OSDN Git Service

Improved Russian & Spanish translations for the installer
[lamexp/LameXP.git] / src / Dialog_About.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2015 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, but always including the *additional*
9 // restrictions defined in the "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         bool m_firstShow;
70         SettingsModel *m_settings;
71         QMap<QWidget*,bool> *m_initFlags;
72         int m_lastTab;
73         
74         QLabel *m_disque;
75         QTimer * m_disqueTimer;
76         bool m_disqueFlags[2];
77         QPoint m_disquePos;
78         QRect m_disqueBound;
79         double m_discOpacity;
80         QPixmap *m_cartoon[4];
81         bool m_rotateNext;
82         QScopedPointer<QElapsedTimer> m_disqueDelay;
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 };