]>
vaikene.ee Git - evaf/blob - src/libs/Common/app.h
3 * @brief Application interface implementation
6 * Copyright (c) 2011-2019 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __COMMON_APP_H
21 #define __COMMON_APP_H
35 * iApp application interface implementation
37 class App
: public iApp
44 * Destroys the iApp interface instance
46 static void destroyInstance();
53 * Initializes the interface implementation
54 * @return True if ok; false if initialization failed
58 virtual bool event(QEvent
*);
63 virtual QString
const name() const { return mName
; }
65 virtual QString
const language() const { return mLanguage
; }
67 virtual QString
const xmlFileName() const;
71 virtual void restart();
73 virtual void quit(bool err
= false);
75 virtual bool isReady() const { return mReady
; }
77 virtual QString
const rootDir() const { return mRootDir
; }
79 virtual QString
const dataRootDir() const;
81 virtual QString
const binDir() const { return mBinDir
; }
83 virtual QString
const etcDir() const;
85 virtual QString
const logDir() const;
87 virtual QString
const docDir() const;
89 virtual QString
const qtPluginsDir() const;
94 /// Flag indicating that the eVaf application is ready
97 /// Name of the application
100 /// Language for the application
103 /// Name of the application's XML file
104 mutable QString mXmlFile
;
106 /// Name of the root directry
109 /// Name of the data root directory
110 mutable QString mDataRootDir
;
112 /// Name of the binary directory
115 /// Name of the Qt plugins directory
116 mutable QString mQtPluginsDir
;
118 /// Name of the configuration files directory
119 mutable QString mEtcDir
;
121 /// Name of the log files directory
122 mutable QString mLogDir
;
124 /// Name of the documentation directory
125 mutable QString mDocDir
;
136 void setReady(bool value
);
140 } // namespace eVaf::Common::Internal
141 } // namespace eVaf::Common