Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The ThemeItem class is the base class of all items in a ThemedView. More...
#include <ThemeItem>
Inherited by ThemeExclusiveItem, ThemeGraphicItem, ThemeGroupItem, ThemeLayoutItem, ThemePageItem, ThemePluginItem, and ThemeTemplateItem.
The ThemeItem class is the base class of all items in a ThemedView.
A ThemedView manages the theme item tree, which is run-time representation of a loaded themed view XML document.
ThemeItem encapsulates functionality common to all theme item tree nodes. It manages common attributes such as rect, whether the item is active, transient, visible, layout attributes, user interactivity and so on.
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.
See also ThemedView and common theme attributes.
State describes the different states of a theme element.
Constant | Value | Description |
---|---|---|
ThemeItem::Default | 1 | The default state of an element. |
ThemeItem::Focus | 2 | The element has the focus. |
ThemeItem::Pressed | 6 | The element is pressed. |
ThemeItem::All | 7 | All the states of an element. |
Constructs a ThemeItem with parent parent, view view and attributes atts.
Destroys the ThemeItem. All child nodes are deleted.
Returns true if this item is currently active, otherwise returns false.
See also setActive().
Adds the characters characters to this item. Normally overridden by subclasses.
Returns an integer value for state state based on the given storage key.
See also setAttribute().
This is an overloaded member function, provided for convenience.
Returns an integer value for state state based on the given storage key.
This function was introduced in Qtopia 4.3.1.
Returns the children of this item.
Called by ThemedView when this item has been clicked. A click is a mouse press followed by a mouse release.
Called by ThemedView when the item has finished being constructed from the themed view XML. This call-back allows an item to perform any required calculations on its data with the knowledge that the data it has is complete. Subclasses should always call the base class version of this function so that proper construction occurs at all levels.
Creates a new QExpressionEvaluator instance based on data. Any valuespace keys are expanded based on this item's fullVSPath(). Performs error checking to ensure the expression given by data is valid. If no error occurs, registers the expression with ThemedView by calling ThemedView::registerExpression() and returns a pointer to the new expression, otherwise returns 0.
Called by ThemedView for a QExpressionEvaluator instance when it emits the Expression::termsChanged() signal. expression is an expression registered through a call to ThemedView::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.
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.
Returns the geometry of this item, relative to its parent.
See also setGeometry().
Returns the rect for this item as literally specified in the themed view XML.
Retreives a QVariant from expression that can be converted to the specified type type. It performs error checking to ensure expression is a valid expression and expression->result() returns a type that can be converted to type. If an error occurs, returns a QVariant that cannot be converted to type type. Returns a QVariant that can be converted to type type otherwise.
Returns true if the item currently has focus, otherwise returns false.
Returns true if this item has the themed view XML attribute interactive="yes", otherwise returns false.
Returns true if str is an expression from the themed view XML, false otherwise.
Returns true if the item is currently visible, otherwise returns false.
Returns the name attribute for this item. This is the value given for the name attribute in the themed view XML.
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.
Paints the rect portion of the item using the painter painter. Normally overridden by sub-classes.
Returns the parent item of this item. Should always return an item, except for the ThemePageItem which will return 0.
Returns true if the item is currently pressed, otherwise returns false.
Returns the geometry of this item relative to the parent ThemedView. rect().x() and rect.y() are the ThemedView widget coordinates where this item is currently positioned.
Run-time type information. Returns ThemedView::Item.
Sets this item to be active if active is true, otherwise sets the item to be inactive.
See also active().
Stores the integer value for the state state based on the given storage key.
See also attribute().
This is an overloaded member function, provided for convenience.
Stores the integer value for the state state based on the given storage key.
This function was introduced in Qtopia 4.3.1.
This is an overloaded member function, provided for convenience.
Stores the string value for state state based on the given storage key.
This is an overloaded member function, provided for convenience.
Stores the string value for state state based on the given storage key.
This function was introduced in Qtopia 4.3.1.
Sets this item's run-time geometry to rect. This controls the position and size of the item in the ThemedView.
See also geometry().
Sets this item to be visible if visible is true, otherwise hides the item.
See also isVisible().
Returns the current state of this ThemeItem.
See also ThemeItem::State.
Called when an item's state is changed to state. The default implementation does nothing.
Returns the string value for state state based on the given storage key.
This is an overloaded member function, provided for convenience.
Returns the string value for state state based on the given storage key.
This function was introduced in Qtopia 4.3.1.
Strips the expression indicators from the expression str. isStringExpression(str) must return true, or this function will abort.
Returns true if this item has the themed view XML attribute transient="yes", otherwise returns false.
Updates this item. Causes this item to be repainted immediately.
This is an overloaded member function, provided for convenience.
Causes the area given by x, y, w, h of this item to be repainted immediately.
Returns the ThemedView this item belongs to.
Returns the vspath attribute for this item. This can be the attribute as it was specified for this item in the themed view XML, or in the case of ThemeTemplateInstanceItem, it will be a dynamically assigned uid.
See also ThemeTemplateInstanceItem.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |