.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
FileProgressDialog.h
1 // FileProgressDialog.h - FileProgressDialog class declaration.
2 // Written By Jesse Z. Zhong
3 #ifndef __File_Progress_Dialog_H__
4 #define __File_Progress_Dialog_H__
5 #pragma region Includes
6 #include <QProgressDialog>
7 #include "Utilities.h"
8 #pragma endregion
9 namespace DataVisualizerGUI {
14  class FileProgressDialog : public QObject {
15  Q_OBJECT
16 
18  static const int ProgressMaxWidth;
19 
21  static const QString LoadingFilesStr;
22 
24  static const QString StopLoadingStr;
25  public:
33  FileProgressDialog(int numberOfFiles, QWidget* parent = NULL);
34 
39 
40  public slots:
44  void Increment();
45 
49  void Complete();
50 
51  signals:
55  void Incremented(int value);
56 
60  void Incremented(const QString& message);
61 
62  protected:
64  QProgressDialog* ProgressDialog_;
65 
71 
73  friend class FileProgressDialogTest;
74  };
75 }
76 
77 #endif // !__File_Progress_Dialog_H__
QProgressDialog * ProgressDialog_
Instance of a dialog box with a progress bar.
Definition: FileProgressDialog.h:64
void Incremented(int value)
Indicates that the current value has been incremented up.
void Increment()
Increment the current value of the progress bar up by one.
Definition: FileProgressDialog.cpp:53
~FileProgressDialog()
Destructor.
Definition: FileProgressDialog.cpp:44
FileProgressDialog(int numberOfFiles, QWidget *parent=NULL)
Constructor.
Definition: FileProgressDialog.cpp:11
friend class FileProgressDialogTest
Allow the class unit test to have access to the progress dialog.
Definition: FileProgressDialog.h:73
int CurrentProgress_
Current progress value. NOTE: Maintaining a counter here avoids race conditions that will occur when ...
Definition: FileProgressDialog.h:70
void Complete()
Sets the progress bar to full/complete.
Definition: FileProgressDialog.cpp:72
This class is a wrapper of QProgressDialog with specialized methods for updating the displayed values...
Definition: FileProgressDialog.h:14