]>
vaikene.ee Git - evaf/blob - src/libs/Common/app.h
34f7a5d73d7bec77413cb717ccae869a1d511b7a
3 * @brief Application interface implementation
6 * Copyright (c) 2011 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
48 * Initializes the interface implementation
49 * @return True if ok; false if initialization failed
53 virtual bool event(QEvent
*);
58 virtual QString
const name() const { return mName
; }
60 virtual QString
const language() const { return mLanguage
; }
62 virtual QString
const xmlFileName() const;
66 virtual void restart();
68 virtual void quit(bool err
= false);
70 virtual bool isReady() const { return mReady
; }
72 virtual QString
const rootDir() const { return mRootDir
; }
74 virtual QString
const dataRootDir() const;
76 virtual QString
const binDir() const { return mBinDir
; }
78 virtual QString
const etcDir() const;
80 virtual QString
const logDir() const;
82 virtual QString
const docDir() const;
84 virtual QString
const qtPluginsDir() const;
89 /// Flag indicating that the eVaf application is ready
92 /// Name of the application
95 /// Language for the application
98 /// Name of the application's XML file
99 mutable QString mXmlFile
;
101 /// Name of the root directry
104 /// Name of the data root directory
105 mutable QString mDataRootDir
;
107 /// Name of the binary directory
110 /// Name of the Qt plugins directory
111 mutable QString mQtPluginsDir
;
113 /// Name of the configuration files directory
114 mutable QString mEtcDir
;
116 /// Name of the log files directory
117 mutable QString mLogDir
;
119 /// Name of the documentation directory
120 mutable QString mDocDir
;
131 void setReady(bool value
);
135 } // namespace eVaf::Common::Internal
136 } // namespace eVaf::Common