39dbb5df14a35f4ed5d9232636296af465bf62a0
[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 class PoiSettings;
29 class SpeedAlarmSettings;
30
31 class MainMenu : public QDialog
32 {
33     Q_OBJECT
34
35 public:
36     MainMenu(QWidget* parent = 0);
37     void addAction(const QString& text, const QObject* receiver, const char* member);
38
39 signals:
40     void resetTrip();
41     void resetAll();
42     void flip();
43     void themeChanged();
44     void unitChanged();
45
46 private slots:
47     void selectTheme();
48     void selectUnit();
49     void showAbout();
50     void confirmReset();
51     void openPoiAlerts();
52     void openSpeedAlarm();
53
54 private:
55     QVBoxLayout* layout_;
56     int itemCount_;
57     QHBoxLayout* currentRow_;
58     ThemeSelector* themeSelector_;
59     UnitSelector* unitSelector_;
60     PoiSettings* poiSettings_;
61     SpeedAlarmSettings* speedAlarmSettings_;
62     QDialog* aboutDialog_;
63 };
64
65 #endif