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  · 

QStyleOptionViewItemV4 Class Reference

The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in Qt 4.4 or above. More...

 #include <QStyleOptionViewItemV4>

Inherits: QStyleOptionViewItemV3.

This class was introduced in Qt 4.4.

Public Types

enum StyleOptionVersion { Version }
enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne }

Public Functions

QStyleOptionViewItemV4 ()
QStyleOptionViewItemV4 ( const QStyleOptionViewItemV4 & other )
QStyleOptionViewItemV4 ( const QStyleOptionViewItem & other )
QStyleOptionViewItemV4 & operator= ( const QStyleOptionViewItem & other )

Public Variables

QBrush backgroundBrush
Qt::CheckState checkState
QIcon icon
QModelIndex index
QString text
ViewItemPosition viewItemPosition

Detailed Description

The QStyleOptionViewItemV4 class is used to describe the parameters necessary for drawing a frame in Qt 4.4 or above.

QStyleOptionViewItemV4 inherits QStyleOptionViewItemV3.

An instance of the QStyleOptionViewItemV4 class has type SO_ViewItem and version 4. The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles. The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

See QStyleOptionViewItemV3's detailed description for a discussion of how to handle "V3" classes.

See also QStyleOptionViewItem and QStyleOption.

Member Type Documentation

enum QStyleOptionViewItemV4::StyleOptionVersion

This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

ConstantValueDescription
QStyleOptionViewItemV4::Version44

The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.

See also StyleOptionType.

enum QStyleOptionViewItemV4::ViewItemPosition

This enum is used to represent the placement of the item on a row. This can be used to draw items differently depending on their placement, for example by putting rounded edges at the beginning and end, and straight edges in between.

ConstantValueDescription
QStyleOptionViewItemV4::Invalid0The ViewItemPosition is unknown and should be disregarded.
QStyleOptionViewItemV4::Beginning1The item appears at the beginning of the row.
QStyleOptionViewItemV4::Middle2The item appears in the middle of the row.
QStyleOptionViewItemV4::End3The item appears at the end of the row.
QStyleOptionViewItemV4::OnlyOne4The item is the only one on the row, and is therefore both at the beginning and the end.

Member Function Documentation

QStyleOptionViewItemV4::QStyleOptionViewItemV4 ()

Constructs a QStyleOptionViewItemV4 object.

QStyleOptionViewItemV4::QStyleOptionViewItemV4 ( const QStyleOptionViewItemV4 & other )

Constructs a copy of other.

QStyleOptionViewItemV4::QStyleOptionViewItemV4 ( const QStyleOptionViewItem & other )

Constructs a QStyleOptionViewItemV4 copy of the other style option which can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.

See also version.

QStyleOptionViewItemV4 & QStyleOptionViewItemV4::operator= ( const QStyleOptionViewItem & other )

Assigns the other style option to this style option. The other style option can be either of the QStyleOptionViewItemV3 or QStyleOptionViewItem types.

Member Variable Documentation

QBrush QStyleOptionViewItemV4::backgroundBrush

The QBrush that should be used to paint the view items background.

Qt::CheckState QStyleOptionViewItemV4::checkState

If this view item is checkable, i.e., ViewItemFeature::HasCheckIndicator is true, checkState is true if the item is checked; otherwise, it is false.

QIcon QStyleOptionViewItemV4::icon

The icon (if any) to be drawn in the view item.

QModelIndex QStyleOptionViewItemV4::index

The model index that is to be drawn.

QString QStyleOptionViewItemV4::text

The text (if any) to be drawn in the view item.

ViewItemPosition QStyleOptionViewItemV4::viewItemPosition

Gives the position of this view item relative to other items. See the ViewItemPosition enum for the details.

Publicit�

Best Of

Actualit�s les plus lues

Semaine
Mois
Ann�e
  1. Microsoft ouvre aux autres compilateurs C++ AMP, la sp�cification pour la conception d'applications parall�les C++ utilisant le GPU 22
  2. Les d�veloppeurs ignorent-ils trop les failles d�couvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. RIM : � 13 % des d�veloppeurs ont gagn� plus de 100 000 $ sur l'AppWord �, Qt et open-source au menu du BlackBerry DevCon Europe 0
  4. � Quelque chose ne va vraiment pas avec les d�veloppeurs "modernes" �, un d�veloppeur � "l'ancienne" critique la multiplication des biblioth�ques 12
  5. 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
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil d�claratif et extensible pour la compilation de projets Qt 17
  7. Quelles nouveaut�s de C++11 Visual C++ doit-il rapidement int�grer ? Donnez-nous votre avis 10
Page suivante

Le Qt Developer Network au hasard

Logo

Utiliser QML et QtWebKit avec PySide

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 4.7
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