1 /*************************************************************************** 2 * * 3 * This program is free software; you can redistribute it and/or modify * 4 * it under the terms of the GNU General Public License as published by * 5 * the Free Software Foundation; either version 3 of the License, or * 6 * (at your option) any later version. * 7 * * 8 ***************************************************************************/ 9 10 #pragma once 11 12 #include <QDialog> 13 #include <QTimer> 14 #include <QLabel> 15 #include <QProgressBar> 16 17 #include "ui_UIHashProgressDialog.h" 18 19 class HashProgress : 20 public QDialog, 21 private Ui::UIHashDialog 22 { 23 Q_OBJECT 24 public: 25 HashProgress(QWidget* = NULL); 26 virtual ~HashProgress(); 27 enum { IDLE, RUNNING, LISTUPDATE, PAUSED, DELAYED }; 28 static unsigned getHashStatus(); 29 float getProgress(); 30 31 public slots: 32 void slotAutoClose(bool); 33 void resetProgress(); 34 35 private slots: 36 void timerTick(); 37 void slotStart(); 38 void stateButton(); 39 40 private: 41 QTimer *timer; 42 43 bool autoClose; 44 qint64 startBytes; 45 size_t startFiles; 46 qint32 startTime; 47 }; 48