Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
menuwidget.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // menuwidget.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-2012
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef XMENUWIDGET_H
10 #define XMENUWIDGET_H
11 
12 #include <QTimer>
13 
14 
15 #include <QWidget>
16 #include <QLabel>
17 #include <QAction>
18 #include <QMenu>
19 #include <QMenuBar>
20 #include <QLabel>
21 #include <QWidgetAction>
22 
24 
25 #include "xobjects/mainobject.h"
26 class MainObject;
27 
28 
29 class MenuWidget : public QWidget
30 {
31 Q_OBJECT
32 public:
33  explicit MenuWidget(MainObject *mob, QWidget *parent = 0);
34 
36  bool debug_mode;
37 
39 
40  // Some kind of placeholder
41  QHBoxLayout *menuLayout;
42 
43  // Menubar
44  QMenuBar *mainMenu;
45 
46  // Menus
48  QMenu *modeMenu;
49  QMenu *profileMenu;
50 
51  QMenu *helpMenu;
53  QMenu *helpFGxGroup;
54 
55  // Menu Actions
56  QAction *quitAction;
57  QAction *logWindowAction;
60 
61  QAction *debugmodeAction;
62 
67 
68  QAction *urlActionWiki;
69  QAction *urlActionForums;
71 
72 signals:
73  void on_debug_mode(bool enabled);
74 
75 public slots:
76  void on_menu_quit();
77  void on_show_log_window();
78  void on_show_debug_window();
79  void on_show_props_window();
80 
81  void on_menu_debug_mode();
82 
83  void on_menu_load_profile();
84  void on_menu_save_profile();
85  void on_menu_reset_profile();
87 
88  void on_menu_url_wiki();
89  void on_menu_url_forums();
90 
92  void on_menu_fgx_github();
93  void on_menu_fgx_www();
94  void on_menu_fgx_issues();
95 
98 
99 };
100 
101 #endif // XMENUWIDGET_H
MainObject * mainObject
Definition: menuwidget.h:38
QMenu * applicationMenu
Definition: menuwidget.h:47
QAction * debugmodeAction
Definition: menuwidget.h:61
void on_menu_url_forums()
Definition: menuwidget.cpp:276
void on_show_log_window()
Definition: menuwidget.cpp:178
QMenu * profileMenu
Definition: menuwidget.h:49
MenuWidget(MainObject *mob, QWidget *parent=0)
Definition: menuwidget.cpp:27
void on_menu_save_profile()
Definition: menuwidget.cpp:232
The XSettings is an extended QSetttings, but also includes most to the FGx configuration.
Definition: xsettings.h:15
QAction * defaultProfileAction
Definition: menuwidget.h:66
QAction * saveProfileAction
Definition: menuwidget.h:64
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
void on_menu_reset_profile()
Definition: menuwidget.cpp:248
QAction * propsWindowAction
Definition: menuwidget.h:59
QAction * urlActionFGxUserHelp
Definition: menuwidget.h:70
QAction * debugWindowAction
Definition: menuwidget.h:58
void on_menu_fgx_github()
Definition: menuwidget.cpp:293
void on_menu_fgx_version_info()
Definition: menuwidget.cpp:300
QAction * resetProfileAction
Definition: menuwidget.h:65
void on_menu_qt_version_info()
Definition: menuwidget.cpp:306
void on_show_debug_window()
Definition: menuwidget.cpp:188
void on_menu_url_wiki()
Definition: menuwidget.cpp:270
QHBoxLayout * menuLayout
Definition: menuwidget.h:41
void on_menu_fgx_user_forums()
Definition: menuwidget.cpp:282
XSettings * settings
Definition: menuwidget.h:35
bool debug_mode
Definition: menuwidget.h:36
QMenu * helpFGxGroup
Definition: menuwidget.h:53
QAction * loadProfileAction
Definition: menuwidget.h:63
void on_show_props_window()
Definition: menuwidget.cpp:198
QMenuBar * mainMenu
Definition: menuwidget.h:44
QAction * logWindowAction
Definition: menuwidget.h:57
void on_menu_default_profile()
Definition: menuwidget.cpp:259
void on_menu_load_profile()
Definition: menuwidget.cpp:217
QMenu * modeMenu
Definition: menuwidget.h:48
QMenu * helpFlightGearGroup
Definition: menuwidget.h:52
QMenu * helpMenu
Definition: menuwidget.h:51
void on_menu_fgx_www()
Definition: menuwidget.cpp:287
QAction * urlActionForums
Definition: menuwidget.h:69
void on_menu_debug_mode()
Definition: menuwidget.cpp:208
void on_menu_fgx_issues()
Definition: menuwidget.cpp:290
QAction * urlActionWiki
Definition: menuwidget.h:68
void on_menu_quit()
Definition: menuwidget.cpp:171
void on_debug_mode(bool enabled)
QAction * quitAction
Definition: menuwidget.h:56
The MenuWidget is the top part of the LauncherWindow.
Definition: menuwidget.h:29