LibEngsas
|
Mostly the same as EWidget but for QDialog as base class. More...
#include <edialog.h>
Public Slots | |
virtual void | reloadSettings () |
Used to reload settings the settings. More... | |
Signals | |
void | error (const QString &message) |
void | warning (const QString &message) |
void | information (const QString &message) |
void | reloadEnableActions () |
Request reloading of enabled actions in EMainWindow. More... | |
void | addMenu (QMenu *newMenu, const QString &parent, QString before=QString()) |
void | addAction (QAction *newAction, const QString &parent, QString before=QString()) |
void | addToolBar (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
void | addNewDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area) |
void | setCentralWidget (QWidget *centralWidget) |
void | showSettings () |
void | showHelp (const QString &page) |
void | showStatusWidget (QWidget *widget) |
void | reloadSettingsRequest () |
Indicates, that a reload of the settings is needed. More... | |
void | doReloadSettings () |
Emitted to bring the reload request back to the farest child. More... | |
Public Member Functions | |
EDialog (QString objName, QWidget *parent=0, Qt::WindowFlags flags=0) | |
Creates a EDialog instance with objectName() set to objName . More... | |
EDialog (QWidget *parent=0, Qt::WindowFlags flags=0) | |
virtual | ~EDialog () |
void | setWindowTitle (const QString &title) |
Sets the window title and prepends the QApplication::applicationName(). More... | |
void | setObjectName (const QString &name) |
Set's the objectname and calls loadGeometry() afterwards. More... | |
void | loadGeometry () |
Can be called to restore geometry of this object. More... | |
void | connectByPass (QObject *object) |
Connects all standard signals. More... | |
Protected Slots | |
virtual void | errorByPass (const QString &message) |
virtual void | warningByPass (const QString &message) |
virtual void | informationByPass (const QString &message) |
virtual void | reloadEnableActionsByPass () |
virtual void | addMenuByPass (QMenu *newMenu, const QString &parent, QString before=QString()) |
virtual void | addActionByPass (QAction *newAction, const QString &parent, QString before=QString()) |
virtual void | addToolBarByPass (QToolBar *newToolBar, Qt::ToolBarArea area=Qt::TopToolBarArea) |
virtual void | addNewDockWidgetByPass (QDockWidget *widget, const Qt::DockWidgetArea &area) |
virtual void | setCentralWidgetByPass (QWidget *centralWidget) |
virtual void | showSettingsByPass () |
virtual void | showHelpByPass (const QString &page) |
virtual void | showStatusWidgetByPass (QWidget *widget) |
virtual void | reloadSettingsRequestByPass () |
void | setHelp (QString page, EPushButton *helpButton=0) |
Call this function to setup helpButton as a help button. More... | |
Protected Member Functions | |
QString | helpPage () |
void | closeEvent (QCloseEvent *event) |
Private Slots | |
void | help () |
Private Member Functions | |
void | init () |
Private Attributes | |
QString | myHelpPage |
Mostly the same as EWidget but for QDialog as base class.
The paragraph below is not working, because the QMetaObject represents the base class. Not the subclass. It provides all needed standard functions. It sets the window title correctly and restores and saves the geometry if the objectName() is not empty. To achieve this, it sets the objectName() to ClassName with a lowered first character (e.g.: MyEDialogSubClass gets the objectName() myEDialogSubclass) in the constructor. Therefore you can override it in your constructor without any problems, but in most cases the default name is enough.
If you use the EHelpCenter also, you may want to setup a help button in the dialog. You can do this by calling setHelp(). This connects the button with appropriate signals and also sets the name and icon of the button.
EDialog::EDialog | ( | QString | objName, |
QWidget * | parent = 0 , |
||
Qt::WindowFlags | flags = 0 |
||
) |
Creates a EDialog instance with objectName() set to objName
.
This is the constructor you normaly want to use, to make sure loading and saving geometry is working.
EDialog::EDialog | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | flags = 0 |
||
) |
|
inlinevirtual |
|
signal |
Adds the action newAction
to the main window. It is added to an existing menu with QObject::objectName() parent
before the action or menu with object name before
. If before
is empty, it is appended at the bottom.
|
inlineprotectedvirtualslot |
|
signal |
Allows to add menu newMenu
to the main window. It is added to an existing menu with QObject::objectName() parent
before the action or menu with object name before
. If before
is empty, it is appended at the bottom.
|
inlineprotectedvirtualslot |
|
signal |
Used to add the dock widget widget
to the main window at the given area
. The main window automatically adds an checkabe show and hide action to the view menu with the title of the widget
.
|
inlineprotectedvirtualslot |
|
signal |
Used to add the toolbar newToolBar
to the main window.
|
inlineprotectedvirtualslot |
|
protected |
|
inline |
Connects all standard signals.
|
signal |
Emitted to bring the reload request back to the farest child.
|
signal |
The signals error(), warning() and information() are used to handle user information. error() should be used in critical situations. warning() is intendend to inform the user about not critical, but important facts. information() are only to inform the user, but they have no bad results. To let the main application decide, how they are displayed, only signals are emitted. This signal is used to notify about an error with message
|
inlineprotectedvirtualslot |
|
inlineprivateslot |
|
protected |
|
signal |
Used to notify about an information with message
.
|
inlineprotectedvirtualslot |
|
private |
void EDialog::loadGeometry | ( | ) |
Can be called to restore geometry of this object.
This function is called by setObjectName() after setting the object name. If the object name is empty, this function does nothing.
|
signal |
Request reloading of enabled actions in EMainWindow.
|
inlineprotectedvirtualslot |
Passes the reloadEnableActions() signals from it's childs forward.
|
inlinevirtualslot |
Used to reload settings the settings.
This function is connected to doReloadSettings() and should be used to actually do the reload of the settings. To indicate, that the settings should be reloaded, emit reloadSettingsRequest(). Use error
to describe the error for the user. And don't forget to call the base implementation or emit doReload() yourself.
|
signal |
Indicates, that a reload of the settings is needed.
Therefore this signal is used to bring the reload message upwards to the main window or whatever.
|
inlineprotectedvirtualslot |
|
signal |
Sets centralWidget
as the new central widget.
|
inlineprotectedvirtualslot |
|
protectedslot |
Call this function to setup helpButton
as a help button.
Can be called by any subclass, to connect signal showHelp(QString) to helpButton. It also set's the right icon, text and shortcut to the button
void EDialog::setObjectName | ( | const QString & | name | ) |
Set's the objectname and calls loadGeometry() afterwards.
If setObjectName is called before all GUI-Elements are created (like setupUi does), the loadGeometry() call does nothing. Therefore you should call loadGeometry() yourself after all gui elements are created.
void EDialog::setWindowTitle | ( | const QString & | title | ) |
Sets the window title and prepends the QApplication::applicationName().
|
signal |
help should be shown and page
should be opened.
|
inlineprotectedvirtualslot |
|
signal |
request to show the settings dialog.
|
inlineprotectedvirtualslot |
|
signal |
Adds widget
to the status bar as a permanent widget.
|
inlineprotectedvirtualslot |
|
signal |
Used to notify about an warning with message
.
|
inlineprotectedvirtualslot |
|
private |