Added altitude display to detail screen. Added option to disable auto rotation.
[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     void orientationChanged();
46
47 private slots:
48     void selectTheme();
49     void selectUnit();
50     void showAbout();
51     void confirmReset();
52     void openPoiAlerts();
53     void openSpeedAlarm();
54
55 private:
56     QVBoxLayout* layout_;
57     int itemCount_;
58     QHBoxLayout* currentRow_;
59     ThemeSelector* themeSelector_;
60     UnitSelector* unitSelector_;
61     PoiSettings* poiSettings_;
62     SpeedAlarmSettings* speedAlarmSettings_;
63     QDialog* aboutDialog_;
64 };
65
66 #endif