X-Git-Url: https://vaikene.ee/gitweb/highlight.css?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Fapp.h;h=8fb0dca887919f7916486c0ab580932d30df6c94;hb=60aebc188674bbfb67be51958ec33171c72986b9;hp=1cf1fdef3269eee4a67148ded50151ae25ce839a;hpb=5815060246f84e8efdf3143b4e8c7d00778168cf;p=evaf diff --git a/src/libs/Common/app.h b/src/libs/Common/app.h index 1cf1fde..8fb0dca 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 */ @@ -59,10 +63,24 @@ public: virtual void restart(); - virtual void quit(bool err); + 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; + + virtual QString const logDir() const; + + virtual QString const docDir() const; + + virtual QString const qtPluginsDir() const; + private: @@ -78,6 +96,33 @@ private: /// Name of the application's XML file 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; + }; } // namespace eVaf::Common::Internal