2019-09-04 18:45:48 +02:00
|
|
|
#ifndef APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
|
|
|
|
#define APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
|
2015-04-22 18:36:40 +02:00
|
|
|
|
2015-09-06 20:19:09 +02:00
|
|
|
#include "./argumentparser.h"
|
2015-04-22 18:36:40 +02:00
|
|
|
|
2019-06-10 21:56:46 +02:00
|
|
|
namespace CppUtilities {
|
2015-04-22 18:36:40 +02:00
|
|
|
|
2017-05-01 03:13:11 +02:00
|
|
|
class CPP_UTILITIES_EXPORT FakeQtConfigArguments {
|
2015-04-22 18:36:40 +02:00
|
|
|
public:
|
|
|
|
FakeQtConfigArguments();
|
|
|
|
|
|
|
|
Argument &qtWidgetsGuiArg();
|
|
|
|
Argument &qtQuickGuiArg();
|
|
|
|
|
|
|
|
bool areQtGuiArgsPresent() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Argument m_qtWidgetsGuiArg;
|
|
|
|
Argument m_qtQuickGuiArg;
|
|
|
|
};
|
|
|
|
|
2016-06-10 22:59:22 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns the argument to show the Qt-widgets-based GUI.
|
|
|
|
*/
|
2015-04-22 18:36:40 +02:00
|
|
|
inline Argument &FakeQtConfigArguments::qtWidgetsGuiArg()
|
|
|
|
{
|
|
|
|
return m_qtWidgetsGuiArg;
|
|
|
|
}
|
|
|
|
|
2016-06-10 22:59:22 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns the argument to show the Qt-quick-based GUI.
|
|
|
|
*/
|
2015-04-22 18:36:40 +02:00
|
|
|
inline Argument &FakeQtConfigArguments::qtQuickGuiArg()
|
|
|
|
{
|
|
|
|
return m_qtQuickGuiArg;
|
|
|
|
}
|
|
|
|
|
2016-06-10 22:59:22 +02:00
|
|
|
/*!
|
|
|
|
* \brief Returns whether at least one of the arguments is present.
|
|
|
|
*/
|
2015-04-22 18:36:40 +02:00
|
|
|
inline bool FakeQtConfigArguments::areQtGuiArgsPresent() const
|
|
|
|
{
|
|
|
|
return m_qtWidgetsGuiArg.isPresent() || m_qtQuickGuiArg.isPresent();
|
|
|
|
}
|
|
|
|
|
2019-06-10 21:56:46 +02:00
|
|
|
} // namespace CppUtilities
|
2015-04-22 18:36:40 +02:00
|
|
|
|
|
|
|
#ifndef QT_CONFIG_ARGUMENTS
|
2019-06-10 21:56:46 +02:00
|
|
|
#define QT_CONFIG_ARGUMENTS CppUtilities::FakeQtConfigArguments
|
2015-04-22 18:36:40 +02:00
|
|
|
#endif
|
|
|
|
|
2019-09-04 18:45:48 +02:00
|
|
|
#endif // APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
|