| Home · All Classes · Main Classes · Deprecated |
A logical ID is a way to unambiguously refer to a particular piece of graphics from the theme. Each and every asset from the theme, be it an icon, a background image, or a piece of a widget graphics, has such an ID.
The ID abstracts the actual format of the graphic from the application developer, and allows MeeGo Touch to automatically switch the graphics when the theme changes to match the new look.
Logical IDs are typically used in the following ways:
Examples of methods that accept an logical ID include:
By providing a logical ID instead of a QPixmap or QImage to a widget, you can be sure that the widget will be updated when the theme changes.
In case you are implementing a widget yourself, or you require a direct handle to the graphics for some other reason, it is possible to request a QPixmap containing a particular themed graphics using MTheme::pixmap(const QString &id, const QSize &size).
In MeeGo Touch CSS files, a logical ID can be provided for style attributes that are of MScalaleImage or QPixmap types:
MButtonSwitchStyle { background-image: "meegotouch-button-switch-background"; thumb-image: "meegotouch-button-switch-thumb"; ... }
A themed graphical asset may be either a static image on the filesystem, or a single element or group inside a SVG document. The rules for mapping a logical ID to a piece of graphics is as follows:
The following figure illustrates how a single SVG document contains all of the necessary graphical assets to draw the MButton::switchType widget:
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:23 (PDT) Doxygen 1.7.1 |
MeeGo Touch |