mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
CHANGED: #1471 Implemented property querying for CDBViewBar.
This commit is contained in:
parent
55c8a44ed4
commit
01d3e9f3ab
3 changed files with 105 additions and 0 deletions
|
@ -52,6 +52,7 @@ namespace NLGUI
|
|||
|
||||
void setType (TViewBar vb);
|
||||
|
||||
std::string getProperty( const std::string &name ) const;
|
||||
bool parse(xmlNodePtr cur,CInterfaceGroup * parentGroup);
|
||||
virtual uint32 getMemory() { return (uint32)(sizeof(*this)+_Id.size()); }
|
||||
virtual void updateCoords ();
|
||||
|
|
|
@ -43,6 +43,63 @@ namespace NLGUI
|
|||
}
|
||||
}
|
||||
|
||||
std::string CDBViewBar::getProperty( const std::string &name ) const
|
||||
{
|
||||
if( name == "value" )
|
||||
{
|
||||
if( _Value.getNodePtr() != NULL )
|
||||
return _Value.getNodePtr()->getFullName();
|
||||
else
|
||||
return toString( _ValueInt );
|
||||
}
|
||||
else
|
||||
if( name == "range" )
|
||||
{
|
||||
if( _Range.getNodePtr() != NULL )
|
||||
return _Range.getNodePtr()->getFullName();
|
||||
else
|
||||
return toString( _RangeInt );
|
||||
}
|
||||
else
|
||||
if( name == "reference" )
|
||||
{
|
||||
if( _Reference.getNodePtr() != NULL )
|
||||
return _Reference.getNodePtr()->getFullName();
|
||||
else
|
||||
return toString( _ReferenceInt );
|
||||
}
|
||||
else
|
||||
if( name == "color_negative" )
|
||||
{
|
||||
return toString( _ColorNegative );
|
||||
}
|
||||
else
|
||||
if( name == "mini" )
|
||||
{
|
||||
if( _Type == ViewBar_Mini )
|
||||
return "true";
|
||||
else
|
||||
return "false";
|
||||
}
|
||||
else
|
||||
if( name == "ultra_mini" )
|
||||
{
|
||||
if( _Type == ViewBar_UltraMini )
|
||||
return "true";
|
||||
else
|
||||
return "false";
|
||||
}
|
||||
else
|
||||
if( name == "mini_thick" )
|
||||
{
|
||||
if( _Type == ViewBar_MiniThick )
|
||||
return "true";
|
||||
else
|
||||
return "false";
|
||||
}
|
||||
else
|
||||
return CViewBitmap::getProperty( name );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
bool CDBViewBar::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<widget>
|
||||
<header>
|
||||
<name>DBViewBar</name>
|
||||
<guiname>CDBViewBar</guiname>
|
||||
<ancestor>ViewBitmap</ancestor>
|
||||
<description></description>
|
||||
<abstract>false</abstract>
|
||||
<icon></icon>
|
||||
</header>
|
||||
<properties>
|
||||
<property>
|
||||
<name>value</name>
|
||||
<type>string</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>range</name>
|
||||
<type>string</type>
|
||||
<default>255</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>reference</name>
|
||||
<type>string</type>
|
||||
<default>0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>color_negative</name>
|
||||
<type>string</type>
|
||||
<default>0 0 0 0</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>mini</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>ultra_mini</name>
|
||||
<type>bool</typef>
|
||||
<default>false</default>
|
||||
</property>
|
||||
<property>
|
||||
<name>mini_thick</name>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
</property>
|
||||
</properties>
|
||||
</widget>
|
Loading…
Reference in a new issue