44e8b0c3f56820eaf2339e63414dfb9dd99716c7
[jspeed] / src / mainmenu.h
1 /*
2  * This file is part of jSpeed.
3  *
4  * jSpeed 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  * jSpeed 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 jSpeed.  If not, see <http://www.gnu.org/licenses/>.
16  *
17  */
18
19 #ifndef MAINMENU_H
20 #define MAINMENU_H
21
22 #include <QtGui/QDialog>
23
24 class QVBoxLayout;
25 class QHBoxLayout;
26 class ThemeSelector;
27 class UnitSelector;
28
29 class MainMenu : public QDialog
30 {
31     Q_OBJECT
32
33 public:
34     MainMenu(QWidget* parent = 0);
35     void addAction(const QString& text, const QObject* receiver, const char* member);
36
37 signals:
38     void resetTrip();
39     void resetAll();
40     void flip();
41     void themeChanged();
42     void unitChanged();
43
44 private slots:
45     void selectTheme();
46     void selectUnit();
47     void showAbout();
48     void confirmReset();
49
50 private:
51     QVBoxLayout* layout_;
52     int itemCount_;
53     QHBoxLayout* currentRow_;
54     ThemeSelector* themeSelector_;
55     UnitSelector* unitSelector_;
56     QDialog* aboutDialog_;
57 };
58
59 #endif