Qt Utilities  6.4.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Namespaces | Macros | Functions
resources.h File Reference
#include "../global.h"
#include <QtContainerFwd>
#include <QtGlobal>
#include <initializer_list>
Include dependency graph for resources.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 QtUtilities
 !
 
 QtUtilities::QtUtilitiesResources
 Functions for using the resources provided by this library.
 
 QtUtilities::TranslationFiles
 Convenience functions to load translations for Qt and the application.
 
 QtUtilities::ApplicationInstances
 Convenience functions to check whether a QCoreApplication/QGuiApplication/QApplication singleton has been instantiated yet.
 

Macros

#define SET_QT_APPLICATION_INFO
 Sets the application meta data in the QCoreApplication singleton and attributes commonly used within my applications. More...
 
#define LOAD_QT_TRANSLATIONS
 Loads translations for Qt, other dependencies and the application. More...
 

Functions

QT_UTILITIES_EXPORT void QtUtilities::QtUtilitiesResources::init ()
 Initiates the resources used and provided by this library. More...
 
QT_UTILITIES_EXPORT void QtUtilities::QtUtilitiesResources::cleanup ()
 Frees the resources used and provided by this library. More...
 
QT_UTILITIES_EXPORT QString & QtUtilities::TranslationFiles::additionalTranslationFilePath ()
 Allows to set an additional search path for translation files. More...
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadQtTranslationFile (std::initializer_list< QString > repositoryNames)
 Loads and installs the appropriate Qt translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadQtTranslationFile (std::initializer_list< QString > repositoryNames, const QString &localeName)
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadApplicationTranslationFile (const QString &configName, const QString &applicationName)
 Loads and installs the appropriate application translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadApplicationTranslationFile (const QString &configName, const QString &applicationName, const QString &localeName)
 Loads and installs the appropriate application translation file for the specified locale. More...
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadApplicationTranslationFile (const QString &configName, const std::initializer_list< QString > &applicationNames)
 Loads and installs the appropriate application translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void QtUtilities::TranslationFiles::loadApplicationTranslationFile (const QString &configName, const std::initializer_list< QString > &applicationNames, const QString &localeName)
 Loads and installs the appropriate application translation file for the specified locale. More...
 
QT_UTILITIES_EXPORT bool QtUtilities::ApplicationInstances::hasCoreApp ()
 Returns whether a QCoreApplication has been instantiated yet. More...
 
QT_UTILITIES_EXPORT void QtUtilities::setupCommonQtApplicationAttributes ()
 Sets Qt application attributes which are commonly used within my Qt applications. More...
 

Macro Definition Documentation

◆ LOAD_QT_TRANSLATIONS

#define LOAD_QT_TRANSLATIONS
Value:
QtUtilities::TranslationFiles::loadApplicationTranslationFile(QStringLiteral(PROJECT_CONFIG_NAME), APP_SPECIFIC_QT_TRANSLATION_FILES)
QT_UTILITIES_EXPORT void loadApplicationTranslationFile(const QString &configName, const std::initializer_list< QString > &applicationNames, const QString &localeName)
Loads and installs the appropriate application translation file for the specified locale.
Definition: resources.cpp:264
QT_UTILITIES_EXPORT void loadQtTranslationFile(std::initializer_list< QString > repositoryNames)
Loads and installs the appropriate Qt translation file for the current locale.
Definition: resources.cpp:95

Loads translations for Qt, other dependencies and the application.

Definition at line 32 of file resources.h.

◆ SET_QT_APPLICATION_INFO

#define SET_QT_APPLICATION_INFO
Value:
QCoreApplication::setOrganizationName(QStringLiteral(APP_AUTHOR)); \
QCoreApplication::setOrganizationDomain(QStringLiteral(APP_DOMAIN)); \
QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \
QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \
QT_UTILITIES_EXPORT void setupCommonQtApplicationAttributes()
Sets Qt application attributes which are commonly used within my Qt applications.
Definition: resources.cpp:314

Sets the application meta data in the QCoreApplication singleton and attributes commonly used within my applications.

See also
QtUtilities::setupCommonQtApplicationAttributes()

Definition at line 22 of file resources.h.