From b4c6213e54fa3d397053fa7c42f4fe1db71ccfc5 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 30 Jul 2012 22:50:35 +0200 Subject: [PATCH] CHANGED: #1471 Implemented property querying for CGroupTable. --- code/nel/include/nel/gui/group_table.h | 2 + code/nel/src/gui/group_table.cpp | 33 ++++++++++++++ .../plugins/gui_editor/widgets/GroupTable.xml | 43 +++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml diff --git a/code/nel/include/nel/gui/group_table.h b/code/nel/include/nel/gui/group_table.h index 4fe063344..e5d2029e2 100644 --- a/code/nel/include/nel/gui/group_table.h +++ b/code/nel/include/nel/gui/group_table.h @@ -146,6 +146,8 @@ namespace NLGUI bool ContinuousUpdate; + std::string getProperties( const std::string &name ) const; + protected: /// \from CInterfaceElement diff --git a/code/nel/src/gui/group_table.cpp b/code/nel/src/gui/group_table.cpp index 25c19752d..d2f2bb822 100644 --- a/code/nel/src/gui/group_table.cpp +++ b/code/nel/src/gui/group_table.cpp @@ -1074,6 +1074,39 @@ namespace NLGUI CInterfaceGroup::draw (); } + std::string CGroupTable::getProperties( const std::string &name ) const + { + if( name == "border" ) + { + return toString( Border ); + } + else + if( name == "cellpadding" ) + { + return toString( CellPadding ); + } + else + if( name == "cellspacing" ) + { + return toString( CellSpacing ); + } + else + if( name == "bgcolor" ) + { + return toString( BgColor ); + } + else + if( name == "width" ) + { + if( ForceWidthMin != 0 ) + return toString( ForceWidthMin ); + else + return toString( TableRatio * 100.0f ); + } + else + return CInterfaceGroup::getProperty( name ); + } + // ------------------------------------------------------------------------------------------------ bool CGroupTable::parse (xmlNodePtr cur, CInterfaceGroup * parentGroup) { diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml new file mode 100644 index 000000000..cbf666b53 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/widgets/GroupTable.xml @@ -0,0 +1,43 @@ + +
+ GroupTable + CGroupTable + InterfaceGroup + + false + +
+ + + border + int + 0 + + + cellpadding + int + 0 + + + cellspacing + int + 0 + + + bgcolor + string + 0 0 0 255 + + + width + string + 0 + + + continuous_update + bool + false + + + +