10 #ifndef GUARD_APPOPTS_ONEOPT_H_INCLUDE
11 #define GUARD_APPOPTS_ONEOPT_H_INCLUDE
13 #include <appopts/appopts-config.h>
19 #include <QStringList>
39 const QString stgs_group =
"general",
40 const QString description = QString(),
41 const QStringList default_val = QStringList());
58 description_(other.description_),
59 default_(other.default_),
60 required_(other.required_)
67 group_ = other.group_;
68 description_ = other.description_;
69 default_ = other.default_;
70 required_ = other.required_;
76 inline const QString &
90 if (group_.isEmpty()) {
93 return QString (
"%1/%2")
102 inline const QString &
116 inline const QString &
125 description_ = value;
130 inline const QStringList &
164 inline bool operator== (
168 inline bool operator!= (
172 inline uint qHash(
OneOpt key) {
return qHash(key.
name())*qHash(key.
group()); }
174 #endif // GUARD_APPOPTS_ONEOPT_H_INCLUDE
void setDefault(const QStringList &value)
Definition: one_opt.h:138
OneOpt & operator=(const OneOpt &other)
Definition: one_opt.h:65
const QString & description() const
Definition: one_opt.h:117
Definition for an option.
Definition: one_opt.h:25
bool required() const
Definition: one_opt.h:145
const QString & name() const
Definition: one_opt.h:77
const QString & group() const
Definition: one_opt.h:103
void setGroup(const QString &value)
Definition: one_opt.h:110
void setRequired(bool value)
Definition: one_opt.h:152
void setDescription(const QString &value)
Definition: one_opt.h:124
const QStringList & defaultValue() const
Definition: one_opt.h:131
void setName(const QString &value)
Definition: one_opt.h:84
OneOpt()
Default constructor.
Definition: one_opt.h:45
OneOpt(const OneOpt &other)
Definition: one_opt.h:55
QString fullName() const
Full name (includes the group)
Definition: one_opt.h:89