The QtilitiesCoreApplication class is the same as QCoreApplication with added functionality. More...
#include <QtilitiesCoreApplication.h>
Signals | |
void | settingsUpdateRequest (const QString &request_id) |
Signal which broadcasts that settings identified by the request_id changed and requires updating. |
Public Member Functions | |
bool | notify (QObject *object, QEvent *event) |
QCoreApplication::notify() overload. This allows exception handling in non-GUI applications. |
Static Public Member Functions | |
static bool | applicationBusy () |
Gets if the application is busy, thus it cannot be closed. | |
static quint32 | applicationExportVersion () |
Gets the application export format for your application. | |
static QString | applicationSessionPath () |
Returns a session path for your application where you can store session related information (for example shortcut configurations etc.) | |
static IContextManager * | contextManager () |
Returns a reference to the context manager. | |
static bool | hasInstance (const char *function, bool silent=false) |
Checks if a valid instance has been created. | |
static QtilitiesCoreApplication * | instance (bool silent=false) |
Returns a reference to the QtilitiesCoreApplication instance. | |
static void | newSettingsUpdateRequest (const QString &request_id) |
Create a new settings update request. | |
static IObjectManager * | objectManager () |
Returns a reference to the observer manager. | |
static bool | qtilitiesSettingsEnabled () |
Gets if the saving of settings by Qtilities classes is enabled. | |
static QString | qtilitiesSettingsPath () |
Gets the path of an ini file which is used by all Qtilities classes to save information between different sessions. | |
static VersionNumber | qtilitiesVersion () |
Returns the version number of Qtilities. | |
static QString | qtilitiesVersionString () |
Returns the version string of Qtilities as a QString. | |
static void | setApplicationBusy (bool is_busy) |
Sets if the application is busy, thus it cannot be closed. | |
static void | setApplicationExportVersion (quint32 application_export_version) |
Sets the application export format for your application. | |
static void | setApplicationSessionPath (const QString &path) |
Sets the session path to be used in your application. | |
static void | setQtilitiesSettingsEnabled (bool is_enabled) |
Enables/disables the saving of settings by Qtilities classes. | |
static TaskManager * | taskManager () |
Returns a reference to the task manager. |
The QtilitiesCoreApplication class is the same as QCoreApplication with added functionality.
This class provides extra functionality which is not found in QCoreApplication:
Allows setting of a session path for application information, see applicationSessionPath().
All functions on QtilitiesCoreApplication are thread safe.
|
static |
Gets the application export format for your application.
Default is 0.
|
inlinestatic |
Returns a session path for your application where you can store session related information (for example shortcut configurations etc.)
In non-GUI applications this path is QCoreApplication::applicationDirPath() + Qtilities::Logging::Constants::qti_def_PATH_SESSION by default. However in GUI applications the path is different as specified by Qtilities::CoreGui::QtilitiesApplication::applicationSessionPath().
|
static |
Returns a reference to the context manager.
This function is thread-safe.
|
static |
Checks if a valid instance has been created.
silent | When true, a warning message will not be printed when the QtilitiesCoreApplication instance was not found. |
|
static |
Returns a reference to the QtilitiesCoreApplication instance.
silent | When true, a warning message will not be printed when the QtilitiesCoreApplication instance was not found. |
|
inlinestatic |
Create a new settings update request.
This function allows settings update requests to be sent anywhere in an application. This allows objects which depend on the settings to update themselves when the settings change.
This function will emit settingsUpdateRequest() with the given request_id
.
|
static |
Returns a reference to the observer manager.
This function is thread-safe.
|
static |
Gets if the saving of settings by Qtilities classes is enabled.
Saving is enabled by default.
|
static |
Gets the path of an ini file which is used by all Qtilities classes to save information between different sessions.
The path used points to a file called qtilities.ini
in the path returned by applicationSessionPath().
Everywhere in Qtilities this path is used as follows to save settings.
By using this ini file, the Qtilities settings are kept seperate from the rest of the settings used by your application. If you don't want Qtilities to save any information during runtime you can disable is using setQtilitiesSettingsEnabled().
|
static |
Returns the version string of Qtilities as a QString.
|
static |
Sets if the application is busy, thus it cannot be closed.
This function uses a stacked approach, thus your setApplicationBusy(false) calls must match the number of setApplicationBusy(true) calls.
For more information on this type of stacked approach, see Qtilities::Core::Observer::startProcessingCycle().
|
static |
Sets the application export format for your application.
|
static |
Sets the session path to be used in your application.
|
static |
Enables/disables the saving of settings by Qtilities classes.
By disabling the saving of settings by Qtilities classes, you can make sure Qtilities does not save any settings information anywhere on the host machine where a Qtilities application is run. When saving is disabled, all settings related functionality in Qtilities will operate on default settings.
Saving is enabled by default.
|
static |
Returns a reference to the task manager.
This function is thread-safe.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|