QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
qetmainwindow.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef QET_MAIN_WINDOW_H
19#define QET_MAIN_WINDOW_H
20#include <QMainWindow>
21#include <QHash>
26class QETMainWindow : public QMainWindow {
27 Q_OBJECT
28
29 // constructor, destructor
30 public:
31 QETMainWindow(QWidget * = nullptr, Qt::WindowFlags = Qt::Widget);
32 ~QETMainWindow() override;
33
34 // methods
35 protected:
36 void initCommonActions();
37 void initCommonMenus();
38 void insertMenu(QMenu *, QMenu *, bool = true);
39 QAction *actionForMenu(QMenu *);
40
41 protected:
42 bool event(QEvent *) override;
43 void dragEnterEvent(QDragEnterEvent *e) override;
44 void dropEvent(QDropEvent *e) override;
45 virtual void firstActivation(QEvent *);
46
47 // slots
48 public slots:
49 void toggleFullScreen();
51 void checkToolbarsmenu();
52
53 // attributes
54 protected:
58 QAction *about_qet_;
59 QAction *manual_online_;
60 QAction *youtube_;
61 QAction *upgrade_;
62 QAction *upgrade_M;
63 QAction *donate_;
64 QAction *about_qt_;
66 QMenu *help_menu_;
68 QHash<QMenu *, QAction *> menu_actions_;
70};
71#endif
Definition qetmainwindow.h:26
void initCommonMenus()
Definition qetmainwindow.cpp:143
void dropEvent(QDropEvent *e) override
Definition qetmainwindow.cpp:281
QAction * about_qet_
Launch the "About QElectroTech" dialog.
Definition qetmainwindow.h:58
QAction * donate_
Launch browser to donate link.
Definition qetmainwindow.h:63
QMenu * help_menu_
Help menu.
Definition qetmainwindow.h:66
void checkToolbarsmenu()
Definition qetmainwindow.cpp:231
void toggleFullScreen()
Definition qetmainwindow.cpp:204
void dragEnterEvent(QDragEnterEvent *e) override
Definition qetmainwindow.cpp:268
QMenu * display_toolbars_
Show/hide toolbars/docks.
Definition qetmainwindow.h:67
void updateFullScreenAction()
Definition qetmainwindow.cpp:213
virtual void firstActivation(QEvent *)
Definition qetmainwindow.cpp:259
QAction * upgrade_M
Launch browser on QElectroTech MAC_OS_X builds.
Definition qetmainwindow.h:62
void initCommonActions()
Definition qetmainwindow.cpp:55
QAction * actionForMenu(QMenu *)
Definition qetmainwindow.cpp:197
QAction * whatsthis_action_
Toggle "What's this" mode.
Definition qetmainwindow.h:57
bool first_activation_
Used to detect whether the window is activated for the first time.
Definition qetmainwindow.h:69
QAction * configure_action_
Launch the QElectroTech configuration dialog.
Definition qetmainwindow.h:55
void insertMenu(QMenu *, QMenu *, bool=true)
Definition qetmainwindow.cpp:182
QMenu * settings_menu_
Settings menu.
Definition qetmainwindow.h:65
~QETMainWindow() override
Definition qetmainwindow.cpp:48
QAction * about_qt_
launch the "About Qt" dialog
Definition qetmainwindow.h:64
QAction * youtube_
Launch browser on QElectroTech Youtube channel.
Definition qetmainwindow.h:60
bool event(QEvent *) override
Definition qetmainwindow.cpp:246
QAction * upgrade_
Launch browser on QElectroTech Windows Nightly builds.
Definition qetmainwindow.h:61
QAction * manual_online_
Launch browser on QElectroTech online manual.
Definition qetmainwindow.h:59
QHash< QMenu *, QAction * > menu_actions_
Store actions retrieved when inserting menus.
Definition qetmainwindow.h:68
QAction * fullscreen_action_
Toggle full screen.
Definition qetmainwindow.h:56