1 #ifndef APPLICATION_UTILITIES_RESOURCES_H 2 #define APPLICATION_UTILITIES_RESOURCES_H 8 #include <initializer_list> 10 QT_FORWARD_DECLARE_CLASS(QString)
11 QT_FORWARD_DECLARE_CLASS(QStringList)
12 QT_FORWARD_DECLARE_CLASS(QSettings)
17 #define SET_QT_APPLICATION_INFO \ 18 QCoreApplication::setOrganizationName(QStringLiteral(APP_AUTHOR)); \ 19 QCoreApplication::setOrganizationDomain(QStringLiteral(APP_URL)); \ 20 QCoreApplication::setApplicationName(QStringLiteral(APP_NAME)); \ 21 QCoreApplication::setApplicationVersion(QStringLiteral(APP_VERSION)); \ 22 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true) 27 #define LOAD_QT_TRANSLATIONS \ 28 TranslationFiles::loadQtTranslationFile(QT_TRANSLATION_FILES); \ 29 TranslationFiles::loadApplicationTranslationFile(APP_SPECIFIC_QT_TRANSLATION_FILES) 50 #if defined(QT_UTILITIES_GUI_QTWIDGETS) 53 #if defined(QT_UTILITIES_GUI_QTWIDGETS) || defined(QT_UTILITIES_GUI_QTQUICK) 64 #endif // APPLICATION_UTILITIES_RESOURCES_H QT_UTILITIES_EXPORT void loadQtTranslationFile(std::initializer_list< QString > repositoryNames)
Loads and installs the appropriate Qt translation file for the current locale.
QT_UTILITIES_EXPORT void cleanup()
Frees the resources used and provided by this library.
QT_UTILITIES_EXPORT bool hasCoreApp()
Returns whether a QCoreApplication has been instantiated yet.
Convenience functions to load translations for Qt and the application.
QT_UTILITIES_EXPORT QString locateConfigFile(const QString &applicationName, const QString &fileName, const QSettings *settings=nullptr)
Locates the config file with the specified fileName for the application with the specified applicatio...
QT_UTILITIES_EXPORT QString & additionalTranslationFilePath()
Allows to set an additional search path for translation files.
QT_UTILITIES_EXPORT void init()
Initiates the resources used and provided by this library.
Convenience functions to check whether a QCoreApplication/QGuiApplication/QApplication singleton has ...
QT_UTILITIES_EXPORT void loadApplicationTranslationFile(const QString &applicationName)
Loads and installs the appropriate application translation file for the current locale.
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
Provides convenience functions for handling config files.