LibEngsas
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
EDialog Class Reference

Mostly the same as EWidget but for QDialog as base class. More...

#include <edialog.h>

+ Inheritance diagram for EDialog:
+ Collaboration diagram for EDialog:

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
 

Detailed Description

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.

See also
EWidget
EObject

Constructor & Destructor Documentation

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.

+ Here is the call graph for this function:

EDialog::EDialog ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
)

+ Here is the call graph for this function:

virtual EDialog::~EDialog ( )
inlinevirtual

Member Function Documentation

void EDialog::addAction ( QAction *  newAction,
const QString &  parent,
QString  before = QString() 
)
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.

See also
addMenu()
addToolBar()
addActionByPass()
EWidget::addAction()
EObject::addAction()
virtual void EDialog::addActionByPass ( QAction *  newAction,
const QString &  parent,
QString  before = QString() 
)
inlineprotectedvirtualslot
See also
addAction() passes the emitted signals from it's child forward
EWidget::addActionByPass()
EObject::addActionByPass()
void EDialog::addMenu ( QMenu *  newMenu,
const QString &  parent,
QString  before = QString() 
)
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.

See also
addAction() to add an action
addToolBar()
addMenuByPass()
EWidget::addMenu()
EObject::addMenu()
virtual void EDialog::addMenuByPass ( QMenu *  newMenu,
const QString &  parent,
QString  before = QString() 
)
inlineprotectedvirtualslot
See also
addMenu() passes the emitted signals from it's child forward
EWidget::addMenuByPass()
EObject::addMenuByPass()
void EDialog::addNewDockWidget ( QDockWidget *  widget,
const Qt::DockWidgetArea &  area 
)
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.

See also
setCentralWidget()
addNewDockWidgetByPass()
EWidget::addNewDockWidget()
EObject::addNewDockWidget()
virtual void EDialog::addNewDockWidgetByPass ( QDockWidget *  widget,
const Qt::DockWidgetArea &  area 
)
inlineprotectedvirtualslot
See also
addNewDockWidget() passes the emitted signals from it's child forward
EWidget::addNewDockWidgetByPass()
EObject::addNewDockWidgetByPass()
void EDialog::addToolBar ( QToolBar *  newToolBar,
Qt::ToolBarArea  area = Qt::TopToolBarArea 
)
signal

Used to add the toolbar newToolBar to the main window.

See also
addMenu()
addAction()
addToolBarByPass()
EWidget::addToolBar()
EObject::addToolBar()
virtual void EDialog::addToolBarByPass ( QToolBar *  newToolBar,
Qt::ToolBarArea  area = Qt::TopToolBarArea 
)
inlineprotectedvirtualslot
See also
addToolBar() passes the emitted signals from it's child forward
EWidget::addToolBarByPass()
EObject::addToolBarByPass()
void EDialog::closeEvent ( QCloseEvent *  event)
protected

+ Here is the caller graph for this function:

void EDialog::connectByPass ( QObject *  object)
inline

Connects all standard signals.

See also
EObject::connectByPass(QObject*)
EWidget::connectByPass(QObject*)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EDialog::doReloadSettings ( )
signal

Emitted to bring the reload request back to the farest child.

See also
reloadSettings()
reloadSettingsRequest()
EWidget::doReloadSettings()
EObject::doReloadSettings()

+ Here is the caller graph for this function:

void EDialog::error ( const QString &  message)
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

See also
warning()
information()
errorByPass()
EWidget::error()
EObject::error()

+ Here is the caller graph for this function:

virtual void EDialog::errorByPass ( const QString &  message)
inlineprotectedvirtualslot
See also
error() if a child emits this signal, this class emits error() (it passes the childs signal upwards)
EWidget::errorByPass()
EObject::errorByPass()
void EDialog::help ( )
inlineprivateslot

+ Here is the caller graph for this function:

QString EDialog::helpPage ( )
protected
void EDialog::information ( const QString &  message)
signal

Used to notify about an information with message.

See also
error()
warning()
informationByPass()
EWidget::information()
EObject::information()

+ Here is the caller graph for this function:

virtual void EDialog::informationByPass ( const QString &  message)
inlineprotectedvirtualslot
See also
information() passes the emitted signals from it's child forward
EWidget::informationByPass()
EObject::informationByPass()
void EDialog::init ( )
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

+ Here is the caller graph for this function:

void EDialog::reloadEnableActions ( )
signal

Request reloading of enabled actions in EMainWindow.

virtual void EDialog::reloadEnableActionsByPass ( )
inlineprotectedvirtualslot

Passes the reloadEnableActions() signals from it's childs forward.

virtual void EDialog::reloadSettings ( )
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.

See also
doReloadSettings()
reloadSettingsRequest()
EWidget::reloadSettings()
EObject::reloadSettings()

+ Here is the caller graph for this function:

void EDialog::reloadSettingsRequest ( )
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.

See also
reloadSettingsRequestByPass()
doReloadSettings()
reloadSettings()
EWidget::reloadSettingsRequest()
EObject::reloadSettingsRequest()

+ Here is the caller graph for this function:

virtual void EDialog::reloadSettingsRequestByPass ( )
inlineprotectedvirtualslot
See also
reloadSettingsRequest() passes the emitted signals from it's child forward.
reloadSettings()
reloadSettingsByPass()
doReloadSettings()

+ Here is the caller graph for this function:

void EDialog::setCentralWidget ( QWidget *  centralWidget)
signal

Sets centralWidget as the new central widget.

Attention
old central widget is destroyed
See also
addNewDockWidget()
setCentralWidget()
EWidget::setCentralWidget()
EObject::setCentralWidget()
virtual void EDialog::setCentralWidgetByPass ( QWidget *  centralWidget)
inlineprotectedvirtualslot
See also
setCentralWidget() passes the emitted signals from it's child forward
EWidget::setCentralWidgetbyPass()
EObject::setCentralWidgetbyPass()
void EDialog::setHelp ( QString  page,
EPushButton helpButton = 0 
)
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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EDialog::setWindowTitle ( const QString &  title)

Sets the window title and prepends the QApplication::applicationName().

+ Here is the caller graph for this function:

void EDialog::showHelp ( const QString &  page)
signal

help should be shown and page should be opened.

See also
showHelpByPass()
EWidget::showHelp()
EObject::showHelp()
virtual void EDialog::showHelpByPass ( const QString &  page)
inlineprotectedvirtualslot
See also
showHelp() passes the emitted signals from it's child forward
EWidget::showHelpByPass()
EObject::showHelpByPass()
void EDialog::showSettings ( )
signal

request to show the settings dialog.

See also
showSettingsByPass()
EWidget::showSettings()
EObject::showSettings()
virtual void EDialog::showSettingsByPass ( )
inlineprotectedvirtualslot
See also
showSettings() passes the emitted signals from it's child forward
EWidget::showSettingsByPass()
EObject::showSettingsByPass()

+ Here is the caller graph for this function:

void EDialog::showStatusWidget ( QWidget *  widget)
signal

Adds widget to the status bar as a permanent widget.

See also
showStatusWidgetByPass()
EWidget::showStatusWidget()
EObject::showStatusWidget()
virtual void EDialog::showStatusWidgetByPass ( QWidget *  widget)
inlineprotectedvirtualslot
See also
showStatusWidget() passes the emitted signals from it's child forward
EWidget::showStatusWidgetbyPass()
EObject::showStatusWidgetbyPass()
void EDialog::warning ( const QString &  message)
signal

Used to notify about an warning with message.

See also
error()
information()
warningByPass()
EWidget::warning()
EObject::warning()
virtual void EDialog::warningByPass ( const QString &  message)
inlineprotectedvirtualslot
See also
warning() passes the emitted signals from it's child forward
EWidget::warningByPass()
EObject::warningByPass()

Member Data Documentation

QString EDialog::myHelpPage
private

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