CHANGED: #1471 Implemented property querying for for CDBViewQuantity.

This commit is contained in:
dfighter1985 2012-08-02 20:42:12 +02:00
parent 673820b8a0
commit 741441874f
3 changed files with 55 additions and 0 deletions

View file

@ -39,6 +39,7 @@ namespace NLGUI
/// Constructor
CDBViewQuantity(const TCtorParam &param);
std::string getProperty( const std::string &name ) const;
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void draw ();

View file

@ -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)

View file

@ -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>