mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 01:06:19 +00:00
CHANGED: #1471 Implemented property querying for CDBViewDigit.
This commit is contained in:
parent
9fa9ebbeb9
commit
23085a00b7
3 changed files with 62 additions and 0 deletions
|
@ -38,6 +38,7 @@ namespace NLGUI
|
|||
/// Constructor
|
||||
CDBViewDigit(const TCtorParam ¶m);
|
||||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||
virtual void draw ();
|
||||
virtual void updateCoords();
|
||||
|
|
|
@ -38,6 +38,35 @@ namespace NLGUI
|
|||
}
|
||||
|
||||
|
||||
std::string CDBViewDigit::getProperty( const std::string &name ) const
|
||||
{
|
||||
if( name == "value" )
|
||||
{
|
||||
if( _Number.getNodePtr() != NULL )
|
||||
return _Number.getNodePtr()->getFullName();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
else
|
||||
if( name == "numdigit" )
|
||||
{
|
||||
return toString( _NumDigit );
|
||||
}
|
||||
else
|
||||
if( name == "wspace" )
|
||||
{
|
||||
return toString( _WSpace );
|
||||
}
|
||||
else
|
||||
if( name == "color" )
|
||||
{
|
||||
return toString( _Color );
|
||||
}
|
||||
else
|
||||
return CViewBase::getProperty( name );
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************************************
|
||||
bool CDBViewDigit::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>DBViewDigit</name>
|
||||
<guiname>CDBViewDigit</guiname>
|
||||
<ancestor>CtrlBase</ancestor>
|
||||
<description></description>
|
||||
<abstract>false</abstract>
|
||||
<icon></icon>
|
||||
</header>
|
||||
<properties>
|
||||
<property>
|
||||
<name>value</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
<property>
|
||||
<name>numdigit</name>
|
||||
<type>int</type>
|
||||
<default>2</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>wspace</name>
|
||||
<type>int</type>
|
||||
<default>-1</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>color</name>
|
||||
<type>string</type>
|
||||
<default>255 255 255 255</default>
|
||||
</property>
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue