From 9dda3aac07887e5bfc5b68eab5844ba53864250b Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 1 Aug 2012 18:54:36 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property querying for CGroupTab. --HG-- branch : gsoc2012-gui-editor --- code/nel/include/nel/gui/group_tab.h | 2 ++ code/nel/src/gui/group_tab.cpp | 19 +++++++++++++ .../plugins/gui_editor/widgets/GroupTab.xml | 27 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml diff --git a/code/nel/include/nel/gui/group_tab.h b/code/nel/include/nel/gui/group_tab.h index d59fdd65d..ae7b45b08 100644 --- a/code/nel/include/nel/gui/group_tab.h +++ b/code/nel/include/nel/gui/group_tab.h @@ -47,6 +47,8 @@ namespace NLGUI /// Constructor CGroupTab(const TCtorParam ¶m); + std::string getProperty( const std::string &name ) const; + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void updateCoords (); diff --git a/code/nel/src/gui/group_tab.cpp b/code/nel/src/gui/group_tab.cpp index 54199a0cb..1e2ec7dc2 100644 --- a/code/nel/src/gui/group_tab.cpp +++ b/code/nel/src/gui/group_tab.cpp @@ -42,6 +42,25 @@ namespace NLGUI _LastTabIndex = -1; } + std::string CGroupTab::getProperty( const std::string &name ) const + { + if( name == "hide_out_tabs" ) + { + return toString( _HideOutTabs ); + } + else + if( name == "onchange" ) + { + return _AHOnChange; + } + else + if( name == "onchange_params" ) + { + return _ParamsOnChange; + } + else + return CInterfaceGroup::getProperty( name ); + } // *************************************************************************** bool CGroupTab::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml new file mode 100644 index 000000000..8c6b61481 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTab.xml @@ -0,0 +1,27 @@ + +
+ GroupTab + CGroupTab + InterfaceGroup + + false + +
+ + + hide_out_tabs + bool + + + + onchange + string + + + + onchange_params + string + + + +