OSDN Git Service

Updated Simplified Chinese translation, thanks to Hongchuan Zhuang <kidneybean@sohu...
[lamexp/LameXP.git] / src / Dialog_About.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU GENERAL PUBLIC LICENSE as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version; always including the non-optional
9 // LAMEXP GNU GENERAL PUBLIC LICENSE ADDENDUM. See "License.txt" file!
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 //
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #pragma once
24
25 #include <QDialog>
26
27 //UIC forward declartion
28 namespace Ui {
29         class AboutDialog;
30 }
31
32 //Class declarations
33 class QLabel;
34 class QPixmap;
35 class QTimer;
36 class QElapsedTimer;
37 class SettingsModel;
38
39 //AboutDialog class
40 class AboutDialog : public QDialog
41 {
42         Q_OBJECT
43
44 public:
45         AboutDialog(SettingsModel *settings, QWidget *parent = 0, bool firstStart = false);
46         ~AboutDialog(void);
47
48         static const char *neroAacUrl, *disqueUrl;
49
50 public slots:
51         int exec();
52         void enableButtons(void);
53         void openURL(const QString &url);
54         void gotoLicenseTab(void);
55         void showAboutQt(void);
56         void moveDisque(void);
57         void tabChanged(int index, const bool silent = false);
58         void adjustSize(void);
59         void geometryUpdated(void);
60
61 protected:
62         virtual void showEvent(QShowEvent *e);
63         virtual void closeEvent(QCloseEvent *e);
64         bool eventFilter(QObject *obj, QEvent *event);
65
66 private:
67         Ui::AboutDialog *ui; //for Qt UIC
68
69         const bool m_firstStart;
70         SettingsModel *const m_settings;
71         QScopedPointer<QMap<QWidget*,bool>> m_initFlags;
72         int m_lastTab;
73         
74         QScopedPointer<QLabel> m_disque;
75         QScopedPointer<QTimer> m_disqueTimer;
76         bool m_disqueFlags[2];
77         QPoint m_disquePos;
78         QRect m_disqueBound;
79         double m_discOpacity;
80         bool m_rotateNext;
81         QScopedPointer<QElapsedTimer> m_disqueDelay;
82         QScopedPointer<QPixmap> m_cartoon[4];
83
84         void initInformationTab(void);
85         void initContributorsTab(void);
86         void initSoftwareTab(void);
87         void initLicenseTab(void);
88
89         QString makeToolText(const QString &toolName, const QString &toolBin, const QString &toolVerFmt, const QString &toolLicense, const QString &toolWebsite, const QString &extraInfo = QString());
90 };