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

QThemedView Class Reference
[QtBaseModule]

The QThemedView widget displays themed views in Qtopia. More...

    #include <QThemedView>

Inherits QGraphicsView.

This class was introduced in Qtopia 4.4.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QThemedView widget displays themed views in Qtopia.

A Qt Extended theme is made of multiple themed views, each described by an XML document called the themed view XML.

See also QThemeItem.


Member Function Documentation

QThemedView::QThemedView ( QWidget * parent = 0, Qt::WindowFlags flags = 0 )

Constructs a QThemedView object passing the parent widget and window flags to the QGraphicsView constructor.

QThemedView::~QThemedView ()

Destroys the QThemedView.

QString QThemedView::fileName () const

Returns the fileName of the view (for example title.xml).

QThemeItem * QThemedView::findItem ( const QString & name ) const

Finds the item in the theme item tree that has the name name.

Returns a pointer to the item if found, otherwise returns 0.

Use qgraphicsitem_cast() to cast the item to the desired type.

Example:

    QThemeWidgetItem *dialerLineEdit = qgraphicsitem_cast<QThemeWidgetItem*>(findItem("dialernumber"));
    if (dialerLineEdit) {
        dialerLineEdit->setWidget(new QLineEdit);
    }

void QThemedView::itemClicked ( QThemeItem * item )   [signal]

Emitted whenever the interactive item item is cliked.

void QThemedView::itemPressed ( QThemeItem * item )   [signal]

Emitted whenever the interactive item item is pressed.

void QThemedView::itemReleased ( QThemeItem * item )   [signal]

Emitted whenever the interactive item item is released.

bool QThemedView::load ( const QString & fileName )

Loads the view fileName. Returns true if it succeeds, false otherwise.

void QThemedView::setThemePrefix ( const QString & prefix )

Sets the prefix of the theme to prefix. The theme prefix should be set before loading the view.

Example:

    themedView->setThemePrefix("mytheme");
    themedView->load("/etc/themes/mytheme/title.xml");

The theme prefix is used by the view to find the images. For example if the theme prefix is set to mytheme, the view will look for images in $QTOPIA_PATH/pics/themes/mytheme/.

See also themePrefix() and load().

QString QThemedView::themePrefix () const

Returns the name of the theme.

See also setThemePrefix().

QList<QThemeWidgetItem *> QThemedView::widgets () const

Returns a list of all widgets on the view.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3