2016-07-04 23:26:48 +02:00
|
|
|
#ifndef APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H
|
|
|
|
#define APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H
|
2015-04-22 18:57:44 +02:00
|
|
|
|
2016-08-29 15:41:11 +02:00
|
|
|
#include "../global.h"
|
|
|
|
|
2015-04-22 18:57:44 +02:00
|
|
|
#include <c++utilities/application/argumentparser.h>
|
|
|
|
|
|
|
|
namespace ApplicationUtilities {
|
|
|
|
|
2017-05-01 03:16:25 +02:00
|
|
|
class QT_UTILITIES_EXPORT QtConfigArguments {
|
2015-04-22 18:57:44 +02:00
|
|
|
public:
|
|
|
|
QtConfigArguments();
|
|
|
|
|
|
|
|
Argument &qtWidgetsGuiArg();
|
|
|
|
Argument &qtQuickGuiArg();
|
|
|
|
Argument &languageArg();
|
|
|
|
|
|
|
|
bool areQtGuiArgsPresent() const;
|
2016-08-14 22:44:25 +02:00
|
|
|
void applySettings(bool preventApplyingDefaultFont = false) const;
|
2015-04-22 18:57:44 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
Argument m_qtWidgetsGuiArg;
|
|
|
|
Argument m_qtQuickGuiArg;
|
|
|
|
Argument m_lngArg;
|
|
|
|
Argument m_qmlDebuggerArg;
|
|
|
|
Argument m_styleArg;
|
|
|
|
Argument m_iconThemeArg;
|
|
|
|
Argument m_fontArg;
|
2016-02-09 01:06:50 +01:00
|
|
|
Argument m_libraryPathsArg;
|
2016-08-16 19:35:40 +02:00
|
|
|
Argument m_platformThemeArg;
|
2015-04-22 18:57:44 +02:00
|
|
|
};
|
|
|
|
|
2015-09-01 20:08:43 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns the argument for the Qt Widgets GUI.
|
|
|
|
*/
|
2015-04-22 18:57:44 +02:00
|
|
|
inline Argument &QtConfigArguments::qtWidgetsGuiArg()
|
|
|
|
{
|
|
|
|
return m_qtWidgetsGuiArg;
|
|
|
|
}
|
|
|
|
|
2015-09-01 20:08:43 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns the argument for the Qt Quick GUI.
|
|
|
|
*/
|
2015-04-22 18:57:44 +02:00
|
|
|
inline Argument &QtConfigArguments::qtQuickGuiArg()
|
|
|
|
{
|
|
|
|
return m_qtQuickGuiArg;
|
|
|
|
}
|
|
|
|
|
2015-09-01 20:08:43 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns the language argument.
|
|
|
|
*/
|
2015-04-22 18:57:44 +02:00
|
|
|
inline Argument &QtConfigArguments::languageArg()
|
|
|
|
{
|
|
|
|
return m_lngArg;
|
|
|
|
}
|
|
|
|
|
2015-09-01 20:08:43 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns whether at least one of the GUI arguments is present.
|
|
|
|
*/
|
2015-04-22 18:57:44 +02:00
|
|
|
inline bool QtConfigArguments::areQtGuiArgsPresent() const
|
|
|
|
{
|
|
|
|
return m_qtWidgetsGuiArg.isPresent() || m_qtQuickGuiArg.isPresent();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-04 23:26:48 +02:00
|
|
|
#endif // APPLICATION_UTILITIES_QTCONFIGARGUMENTS_H
|
2015-04-22 18:57:44 +02:00
|
|
|
|
|
|
|
#ifdef QT_CONFIG_ARGUMENTS
|
2017-05-01 03:16:25 +02:00
|
|
|
#undef QT_CONFIG_ARGUMENTS
|
2015-04-22 18:57:44 +02:00
|
|
|
#endif
|
|
|
|
#define QT_CONFIG_ARGUMENTS ApplicationUtilities::QtConfigArguments
|