X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=inline;f=src%2Flibs%2FCommon%2Fiapp.h;h=8028589f112d58659b1925598928f274ca4eb0ff;hb=688e916955a6b848dbbae1f65ae85a73593ed680;hp=55269e1498ae84b885bf3fad1fa0ec7d8229372d;hpb=f049c1cab2a27a68b381d33da01af859e83a42cb;p=evaf
diff --git a/src/libs/Common/iapp.h b/src/libs/Common/iapp.h
index 55269e1..8028589 100644
--- a/src/libs/Common/iapp.h
+++ b/src/libs/Common/iapp.h
@@ -45,6 +45,25 @@ class COMMON_EXPORT iApp : public QObject
public:
+ /// Application return values
+ enum {
+ RC_Quit = 0, ///< Normal exit
+ RC_Error = 1, ///< Exit due to an error
+ RC_Restart = 2 ///< The application is restarting
+ };
+
+ /// Event that requests the eVaf application to quit
+ static char const * const EV_QUIT;
+
+ /// Event that requests the eVaf application to restart
+ static char const * const EV_RESTART;
+
+ /// Event informing that the eVaf application is ready
+ static char const * const EV_READY;
+
+ /// Event informing that the eVaf application is restarting
+ static char const * const EV_TERMINATING;
+
/// Interface constructor
iApp() : QObject() {}
@@ -101,6 +120,26 @@ public:
*/
virtual QString const xmlFileName() const = 0;
+ /**
+ * Requests the eVaf application to restart.
+ *
+ * This function requests the eVaf application to restart itself. Restarting the application
+ * reloads all the plugins and re-initializes them.
+ */
+ virtual void restart() = 0;
+
+ /**
+ * Requests the eVaf application to quit.
+ *
+ * This function requests the eVaf application to quit.
+ */
+ virtual void quit() = 0;
+
+ /**
+ * Returns true if the eVaf application is ready.
+ */
+ virtual bool isReady() const = 0;
+
signals: