Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
jm::Property Struct Reference

This interface defines the possibility to edit properties of an object via a uniform interface. This is particularly useful for saving time when objects are to be edited in the GUI. More...

Public Member Functions

 Property ()
 Default constructor.
 
 Property (const String &id)
 Constructor with the property id.
 
 Property (const String &id, const String &group, const String &name, const String &hint, const String &editor, bool readOnly=false, PropertyChangeMode changeMode=PropertyChangeMode::kItself, bool allowEmpty=true)
 Constructor with parameters.
 
bool isReadOnly () const
 Status, if property is read-only.
 
bool allowEmpty () const
 Status, if property can be empty.
 
PropertyChangeMode changeMode () const
 Status, how the change of one property will effect other properties of the corresponding object.
 
bool is (const String &id) const
 Short call for checking is. Same as: GetId().IsEqual()
 
const Stringid () const
 Returns the id of the property.
 
const Stringname () const
 Returns the name of the property.
 
const Stringhint () const
 Returns a help string for the property.
 
const Stringeditor () const
 Returns an identifiert for the suggested edtior of this property.
 
const Stringgroup () const
 Returns the group this property can belong to.
 
void setIcon (const String &iconname)
 Set the name of an icon of this property.
 
const Stringicon () const
 Returns the icon name of this property.
 
Status setStringValue (const String &value)
 Set the string value of this property.
 
Status setUnitValue (double value, const String &unit)
 Set unit value.
 
const StringstringValue () const
 Returns the string value of this property.
 
Status setIntegerValue (int64 value)
 Set the Integer value of this Property.
 
int64 integerValue () const
 Returns the Integer Value of this property.
 
Status setBoolValue (bool value)
 Set the Bool value of this Property.
 
bool boolValue () const
 Returns the Bool Value of this property.
 
Status setDoubleValue (double value)
 Set the Double value of this Property.
 
double doubleValue () const
 Returns the Dool Value of this property.
 
PropertyType type () const
 Returns the type of the last value which was set. It is assumed that this is the right property type. Consider that on type (like comboboxes) this type can be wrong and has no meaning in that case.
 
void setType (PropertyType type)
 
void setValue (const Property &other)
 Übernimmt den Wert aus dem anderen Property.
 
bool isValueEquals (const Property &other) const
 Prüfe, ob Werte gleich sind.
 

Friends

DllExport friend bool operator== (Property const &v1, Property const &v2)
 Implementierung des Operators ==.
 

Detailed Description

This interface defines the possibility to edit properties of an object via a uniform interface. This is particularly useful for saving time when objects are to be edited in the GUI.

Constructor & Destructor Documentation

◆ Property() [1/3]

jm::Property::Property ( )

Default constructor.

◆ Property() [2/3]

jm::Property::Property ( const String id)
explicit

Constructor with the property id.

◆ Property() [3/3]

jm::Property::Property ( const String id,
const String group,
const String name,
const String hint,
const String editor,
bool  readOnly = false,
PropertyChangeMode  changeMode = PropertyChangeMode::kItself,
bool  allowEmpty = true 
)

Constructor with parameters.

Parameters
idThe id of the property
groupThe group of the property
nameThe name of the property
hintA hint/help string of the property for the user
editorPreferred editor widget for this property
readOnlyStatus, if the property is read-only
changeModeMode of change infulence
allowEmptyStatus, if property can be empty

Member Function Documentation

◆ allowEmpty()

bool jm::Property::allowEmpty ( ) const

Status, if property can be empty.

◆ boolValue()

bool jm::Property::boolValue ( ) const

Returns the Bool Value of this property.

◆ changeMode()

PropertyChangeMode jm::Property::changeMode ( ) const

Status, how the change of one property will effect other properties of the corresponding object.

◆ doubleValue()

double jm::Property::doubleValue ( ) const

Returns the Dool Value of this property.

◆ editor()

const String & jm::Property::editor ( ) const

Returns an identifiert for the suggested edtior of this property.

◆ group()

const String & jm::Property::group ( ) const

Returns the group this property can belong to.

◆ hint()

const String & jm::Property::hint ( ) const

Returns a help string for the property.

◆ icon()

const String & jm::Property::icon ( ) const

Returns the icon name of this property.

◆ id()

const String & jm::Property::id ( ) const

Returns the id of the property.

◆ integerValue()

int64 jm::Property::integerValue ( ) const

Returns the Integer Value of this property.

◆ is()

bool jm::Property::is ( const String id) const

Short call for checking is. Same as: GetId().IsEqual()

Parameters
idThe unique id of the property.

◆ isReadOnly()

bool jm::Property::isReadOnly ( ) const

Status, if property is read-only.

◆ isValueEquals()

bool jm::Property::isValueEquals ( const Property other) const

Prüfe, ob Werte gleich sind.

◆ name()

const String & jm::Property::name ( ) const

Returns the name of the property.

◆ setBoolValue()

Status jm::Property::setBoolValue ( bool  value)

Set the Bool value of this Property.

Parameters
valueThe Bool value

◆ setDoubleValue()

Status jm::Property::setDoubleValue ( double  value)

Set the Double value of this Property.

Parameters
valueThe Bool value

◆ setIcon()

void jm::Property::setIcon ( const String iconname)

Set the name of an icon of this property.

Parameters
iconnameThe name of the icon.

◆ setIntegerValue()

Status jm::Property::setIntegerValue ( int64  value)

Set the Integer value of this Property.

Parameters
valueThe Integer value

◆ setStringValue()

Status jm::Property::setStringValue ( const String value)

Set the string value of this property.

Parameters
valueThe string value.

◆ setType()

void jm::Property::setType ( PropertyType  type)

◆ setUnitValue()

Status jm::Property::setUnitValue ( double  value,
const String unit 
)

Set unit value.

Parameters
valueThe number.
unitThe unit.

◆ setValue()

void jm::Property::setValue ( const Property other)

Übernimmt den Wert aus dem anderen Property.

◆ stringValue()

const String & jm::Property::stringValue ( ) const

Returns the string value of this property.

◆ type()

PropertyType jm::Property::type ( ) const

Returns the type of the last value which was set. It is assumed that this is the right property type. Consider that on type (like comboboxes) this type can be wrong and has no meaning in that case.

Friends And Related Symbol Documentation

◆ operator==

DllExport friend bool operator== ( Property const &  v1,
Property const &  v2 
)
friend

Implementierung des Operators ==.

Member Data Documentation

◆ boolValue

bool jm::Property::boolValue

◆ doubleValue

double jm::Property::doubleValue

◆ floatValue

float jm::Property::floatValue

◆ intValue

int64 jm::Property::intValue

◆ uintValue

uint64 jm::Property::uintValue