eVaf
|
iApp application interface implementation More...
#include <Common/app.h>
Public Member Functions | |
App () | |
virtual QString const | binDir () const |
Returns the name of the binary files directory. More... | |
virtual QString const | dataRootDir () const |
Returns the name of the eVaf data directory. More... | |
virtual QString const | docDir () const |
Returns the documentation directory. More... | |
virtual QString const | etcDir () const |
Returns the configuration files directory. More... | |
virtual bool | event (QEvent *) |
virtual int | exec () |
Enters the main event loop of the Qt application. More... | |
bool | init () |
Initializes the interface implementation. More... | |
virtual bool | isReady () const |
Returns true if the eVaf application is ready. More... | |
virtual QString const | language () const |
Returns the current language and country used by the application. More... | |
virtual QString const | logDir () const |
Returns the log files directory. More... | |
virtual QString const | name () const |
Returns the name of the eVaf application. More... | |
virtual QString const | qtPluginsDir () const |
Returns the Qt plugins directory. More... | |
virtual void | quit (bool err=false) |
Requests the eVaf application to quit. More... | |
virtual void | restart () |
Requests the eVaf application to restart. More... | |
virtual QString const | rootDir () const |
Returns the name of the eVaf root directory. More... | |
virtual QString const | xmlFileName () const |
Returns the name of the application's XML file. More... | |
virtual | ~App () |
Public Member Functions inherited from eVaf::Common::iApp | |
iApp () | |
Interface constructor. More... | |
virtual | ~iApp () |
Empty virtual destructor. More... | |
Additional Inherited Members | |
Public Types inherited from eVaf::Common::iApp | |
enum | { RC_Quit = 0, RC_Error = 1, RC_Restart = 2 } |
Application return values. More... | |
Signals inherited from eVaf::Common::iApp | |
void | ready () |
Ready signal. More... | |
void | terminating () |
Terminating signal. More... | |
Static Public Member Functions inherited from eVaf::Common::iApp | |
static iApp * | instance () |
Returns the iApp interface instance. More... | |
Static Public Attributes inherited from eVaf::Common::iApp | |
static char const *const | EV_QUIT |
Event that requests the eVaf application to quit. More... | |
static char const *const | EV_READY |
Event informing that the eVaf application is ready. More... | |
static char const *const | EV_RESTART |
Event that requests the eVaf application to restart. More... | |
static char const *const | EV_TERMINATING |
Event informing that the eVaf application is restarting. More... | |
eVaf::Common::Internal::App::App | ( | ) |
|
virtual |
|
inlinevirtual |
Returns the name of the binary files directory.
The binary directory is the directory where all the application's binary files (main executable and modules) are located. The default binary directory is where the main executable is located.
NB! Changing the application's root directory does not change the location of the binary directory.
Implements eVaf::Common::iApp.
|
virtual |
Returns the name of the eVaf data directory.
The data root directory is the base directory for all the directories that require write access.
The default data directory on Windows is %APPDATA%/%EVAF_APP_NAME%. The default data directory on Linux is ${HOME}/.${EVAF_APP_NAME}.
This directory can be changed with the EVAF_DATA_ROOT_DIR environment variable or with the -dataroot[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Returns the documentation directory.
This is the directory where all the documentation and help files are located. The default documentation directory is 'doc' in the root directory.
This directory can be changed with the EVAF_DOC_DIR environment variable or with the -doc[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Returns the configuration files directory.
This is the directory where all the application's configuration files are located. The default configuration files directory is 'etc' in the data root directory.
This directory can be changed with the EVAF_ETC_DIR environment variable or with the -etc[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
|
virtual |
Enters the main event loop of the Qt application.
This function enters the event loop of the Qt application. Use this function to start event handling instead of calling QCoreApplication::exec() or QApplication::exec() functions directly.
Implements eVaf::Common::iApp.
bool eVaf::Common::Internal::App::init | ( | ) |
Initializes the interface implementation.
|
inlinevirtual |
Returns true if the eVaf application is ready.
Implements eVaf::Common::iApp.
|
inlinevirtual |
Returns the current language and country used by the application.
This function returns the current lowercase two-letter ISO 639 language code and uppercase two-letter ISO 3166 country code if set.
The default language is queried from the operating system.
The language can be changed with the EVAF_LANGUAGE environment variabel or with the -lang[uage]=<language> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Returns the log files directory.
This is the directory where the application outputs all the log files. The default log files directory is 'log' in the data root directory.
This directory can be changed with the EVAF_LOG_DIR environment variable or with the -log[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
inlinevirtual |
Returns the name of the eVaf application.
This function returns the name of the eVaf application, which is a string that identifies the application. The default name of the application is "eVaf".
This name of the application can be changed with the EVAF_APP_NAME environment variable or with the -app[lication]=<name> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Returns the Qt plugins directory.
The Qt plugins directory is where additional Qt plugins are located. These Qt plugins are loaded manually by the application and specified in the application's XML file.
Changing this directory does not affect the way how Qt itself loads its plugins.
This directory can be changed with the EVAF_QT_PLUGINS_DIR environment variable or with the -qtplugins[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Requests the eVaf application to quit.
err | If true, then indicates that the application exits due to a fatal error |
This function requests the eVaf application to quit.
Implements eVaf::Common::iApp.
|
virtual |
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.
Implements eVaf::Common::iApp.
|
inlinevirtual |
Returns the name of the eVaf root directory.
The root directory is the base directory where the eVaf application is installed. The default root directory is the parent of the binary directory.
Write access to the root directory is not required to run the application.
This directory can be changed with the EVAF_ROOT_DIR environment variable or with the -root[dir]=<directory> command line argument.
Implements eVaf::Common::iApp.
|
virtual |
Returns the name of the application's XML file.
This function returns the name of the application's XML file. It tries to find the most specific file name for the given language. If not found, then defaults to the generic name.
For example, if the language is set to "et_EE" and the application's name is "eVaf", then it tries to find XML files with the following names "eVaf_et_EE.xml" and "eVaf_et.xml". If neither is found, defaults to the name "eVaf.xml".
The path is not included in the returned file name. Use the eVaf::Common::iEnv::etcDir() function for the location of the file.
Implements eVaf::Common::iApp.