This repository was archived by the owner on Jun 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +81
-0
lines changed Expand file tree Collapse file tree 4 files changed +81
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ SET( UI_FILES
152
152
153
153
Widgets/ExpandableDlg.ui
154
154
Widgets/ProgressDlg.ui
155
+
156
+ Widgets/ProgressWdgt.ui
155
157
)
156
158
157
159
SET ( HID_FILES
Original file line number Diff line number Diff line change 1
1
2
2
#include " ProgressDlg.hpp"
3
3
#include " ui_ProgressDlg.h"
4
+ #include " ui_ProgressWdgt.h"
4
5
5
6
#include < QStringBuilder>
6
7
#include < QCloseEvent>
7
8
#include < QDebug>
8
9
#include < QPushButton>
9
10
#include < QString>
10
11
12
+ namespace Private
13
+ {
14
+
15
+ class ProgressWdgt : public QWidget , public Ui ::ProgressWdgt
16
+ {
17
+ public:
18
+ typedef QMap< QString, QPointer<ProgressWdgt> > Steps;
19
+
20
+ enum Status { Running = 0 , Stopped };
21
+
22
+ public:
23
+ ProgressWdgt (const QString& description)
24
+ {
25
+ setupUi (this );
26
+ progressBar->setMinimum (0 );
27
+ progressBar->setMaximum (100 );
28
+ txtHeader->setText ( description );
29
+ }
30
+
31
+ public:
32
+ Steps mSteps ;
33
+ Status mStatus = Running;
34
+
35
+ qreal mPercentage = 0 .;
36
+ };
37
+
38
+ }
39
+
11
40
12
41
ProgressDlg::ProgressDlg ()
13
42
: BlueSky::Dialog()
Original file line number Diff line number Diff line change 4
4
#include " libMacGitverCore/MacGitverApi.hpp"
5
5
#include " libBlueSky/Dialog.hpp"
6
6
7
+ #include < QMap>
8
+ #include < QPointer>
9
+
10
+ namespace Private
11
+ {
12
+ class ProgressWdgt ;
13
+ };
14
+
7
15
namespace Ui
8
16
{
9
17
class ProgressDlg ;
@@ -12,6 +20,10 @@ namespace Ui
12
20
class MGV_CORE_API ProgressDlg : public BlueSky::Dialog
13
21
{
14
22
Q_OBJECT
23
+
24
+ public:
25
+ typedef QMap< QPointer<QObject>, QPointer<Private::ProgressWdgt> > Activities;
26
+
15
27
public:
16
28
ProgressDlg ();
17
29
~ProgressDlg ();
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <ui version =" 4.0" >
3
+ <class >ProgressWdgt</class >
4
+ <widget class =" QWidget" name =" ProgressWdgt" >
5
+ <property name =" geometry" >
6
+ <rect >
7
+ <x >0</x >
8
+ <y >0</y >
9
+ <width >448</width >
10
+ <height >83</height >
11
+ </rect >
12
+ </property >
13
+ <property name =" windowTitle" >
14
+ <string >Progress</string >
15
+ </property >
16
+ <layout class =" QVBoxLayout" name =" verticalLayout" >
17
+ <item >
18
+ <widget class =" QLabel" name =" txtHeader" >
19
+ <property name =" text" >
20
+ <string >Progress:</string >
21
+ </property >
22
+ </widget >
23
+ </item >
24
+ <item >
25
+ <widget class =" QProgressBar" name =" progressBar" />
26
+ </item >
27
+ <item >
28
+ <widget class =" QLabel" name =" txtStatusInfo" >
29
+ <property name =" text" >
30
+ <string >Not started...</string >
31
+ </property >
32
+ </widget >
33
+ </item >
34
+ </layout >
35
+ </widget >
36
+ <resources />
37
+ <connections />
38
+ </ui >
You can’t perform that action at this time.
0 commit comments