LibEngsas
|
EWidget is a base class for common widgets. More...
#include <ewidget.h>
Public Slots | |
virtual EngSaS::AvailableActions | enableActions () |
Will be called by EMainWindow::setCentralWidget() to enable and disable standard actions. | |
virtual QString | fileFilters (EngSaS::FileFilter reason) |
virtual bool | load (QFile *file, QString &error) |
virtual bool | save (QFile *file, QString &error) |
virtual bool | fileNew (QString &error) |
virtual bool | print (QString &error) |
virtual bool | undo (QString &error) |
virtual bool | redo (QString &error) |
virtual bool | cut (QString &error) |
virtual bool | copy (QString &error) |
virtual bool | paste (QString &error) |
virtual bool | reload (QString &error) |
virtual void | reloadSettings () |
Used to reload settings the settings. |
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. | |
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) |
To add managed dock widgets, use addManagedDockWidget() instead. | |
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. | |
void | doReloadSettings () |
Emitted to bring the reload request back to the farest child. |
Public Member Functions | |
EWidget (QWidget *parent=0, Qt::WindowFlags flags=0) | |
virtual | ~EWidget () |
void | setWindowTitle (const QString &title) |
void | connectByPass (QObject *object) |
Connects all standard signals. |
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 () |
Protected Member Functions | |
void | addManagedDockWidget (QDockWidget *widget, const Qt::DockWidgetArea &area, QString actionLabel=QString(), QString actionParent=QString()) |
Adds an dock widget via addNewDockWidget() and adds widget to the list of managed dock widgets. |
Private Attributes | |
QList< QPointer< QDockWidget > > | dockWidgets |
QList< QPointer< QAction > > | dockActions |
EWidget is a base class for common widgets.
It can handle all standard functionality which may be used. If you want to cut of the by passing of signals, just reimplment the virtual byPass() slot of the signal.
|
inline |
|
virtual |
Call close here, to get the close() function called in every possible case.
|
signal |
|
inlineprotectedvirtualslot |
|
protected |
Adds an dock widget via addNewDockWidget() and adds widget
to the list of managed dock widgets.
If actionLabel
(and also actionParent) is set, an EAction is created and added to parent actionParent
to show and hide the dock widget. This action is also managed and therefore deleted along with the dock widget itself.
The benefit is, that all the dock widgets on this list are deleted automatically, if the widget it self is deleted.
|
signal |
|
inlineprotectedvirtualslot |
|
signal |
To add managed dock widgets, use addManagedDockWidget() instead.
|
inlineprotectedvirtualslot |
|
signal |
|
inlineprotectedvirtualslot |
|
inline |
Connects all standard signals.
|
virtualslot |
copy selected Use error
to describe the error for the user.
|
virtualslot |
cut selected Use error
to describe the error for the user.
|
signal |
Emitted to bring the reload request back to the farest child.
|
inlinevirtualslot |
Will be called by EMainWindow::setCentralWidget() to enable and disable standard actions.
|
signal |
|
inlineprotectedvirtualslot |
|
virtualslot |
Severall filters can be seperated by ;; like
reason
.
|
virtualslot |
Create new empty document Use error
to describe the error for the user.
|
signal |
|
inlineprotectedvirtualslot |
|
virtualslot |
Try load file
. You do not need to take care for opening or closing, because the file
is already opened for reading and will be closed afterwards. Use error
to describe the error for the user.
|
virtualslot |
paste selected Use error
to describe the error for the user.
|
virtualslot |
Print content Use error
to describe the error for the user.
|
virtualslot |
redo last Use error
to describe the error for the user.
|
virtualslot |
reload content Use error
to describe the error for the user.
|
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 |
|
virtualslot |
Try to save content to file
. Take care of the chosen file ending to allow exporting. You do not need to take care for opening or closing, because the file
is already opened for writing and will be closed afterwards. Use error
to describe the error for the user.
|
signal |
|
inlineprotectedvirtualslot |
void EWidget::setWindowTitle | ( | const QString & | title | ) |
overloads QWidget::setWindowTitle() and prepends the application short name. this is according to the Microsoft window guide line and also common behaviour.
|
signal |
|
inlineprotectedvirtualslot |
|
signal |
|
inlineprotectedvirtualslot |
|
signal |
|
inlineprotectedvirtualslot |
|
virtualslot |
undo last Use error
to describe the error for the user.
|
signal |
|
inlineprotectedvirtualslot |
|
private |
|
private |