AppOpts Pile
version 0.0.1
The pile provides the application with easy loading
|
Definition for an option. More...
#include <one_opt.h>
Public Member Functions | |
OneOpt () | |
Default constructor. | |
OneOpt (const OneOpt &other) | |
OneOpt & | operator= (const OneOpt &other) |
const QString & | name () const |
void | setName (const QString &value) |
QString | fullName () const |
Full name (includes the group) | |
const QString & | group () const |
void | setGroup (const QString &value) |
const QString & | description () const |
void | setDescription (const QString &value) |
const QStringList & | defaultValue () const |
void | setDefault (const QStringList &value) |
bool | required () const |
void | setRequired (bool value) |
Static Public Member Functions | |
static OneOpt | create (const QString name, const QString stgs_group="general", const QString description=QString(), const QStringList default_val=QStringList()) |
Populates an instance. More... | |
Public Attributes | |
QString | name_ |
QString | group_ |
QString | description_ |
QStringList | default_ |
bool | required_ |
Definition for an option.
This class describes an option and contains a default value for it. The class does NOT hold the value for the variable. Lists of such instances are used to initialize the AppOpts class by only reading the variables we know about.
|
inline |
copy constructor
|
static |
Populates an instance.
name | The name of the option. |
stgs_group | The name of the group where the option lies in settings file. |
description | Human readable description. |
default_val | Default value. |
|
inline |
The default.
|
inline |
The description.
|
inline |
The group.
|
inline |
The name.
|
inline |
Is this value required to exist in at least one config file or not.
|
inline |
Change the default.
|
inline |
Change the description.
|
inline |
Change the group.
|
inline |
Change the name.
|
inline |
Change the required state.