OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::OnePropertyDialogCfg Class Reference

#include "OnePropertyDialogCfg.h"

Inheritance diagram for ot::OnePropertyDialogCfg:
ot::DialogCfg ot::Serializable

Public Member Functions

 OnePropertyDialogCfg (Property *_property=(Property *) nullptr)
 
 OnePropertyDialogCfg (const std::string &_title, Property *_property=(Property *) nullptr)
 
virtual ~OnePropertyDialogCfg ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ot::ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void setProperty (Property *_property)
 Set or replace the property If a property was set before it will be destroyed.
 
PropertygetProperty (void) const
 
PropertytakeProperty (void)
 Returns the current property and replaces it with null.
 
- Public Member Functions inherited from ot::DialogCfg
 DialogCfg (DialogFlags _flags=DialogFlags(NoFlags))
 
 DialogCfg (const std::string &_title, DialogFlags _flags=DialogFlags(NoFlags))
 
 DialogCfg (const DialogCfg &_other)
 
virtual ~DialogCfg ()
 
DialogCfgoperator= (const DialogCfg &_other)
 
void setName (const std::string &_name)
 
const std::string & getName (void) const
 
void setTitle (const std::string &_title)
 
const std::string & getTitle (void) const
 
void setFlag (DialogFlag _flag, bool _active=true)
 
void setFlags (DialogFlags _flags)
 
DialogFlags getFlags (void) const
 
void setMinSize (int _width, int _height)
 
void setMinSize (const ot::Size2D &_size)
 
const ot::Size2DgetMinSize (void) const
 
void setMaxSize (int _width, int _height)
 
void setMaxSize (const ot::Size2D &_size)
 
const ot::Size2DgetMaxSize (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Additional Inherited Members

- Public Types inherited from ot::DialogCfg
enum  DialogFlag { NoFlags = 0x00 , CancelOnNoChange = 0x01 , MoveGrabAnywhere = 0x02 , RecenterOnF11 = 0x04 }
 
typedef Flags< DialogFlagDialogFlags
 
- Static Public Member Functions inherited from ot::DialogCfg
static std::string toString (DialogFlag _flag)
 
static DialogFlag stringToFlag (const std::string &_flag)
 
static std::list< std::string > toStringList (DialogFlags _flags)
 
static DialogFlags stringListToFlags (const std::list< std::string > &_flags)
 

Constructor & Destructor Documentation

◆ OnePropertyDialogCfg() [1/2]

ot::OnePropertyDialogCfg::OnePropertyDialogCfg ( Property * _property = (Property*)nullptr)

◆ OnePropertyDialogCfg() [2/2]

ot::OnePropertyDialogCfg::OnePropertyDialogCfg ( const std::string & _title,
Property * _property = (Property*)nullptr )

◆ ~OnePropertyDialogCfg()

ot::OnePropertyDialogCfg::~OnePropertyDialogCfg ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::OnePropertyDialogCfg::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference
_allocatorAllocator

Reimplemented from ot::DialogCfg.

◆ getProperty()

Property * ot::OnePropertyDialogCfg::getProperty ( void ) const
inline

◆ setFromJsonObject()

void ot::OnePropertyDialogCfg::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Reimplemented from ot::DialogCfg.

◆ setProperty()

void ot::OnePropertyDialogCfg::setProperty ( Property * _property)

Set or replace the property If a property was set before it will be destroyed.

◆ takeProperty()

ot::Property * ot::OnePropertyDialogCfg::takeProperty ( void )

Returns the current property and replaces it with null.


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