test
[push-it] / src / aboutdialog.hpp
1 /*
2     Copyright (C) <2010>  <Markus Scharnowski markus.scharnowski@gmail.com>
3
4     This program is free software: you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation, either version 3 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 #ifndef ABOUTDIALOG_HPP
18 #define ABOUTDIALOG_HPP
19
20 #include <QTextBrowser>
21 #include <QDialog>
22 #include <QTranslator>
23 #include <QTabWidget>
24
25 class AboutDialog : public QDialog
26 {
27   Q_OBJECT
28
29 public:
30   explicit AboutDialog(QString name = "", QString customUrl = "", QWidget *parent = 0);
31   ~AboutDialog();
32   int setProgramName(QString name);
33   int setProgramUrl(QString url);
34   int setGeneralHtmlText(QString htmlText = "");
35   int setDonateHtmlText(QString htmlText = "");
36   int setWebsiteHtmlText(QString htmlText = "");
37   int setFeedbackHtmlText(QString htmlText = "");
38   QTabWidget *tabs;
39
40 private:
41   int refreshDefaultTexts();
42
43   QTextBrowser *browserGeneral;
44   QTextBrowser *browserDonate;
45   QTextBrowser *browserWebsite;
46   QTextBrowser *browserFeedback;
47
48   QString textGeneral;
49   QString textDonate;
50   QString textFeedback;
51   QString textWebsite;
52
53   QString programName;
54   QString programUrl;
55 };
56
57 #endif // ABOUTDIALOG_HPP