RabbitCommon v2.3.3
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
33namespace Ui {
34class CDlgAbout;
35}
36
37namespace RabbitCommon {
38class CDownload;
39}
40
71class RABBITCOMMON_EXPORT CDlgAbout : public QDialog
72{
73 Q_OBJECT
74
75public:
76 explicit CDlgAbout(QWidget *parent = nullptr);
77 virtual ~CDlgAbout() override;
78
79public:
80 QString m_szAppName;
81 QImage m_AppIcon;
83 QString m_szVersion;
84 QString m_szVersionRevision;
85 QString m_szVersionRevisionUrl;
86 QString m_szArch;
87 QString m_szBuildTime;
88 QString m_szDetails; // The applaction's information append to details dialog
89 QString m_szAuthor;
90 QString m_szEmail;
91 QString m_szHomePage;
92 QString m_szCopyright;
93 QImage m_CopyrightIcon;
94 QString m_szCopyrightTime;
95 QString m_szCopyrightStartTime;
96 QString m_szCopyrightOwner;
97 int SetDonationIcon(const QImage& img);
98
99#if defined(Q_OS_ANDROID)
100protected:
101 virtual bool eventFilter(QObject *watched, QEvent *event) override;
102#endif
103
104protected Q_SLOTS:
105 void on_pbOK_clicked();
106 void on_pbDetails_clicked();
107 void slotDonation(const QPoint &pos);
108 void slotSaveDonation();
109
110 void slotDownloadError(int nErr, const QString szError);
111 void slotDownloadFileFinished(const QString szFile);
112
113private:
114 Ui::CDlgAbout *ui;
115
116 QImage m_DonationIcon;
117 QSharedPointer<RabbitCommon::CDownload> m_Download;
118
119 QString BuildTime();
120 QString Version();
121
122 QWidget* m_pLicense;
123 QWidget* m_pChangeLog;
124 QWidget* m_pThanks;
125 int AppendFile(QWidget *pWidget, const QString &szFile, const QString &szTitle);
126 static QString MarkDownToHtml(const QString &szText);
127 friend class CInformation;
128
129protected:
130 virtual void showEvent(QShowEvent *event) override;
131};
132
133#endif // RABBITCOMMON_DLGABOUT_H
About dialog.
Definition DlgAbout.h:72
QString m_szVersion
The application version, it is different RabbitCommon::CTools::Version()
Definition DlgAbout.h:83