blob: 902fccddbe42eeb6360c2ac6b99c9f3c9fa05f2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#pragma once
#include <QObject>
#include <QWidget>
#include <QProgressDialog>
#include "../QObject_unique_ptr.h"
using namespace cli;
class CodeProgressHelper : public QObject {
Q_OBJECT
public:
CodeProgressHelper(QWidget* parentWidget);
void ShowProgressDialog();
void UpdateProgressValue(int percentage);
void HideProgressDialog();
public slots:
void ShowProgressDialogSlot();
void UpdateProgressValueSlot(int percentage);
void HideProgressDialogSlot();
signals:
void ShowProgressDialogSignal();
void UpdateProgressValueSignal(int percentage);
void HideProgressDialogSignal();
private:
QWidget* mParentWidget;
QObject_unique_ptr<QProgressDialog> mProgressDialog;
};
ref class CodeProgress : OMODFramework::ICodeProgress
{
public:
CodeProgress(QWidget* parentWidget) : mParentWidget(parentWidget) { }
virtual void Init(__int64 totalSize, bool compressing);
virtual void SetProgress(__int64 inSize, __int64 outSize);
~CodeProgress();
!CodeProgress();
void setParentWidget(QWidget* parentWidget);
private:
QWidget* mParentWidget;
CodeProgressHelper* mHelper;
__int64 mTotalSize;
int mPercentage;
bool mCompressing;
};
|