mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
CHANGED: Implemented property setting for CDBGroupComboBox.
This commit is contained in:
parent
d84830051f
commit
87e5b794ae
2 changed files with 39 additions and 0 deletions
|
@ -44,6 +44,9 @@ namespace NLGUI
|
||||||
CDBGroupComboBox(const TCtorParam ¶m);
|
CDBGroupComboBox(const TCtorParam ¶m);
|
||||||
~CDBGroupComboBox();
|
~CDBGroupComboBox();
|
||||||
|
|
||||||
|
std::string getProperty( const std::string &name ) const;
|
||||||
|
void setProperty( const std::string &name, const std::string &value );
|
||||||
|
|
||||||
/// CInterfaceGroup Interface
|
/// CInterfaceGroup Interface
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
virtual void updateCoords ();
|
virtual void updateCoords ();
|
||||||
|
|
|
@ -74,6 +74,42 @@ namespace NLGUI
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CDBGroupComboBox::getProperty( const std::string &name ) const
|
||||||
|
{
|
||||||
|
if( name == "linked_to_db" )
|
||||||
|
{
|
||||||
|
return toString( _LinkedToDB );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "value" )
|
||||||
|
{
|
||||||
|
if( _Selection.getNodePtr() != NULL )
|
||||||
|
return _Selection.getNodePtr()->getFullName();
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return CInterfaceGroup::getProperty( name );
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDBGroupComboBox::setProperty( const std::string &name, const std::string &value )
|
||||||
|
{
|
||||||
|
if( name == "linked_to_db" )
|
||||||
|
{
|
||||||
|
bool b;
|
||||||
|
if( fromString( value, b ) )
|
||||||
|
_LinkedToDB = b;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "value" )
|
||||||
|
{
|
||||||
|
_Selection.link( value.c_str() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
CInterfaceGroup::setProperty( name, value );
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CDBGroupComboBox::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
bool CDBGroupComboBox::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
|
|
Loading…
Reference in a new issue