mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-28 11:50:53 +00:00
CHANGED: #1471 Implemented property querying for for CDBViewNumber.
This commit is contained in:
parent
f2d465dab7
commit
673820b8a0
3 changed files with 91 additions and 0 deletions
|
@ -39,6 +39,7 @@ namespace NLGUI
|
|||
/// Constructor
|
||||
CDBViewNumber(const TCtorParam ¶m);
|
||||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
|
||||
virtual void checkCoords();
|
||||
virtual void draw ();
|
||||
|
|
|
@ -41,6 +41,48 @@ namespace NLGUI
|
|||
_Modulo = 0;
|
||||
}
|
||||
|
||||
std::string CDBViewNumber::getProperty( const std::string &name ) const
|
||||
{
|
||||
if( name == "value" )
|
||||
{
|
||||
if( _Number.getNodePtr() != NULL )
|
||||
return _Number.getNodePtr()->getFullName();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
else
|
||||
if( name == "positive" )
|
||||
{
|
||||
return toString( _Positive );
|
||||
}
|
||||
else
|
||||
if( name == "format" )
|
||||
{
|
||||
return toString( _Format );
|
||||
}
|
||||
else
|
||||
if( name == "divisor" )
|
||||
{
|
||||
return toString( _Divisor );
|
||||
}
|
||||
else
|
||||
if( name == "modulo" )
|
||||
{
|
||||
return toString( _Modulo );
|
||||
}
|
||||
else
|
||||
if( name == "suffix" )
|
||||
{
|
||||
return _Suffix.toString();
|
||||
}
|
||||
else
|
||||
if( name == "prefix" )
|
||||
{
|
||||
return _Prefix.toString();
|
||||
}
|
||||
else
|
||||
return CViewText::getProperty( name );
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
bool CDBViewNumber::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>DBViewNumber</name>
|
||||
<guiname>CDBViewNumber</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>positive</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>format</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>divisor</name>
|
||||
<type>int</type>
|
||||
<default>1</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>modulo</name>
|
||||
<type>int</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>suffix</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
<property>
|
||||
<name>prefix</name>
|
||||
<type>string</type>
|
||||
<default></default>
|
||||
</property>
|
||||
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue