Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

ThemeGraphicItem Class Reference
[QtBaseModule]

The ThemeGraphicItem class contains common functionality for graphics based items in a ThemedView. More...

    #include <ThemeGraphicItem>

Inherits ThemeItem.

Inherited by ThemeLineItem, ThemePixmapItem, ThemeRectItem, ThemeTextItem, and ThemeWidgetItem.

Public Functions

  • 20 public functions inherited from ThemeItem

Protected Functions

  • QColor color ( const QString & key, ThemeItem::State state = ThemeItem::Default ) const
  • QColor color ( const QLatin1String & key, ThemeItem::State state = ThemeItem::Default ) const
  • QFont font ( const QString & key, ThemeItem::State state = ThemeItem::Default ) const
  • QFont font ( const QLatin1String & key, ThemeItem::State state = ThemeItem::Default ) const
  • QColor getColor ( const QColor & color, int role ) const
  • int parseColor ( const QString & value, QColor & color )
  • QFont parseFont ( const QFont & defFont, const QString & size, const QString & bold )
  • void setColor ( const QString & key, const QColor & value, ThemeItem::State state = ThemeItem::Default )
  • void setColor ( const QLatin1String & key, const QColor & value, ThemeItem::State state = ThemeItem::Default )
  • void setFont ( const QString & key, const QFont & value, ThemeItem::State state = ThemeItem::Default )
  • void setFont ( const QLatin1String & key, const QFont & value, ThemeItem::State state = ThemeItem::Default )
  • void setupAlpha ( const QString & key, const QString & alpha, ThemeItem::State state = ThemeItem::Default )
  • void setupAlpha ( const QLatin1String & key, const QString & alpha, ThemeItem::State state = ThemeItem::Default )
  • void setupColor ( const QString & key, const QString & color, ThemeItem::State state = ThemeItem::Default )
  • void setupColor ( const QLatin1String & key, const QLatin1String & roleKey, const QString & color, ThemeItem::State state = ThemeItem::Default )
  • 21 protected functions inherited from ThemeItem

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.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Introduction

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web