mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 21:11:39 +00:00
CHANGED: #1471 Implemented property setting for CDBViewNumber.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
072bd05c92
commit
88819cbcd9
2 changed files with 56 additions and 0 deletions
|
@ -40,6 +40,7 @@ namespace NLGUI
|
||||||
CDBViewNumber(const TCtorParam ¶m);
|
CDBViewNumber(const TCtorParam ¶m);
|
||||||
|
|
||||||
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 checkCoords();
|
virtual void checkCoords();
|
||||||
virtual void draw ();
|
virtual void draw ();
|
||||||
|
|
|
@ -84,6 +84,61 @@ namespace NLGUI
|
||||||
return CViewText::getProperty( name );
|
return CViewText::getProperty( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDBViewNumber::setProperty( const std::string &name, const std::string &value )
|
||||||
|
{
|
||||||
|
if( name == "value" )
|
||||||
|
{
|
||||||
|
_Number.link( value.c_str() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "positive" )
|
||||||
|
{
|
||||||
|
bool b;
|
||||||
|
if( fromString( value, b ) )
|
||||||
|
_Positive = b;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "format" )
|
||||||
|
{
|
||||||
|
bool b;
|
||||||
|
if( fromString( value, b ) )
|
||||||
|
_Format = b;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "divisor" )
|
||||||
|
{
|
||||||
|
sint64 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
_Divisor = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "modulo" )
|
||||||
|
{
|
||||||
|
sint64 i;
|
||||||
|
if( fromString( value, i ) )
|
||||||
|
_Divisor = i;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "suffix" )
|
||||||
|
{
|
||||||
|
_Suffix = value;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "prefix" )
|
||||||
|
{
|
||||||
|
_Prefix = value;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CViewText::setProperty( name, value );
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue