CHANGED: #1471 Implemented property querying for CDBGroupSelectNumber.
This commit is contained in:
parent
3805b6ad58
commit
75aa4b03e3
3 changed files with 72 additions and 0 deletions
|
@ -44,6 +44,8 @@ namespace NLGUI
|
||||||
CDBGroupSelectNumber(const TCtorParam ¶m);
|
CDBGroupSelectNumber(const TCtorParam ¶m);
|
||||||
~CDBGroupSelectNumber();
|
~CDBGroupSelectNumber();
|
||||||
|
|
||||||
|
std::string getProperty( const std::string &name ) const;
|
||||||
|
|
||||||
/// CInterfaceGroup Interface
|
/// CInterfaceGroup Interface
|
||||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
|
||||||
virtual void updateCoords ();
|
virtual void updateCoords ();
|
||||||
|
|
|
@ -49,6 +49,39 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CDBGroupSelectNumber::getProperty( const std::string &name ) const
|
||||||
|
{
|
||||||
|
if( name == "value" )
|
||||||
|
{
|
||||||
|
if( _Number.getNodePtr() != NULL )
|
||||||
|
return _Number.getNodePtr()->getFullName();
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "loop" )
|
||||||
|
{
|
||||||
|
return toString( _LoopMode );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "min" )
|
||||||
|
{
|
||||||
|
return toString( _MinValue );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "max" )
|
||||||
|
{
|
||||||
|
return toString( _MaxValue );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if( name == "delta" )
|
||||||
|
{
|
||||||
|
return toString( _DeltaMultiplier );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return CInterfaceGroup::getProperty( name );
|
||||||
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
bool CDBGroupSelectNumber::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
bool CDBGroupSelectNumber::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<widget>
|
||||||
|
<header>
|
||||||
|
<name>DBGroupSelectNumber</name>
|
||||||
|
<guiname>CDBGroupSelectNumber</guiname>
|
||||||
|
<ancestor>InterfaceGroup</ancestor>
|
||||||
|
<description></description>
|
||||||
|
<abstract>false</abstract>
|
||||||
|
<icon></icon>
|
||||||
|
</header>
|
||||||
|
<properties>
|
||||||
|
<property>
|
||||||
|
<name>value</name>
|
||||||
|
<type>string</type>
|
||||||
|
<default></default>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>loop</name>
|
||||||
|
<type>bool</type>
|
||||||
|
<default>true</default>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>min</name>
|
||||||
|
<type>int</type>
|
||||||
|
<default>0</default>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>max</name>
|
||||||
|
<type>int</type>
|
||||||
|
<default>9</default>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>delta</name>
|
||||||
|
<type>int</type>
|
||||||
|
<default>1</default>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</widget>
|
Loading…
Reference in a new issue