RabbitCommon v2.2.6
Loading...
Searching...
No Matches
DlgAbout.h
1/*
2Copyright (c) Kang Lin studio, All Rights Reserved
3
4Author:
5 Kang Lin <kl222@126.com>
6
7Module Name:
8
9 DlgAbout.h
10
11Abstract:
12
13 About dialog
14
15 User must install the follow file to install root:
16 ChangeLog: ChangeLog.md or ChangeLog[_locale].md
17 License: License.md or License[_locale].md
18 Authors: Authors.md or Authors[_locale].md
19
20 locale is the language used. eg:
21 Chines language: ChangeLog_zh_CN.md
22 English language: ChangeLog_en.md
23
24 */
25
26#ifndef RABBITCOMMON_DLGABOUT_H
27#define RABBITCOMMON_DLGABOUT_H
28
29#include <QDialog>
30
31#include "rabbitcommon_export.h"
32#include "Download.h"
33
34namespace Ui {
35class CDlgAbout;
36}
37
68class RABBITCOMMON_EXPORT CDlgAbout : public QDialog
69{
70 Q_OBJECT
71
72public:
73 explicit CDlgAbout(QWidget *parent = nullptr);
74 virtual ~CDlgAbout() override;
75
76public:
77 QString m_szAppName;
78 QImage m_AppIcon;
80 QString m_szVersion;
81 QString m_szVersionRevision;
82 QString m_szVersionRevisionUrl;
83 QString m_szArch;
84 QString m_szBuildTime;
85 QString m_szDetails; // The applaction's information append to details dialog
86 QString m_szAuthor;
87 QString m_szEmail;
88 QString m_szHomePage;
89 QString m_szCopyright;
90 QImage m_CopyrightIcon;
91 QString m_szCopyrightTime;
92 QString m_szCopyrightStartTime;
93 QString m_szCopyrightOwner;
94 int SetDonationIcon(const QImage& img);
95
96#if defined(Q_OS_ANDROID)
97protected:
98 virtual bool eventFilter(QObject *watched, QEvent *event) override;
99#endif
100
101protected Q_SLOTS:
102 void on_pbOK_clicked();
103 void on_pbDetails_clicked();
104 void slotDonation(const QPoint &pos);
105 void slotSaveDonation();
106
107 void slotDownloadError(int nErr, const QString szError);
108 void slotDownloadFileFinished(const QString szFile);
109
110private:
111 Ui::CDlgAbout *ui;
112
113 QImage m_DonationIcon;
114 QSharedPointer<RabbitCommon::CDownload> m_Download;
115
116 QString BuildTime();
117 QString Version();
118
119 QWidget* m_pLicense;
120 QWidget* m_pChangeLog;
121 QWidget* m_pThanks;
122 int AppendFile(QWidget *pWidget, const QString &szFile);
123 static QString MarkDownToHtml(const QString &szText);
124 friend class CInformation;
125
126protected:
127 virtual void showEvent(QShowEvent *event) override;
128};
129
130#endif // RABBITCOMMON_DLGABOUT_H
About dialog.
Definition DlgAbout.h:69
QString m_szVersion
The application version, it is different RabbitCommon::CTools::Version()
Definition DlgAbout.h:80