CHANGED: #1471 Implemented property querying for for CDBViewQuantity.
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
d67ffd246b
commit
0b3be8e93d
3 changed files with 55 additions and 0 deletions
|
@ -39,6 +39,7 @@ namespace NLGUI
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CDBViewQuantity(const TCtorParam ¶m);
|
CDBViewQuantity(const TCtorParam ¶m);
|
||||||
|
|
||||||
|
std::string getProperty( const std::string &name ) const;
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||||
virtual void draw ();
|
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)
|
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