25 #ifndef WPROPERTYWRAPPER_H
26 #define WPROPERTYWRAPPER_H
32 #include "WColorWrapper.h"
33 #include "core/common/WPropertyBase.h"
70 bool getBool(
bool notify =
false )
const;
78 int getInt(
bool notify =
false )
const;
86 std::string
getString(
bool notify =
false )
const;
94 double getDouble(
bool notify =
false )
const;
102 std::string
getFilename(
bool notify =
false )
const;
Wraps the WColor class for scripts.
Encapsulates a WProperty.
std::shared_ptr< WPropertyBase > m_prop
The property.
std::string getName() const
Return the name of the property.
void setColor(WColorWrapper col)
Set the color of a color property.
void click()
Trigger a trigger property.
void setInt(int i)
Set the value of an integer property.
std::string getString(bool notify=false) const
Get the value of a string property.
std::string getDescription() const
Return the description of the property.
void setString(std::string const &s)
Set the value of a string property.
void setBool(bool b)
Set the value of a boolean property.
WPropertyWrapper(std::shared_ptr< WPropertyBase > prop)
Constructor.
void waitForUpdate()
Wait for the property to update its value.
bool getBool(bool notify=false) const
Get the value of a boolean property.
std::string getFilename(bool notify=false) const
Get the filename of a filename property.
void setFilename(std::string const &fn)
Set the filename of the filename property.
double getDouble(bool notify=false) const
Get the value of a double property.
WColorWrapper getColor(bool notify=false) const
Get the color of a color property.
int getSelection(bool notify=false) const
Get the (first) selected item of a selection property.
void setSelection(int s)
Sets the selected item of a selection.
int getInt(bool notify=false) const
Get the value of an integer property.
void setDouble(double d)
Set the value of a double property.