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

QThemeItem Class Reference
[QtBaseModule]

The QThemeItem class is the base class of all items in a QThemedView. More...

    #include <QThemeItem>

Inherits QGraphicsItem.

Inherited by QThemeExclusiveItem, QThemeGroupItem, QThemeImageItem, QThemeLayoutItem, QThemePageItem, QThemePluginItem, QThemeRectItem, QThemeTextItem, and QThemeWidgetItem.

This class was introduced in Qtopia 4.4.

Public Functions

Static Public Members

Protected Functions

Static Protected Members

Additional Inherited Members


Detailed Description

The QThemeItem class is the base class of all items in a QThemedView.

QThemeItem encapsulates functionality common to all theme items. It manages common attributes such as rect, whether the item is active, visible, layout attributes, user interactivity and so on.

See also QThemedView.


Member Function Documentation

QThemeItem::QThemeItem ( QThemeItem * parent = 0 )

Constructs a QThemeItem. The parent is passed to the base class constructor.

QThemeItem::~QThemeItem ()   [virtual]

Destroys the QThemeItem.

void QThemeItem::constructionComplete ()   [virtual protected]

Called when the item has finished being constructed from the themed view XML.

Reimplement to perform any required calculations on the item's data with the knowledge that the data is complete.

Subclasses should always call the base class version of this function so that proper construction occurs at all levels.

void QThemeItem::expressionChanged ( QExpressionEvaluator * expression )   [virtual protected]

Called by ThemedView for a QExpressionEvaluator instance when it emits the Expression::termsChanged() signal. expression is an expression registered through a call to QThemedView::registerExpression().

The Expression expression will be an expression that belongs to this item.

Subclasses should make sure they call the base class version of this function should they not know about expression.

QString QThemeItem::fullValueSpacePath () const   [protected]

Returns the full vspath for this item. The full vspath is this item's vspath appended to the parent item's full vspath. A trailing slash is always included.

bool QThemeItem::isActive () const

Returns true if the item is active. Returns false otherwise.

bool QThemeItem::isExpression ( const QString & string )   [static protected]

Returns true if string is an expression, false otherwise.

void QThemeItem::layout ()   [virtual]

Lays out the item.

The item calcuates its actual position and size based on the abstract geometry information specified for the rect attribute in the themed view XML.

void QThemeItem::load ( QXmlStreamReader & reader )

Loads the item using the XML reader.

void QThemeItem::loadAttributes ( QXmlStreamReader & reader )   [virtual protected]

Loads the item's attributes using the XML reader.

Reimplement this function to read attributes specific to this item.

void QThemeItem::loadChildren ( QXmlStreamReader & reader )   [virtual protected]

Loads the item's children using the XML reader.

The default implementation loads any kind of item.

Reimplement this function if you want to load specific children.

QString QThemeItem::name () const

Returns the item's name.

void QThemeItem::registerType ( int type )

When subclassing QThemeItem, call this method in the constructor. It is required by qthemeitem_cast() to return the correct type.

void QThemeItem::resize ( qreal width, qreal height )   [virtual protected]

Sets the size of the item to width and height.

void QThemeItem::setActive ( bool active )   [virtual]

Sets this item to be active if active is true, otherwise sets the item to be inactive.

See also isActive().

void QThemeItem::setState ( const QString & state )

Sets the current state of the item. By default, an item is in the state 'default'.

See also state().

void QThemeItem::setValueSpacePath ( const QString & path )   [protected]

Sets the valuespace path of this item.

See also valueSpacePath().

QString QThemeItem::state () const

Returns the current state of the item.

See also setState().

QString QThemeItem::strippedExpression ( const QString & s )   [static protected]

Strips the expression indicators from the expression s.

isExpression(s) must return true, or this function will abort.

QThemeItem * QThemeItem::themeItem ( QGraphicsItem * item )   [static]

Returns a pointer to QThemeItem if item is a QThemeItem or one of its subclass. Returns 0 otherwise.

QThemedView * QThemeItem::themedView () const

Returns the themed view displaying this item.

QString QThemeItem::valueSpacePath () const   [protected]

Returns the valuespace path of the item.

See also setValueSpacePath().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3