26 #include <boost/shared_ptr.hpp>
28 #include "core/common/WProperties.h"
30 #include "WPropertyWrapper.h"
44 return m_prop->getDescription();
49 return m_prop->toPropBool()->get( notify );
54 return m_prop->toPropInt()->get( notify );
59 return m_prop->toPropString()->get( notify );
64 return m_prop->toPropDouble()->get( notify );
69 return m_prop->toPropFilename()->get( notify ).string();
74 return static_cast< int >(
m_prop->toPropSelection()->get( notify ).getItemIndexOfSelected( 0 ) );
79 m_prop->toPropBool()->set( b,
false );
84 m_prop->toPropInt()->set( i,
false );
89 m_prop->toPropString()->set( s,
false );
94 m_prop->toPropDouble()->set( d,
false );
99 m_prop->toPropFilename()->set( boost::filesystem::path( fn ),
false );
105 it.push_back( static_cast< std::size_t >( s ) );
107 m_prop->toPropSelection()->set( sel,
false );
117 m_prop->getUpdateCondition()->wait();
void setFilename(std::string const &fn)
Set the filename of the filename property.
bool getBool(bool notify=false) const
Get the value of a boolean property.
void waitForUpdate()
Wait for the property to update its value.
void setString(std::string const &s)
Set the value of a string property.
Trigger property: got triggered.
boost::shared_ptr< WPropertyBase > m_prop
The property.
std::vector< size_t > IndexList
The type used for storing index lists.
void setDouble(double d)
Set the value of a double property.
void setBool(bool b)
Set the value of a boolean property.
void setSelection(int s)
Sets the selected item of a selection.
std::string getDescription() const
Return the description of the property.
std::string getString(bool notify=false) const
Get the value of a string property.
double getDouble(bool notify=false) const
Get the value of a double property.
void click()
Trigger a trigger property.
This class represents a subset of a WItemSelection.
int getSelection(bool notify=false) const
Get the (first) selected item of a selection property.
WPropertyWrapper(boost::shared_ptr< WPropertyBase > prop)
Constructor.
std::string getName() const
Return the name of the property.
void setInt(int i)
Set the value of an integer property.
std::string getFilename(bool notify=false) const
Get the filename of a filename property.
int getInt(bool notify=false) const
Get the value of an integer property.