1 #ifndef IMPORT_COMICS_INFO_DIALOG_H 2 #define IMPORT_COMICS_INFO_DIALOG_H 3 4 #include <QDialog> 5 #include <QDialog> 6 #include <QLabel> 7 #include <QLineEdit> 8 #include <QPushButton> 9 #include <QProgressBar> 10 #include <QThread> 11 12 class Importer : public QThread 13 { 14 public: 15 QString source; 16 QString dest; 17 18 private: 19 void run() override; 20 }; 21 22 class ImportComicsInfoDialog : public QDialog 23 { 24 Q_OBJECT 25 26 public: 27 ImportComicsInfoDialog(QWidget *parent = nullptr); 28 ~ImportComicsInfoDialog(); 29 QString dest; 30 31 private: 32 QLabel *nameLabel; 33 QLabel *textLabel; 34 QLabel *destLabel; 35 QLineEdit *path; 36 QLineEdit *destPath; 37 QLineEdit *nameEdit; 38 QPushButton *find; 39 QPushButton *findDest; 40 QPushButton *accept; 41 QPushButton *cancel; 42 QLabel *progress; 43 void setupUI(); 44 int progressCount; 45 QProgressBar *progressBar; 46 47 public slots: 48 void findPath(); 49 void import(); 50 void close(); 51 }; 52 53 #endif // IMPORT_COMICS_INFO_DIALOG_H 54