mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 08:16:16 +00:00
CHANGED: #1471 Implemented property querying for for CDBViewQuantity.
This commit is contained in:
parent
673820b8a0
commit
741441874f
3 changed files with 55 additions and 0 deletions
|
@ -39,6 +39,7 @@ namespace NLGUI
|
|||
/// Constructor
|
||||
CDBViewQuantity(const TCtorParam ¶m);
|
||||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||
virtual void draw ();
|
||||
|
||||
|
|
|
@ -36,6 +36,31 @@ namespace NLGUI
|
|||
}
|
||||
|
||||
|
||||
std::string CDBViewQuantity::getProperty( const std::string &name ) const
|
||||
{
|
||||
if( name == "value" )
|
||||
{
|
||||
if( _Number.getNodePtr() != NULL )
|
||||
return _Number.getNodePtr()->getFullName();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
else
|
||||
if( name == "valuemax" )
|
||||
{
|
||||
if( _NumberMax.getNodePtr() != NULL )
|
||||
return _NumberMax.getNodePtr()->getFullName();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
else
|
||||
if( name == "emptytext" )
|
||||
{
|
||||
return _EmptyText.toString();
|
||||
}
|
||||
else
|
||||
return CViewText::getProperty( name );
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CDBViewQuantity::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>DBViewQuantity</name>
|
||||
<guiname>CDBViewQuantity</guiname>
|
||||
<ancestor>ViewText</ancestor>
|
||||
<description></description>
|
||||
<abstract>false</abstract>
|
||||
<icon></icon>
|
||||
</header>
|
||||
<properties>
|
||||
<property>
|
||||
<name>value</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
<property>
|
||||
<name>valuemax</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
<property>
|
||||
<name>emptytext</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
|
||||
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue