#ifndef DIALOG_SCANNERLOG_H #define DIALOG_SCANNERLOG_H #include #include #include class QLabel; namespace Ui { class dialog_log; } enum { INFO_DLG_FLAG_INFO_LIST = 1 << 1, INFO_DLG_FLAG_PROGRESS = 1 << 2 }; enum { LOG_EVENT_DONT_CARE = 0, LOG_EVENT_SCAN_BEGINNING, LOG_EVENT_SCAN_STOPPED, }; class QListWidgetItem; class dialog_log : public QDialog { Q_OBJECT int ind_scanning_; int img_received_; std::string msg_fixed_scanning_; public: explicit dialog_log(QWidget *parent = nullptr); ~dialog_log(); void addLog(const QString &log, bool err, int log_event = LOG_EVENT_DONT_CARE); void updateStatus(bool online, bool isScanning); void image_received_from_scanner(void); public: QPushButton *pbtn_export; signals: void stopScan(); void continueScan(); void exportScanned(); private: void closeEvent(QCloseEvent *event); private slots: void on_cbox_autoScroll_stateChanged(int state); void on_pbtn_stop_clicked(void); void on_pbtn_clear_clicked(); void on_pbtn_export_clicked(); void on_pbtn_continuScan_cliked(); void on_pbtn_finishScan_cliked(); private: Ui::dialog_log *ui; QPushButton *pbtn_stop; QCheckBox *cBox_autoScroll; QPushButton *pbtn_clear; QPushButton *pbtn_continueScan; QPushButton *pbtn_finishScan; }; #endif // DIALOG_SCANNERLOG_H