Commit 46f77a6c authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - added hidden flag

parent a187fe10
......@@ -26,7 +26,8 @@
WPropertyBase::WPropertyBase( std::string name, std::string description ):
m_name( name ),
m_description( description )
m_description( description ),
m_hidden( false )
{
// initialize members
}
......@@ -51,3 +52,13 @@ PROPERTY_TYPE WPropertyBase::getType() const
return m_type;
}
bool WPropertyBase::isHidden() const
{
return m_hidden;
}
void WPropertyBase::setHidden( bool hidden )
{
m_hidden = hidden;
}
......@@ -63,6 +63,20 @@ public:
*/
std::string getDescription() const;
/**
* Determines whether the property is hidden or not.
*
* \return true if hidden
*/
bool isHidden() const;
/**
* Sets the property hidden. This flag is especially used by the GUI.
*
* \param hidden true if it should be hidden.
*/
void setHidden( bool hidden );
/**
* Gets the real WPropertyVariable type of this instance.
*
......@@ -82,6 +96,11 @@ protected:
*/
std::string m_description;
/**
* Flag denoting whether the property is hidden or not.
*/
bool m_hidden;
/**
* Type of the PropertyVariable instance
*/
......
......@@ -102,6 +102,17 @@ public:
*/
virtual ~WPropertyVariable();
/**
* Determines whether the specified value is acceptable.
*
* \param newValue the new value.
*
* \return true if it is a valid/acceptable value.
*
* \note this currently is a dummy.
*/
bool accept( T newValue );
protected:
/**
......@@ -158,6 +169,13 @@ WPropertyVariable< T >::~WPropertyVariable()
m_notifierConnection.disconnect();
}
template < typename T >
bool WPropertyVariable< T >::accept( T newValue )
{
// this currently is a dummy. Later this can be implemented to determine whether a value is valid.
return true;
}
template < typename T >
void WPropertyVariable< T >::updateType()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment