mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 13:01:41 +00:00
CHANGED: #1471 CDBGroupComboBox fields can now be serialized.
This commit is contained in:
parent
f40cbfe768
commit
65f04c6cdc
2 changed files with 19 additions and 0 deletions
|
@ -46,6 +46,7 @@ namespace NLGUI
|
|||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
void setProperty( const std::string &name, const std::string &value );
|
||||
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
|
||||
|
||||
/// CInterfaceGroup Interface
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||
|
|
|
@ -111,6 +111,24 @@ namespace NLGUI
|
|||
CInterfaceGroup::setProperty( name, value );
|
||||
}
|
||||
|
||||
xmlNodePtr CDBGroupComboBox::serialize( xmlNodePtr parentNode, const char *type ) const
|
||||
{
|
||||
xmlNodePtr node = CInterfaceGroup::serialize( parentNode, type );
|
||||
if( node == NULL )
|
||||
return NULL;
|
||||
|
||||
xmlSetProp( node, BAD_CAST "type", BAD_CAST "combo_box" );
|
||||
xmlSetProp( node, BAD_CAST "linked_to_db", BAD_CAST toString( _LinkedToDB ).c_str() );
|
||||
|
||||
if( _Selection.getNodePtr() != NULL )
|
||||
xmlSetProp( node, BAD_CAST "value", BAD_CAST _Selection.getNodePtr()->getFullName().c_str() );
|
||||
else
|
||||
xmlSetProp( node, BAD_CAST "value", BAD_CAST "" );
|
||||
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CDBGroupComboBox::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue