AppOpts Pile   version 0.0.1
The pile provides the application with easy loading
OneOpt Class Reference

Definition for an option. More...

#include <one_opt.h>

Public Member Functions

 OneOpt ()
 Default constructor.
 
 OneOpt (const OneOpt &other)
 
OneOptoperator= (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_
 

Detailed Description

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.

Constructor & Destructor Documentation

OneOpt::OneOpt ( const OneOpt other)
inline

copy constructor

Member Function Documentation

OneOpt OneOpt::create ( const QString  name,
const QString  stgs_group = "general",
const QString  description = QString(),
const QStringList  default_val = QStringList() 
)
static

Populates an instance.

Parameters
nameThe name of the option.
stgs_groupThe name of the group where the option lies in settings file.
descriptionHuman readable description.
default_valDefault value.
Returns
Newly initialized object.
const QStringList& OneOpt::defaultValue ( ) const
inline

The default.

const QString& OneOpt::description ( ) const
inline

The description.

const QString& OneOpt::group ( ) const
inline

The group.

const QString& OneOpt::name ( ) const
inline

The name.

OneOpt& OneOpt::operator= ( const OneOpt other)
inline

assignment operator

bool OneOpt::required ( ) const
inline

Is this value required to exist in at least one config file or not.

void OneOpt::setDefault ( const QStringList &  value)
inline

Change the default.

void OneOpt::setDescription ( const QString &  value)
inline

Change the description.

void OneOpt::setGroup ( const QString &  value)
inline

Change the group.

void OneOpt::setName ( const QString &  value)
inline

Change the name.

void OneOpt::setRequired ( bool  value)
inline

Change the required state.


The documentation for this class was generated from the following files: