CHANGED: #1471 Implemented property querying for for CViewTextFormated.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-08-02 19:33:03 +02:00
parent 4ad9430fcf
commit 77a2924b73
3 changed files with 30 additions and 0 deletions

View file

@ -46,6 +46,7 @@ namespace NLGUI
CViewTextFormated (const TCtorParam &param) : CViewText(param)
{}
std::string getProperty( const std::string &name ) const;
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords();
const ucstring &getFormatString() const { return _FormatString; }

View file

@ -25,6 +25,16 @@ namespace NLGUI
CViewTextFormated::IViewTextFormatter *CViewTextFormated::textFormatter = NULL;
std::string CViewTextFormated::getProperty( const std::string &name ) const
{
if( name == "format" )
{
return getFormatString().toString();
}
else
return CViewText::getProperty( name );
}
// ****************************************************************************
bool CViewTextFormated::parse(xmlNodePtr cur,CInterfaceGroup * parentGroup)
{

View file

@ -0,0 +1,19 @@
<widget>
<header>
<name>ViewTextFormated</name>
<guiname>CViewTextFormated</guiname>
<ancestor>ViewText</ancestor>
<description></description>
<abstract>false</abstract>
<icon></icon>
</header>
<properties>
<property>
<name>format</name>
<type>string</type>
<default></default>
</property>
</properties>
</widget>