X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Fapp.h;h=34f7a5d73d7bec77413cb717ccae869a1d511b7a;hb=2ed96066b8600d07d9ada5dc44e9768fe56e633c;hp=c95464179d271d011f1edb7c103876cc77c66ac1;hpb=688e916955a6b848dbbae1f65ae85a73593ed680;p=evaf
diff --git a/src/libs/Common/app.h b/src/libs/Common/app.h
index c954641..34f7a5d 100644
--- a/src/libs/Common/app.h
+++ b/src/libs/Common/app.h
@@ -25,6 +25,8 @@
#include
#include
+class QEvent;
+
namespace eVaf {
namespace Common {
namespace Internal {
@@ -48,6 +50,8 @@ public:
*/
bool init();
+ virtual bool event(QEvent *);
+
/*
iApp interface
*/
@@ -57,14 +61,30 @@ public:
virtual QString const xmlFileName() const;
+ virtual int exec();
+
virtual void restart();
- virtual void quit();
+ virtual void quit(bool err = false);
virtual bool isReady() const { return mReady; }
+ virtual QString const rootDir() const { return mRootDir; }
+
+ virtual QString const dataRootDir() const;
+
+ virtual QString const binDir() const { return mBinDir; }
+
+ virtual QString const etcDir() const;
-private:
+ virtual QString const logDir() const;
+
+ virtual QString const docDir() const;
+
+ virtual QString const qtPluginsDir() const;
+
+
+private: // Members
/// Flag indicating that the eVaf application is ready
bool mReady;
@@ -76,7 +96,39 @@ private:
QString mLanguage;
/// Name of the application's XML file
- QString mXmlFile;
+ mutable QString mXmlFile;
+
+ /// Name of the root directry
+ QString mRootDir;
+
+ /// Name of the data root directory
+ mutable QString mDataRootDir;
+
+ /// Name of the binary directory
+ QString mBinDir;
+
+ /// Name of the Qt plugins directory
+ mutable QString mQtPluginsDir;
+
+ /// Name of the configuration files directory
+ mutable QString mEtcDir;
+
+ /// Name of the log files directory
+ mutable QString mLogDir;
+
+ /// Name of the documentation directory
+ mutable QString mDocDir;
+
+ /// Event numbers
+ uint mEvQuit;
+ uint mEvRestart;
+ uint mEvReady;
+ uint mEvTerminating;
+
+
+private: // Methods
+
+ void setReady(bool value);
};