mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-25 16:46:17 +00:00
CHANGED: #1471 CDBViewNumber fields can now be serialized.
This commit is contained in:
parent
09458f2452
commit
a258c451c1
2 changed files with 24 additions and 0 deletions
|
@ -41,6 +41,7 @@ namespace NLGUI
|
||||||
|
|
||||||
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 );
|
void setProperty( const std::string &name, const std::string &value );
|
||||||
|
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||||
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 ();
|
||||||
|
|
|
@ -139,6 +139,29 @@ namespace NLGUI
|
||||||
CViewText::setProperty( name, value );
|
CViewText::setProperty( name, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xmlNodePtr CDBViewNumber::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||||
|
{
|
||||||
|
xmlNodePtr node = CViewText::serialize( parentNode, type );
|
||||||
|
if( node == NULL )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
xmlSetProp( node, BAD_CAST "type", BAD_CAST "text_number" );
|
||||||
|
|
||||||
|
if( _Number.getNodePtr() != NULL )
|
||||||
|
xmlSetProp( node, BAD_CAST "value", BAD_CAST _Number.getNodePtr()->getFullName().c_str() );
|
||||||
|
else
|
||||||
|
xmlSetProp( node, BAD_CAST "value", BAD_CAST "" );
|
||||||
|
|
||||||
|
xmlSetProp( node, BAD_CAST "positive", BAD_CAST toString( _Positive ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "format", BAD_CAST toString( _Format ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "divisor", BAD_CAST toString( _Divisor ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "modulo", BAD_CAST toString( _Modulo ).c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "suffix", BAD_CAST _Suffix.toString().c_str() );
|
||||||
|
xmlSetProp( node, BAD_CAST "prefix", BAD_CAST _Prefix.toString().c_str() );
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue