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

ThemePixmapItem Class Reference
[QtBaseModule]

The ThemePixmapItem class contains common functionality for image based items in a ThemedView. More...

    #include <ThemePixmapItem>

Inherits ThemeGraphicItem.

Inherited by ThemeAnimationItem, ThemeImageItem, and ThemeStatusItem.

Public Functions

Static Public Members

Protected Functions


Detailed Description

The ThemePixmapItem class contains common functionality for image based items in a ThemedView.

As several items such as ThemeImageItem, ThemeLevelItem and ThemeStatusItem are based on images, a ThemePixmapItem provides the convenient setPixmap() and pixmap() functions to access and store images based on a name and state pair of values.

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


Member Function Documentation

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

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

ThemePixmapItem::~ThemePixmapItem ()   [virtual]

Destroys the ThemePixmapItem.

void ThemePixmapItem::colorizeImage ( QImage & img, const QColor & col, int alpha, bool blendColor = true )   [static]

Blend the color col and the alpha value alpha with the image img if blendColor is true (the default). If blendColor is false, only the alpha value alpha is blended. This function modifies img directly.

QPixmap ThemePixmapItem::loadImage ( const QString & filename, int colorRole, const QColor & col, int alpha, int width = 0, int height = 0 )   [protected]

Loads the image given by filename for the given width and height. If colorRole is a valid index to QPalette, or if the color col is valid, and alpha is less than 255, the image is passed through ThemePixmapItem::colorizeImage(). Returns the loaded image.

QPixmap ThemePixmapItem::pixmap ( const QString & key, ThemeItem::State state = ThemeItem::Default ) const   [protected]

Returns the pixmap for the given key and state state. state has a default value of ThemeItem::Default.

See also setPixmap().

QPixmap ThemePixmapItem::pixmap ( const QLatin1String & key, ThemeItem::State state = ThemeItem::Default ) const   [protected]

This is an overloaded member function, provided for convenience.

Returns the pixmap for the given key and state state. state has a default value of ThemeItem::Default.

This function was introduced in Qtopia 4.3.1.

void ThemePixmapItem::setPixmap ( const QString & key, const QPixmap & value, ThemeItem::State state = ThemeItem::Default, const QString & filename = QString::null )   [protected]

Sets the pixmap value for the given key and state state from filename. state has a default value of ThemeItem::Default.

See also pixmap().

void ThemePixmapItem::setPixmap ( const QLatin1String & key, const QPixmap & value, ThemeItem::State state = ThemeItem::Default, const QString & filename = QString::null )   [protected]

This is an overloaded member function, provided for convenience.

Sets the pixmap value for the given key and state state from filename. state has a default value of ThemeItem::Default.

This function was introduced in Qtopia 4.3.1.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3