Detailed Description
The ThemeGraphicItem class contains common functionality for graphics based items in a ThemedView.
Many items share common graphics related functionality including ThemeRectItem, ThemeTextItem and ThemeLineItem. ThemeGraphicItem provides functionality and data storage for graphics related items.
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
ThemeGraphicItem::ThemeGraphicItem ( ThemeItem * parent, ThemedView * view, const ThemeAttributes & atts )
Constructs a ThemeGraphicItem. parent, view and atts are passed to the base class constructor.
ThemeGraphicItem::~ThemeGraphicItem () [virtual]
Destroys the ThemeGraphicItem
QColor ThemeGraphicItem::color ( const QString & key, ThemeItem::State state = ThemeItem::Default ) const [protected]
Returns the color for the given storage key key and state state.
See also setColor().
QColor ThemeGraphicItem::color ( const QLatin1String & key, ThemeItem::State state = ThemeItem::Default ) const [protected]
This is an overloaded member function, provided for convenience.
Returns the color for the given storage key key and state state.
This function was introduced in Qtopia 4.3.1.
QFont ThemeGraphicItem::font ( const QString & key, ThemeItem::State state = ThemeItem::Default ) const [protected]
Returns the font for the given storage key and state state.
See also setFont().
QFont ThemeGraphicItem::font ( const QLatin1String & key, ThemeItem::State state = ThemeItem::Default ) const [protected]
This is an overloaded member function, provided for convenience.
Returns the font for the given storage key and state state.
This function was introduced in Qtopia 4.3.1.
QColor ThemeGraphicItem::getColor ( const QColor & color, int role ) const [protected]
Returns a QColor object for either color or role. If role is a valid QPalette::ColorRole, the corresponding QColor object for the role is returned. Otherwise, color is returned.
int ThemeGraphicItem::parseColor ( const QString & value, QColor & color ) [protected]
Parses the color given by the color name value. value can either be a palette color name, eg. HighlightedText, or a name suitable for being passed to QColor::setNamedColor(). If value references the palette, this function returns the QPalette::ColorRole for the color and does not modify color. Otherwise, value is passed to QColor::setNamedColor(), the result is stored in color, and the function returns QPalette::NColorRoles+1.
QFont ThemeGraphicItem::parseFont ( const QFont & defFont, const QString & size, const QString & bold ) [protected]
Returns defFont modified to be the point size given by size, and to be bold if bold is "yes" or normal weight if bold is any other non-empty string.
void ThemeGraphicItem::setColor ( const QString & key, const QColor & value, ThemeItem::State state = ThemeItem::Default ) [protected]
Stores the color value based on the given storage key and state state.
See also color().
void ThemeGraphicItem::setColor ( const QLatin1String & key, const QColor & value, ThemeItem::State state = ThemeItem::Default ) [protected]
This is an overloaded member function, provided for convenience.
Stores the color value based on the given storage key and state state.
This function was introduced in Qtopia 4.3.1.
void ThemeGraphicItem::setFont ( const QString & key, const QFont & value, ThemeItem::State state = ThemeItem::Default ) [protected]
Stores the font value based on the given storage key and state state.
See also font().
void ThemeGraphicItem::setFont ( const QLatin1String & key, const QFont & value, ThemeItem::State state = ThemeItem::Default ) [protected]
This is an overloaded member function, provided for convenience.
Stores the font value based on the given storage key and state state.
This function was introduced in Qtopia 4.3.1.
void ThemeGraphicItem::setupAlpha ( const QString & key, const QString & alpha, ThemeItem::State state = ThemeItem::Default ) [protected]
Stores the alpha attribute alpha for this item based on the given storage key and state state.
void ThemeGraphicItem::setupAlpha ( const QLatin1String & key, const QString & alpha, ThemeItem::State state = ThemeItem::Default ) [protected]
This is an overloaded member function, provided for convenience.
Stores the alpha attribute alpha for this item based on the given storage key and state state.
This function was introduced in Qtopia 4.3.1.
void ThemeGraphicItem::setupColor ( const QString & key, const QString & color, ThemeItem::State state = ThemeItem::Default ) [protected]
Stores the given color color based on the given storage key and state state.
void ThemeGraphicItem::setupColor ( const QLatin1String & key, const QLatin1String & roleKey, const QString & color, ThemeItem::State state = ThemeItem::Default ) [protected]
This is an overloaded member function, provided for convenience.
Stores the given color color based on the given storage key role key roleKey and state state.
This function was introduced in Qtopia 4.3.1.