forked from aeagean/DeployQt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVersionModel.h
57 lines (45 loc) · 1.65 KB
/
VersionModel.h
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
/**********************************************************
Author: Qt君
微信公众号: Qt君(首发)
QQ群: 732271126
Email: 2088201923@qq.com
LICENSE: MIT
**********************************************************/
#ifndef VERSIONMODEL_H
#define VERSIONMODEL_H
#include <QObject>
#include <QProcess>
class VersionModel : public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList qtVersionList READ qtVersionList NOTIFY listChanged)
Q_PROPERTY(QStringList compilerVersionList READ compilerVersionList NOTIFY listChanged)
Q_PROPERTY(QString qtVersion READ qtVersion WRITE setQtVersion NOTIFY statusChanged)
Q_PROPERTY(QString compilerVersion READ compilerVersion WRITE setCompilerVersion NOTIFY statusChanged)
Q_PROPERTY(QString exeFile READ exeFile WRITE setExeFile NOTIFY statusChanged)
public:
VersionModel();
Q_INVOKABLE bool create();
Q_INVOKABLE bool test();
QStringList qtVersionList();
QStringList compilerVersionList();
QString qtVersion();
void setQtVersion(const QString &version);
QString compilerVersion();
void setCompilerVersion(const QString &version);
QString exeFile();
void setExeFile(const QString &file);
signals:
void listChanged();
void statusChanged();
private:
QStringList m_qtVersionList;
QStringList m_compilerVersionList;
QString m_qtVersion;
QString m_qtVersionDirName;
QString m_compilerVersion;
QString m_exeFile;
QString m_sourceEnvPath;
QProcess m_testProcess;
};
#endif // VERSIONMODEL_H