Qt Utilities  5.6.0
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 <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

 QtUtilitiesResources
 !
 
 TranslationFiles
 Convenience functions to load translations for Qt and the application.
 
 ApplicationInstances
 Convenience functions to check whether a QCoreApplication/QGuiApplication/QApplication singleton has been instantiated yet.
 
 ConfigFile
 Provides convenience functions for handling config files.
 

Macros

#define SET_QT_APPLICATION_INFO
 Sets the application meta data in the QCoreApplication singleton. More...
 
#define LOAD_QT_TRANSLATIONS
 Loads translations for Qt, other dependencies and the application. More...
 

Functions

QT_UTILITIES_EXPORT void QtUtilitiesResources::init ()
 Initiates the resources used and provided by this library. More...
 
QT_UTILITIES_EXPORT void QtUtilitiesResources::cleanup ()
 Frees the resources used and provided by this library. More...
 
QT_UTILITIES_EXPORT QString & TranslationFiles::additionalTranslationFilePath ()
 Allows to set an additional search path for translation files. More...
 
QT_UTILITIES_EXPORT void TranslationFiles::loadQtTranslationFile (std::initializer_list< QString > repositoryNames)
 Loads and installs the appropriate Qt translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void TranslationFiles::loadQtTranslationFile (std::initializer_list< QString > repositoryNames, const QString &localeName)
 
QT_UTILITIES_EXPORT void TranslationFiles::loadApplicationTranslationFile (const QString &applicationName)
 Loads and installs the appropriate application translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void TranslationFiles::loadApplicationTranslationFile (const QString &applicationName, const QString &localeName)
 Loads and installs the appropriate application translation file for the specified locale. More...
 
QT_UTILITIES_EXPORT void TranslationFiles::loadApplicationTranslationFile (const std::initializer_list< QString > &applicationNames)
 Loads and installs the appropriate application translation file for the current locale. More...
 
QT_UTILITIES_EXPORT void TranslationFiles::loadApplicationTranslationFile (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 ApplicationInstances::hasCoreApp ()
 Returns whether a QCoreApplication has been instantiated yet. More...
 
QT_UTILITIES_EXPORT QString ConfigFile::locateConfigFile (const QString &applicationName, const QString &fileName, const QSettings *settings)
 Locates the config file with the specified fileName for the application with the specified applicationName. More...
 

Macro Definition Documentation

◆ LOAD_QT_TRANSLATIONS

#define LOAD_QT_TRANSLATIONS
Value:
TranslationFiles::loadApplicationTranslationFile(APP_SPECIFIC_QT_TRANSLATION_FILES)
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:91
QT_UTILITIES_EXPORT void loadApplicationTranslationFile(const std::initializer_list< QString > &applicationNames, const QString &localeName)
Loads and installs the appropriate application translation file for the specified locale...
Definition: resources.cpp:203

Loads translations for Qt, other dependencies and the application.

Definition at line 27 of file resources.h.

◆ SET_QT_APPLICATION_INFO

#define SET_QT_APPLICATION_INFO
Value:
QCoreApplication::setOrganizationName(QStringLiteral(APP_AUTHOR)); \
QCoreApplication::setOrganizationDomain(QStringLiteral(APP_URL)); \
QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \
QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true)

Sets the application meta data in the QCoreApplication singleton.

Definition at line 17 of file resources.h.