From a812f5dd29a071bef22b69a9c9ca0e8956256a29 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 31 Jul 2012 22:19:45 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property querying for CInterfaceGroupWheel. --- code/nel/include/nel/gui/group_wheel.h | 3 ++ code/nel/src/gui/group_wheel.cpp | 25 +++++++++++++++ .../widgets/InterfaceGroupWheel.xml | 32 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml diff --git a/code/nel/include/nel/gui/group_wheel.h b/code/nel/include/nel/gui/group_wheel.h index c2c80dd46..37c7d377f 100644 --- a/code/nel/include/nel/gui/group_wheel.h +++ b/code/nel/include/nel/gui/group_wheel.h @@ -30,6 +30,9 @@ namespace NLGUI public: /// Constructor CInterfaceGroupWheel(const TCtorParam ¶m); + + std::string getProperty( const std::string &name ) const; + /// Coming from CInterfaceElement virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool handleEvent (const NLGUI::CEventDescriptor &event); diff --git a/code/nel/src/gui/group_wheel.cpp b/code/nel/src/gui/group_wheel.cpp index c7d6a57e2..c21ec2cb9 100644 --- a/code/nel/src/gui/group_wheel.cpp +++ b/code/nel/src/gui/group_wheel.cpp @@ -32,6 +32,31 @@ namespace NLGUI _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) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml new file mode 100644 index 000000000..e3e4358a3 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/InterfaceGroupWheel.xml @@ -0,0 +1,32 @@ + +
+ InterfaceGroupWheel + CInterfaceGroupWheel + InterfaceGroup + + false + +
+ + + on_wheel_up + string + + + + on_wheel_up_params + string + + + + on_wheel_down + string + + + + on_wheel_down_params + string + + + +