1 /*************************************************************************** 2 * Copyright (C) 2004-2021 by Pere Constans 3 * constans@molspaces.com 4 * cb2Bib version 2.0.1. Licensed under the GNU GPL version 3. 5 * See the LICENSE file that comes with this distribution. 6 ***************************************************************************/ 7 #ifndef C2BPDFIMPORT_H 8 #define C2BPDFIMPORT_H 9 10 #include "ui_c2bPdfImport.h" 11 #include <QDialog> 12 13 14 class c2bSettings; 15 16 class c2bPdfImport : public QDialog 17 { 18 19 Q_OBJECT 20 21 public: 22 explicit c2bPdfImport(QWidget* parentw = 0); 23 ~c2bPdfImport(); 24 25 QString processedFile; 26 27 28 public slots: 29 void processNext(); 30 void referenceExtacted(bool status); 31 void show(); 32 void showMessage(const QString& ms); 33 34 35 signals: 36 void fileProcessed(const QString& filename); 37 void saveReferenceRequest(); 38 void setClipboardDisabled(bool disable); 39 void textProcessed(const QString& text); 40 41 42 protected: 43 bool event(QEvent* qevent); 44 void dragEnterEvent(QDragEnterEvent* qevent); 45 void dropEvent(QDropEvent* qevent); 46 47 48 private slots: 49 void abort(); 50 void help(); 51 void loadSettings(); 52 void processOneFile(); 53 void saveSettings(); 54 void selectFiles(); 55 56 57 private: 58 QPushButton* buttonProcess; 59 QPushButton* buttonSelectFiles; 60 Ui::c2bPdfImport ui; 61 bool c2bAutomaticQuery; 62 bool m_aborted; 63 c2bSettings* settings; 64 void processDocument(); 65 }; 66 67 #endif