CHANGED: #1471 Implemented property querying for CInterfaceGroupWheel.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-07-31 22:19:45 +02:00
parent cee3e3c5b4
commit 70d5759713
3 changed files with 60 additions and 0 deletions

View file

@ -30,6 +30,9 @@ namespace NLGUI
public: public:
/// Constructor /// Constructor
CInterfaceGroupWheel(const TCtorParam &param); CInterfaceGroupWheel(const TCtorParam &param);
std::string getProperty( const std::string &name ) const;
/// Coming from CInterfaceElement /// Coming from CInterfaceElement
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual bool handleEvent (const NLGUI::CEventDescriptor &event); virtual bool handleEvent (const NLGUI::CEventDescriptor &event);

View file

@ -32,6 +32,31 @@ namespace NLGUI
_AHWheelDown = NULL; _AHWheelDown = NULL;
} }
std::string CInterfaceGroupWheel::getProperty( const std::string &name ) const
{
if( name == "on_wheel_up" )
{
return CAHManager::getInstance()->getActionHandlerName( _AHWheelUp );
}
else
if( name == "on_wheel_up_params" )
{
return _AHWheelUpParams;
}
else
if( name == "on_wheel_down" )
{
return CAHManager::getInstance()->getActionHandlerName( _AHWheelDown );
}
else
if( name == "on_wheel_down_params" )
{
return _AHWheelDownParams;
}
else
return CInterfaceGroup::getProperty( name );
}
// ***************************************************************************************************************** // *****************************************************************************************************************
bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{ {

View file

@ -0,0 +1,32 @@
<widget>
<header>
<name>InterfaceGroupWheel</name>
<guiname>CInterfaceGroupWheel</guiname>
<ancestor>InterfaceGroup</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>on_wheel_up</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_up_params</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_down</name>
<type>string</type>
<default></default>
</property>
<property>
<name>on_wheel_down_params</name>
<type>string</type>
<default></default>
</property>
</properties>
</widget>