Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The ThemeListModelEntry class implements a single theme list entry in a ThemeListModel. More...
#include <ThemeListModelEntry>
The ThemeListModelEntry class implements a single theme list entry in a ThemeListModel.
The ThemeListModelEntry has a uid() and a type(), which are used by templateInstance() to associate a single template instance to this entry. The ThemeListModelEntry stores this template instance internally and can be retrieved using templateInstance().
This class must be subclassed and the pure virtual type() function reimplemented to return the appropriate value.
See also ThemeListModel, ThemeTemplateItem, and ThemeTemplateInstanceItem.
Constructs a ThemeListModelEntry an associates it with the given model.
Destroys the ThemeListModelEntry.
Returns the parent ThemeListModel instance associated with this entry.
Sets the given value in the valuespace based on the given key. The actual key set will be templateInstance()->fullVSPath() + key.
See also value().
Creates and returns a ThemeTemplateInstanceItem object for this entry. This function searches all template items defined under the list item in the themed view XML file looking for an item that has a name attribute matching the return value of type(). When it finds one it calls ThemeTemplateItem::createInstance() passing the value of uid(), and stores the return value in this entry. If a template instance item already exists but its name attribute does not match the value currently returned by type(), then it is deleted and a new template instance is created. If no template can be found for this entry 0 is returned, otherwise a pointer to the associated ThemeTemplateInstanceItem is returned.
See also ThemeTemplateInstanceItem.
Returns the type of this entry. Subclasses must overrride this pure virtual function and return a value that corresponds to the name attribute of a template item defined under the associated list item in the themed view XML. templateInstance() calls this function to lookup and associate this entry to a ThemeTemplateItem. If the value that this function returns changes, either the subclass or the parent ThemeListModel implementation should instruct the view to repaint this entry, probably by calling ThemeListModel::triggerUpdate(). The internal QItemDelegate implementation will call templateInstance() to create and associate a ThemeTemplateInstanceItem object with this entry, based on the new return value.
Returns a globally unique identifier for this entry. The return value of this function is used by templateInstance() in order to associate this entry with a theme template instance.
Retrives a value from the valuespace based on the given key. The actual valuespace key used to get the value will be templateInstance()->fullVSPath() + key.
See also setValue().
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |