CHANGED: #1471 Implemented property querying for CGroupHeader.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-08-01 05:58:10 +02:00
parent 02a6417039
commit 5c5f25cb8b
3 changed files with 30 additions and 0 deletions

View file

@ -41,6 +41,9 @@ namespace NLGUI
REFLECT_EXPORT_END REFLECT_EXPORT_END
CGroupHeader(const TCtorParam &param); CGroupHeader(const TCtorParam &param);
std::string getProperty( const std::string &name ) const;
// from CInterfaceGroup // from CInterfaceGroup
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
sint32 getHeaderMaxSize() const { return _HeaderMaxSize; } sint32 getHeaderMaxSize() const { return _HeaderMaxSize; }

View file

@ -215,6 +215,16 @@ namespace NLGUI
return 0; return 0;
} }
std::string CGroupHeader::getProperty( const std::string &name ) const
{
if( name == "header_max_size" )
{
return toString( _HeaderMaxSize );
}
else
return CGroupList::getProperty( name );
}
// ***************************************************************************************************************** // *****************************************************************************************************************
bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{ {

View file

@ -0,0 +1,17 @@
<widget>
<header>
<name>GroupHeader</name>
<guiname>CGroupHeader</guiname>
<ancestor>GroupList</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>header_max_size</name>
<type>int</type>
<default>32767</default>
</property>
</properties>
</widget>