API Documentation
Loading...
Searching...
No Matches
ApplicationOption< t_type > Class Template Reference

The default object to store data of any type that should persist through sessions of the application. More...

#include <ApplicationOptions.h>

Inheritance diagram for ApplicationOption< t_type >:
[legend]
Collaboration diagram for ApplicationOption< t_type >:
[legend]

Public Member Functions

void addListener (ResourceListener *listener, bool silent_add=false)
 
 ApplicationOption (const TranslatedString &group, const TranslatedString &label, const t_type &value, ApplicationOptions &options=ApplicationOptions::UserOptions())
 
 ApplicationOption (const TranslatedString &label, const t_type &value, ApplicationOptions &options=ApplicationOptions::UserOptions())
 
virtual void fromString (const String &value) override
 
t_type get () const
 
Resource< t_type > & getResource ()
 
const TranslatedStringgroup () const
 
virtual INIOptioniniOption () override
 
virtual bool isDefault () const override
 
const TranslatedStringlabel () const
 
void set (const t_type &value, bool make_default=false)
 
void setDefaultValue (const t_type &value)
 
virtual void setToDefaultValue () override
 
virtual String toString () const override
 
- Public Member Functions inherited from ApplicationOptionBase
virtual ~ApplicationOptionBase ()
 

Protected Attributes

t_type m_default_value
 
const TranslatedString m_group
 
const TranslatedString m_label
 
ApplicationOptionsm_options
 
Resource< t_type > m_value
 

Detailed Description

template<class t_type>
class NDEVR::ApplicationOption< t_type >

The default object to store data of any type that should persist through sessions of the application.


Class: ApplicationOption

Stores data of any type that can easily be saved or retrieved at runtime. Option belongs to a specific group for easy sorting and can be used to automatically generate widgets.

Constructor & Destructor Documentation

◆ ApplicationOption() [1/2]

template<class t_type >
ApplicationOption ( const TranslatedString & group,
const TranslatedString & label,
const t_type & value,
ApplicationOptions & options = ApplicationOptions::UserOptions() )
inline

◆ ApplicationOption() [2/2]

template<class t_type >
ApplicationOption ( const TranslatedString & label,
const t_type & value,
ApplicationOptions & options = ApplicationOptions::UserOptions() )
inline

Member Function Documentation

◆ addListener()

template<class t_type >
void addListener ( ResourceListener * listener,
bool silent_add = false )
inline

◆ fromString()

template<class t_type >
virtual void fromString ( const String & value)
inlineoverridevirtual

Implements ApplicationOptionBase.

◆ get()

template<class t_type >
t_type get ( ) const
inline

◆ getResource()

template<class t_type >
Resource< t_type > & getResource ( )
inline

◆ group()

template<class t_type >
const TranslatedString & group ( ) const
inline

◆ iniOption()

template<class t_type >
virtual INIOption * iniOption ( )
inlineoverridevirtual

Implements ApplicationOptionBase.

◆ isDefault()

template<class t_type >
virtual bool isDefault ( ) const
inlineoverridevirtual

Implements ApplicationOptionBase.

◆ label()

template<class t_type >
const TranslatedString & label ( ) const
inline

◆ set()

template<class t_type >
void set ( const t_type & value,
bool make_default = false )
inline

◆ setDefaultValue()

template<class t_type >
void setDefaultValue ( const t_type & value)
inline

◆ setToDefaultValue()

template<class t_type >
virtual void setToDefaultValue ( )
inlineoverridevirtual

Implements ApplicationOptionBase.

◆ toString()

template<class t_type >
virtual String toString ( ) const
inlineoverridevirtual

Implements ApplicationOptionBase.

Member Data Documentation

◆ m_default_value

template<class t_type >
t_type m_default_value
protected

◆ m_group

template<class t_type >
const TranslatedString m_group
protected

◆ m_label

template<class t_type >
const TranslatedString m_label
protected

◆ m_options

template<class t_type >
ApplicationOptions& m_options
protected

◆ m_value

template<class t_type >
Resource<t_type> m_value
protected

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