1
0
mirror of https://github.com/jaredtao/TaoQuick.git synced 2025-01-19 20:22:56 +08:00

101 lines
3.0 KiB
C
Raw Normal View History

2020-07-05 02:12:59 +08:00
#pragma once
#include <QObject>
#include <QString>
2020-10-22 23:12:00 +08:00
#include <QQmlContext>
class AppInfo : public QObject
2020-07-05 02:12:59 +08:00
{
Q_OBJECT
Q_PROPERTY(QString appName READ appName WRITE setAppName NOTIFY appNameChanged)
Q_PROPERTY(QString appVersion READ appVersion WRITE setAppVersion NOTIFY appVersionChanged)
2020-10-24 12:11:53 +08:00
Q_PROPERTY(QString latestVersion READ latestVersion WRITE setLatestVersion NOTIFY
latestVersionChanged)
Q_PROPERTY(QString buildDateTime READ buildDateTime WRITE setBuildDateTime NOTIFY
buildDateTimeChanged)
Q_PROPERTY(QString buildRevision READ buildRevision WRITE setBuildRevision NOTIFY
buildRevisionChanged)
2020-07-05 02:12:59 +08:00
Q_PROPERTY(QString copyRight READ copyRight WRITE setCopyRight NOTIFY copyRightChanged)
Q_PROPERTY(QString descript READ descript WRITE setDescript NOTIFY descriptChanged)
2020-10-24 12:11:53 +08:00
Q_PROPERTY(QString compilerVendor READ compilerVendor WRITE setCompilerVendor NOTIFY
compilerVendorChanged)
2020-07-05 02:12:59 +08:00
Q_PROPERTY(bool splashShow READ splashShow WRITE setSplashShow NOTIFY splashShowChanged)
public:
explicit AppInfo(QObject *parent = nullptr);
public:
2020-10-24 12:11:53 +08:00
void beforeUiReady(QQmlContext *ctx);
void afterUiReady();
const QString &appName() const { return m_appName; }
const QString &appVersion() const { return m_appVersion; }
const QString &latestVersion() const { return m_latestVersion; }
const QString &buildDateTime() const { return m_buildDateTime; }
const QString &buildRevision() const { return m_buildRevision; }
const QString &copyRight() const { return m_copyRight; }
const QString &descript() const { return m_descript; }
const QString &compilerVendor() const { return m_compilerVendor; }
bool splashShow() const { return m_splashShow; }
2020-07-05 02:12:59 +08:00
public slots:
2020-10-24 12:11:53 +08:00
void setAppName(const QString &appName);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setAppVersion(const QString &appVersion);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setLatestVersion(const QString &latestVersion);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setBuildDateTime(const QString &buildDateTime);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setBuildRevision(const QString &buildRevision);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setCopyRight(const QString &copyRight);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setDescript(const QString &descript);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void setCompilerVendor(const QString &compilerVendor);
2020-07-05 02:12:59 +08:00
void setSplashShow(bool splashShow);
signals:
2020-10-24 12:11:53 +08:00
void appNameChanged(const QString &appName);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void appVersionChanged(const QString &appVersion);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void latestVersionChanged(const QString &latestVersion);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void buildDateTimeChanged(const QString &buildDateTime);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void buildRevisionChanged(const QString &buildRevision);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void copyRightChanged(const QString &copyRight);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void descriptChanged(const QString &descript);
2020-07-05 02:12:59 +08:00
2020-10-24 12:11:53 +08:00
void compilerVendorChanged(const QString &compilerVendor);
2020-07-05 02:12:59 +08:00
void splashShowChanged(bool splashShow);
protected:
private:
QString m_appName;
QString m_appVersion;
QString m_latestVersion;
QString m_buildDateTime;
QString m_buildRevision;
QString m_copyRight;
QString m_descript;
QString m_compilerVendor;
2020-11-06 19:48:40 +08:00
bool m_splashShow = false;
2020-07-05 02:12:59 +08:00
};