|
hgl 0.5.25
A compiler/interpreter suite for developing images
|
Interface to a typical HGL Suite application. More...
#include "iapplication.h"
Public Types | |
| enum | NOTIFYOPT { DEFAULT, UPDATE, CLOSE } |
Behaviour options to be passed to the notifyXXX functions. More... | |
Public Member Functions | |
| virtual bool | hasTerminated () const =0 |
| Indicates if the application got a termination signal and should prepare to shutdown. More... | |
| virtual bool | notificationsAvailable () const =0 |
| Checks if notifications are available and enabled. More... | |
| virtual void | notifyError (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits an error desktop notification if possible. More... | |
| virtual void | notifyFatal (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits an fatal error desktop notification if possible. More... | |
| virtual void | notifyInfo (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits an information desktop notification if possible. More... | |
| virtual void | notifyWarn (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits a warning desktop notification if possible. More... | |
| virtual void | registerApplicationObserver (const IApplicationObserver *const iao)=0 |
| Registers an IApplicationObserver. More... | |
| virtual void | unregisterApplicationObserver (const IApplicationObserver *const iao)=0 |
| Unregisters an IApplicationObserver. More... | |
Interface to a typical HGL Suite application.
A typical HGL Suite application should implement this interface, resp. derive from HGL::Common::Application.
Since version 0.5.25 it is tried to register with a desktop notification daemon. If there is such one and the config value enable-notifications is true a desktop notification can be emitted by calling notifyInfo, notifyWarn or notifyError else if the config value enable-notifications is true a console log to the respective logger is emitted.
|
pure virtual |
Indicates if the application got a termination signal and should prepare to shutdown.
true if the application shut prepare to shut down, false otherwise Implemented in HGL::Common::Application.
|
pure virtual |
Checks if notifications are available and enabled.
true if notifications are available, false otherwiseImplemented in HGL::Common::Application.
|
pure virtual |
Emits an error desktop notification if possible.
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
Implemented in HGL::Common::Application.
|
pure virtual |
Emits an fatal error desktop notification if possible.
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
Implemented in HGL::Common::Application.
|
pure virtual |
Emits an information desktop notification if possible.
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
Implemented in HGL::Common::Application.
|
pure virtual |
Emits a warning desktop notification if possible.
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
Implemented in HGL::Common::Application.
|
pure virtual |
Registers an IApplicationObserver.
| iao | an IApplicationObserver to register |
Implemented in HGL::Common::Application.
|
pure virtual |
Unregisters an IApplicationObserver.
| iao | an IApplicationObserver to unregister |
Implemented in HGL::Common::Application.
1.8.5