C++ Utilities: application/fakeqtconfigarguments.h Source File

C++ Utilities 5.33.0 Useful C++ classes and routines such as argument parser, IO and conversion utilities

Loading...
Searching...
No Matches
fakeqtconfigarguments.h
Go to the documentation of this file.
1#ifndef APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
2#define APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
3
4#include "./argumentparser.h"
5
6namespace CppUtilities {
7
8 class CPP_UTILITIES_EXPORT FakeQtConfigArguments {
9public:
10 FakeQtConfigArguments();
11
12 Argument &qtWidgetsGuiArg();
13 Argument &qtQuickGuiArg();
14
15 bool areQtGuiArgsPresent() const;
16
17private:
18 Argument m_qtWidgetsGuiArg;
19 Argument m_qtQuickGuiArg;
20};
21
25 inline Argument &FakeQtConfigArguments::qtWidgetsGuiArg()
26{
27 return m_qtWidgetsGuiArg;
28}
29
33 inline Argument &FakeQtConfigArguments::qtQuickGuiArg()
34{
35 return m_qtQuickGuiArg;
36}
37
41 inline bool FakeQtConfigArguments::areQtGuiArgsPresent() const
42{
43 return m_qtWidgetsGuiArg.isPresent() || m_qtQuickGuiArg.isPresent();
44}
45
46} // namespace CppUtilities
47
48#ifndef QT_CONFIG_ARGUMENTS
49#define QT_CONFIG_ARGUMENTS CppUtilities::FakeQtConfigArguments
50#endif
51
52#endif // APPLICATION_UTILITIES_FAKEQTCONFIGARGUMENTS_H
argumentparser.h
CppUtilities::Argument
The Argument class is a wrapper for command line argument information.
Definition argumentparser.h:263
CppUtilities::Argument::isPresent
bool isPresent() const
Returns an indication whether the argument could be detected when parsing.
Definition argumentparser.h:747
CppUtilities::FakeQtConfigArguments::FakeQtConfigArguments
FakeQtConfigArguments()
Constructs new fake Qt-config arguments.
Definition fakeqtconfigarguments.cpp:15
CppUtilities::FakeQtConfigArguments::qtQuickGuiArg
Argument & qtQuickGuiArg()
Returns the argument to show the Qt-quick-based GUI.
Definition fakeqtconfigarguments.h:33
CppUtilities::FakeQtConfigArguments::areQtGuiArgsPresent
bool areQtGuiArgsPresent() const
Returns whether at least one of the arguments is present.
Definition fakeqtconfigarguments.h:41
CppUtilities::FakeQtConfigArguments::qtWidgetsGuiArg
Argument & qtWidgetsGuiArg()
Returns the argument to show the Qt-widgets-based GUI.
Definition fakeqtconfigarguments.h:25
CPP_UTILITIES_EXPORT
#define CPP_UTILITIES_EXPORT
Marks the symbol to be exported by the c++utilities library.
Definition global.h:14
CppUtilities
Contains all utilities provided by the c++utilities library.
Definition argumentparser.h:18