LibEngsas
|
Implement this class to create an object, which can be used in several applications. More...
#include <epart.h>
Public Types | |
enum | InitState { Exit, Failed, Successful } |
Used to identify the result of the init() function. More... |
Public Slots | |
virtual void | show ()=0 |
This should show the standard widget of this module. | |
![]() | |
virtual void | reloadSettings () |
Used to reload the settings. |
Signals | |
virtual void | showSetupWizard ()=0 |
![]() | |
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) |
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 | |
virtual QString | translationDir () const =0 |
Should return the directory, where all translations for this part can be found. | |
virtual QString | resourceDir () const =0 |
Should return the resource directory, where all resources for this part can be found. | |
virtual EngSaS::CmdLineOptions | cmdLineArgs () const =0 |
Return a list a supported command line options. | |
virtual InitState | init (ECmdLineArgs *args, bool standalone=false)=0 |
Called to setup the EPart. | |
virtual QString | name () const =0 |
Return the real long name of the EPart. | |
virtual QString | shortName () const =0 |
Return the short name of the EPart (used as window title and for QSettings). | |
virtual QImage | icon () const =0 |
Return an icon to represent the EPartMainWindow. | |
virtual QString | helpDescription () const =0 |
Return the help description of the EPart. | |
virtual QString | description () const =0 |
Return the description of the EPart. | |
virtual QUrl | website () const =0 |
The Url to the website of this EPart. | |
virtual QString | versionString () const =0 |
Return the version of this EPart. | |
virtual QString | libEngsasVersion () const =0 |
The LibEngsas version at compile time of your EPart. | |
virtual EHelpCenterSetup | helpSetup ()=0 |
Used to setup the EHelpCenter correctly for this part. | |
virtual EDependencyItem * | dependencies ()=0 |
Return all needed dependencies (like used libraries) as or in an EDependencyItem. | |
virtual EngSaS::SetupWizardObjects | setupWizardObjects ()=0 |
Return a list with ESetupObjects, which should be placed in an ESetupWizard before show() is called. | |
virtual EngSaS::AboutPersons | aboutPersons ()=0 |
A list of persons, who should be mentioned at the about dialog. | |
virtual ESettingsModelItem * | settingsModelItem ()=0 |
The returned item should contain all needed settings for this EPart. | |
![]() | |
EObject (QObject *parent=0) | |
virtual | ~EObject () |
void | connectByPass (QObject *object) |
Additional Inherited Members | |
![]() | |
static void | connectByPass (QObject *parent, QObject *child) |
![]() | |
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 | 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. |
Implement this class to create an object, which can be used in several applications.
It is compareable to KDE KParts, but also a bit differently in detail. The loading of an EPart contains the following steps:
To implement libEngsasVersion() function, just add EPART_LIBENGSAS_VERSION to your header.
To use the EPart as a standalone application, nothing needs to be done, but installing the EPart into the ELibrary EPart-directory. Afterwards just call
to open the EPart as a standalone application.
Plugins should be allowed to be licensed under different licenses than GPLv2, e.g. LGPL for not soo free sources -> this will lead to provide a license by every epart and will also need some changes in epartexe
Add function to epart interface providing a help text regarding the eparts general functionality and usage (special descriptions regarding the options are located in the option list)
enum EPart::InitState |
Used to identify the result of the init() function.
|
pure virtual |
A list of persons, who should be mentioned at the about dialog.
|
pure virtual |
Return a list a supported command line options.
Some like -v or -h are added by the epartexe automatically.
|
pure virtual |
Return all needed dependencies (like used libraries) as or in an EDependencyItem.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Used to setup the EHelpCenter correctly for this part.
|
pure virtual |
|
pure virtual |
Called to setup the EPart.
This is the first function called from an EPart, after creating an instance of the part. You should not emit showSetupWizard() within this context, because the setupwizard is normally shown later on, to let the application load all EParts and show one setupwizard for all EParts.
The specified command line arguments are given with args
and can be parsed with help of ECmdLineArgs. standalone
is set to true, if the EPart is the only part, which is loaded. The Epart may organize it's menus and actions in another way then. For example in standalone mode, it's actions are placed under File-menu and if standalone
is false, the actions are placed in an submenu below the File-menu.
|
pure virtual |
The LibEngsas version at compile time of your EPart.
To implement this function at your EPart, just add EPART_LIBENGSAS_VERSION to your header file.
|
pure virtual |
Return the real long name of the EPart.
|
pure virtual |
Should return the resource directory, where all resources for this part can be found.
The resource directory should contain all resource files provided by this EPart (not Qt or LibEngsas ones).
|
pure virtual |
The returned item should contain all needed settings for this EPart.
|
pure virtual |
Return a list with ESetupObjects, which should be placed in an ESetupWizard before show() is called.
|
pure virtual |
|
pure virtualslot |
This should show the standard widget of this module.
|
pure virtualsignal |
|
pure virtual |
Should return the directory, where all translations for this part can be found.
The translation directory should contain all translation files provided by this EPart (not Qt or LibEngsas ones).
|
pure virtual |
|
pure virtual |
The Url to the website of this EPart.
Should be relative to engsas.de to get localized absolute url in EAboutDialog.