X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;ds=sidebyside;f=src%2Flibs%2FCommon%2Fiapp.h;h=5329e1b77c6465777f731ce362031f32ef845de3;hb=5815060246f84e8efdf3143b4e8c7d00778168cf;hp=55269e1498ae84b885bf3fad1fa0ec7d8229372d;hpb=441d1b38e0900f56891f495a94a08dc8d48e0a32;p=evaf
diff --git a/src/libs/Common/iapp.h b/src/libs/Common/iapp.h
index 55269e1..5329e1b 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,27 @@ 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.
+ * @param err If true, then indicates that the application exits due to a fatal error
+ *
+ * This function requests the eVaf application to quit.
+ */
+ virtual void quit(bool err) = 0;
+
+ /**
+ * Returns true if the eVaf application is ready.
+ */
+ virtual bool isReady() const = 0;
+
signals: