]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/iapp.h
Added more Common library files.
[evaf] / src / libs / Common / iapp.h
index 55269e1498ae84b885bf3fad1fa0ec7d8229372d..8028589f112d58659b1925598928f274ca4eb0ff 100644 (file)
@@ -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: