.. _object_Application: :index:`Application` -------------------- Description *********** The Application object is the root object for all other objects and represents the application instance. It provides properties for global settings such as :ref:`country `, :ref:`language `, :ref:`timeZone ` and :ref:`measurementSystem `. The application also has meta data properties such as :ref:`name `, :ref:`description ` and :ref:`version `. :**› Inherits**: :ref:`ObjectArray ` Overview ******** Properties ++++++++++ .. hlist:: :columns: 3 * :ref:`commandLineArguments ` * :ref:`country ` * :ref:`customCaCertificates ` * :ref:`debug ` * :ref:`description ` * :ref:`language ` * :ref:`measurementSystem ` * :ref:`messageLoggingFilterRules ` * :ref:`messageLoggingPattern ` * :ref:`name ` * :ref:`processEnvironment ` * :ref:`standardInput ` * :ref:`system ` * :ref:`timeZone ` * :ref:`trace ` * :ref:`translate ` * :ref:`translators ` * :ref:`trapErrors ` * :ref:`url ` * :ref:`vendor ` * :ref:`version ` * :ref:`ObjectArray.objects ` * :ref:`Object.objectId ` * :ref:`Object.parent ` Methods +++++++ .. hlist:: :columns: 1 * :ref:`dumpInternalBacktrace() ` * :ref:`dumpStackTrace() ` * :ref:`Object.deserializeProperties() ` * :ref:`Object.fromJson() ` * :ref:`Object.serializeProperties() ` * :ref:`Object.toJson() ` Signals +++++++ .. hlist:: :columns: 1 * :ref:`translatorsDataChanged() ` * :ref:`ObjectArray.objectsDataChanged() ` * :ref:`Object.completed() ` Enumerations ++++++++++++ .. hlist:: :columns: 1 * :ref:`Country ` * :ref:`Language ` Properties ********** .. _property_Application_commandLineArguments: .. _signal_Application_commandLineArgumentsChanged: .. index:: single: commandLineArguments commandLineArguments ++++++++++++++++++++ This property holds the arguments passed to the application when run manually at the command line. This can be used to implement simple CLI applications, e.g. for testing purposes. This property was introduced in InCore 1.1. :**› Type**: StringList :**› Signal**: commandLineArgumentsChanged() :**› Attributes**: Readonly .. _property_Application_country: .. _signal_Application_countryChanged: .. index:: single: country country +++++++ This property holds the country the application is configured for. This information is used for localization purposes and influences how numbers and dates are formatted. :**› Type**: :ref:`Country ` :**› Default**: :ref:`Application.Germany ` :**› Signal**: countryChanged() :**› Attributes**: Writable .. _property_Application_customCaCertificates: .. _signal_Application_customCaCertificatesChanged: .. index:: single: customCaCertificates customCaCertificates ++++++++++++++++++++ This property holds a list of paths to custom CA certificate files which to use in addition to the list of default CAs installed provided by the operating system. Use this if you have to establish encrypted network connections to services which use SSL/TLS certificates generated by an internal CA. **Important:** all certificate files have to be in PEM format. This property was introduced in InCore 2.5. :**› Type**: StringList :**› Signal**: customCaCertificatesChanged() :**› Attributes**: Writable .. _property_Application_debug: .. _signal_Application_debugChanged: .. index:: single: debug debug +++++ This property holds whether to log internal debug messages to the console. When enabled additionally all errors occurring in any object are logged to the console automatically. :**› Type**: Boolean :**› Default**: ``false`` :**› Signal**: debugChanged() :**› Attributes**: Writable, Optional .. _property_Application_description: .. _signal_Application_descriptionChanged: .. index:: single: description description +++++++++++ This property holds a description for the application. It currently does not serve any special purposes but can be used to document and describe the application in a program-accessible manner. :**› Type**: String :**› Signal**: descriptionChanged() :**› Attributes**: Writable, Optional .. _property_Application_language: .. _signal_Application_languageChanged: .. index:: single: language language ++++++++ This property holds the language the application is configured for. Changing this property from :ref:`Application.English ` to a different language may - depending on the current translation and language support state - make the individual InCore objects return translated messages and error strings. :**› Type**: :ref:`Language ` :**› Default**: :ref:`Application.German ` :**› Signal**: languageChanged() :**› Attributes**: Writable .. _property_Application_measurementSystem: .. _signal_Application_measurementSystemChanged: .. index:: single: measurementSystem measurementSystem +++++++++++++++++ This property holds the measurement system the application is configured for. Objects derived from the :ref:`Measurement ` object may depend on this setting and return values converted for the appropriate measurement system. For example a temperature object could provide the formatted temperature in the :ref:`Measurement.displayString ` property. It is converted to °F if :ref:`measurementSystem ` is set to :ref:`Measurement.ImperialUSSystem `. :**› Type**: :ref:`Measurement.System ` :**› Default**: :ref:`Measurement.MetricSystem ` :**› Signal**: measurementSystemChanged() :**› Attributes**: Writable .. _property_Application_messageLoggingFilterRules: .. _signal_Application_messageLoggingFilterRulesChanged: .. index:: single: messageLoggingFilterRules messageLoggingFilterRules +++++++++++++++++++++++++ This property holds rules for filtering log messages based on their respective logging category. To disable all debug messages but e.g. networking-related ones, set this property to ``*.debug=false foundation.network=true``. The logging categories of a message can be found at the beginning of a message per default. It can be changed through the :ref:`messageLoggingPattern ` property. .. seealso:: `Qt documentation on configuring logging categories `_ This property was introduced in InCore 2.0. :**› Type**: String :**› Signal**: messageLoggingFilterRulesChanged() :**› Attributes**: Writable, Optional .. _property_Application_messageLoggingPattern: .. _signal_Application_messageLoggingPatternChanged: .. index:: single: messageLoggingPattern messageLoggingPattern +++++++++++++++++++++ This property holds a pattern including placeholders which can be used for customizing the log message format and content. See the `Qt documentation on message patterns `_ for details and all supported placeholders. This property was introduced in InCore 2.0. :**› Type**: String :**› Default**: ``%{if-category}%{category}.%{type}: %{endif}%{message}`` :**› Signal**: messageLoggingPatternChanged() :**› Attributes**: Writable, Optional .. _property_Application_name: .. _signal_Application_nameChanged: .. index:: single: name name ++++ This property holds the name of the application. This property is used to determine settings and storage paths and should therefore consist of alphanumeric characters only. :**› Type**: String :**› Default**: ``Default App`` :**› Signal**: nameChanged() :**› Attributes**: Writable .. _property_Application_processEnvironment: .. _signal_Application_processEnvironmentChanged: .. index:: single: processEnvironment processEnvironment ++++++++++++++++++ This property holds the environment variables for the current process set by the system. This property was introduced in InCore 2.5. :**› Type**: Map :**› Signal**: processEnvironmentChanged() :**› Attributes**: Readonly .. _property_Application_standardInput: .. _signal_Application_standardInputChanged: .. index:: single: standardInput standardInput +++++++++++++ This property holds the standard input channel for the current process. This property was introduced in InCore 2.5. :**› Type**: :ref:`IoDevice ` :**› Signal**: standardInputChanged() :**› Attributes**: Readonly .. _property_Application_system: .. _signal_Application_systemChanged: .. index:: single: system system ++++++ This property holds a global instance of a :ref:`System ` object. It's available for convenience so that no separate instances have to be defined manually. :**› Type**: :ref:`System ` :**› Signal**: systemChanged() :**› Attributes**: Readonly .. _property_Application_timeZone: .. _signal_Application_timeZoneChanged: .. index:: single: timeZone timeZone ++++++++ This property holds the timezone for the location at which the application or device is running. Setting this property affects all :ref:`DateTime ` objects which do not have the :ref:`DateTime.timezone ` property set explicitely. :**› Type**: String :**› Default**: ``UTC`` :**› Signal**: timeZoneChanged() :**› Attributes**: Writable .. _property_Application_trace: .. _signal_Application_traceChanged: .. index:: single: trace trace +++++ This property holds whether to log internal trace messages to the console. This allows analysing internal function call sequences more closely. :**› Type**: Boolean :**› Default**: ``false`` :**› Signal**: traceChanged() :**› Attributes**: Writable, Optional .. _property_Application_translate: .. _signal_Application_translateChanged: .. index:: single: translate translate +++++++++ This property holds whether to load a translation file based on the :ref:`language ` setting. When enabled, the file ``.qm`` is loaded from the application directory. This property was introduced in InCore 2.4. :**› Type**: Boolean :**› Default**: ``false`` :**› Signal**: translateChanged() :**› Attributes**: Writable .. _property_Application_translators: .. _signal_Application_translatorsChanged: .. index:: single: translators translators +++++++++++ This property holds a list of :ref:`Translator ` objects which to load translation data from. This property was introduced in InCore 2.8. :**› Type**: :ref:`List `\<:ref:`Translator `> :**› Signal**: translatorsChanged() :**› Attributes**: Readonly .. _property_Application_trapErrors: .. _signal_Application_trapErrorsChanged: .. index:: single: trapErrors trapErrors ++++++++++ This property holds whether to immediately exit the application on any occurring error. This can ease debugging in case a huge number of messages are printed to the console during runtime. This property was introduced in InCore 2.5. :**› Type**: Boolean :**› Default**: ``false`` :**› Signal**: trapErrorsChanged() :**› Attributes**: Writable .. _property_Application_url: .. _signal_Application_urlChanged: .. index:: single: url url +++ This property holds a URL of the application or the application vendor. It currently is not evaluated within the InCore framework. :**› Type**: String :**› Default**: ``https://inhub.de`` :**› Signal**: urlChanged() :**› Attributes**: Writable, Optional .. _property_Application_vendor: .. _signal_Application_vendorChanged: .. index:: single: vendor vendor ++++++ This property holds the name of the application vendor. It may be formatted arbitrarily and currently is not evaluated within the InCore framework. :**› Type**: String :**› Default**: ``in.hub GmbH`` :**› Signal**: vendorChanged() :**› Attributes**: Writable, Optional .. _property_Application_version: .. _signal_Application_versionChanged: .. index:: single: version version +++++++ This property holds a version string for the application. It may be formatted arbitrarily and currently is not evaluated within the InCore framework. :**› Type**: String :**› Signal**: versionChanged() :**› Attributes**: Writable, Optional Methods ******* .. _method_Application_dumpInternalBacktrace: .. index:: single: dumpInternalBacktrace dumpInternalBacktrace() +++++++++++++++++++++++ This method dumps an internal function call backtrace to the console. Except for troubleshooting in contact with the InCore developers you'll never need to call this function. .. _method_Application_dumpStackTrace: .. index:: single: dumpStackTrace dumpStackTrace() ++++++++++++++++ This method dumps a QML function call stack trace to the console which can be used for debugging purposes. This method was introduced in InCore 2.5. Signals ******* .. _signal_Application_translatorsDataChanged: .. index:: single: translatorsDataChanged translatorsDataChanged(SignedInteger index) +++++++++++++++++++++++++++++++++++++++++++ This signal is emitted whenever the :ref:`List.dataChanged() ` signal is emitted, i.e. the item at ``index`` in the :ref:`translators ` list itself emitted the dataChanged() signal. Enumerations ************ .. _enum_Application_Country: .. index:: single: Country Country +++++++ This enumeration is used to specify a country. .. index:: single: Application.AnyCountry .. index:: single: Application.Argentina .. index:: single: Application.Australia .. index:: single: Application.Austria .. index:: single: Application.Belgium .. index:: single: Application.Brazil .. index:: single: Application.Canada .. index:: single: Application.China .. index:: single: Application.CzechRepublic .. index:: single: Application.Denmark .. index:: single: Application.Estonia .. index:: single: Application.Finland .. index:: single: Application.France .. index:: single: Application.Germany .. index:: single: Application.India .. index:: single: Application.Indonesia .. index:: single: Application.Iran .. index:: single: Application.Italy .. index:: single: Application.Japan .. index:: single: Application.Latvia .. index:: single: Application.Lithuania .. index:: single: Application.Luxembourg .. index:: single: Application.Mexico .. index:: single: Application.Netherlands .. index:: single: Application.Norway .. index:: single: Application.Pakistan .. index:: single: Application.Poland .. index:: single: Application.Portugal .. index:: single: Application.Russia .. index:: single: Application.Spain .. index:: single: Application.Sweden .. index:: single: Application.Switzerland .. index:: single: Application.Turkey .. index:: single: Application.Ukraine .. index:: single: Application.UnitedKingdom .. index:: single: Application.UnitedStates .. index:: single: Application.Vietnam .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_Application_AnyCountry: * - ``Application.AnyCountry`` - ``0`` - .. _enumitem_Application_Argentina: * - ``Application.Argentina`` - ``10`` - .. _enumitem_Application_Australia: * - ``Application.Australia`` - ``13`` - .. _enumitem_Application_Austria: * - ``Application.Austria`` - ``14`` - .. _enumitem_Application_Belgium: * - ``Application.Belgium`` - ``21`` - .. _enumitem_Application_Brazil: * - ``Application.Brazil`` - ``30`` - .. _enumitem_Application_Canada: * - ``Application.Canada`` - ``38`` - .. _enumitem_Application_China: * - ``Application.China`` - ``44`` - .. _enumitem_Application_CzechRepublic: * - ``Application.CzechRepublic`` - ``57`` - .. _enumitem_Application_Denmark: * - ``Application.Denmark`` - ``58`` - .. _enumitem_Application_Estonia: * - ``Application.Estonia`` - ``68`` - .. _enumitem_Application_Finland: * - ``Application.Finland`` - ``73`` - .. _enumitem_Application_France: * - ``Application.France`` - ``74`` - .. _enumitem_Application_Germany: * - ``Application.Germany`` - ``82`` - .. _enumitem_Application_India: * - ``Application.India`` - ``100`` - .. _enumitem_Application_Indonesia: * - ``Application.Indonesia`` - ``101`` - .. _enumitem_Application_Iran: * - ``Application.Iran`` - ``102`` - .. _enumitem_Application_Italy: * - ``Application.Italy`` - ``106`` - .. _enumitem_Application_Japan: * - ``Application.Japan`` - ``108`` - .. _enumitem_Application_Latvia: * - ``Application.Latvia`` - ``118`` - .. _enumitem_Application_Lithuania: * - ``Application.Lithuania`` - ``124`` - .. _enumitem_Application_Luxembourg: * - ``Application.Luxembourg`` - ``125`` - .. _enumitem_Application_Mexico: * - ``Application.Mexico`` - ``139`` - .. _enumitem_Application_Netherlands: * - ``Application.Netherlands`` - ``151`` - .. _enumitem_Application_Norway: * - ``Application.Norway`` - ``161`` - .. _enumitem_Application_Pakistan: * - ``Application.Pakistan`` - ``163`` - .. _enumitem_Application_Poland: * - ``Application.Poland`` - ``172`` - .. _enumitem_Application_Portugal: * - ``Application.Portugal`` - ``173`` - .. _enumitem_Application_Russia: * - ``Application.Russia`` - ``178`` - .. _enumitem_Application_Spain: * - ``Application.Spain`` - ``197`` - .. _enumitem_Application_Sweden: * - ``Application.Sweden`` - ``205`` - .. _enumitem_Application_Switzerland: * - ``Application.Switzerland`` - ``206`` - .. _enumitem_Application_Turkey: * - ``Application.Turkey`` - ``217`` - .. _enumitem_Application_Ukraine: * - ``Application.Ukraine`` - ``222`` - .. _enumitem_Application_UnitedKingdom: * - ``Application.UnitedKingdom`` - ``224`` - .. _enumitem_Application_UnitedStates: * - ``Application.UnitedStates`` - ``225`` - .. _enumitem_Application_Vietnam: * - ``Application.Vietnam`` - ``232`` - .. _enum_Application_Language: .. index:: single: Language Language ++++++++ This enumeration is used to specify a language. .. index:: single: Application.AnyLanguage .. index:: single: Application.Arabic .. index:: single: Application.Chinese .. index:: single: Application.Czech .. index:: single: Application.Danish .. index:: single: Application.Dutch .. index:: single: Application.English .. index:: single: Application.Estonian .. index:: single: Application.Finnish .. index:: single: Application.French .. index:: single: Application.German .. index:: single: Application.Hebrew .. index:: single: Application.Hindi .. index:: single: Application.Indonesian .. index:: single: Application.Italian .. index:: single: Application.Japanese .. index:: single: Application.Latvian .. index:: single: Application.Lithuanian .. index:: single: Application.Persian .. index:: single: Application.Polish .. index:: single: Application.Portuguese .. index:: single: Application.Russian .. index:: single: Application.Spanish .. index:: single: Application.Swedish .. index:: single: Application.Ukrainian .. index:: single: Application.Urdu .. index:: single: Application.Vietnamese .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_Application_AnyLanguage: * - ``Application.AnyLanguage`` - ``0`` - .. _enumitem_Application_Arabic: * - ``Application.Arabic`` - ``8`` - .. _enumitem_Application_Chinese: * - ``Application.Chinese`` - ``25`` - .. _enumitem_Application_Czech: * - ``Application.Czech`` - ``28`` - .. _enumitem_Application_Danish: * - ``Application.Danish`` - ``29`` - .. _enumitem_Application_Dutch: * - ``Application.Dutch`` - ``30`` - .. _enumitem_Application_English: * - ``Application.English`` - ``31`` - .. _enumitem_Application_Estonian: * - ``Application.Estonian`` - ``33`` - .. _enumitem_Application_Finnish: * - ``Application.Finnish`` - ``36`` - .. _enumitem_Application_French: * - ``Application.French`` - ``37`` - .. _enumitem_Application_German: * - ``Application.German`` - ``42`` - .. _enumitem_Application_Hebrew: * - ``Application.Hebrew`` - ``48`` - .. _enumitem_Application_Hindi: * - ``Application.Hindi`` - ``49`` - .. _enumitem_Application_Indonesian: * - ``Application.Indonesian`` - ``52`` - .. _enumitem_Application_Italian: * - ``Application.Italian`` - ``58`` - .. _enumitem_Application_Japanese: * - ``Application.Japanese`` - ``59`` - .. _enumitem_Application_Latvian: * - ``Application.Latvian`` - ``71`` - .. _enumitem_Application_Lithuanian: * - ``Application.Lithuanian`` - ``73`` - .. _enumitem_Application_Persian: * - ``Application.Persian`` - ``89`` - .. _enumitem_Application_Polish: * - ``Application.Polish`` - ``90`` - .. _enumitem_Application_Portuguese: * - ``Application.Portuguese`` - ``91`` - .. _enumitem_Application_Russian: * - ``Application.Russian`` - ``96`` - .. _enumitem_Application_Spanish: * - ``Application.Spanish`` - ``111`` - .. _enumitem_Application_Swedish: * - ``Application.Swedish`` - ``114`` - .. _enumitem_Application_Ukrainian: * - ``Application.Ukrainian`` - ``129`` - .. _enumitem_Application_Urdu: * - ``Application.Urdu`` - ``130`` - .. _enumitem_Application_Vietnamese: * - ``Application.Vietnamese`` - ``132`` - .. _example_Application: Example ******* .. code-block:: qml import InCore.Foundation 2.5 Application { id: app // populate metadata name: "example" version: "1.2.3" description: "Simple application example" url: "https://incore.readthedocs.io" vendor: "in.hub GmbH" // global settings country: Application.Germany language: Application.German timeZone: "Europe/Berlin" // print message when finished loading onCompleted: console.log("Example app ready") }