CHANGED: #1471 Implemented property querying for for CDBViewQuantity.

--HG--
branch : gsoc2012-gui-editor
hg/feature/sse2
dfighter1985 12 years ago
parent d67ffd246b
commit 0b3be8e93d

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

@ -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…
Cancel
Save