Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

ThemeTextItem Class Reference
[QtBaseModule]

The ThemeTextItem class represents a text in a ThemedView. More...

    #include <ThemeTextItem>

Inherits ThemeGraphicItem.

Public Functions

Additional Inherited Members


Detailed Description

The ThemeTextItem class represents a text in a ThemedView.

The ThemeTextItem class implements the text element from the theme XML.

The text displayed can be set manually by calling setText() or accessed through text(). The format of the text can be set explicitly using the setTextFormat() function.

Normally you do not want to call this item's functions directly, but rather specify the relevant data for this item in the themed view XML or in the valuespace.

See also text element.


Member Function Documentation

ThemeTextItem::ThemeTextItem ( ThemeItem * parent, ThemedView * view, const ThemeAttributes & atts )

Constructs a ThemeTextItem. parent, view and atts are passed to the base class constructor.

ThemeTextItem::~ThemeTextItem ()

Destroys the ThemeTextItem.

void ThemeTextItem::setText ( const QString & text )

Sets the content for this text item. text will be drawn to the screen.

See also text().

void ThemeTextItem::setTextFormat ( Qt::TextFormat format )

Sets the text format of the item explicitly to format. If the value is Qt::AutoText, the item tries to determine the correct format.

See also textFormat().

bool ThemeTextItem::shortLabel () const

Returns the short label for this item, as specified in the themed view XML.

QString ThemeTextItem::text () const

Returns the content of this text item.

See also setText().

Qt::TextFormat ThemeTextItem::textFormat () const

Returns the current text format of the text item.

See also setTextFormat().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3