CHANGED: #1471 Implemented property setting for CDBViewQuantity.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-08-04 18:17:52 +02:00
parent 88819cbcd9
commit f835e224ff
2 changed files with 25 additions and 0 deletions

View file

@ -40,6 +40,7 @@ namespace NLGUI
CDBViewQuantity(const TCtorParam &param); CDBViewQuantity(const TCtorParam &param);
std::string getProperty( const std::string &name ) const; std::string getProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value );
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void draw (); virtual void draw ();

View file

@ -62,6 +62,30 @@ namespace NLGUI
return CViewText::getProperty( name ); return CViewText::getProperty( name );
} }
void CDBViewQuantity::setProperty( const std::string &name, const std::string &value )
{
if( name == "value" )
{
_Number.link( value.c_str() );
return;
}
else
if( name == "valuemax" )
{
_NumberMax.link( value.c_str() );
return;
}
else
if( name == "emptytext" )
{
_EmptyText = value;
return;
}
else
CViewText::setProperty( name, value );
}
// *************************************************************************** // ***************************************************************************
bool CDBViewQuantity::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) bool CDBViewQuantity::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
{ {