QElectroTech
0.70
|
#include <qetmainwindow.h>
Public Slots | |
void | toggleFullScreen () |
void | updateFullScreenAction () |
void | checkToolbarsmenu () |
Public Member Functions | |
QETMainWindow (QWidget *=nullptr, Qt::WindowFlags=nullptr) | |
~QETMainWindow () override | |
Protected Member Functions | |
void | initCommonActions () |
void | initCommonMenus () |
void | insertMenu (QMenu *, QMenu *, bool=true) |
QAction * | actionForMenu (QMenu *) |
bool | event (QEvent *) override |
void | dragEnterEvent (QDragEnterEvent *e) override |
void | dropEvent (QDropEvent *e) override |
virtual void | firstActivation (QEvent *) |
Protected Attributes | |
QAction * | configure_action_ |
Launch the QElectroTech configuration dialog. More... | |
QAction * | fullscreen_action_ |
Toggle full screen. More... | |
QAction * | whatsthis_action_ |
Toggle "What's this" mode. More... | |
QAction * | about_qet_ |
Launch the "About QElectroTech" dialog. More... | |
QAction * | manual_online_ |
Launch browser on QElectroTech online manual. More... | |
QAction * | youtube_ |
Launch browser on QElectroTech Youtube channel. More... | |
QAction * | upgrade_ |
Launch browser on QElectroTech Windows Nightly builds. More... | |
QAction * | upgrade_M |
Launch browser on QElectroTech MAC_OS_X builds. More... | |
QAction * | donate_ |
Launch browser to donate link. More... | |
QAction * | about_qt_ |
launch the "About Qt" dialog More... | |
QMenu * | settings_menu_ |
Settings menu. More... | |
QMenu * | help_menu_ |
Help menu. More... | |
QMenu * | display_toolbars_ |
Show/hide toolbars/docks. More... | |
QHash< QMenu *, QAction * > | menu_actions_ |
Store actions retrieved when inserting menus. More... | |
bool | first_activation_ |
Used to detect whether the window is activated for the first time. More... | |
This is the base class for the main top-level windows within QElectroTech.
Definition at line 26 of file qetmainwindow.h.
QETMainWindow::QETMainWindow | ( | QWidget * | widget = nullptr , |
Qt::WindowFlags | flags = nullptr |
||
) |
Constructor
Definition at line 34 of file qetmainwindow.cpp.
References initCommonActions(), and initCommonMenus().
|
override |
Destructor
Definition at line 48 of file qetmainwindow.cpp.
|
protected |
Definition at line 187 of file qetmainwindow.cpp.
References menu_actions_.
Referenced by insertMenu().
|
slot |
Check whether a sub menu dedicated to docks and toolbars can be inserted on top of the settings menu.
Definition at line 219 of file qetmainwindow.cpp.
References QET::Icons::ConfigureToolbars, display_toolbars_, fullscreen_action_, insertMenu(), settings_menu_, and QET::Icons::tr.
Referenced by initCommonMenus().
|
overrideprotected |
Accept or refuse drag'n drop events depending on the dropped mime type; especially, accepts only URLs to local files that we could open.
e | le QDragEnterEvent correspondant au drag'n drop tente |
Definition at line 255 of file qetmainwindow.cpp.
References QETApp::handledFiles().
|
overrideprotected |
Handle drops accepted on main windows; more specifically, open dropped files as long as they are handled by QElectrotech.
e | the QDropEvent describing the current drag'n drop |
Definition at line 268 of file qetmainwindow.cpp.
References QETApp::handledFiles(), and QETApp::instance().
|
overrideprotected |
Handle the e event.
Definition at line 233 of file qetmainwindow.cpp.
References first_activation_, firstActivation(), and updateFullScreenAction().
Referenced by QETDiagramEditor::event(), QETTitleBlockTemplateEditor::firstActivation(), and QETElementEditor::firstActivation().
|
protectedvirtual |
Base implementation of firstActivation (does nothing).
Reimplemented in QETElementEditor, and QETTitleBlockTemplateEditor.
Definition at line 246 of file qetmainwindow.cpp.
Referenced by event().
|
protected |
Initialize common actions.
Definition at line 54 of file qetmainwindow.cpp.
References about_qet_, about_qt_, QET::Icons::Configure, configure_action_, QETApp::configureQET(), QETApp::diagramEditors(), donate_, fullscreen_action_, QETApp::instance(), manual_online_, QET::Icons::QETDonate, QET::Icons::QETDownload, QET::Icons::QETLogo, QET::Icons::QETManual, QET::Icons::QETVideo, QET::Icons::QtLogo, toggleFullScreen(), QET::Icons::tr, updateFullScreenAction(), upgrade_, upgrade_M, whatsthis_action_, and youtube_.
Referenced by QETMainWindow().
|
protected |
Initialize common menus.
Definition at line 134 of file qetmainwindow.cpp.
References about_qet_, about_qt_, checkToolbarsmenu(), configure_action_, donate_, fullscreen_action_, help_menu_, insertMenu(), manual_online_, settings_menu_, QET::Icons::tr, upgrade_, upgrade_M, whatsthis_action_, and youtube_.
Referenced by QETMainWindow().
|
protected |
Add menu before before. Unless customize is false, this method also enables some common settings on the inserted menu.
Definition at line 172 of file qetmainwindow.cpp.
References actionForMenu(), and menu_actions_.
Referenced by checkToolbarsmenu(), initCommonMenus(), QETTitleBlockTemplateEditor::initMenus(), QETDiagramEditor::setUpMenu(), and QETElementEditor::setupMenus().
|
slot |
Toggle the window from/to full screen.
Definition at line 194 of file qetmainwindow.cpp.
Referenced by initCommonActions().
|
slot |
Update the look of the full screen action according to the current state of the window.
Definition at line 202 of file qetmainwindow.cpp.
References fullscreen_action_, QET::Icons::FullScreenEnter, QET::Icons::FullScreenExit, and QET::Icons::tr.
Referenced by event(), and initCommonActions().
|
protected |
Launch the "About QElectroTech" dialog.
Definition at line 58 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
launch the "About Qt" dialog
Definition at line 64 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Launch the QElectroTech configuration dialog.
Definition at line 55 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Show/hide toolbars/docks.
Definition at line 67 of file qetmainwindow.h.
Referenced by checkToolbarsmenu().
|
protected |
Launch browser to donate link.
Definition at line 63 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Used to detect whether the window is activated for the first time.
Definition at line 69 of file qetmainwindow.h.
Referenced by event().
|
protected |
Toggle full screen.
Definition at line 56 of file qetmainwindow.h.
Referenced by checkToolbarsmenu(), initCommonActions(), initCommonMenus(), and updateFullScreenAction().
|
protected |
Help menu.
Definition at line 66 of file qetmainwindow.h.
Referenced by initCommonMenus(), and QETDiagramEditor::setUpMenu().
|
protected |
Launch browser on QElectroTech online manual.
Definition at line 59 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Store actions retrieved when inserting menus.
Definition at line 68 of file qetmainwindow.h.
Referenced by actionForMenu(), and insertMenu().
|
protected |
Settings menu.
Definition at line 65 of file qetmainwindow.h.
Referenced by checkToolbarsmenu(), initCommonMenus(), QETTitleBlockTemplateEditor::initMenus(), QETDiagramEditor::setUpMenu(), and QETElementEditor::setupMenus().
|
protected |
Launch browser on QElectroTech Windows Nightly builds.
Definition at line 61 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Launch browser on QElectroTech MAC_OS_X builds.
Definition at line 62 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Toggle "What's this" mode.
Definition at line 57 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().
|
protected |
Launch browser on QElectroTech Youtube channel.
Definition at line 60 of file qetmainwindow.h.
Referenced by initCommonActions(), and initCommonMenus().