QElectroTech  0.8-dev
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QETMainWindow Class Reference

#include <qetmainwindow.h>

Inheritance diagram for QETMainWindow:
Inheritance graph
Collaboration diagram for QETMainWindow:
Collaboration graph

Public Slots

void toggleFullScreen ()
 
void updateFullScreenAction ()
 
void checkToolbarsmenu ()
 

Public Member Functions

 QETMainWindow (QWidget *=nullptr, Qt::WindowFlags=Qt::Widget)
 
 ~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...
 

Detailed Description

This is the base class for the main top-level windows within QElectroTech.

Constructor & Destructor Documentation

◆ QETMainWindow()

QETMainWindow::QETMainWindow ( QWidget *  widget = nullptr,
Qt::WindowFlags  flags = Qt::Widget 
)

Constructor

Here is the call graph for this function:

◆ ~QETMainWindow()

QETMainWindow::~QETMainWindow ( )
override

Destructor

Member Function Documentation

◆ actionForMenu()

QAction * QETMainWindow::actionForMenu ( QMenu *  menu)
protected
Returns
the action returned when inserting menu
Here is the caller graph for this function:

◆ checkToolbarsmenu

void QETMainWindow::checkToolbarsmenu ( )
slot

Check whether a sub menu dedicated to docks and toolbars can be inserted on top of the settings menu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dragEnterEvent()

void QETMainWindow::dragEnterEvent ( QDragEnterEvent *  e)
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.

Parameters
ele QDragEnterEvent correspondant au drag'n drop tente
Here is the call graph for this function:

◆ dropEvent()

void QETMainWindow::dropEvent ( QDropEvent *  e)
overrideprotected

Handle drops accepted on main windows; more specifically, open dropped files as long as they are handled by QElectrotech.

Parameters
ethe QDropEvent describing the current drag'n drop
Here is the call graph for this function:

◆ event()

bool QETMainWindow::event ( QEvent *  e)
overrideprotected

Handle the e event.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ firstActivation()

void QETMainWindow::firstActivation ( QEvent *  )
protectedvirtual

Base implementation of firstActivation (does nothing).

Reimplemented in QETElementEditor, and QETTitleBlockTemplateEditor.

Here is the caller graph for this function:

◆ initCommonActions()

void QETMainWindow::initCommonActions ( )
protected

Initialize common actions.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initCommonMenus()

void QETMainWindow::initCommonMenus ( )
protected

Initialize common menus.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertMenu()

void QETMainWindow::insertMenu ( QMenu *  before,
QMenu *  menu,
bool  customize = true 
)
protected

Add menu before before. Unless customize is false, this method also enables some common settings on the inserted menu.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toggleFullScreen

void QETMainWindow::toggleFullScreen ( )
slot

Toggle the window from/to full screen.

◆ updateFullScreenAction

void QETMainWindow::updateFullScreenAction ( )
slot

Update the look of the full screen action according to the current state of the window.

Here is the caller graph for this function:

Member Data Documentation

◆ about_qet_

QAction* QETMainWindow::about_qet_
protected

Launch the "About QElectroTech" dialog.

◆ about_qt_

QAction* QETMainWindow::about_qt_
protected

launch the "About Qt" dialog

◆ configure_action_

QAction* QETMainWindow::configure_action_
protected

Launch the QElectroTech configuration dialog.

◆ display_toolbars_

QMenu* QETMainWindow::display_toolbars_
protected

Show/hide toolbars/docks.

◆ donate_

QAction* QETMainWindow::donate_
protected

Launch browser to donate link.

◆ first_activation_

bool QETMainWindow::first_activation_
protected

Used to detect whether the window is activated for the first time.

◆ fullscreen_action_

QAction* QETMainWindow::fullscreen_action_
protected

Toggle full screen.

◆ help_menu_

QMenu* QETMainWindow::help_menu_
protected

Help menu.

◆ manual_online_

QAction* QETMainWindow::manual_online_
protected

Launch browser on QElectroTech online manual.

◆ menu_actions_

QHash<QMenu *, QAction *> QETMainWindow::menu_actions_
protected

Store actions retrieved when inserting menus.

◆ settings_menu_

QMenu* QETMainWindow::settings_menu_
protected

Settings menu.

◆ upgrade_

QAction* QETMainWindow::upgrade_
protected

Launch browser on QElectroTech Windows Nightly builds.

◆ upgrade_M

QAction* QETMainWindow::upgrade_M
protected

Launch browser on QElectroTech MAC_OS_X builds.

◆ whatsthis_action_

QAction* QETMainWindow::whatsthis_action_
protected

Toggle "What's this" mode.

◆ youtube_

QAction* QETMainWindow::youtube_
protected

Launch browser on QElectroTech Youtube channel.


The documentation for this class was generated from the following files: