#include <qstyleoption.h>
Inheritance diagram for QStyleOptionViewItemV2:


An instance of the QStyleOptionViewItemV2 class has type SO_ViewItem and version 2. 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 don't need to check it.
See QStyleOptionFrameV2's detailed description for a discussion of how to handle "V2" classes.
Definition at line 450 of file qstyleoption.h.
Public Types | |
| enum | StyleOptionVersion |
| enum | ViewItemFeature |
Public Member Functions | |
| QStyleOptionViewItemV2 () | |
| QStyleOptionViewItemV2 (const QStyleOptionViewItemV2 &other) | |
| QStyleOptionViewItemV2 (const QStyleOptionViewItem &other) | |
| QStyleOptionViewItemV2 & | operator= (const QStyleOptionViewItem &other) |
Public Attributes | |
| ViewItemFeatures | features |
Protected Member Functions | |
| QStyleOptionViewItemV2 (int version) | |
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.
Version 2
The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.
Reimplemented from QStyleOptionViewItem.
Definition at line 453 of file qstyleoption.h.
00453 { Version = 2 };
This enum describles the different types of features an item can have.
None Indicates a normal item. WrapText Indicates an item with wrapped text. Alternate Indicates that the item's background is rendered using alternateBase.
Definition at line 455 of file qstyleoption.h.
| QStyleOptionViewItemV2::QStyleOptionViewItemV2 | ( | ) |
a bitwise OR of the features that describe this view item
Constructs a QStyleOptionViewItemV2 object.
Definition at line 697 of file qstyleoption.cpp.
00698 : QStyleOptionViewItem(Version), features(None) 00699 { 00700 }
| QStyleOptionViewItemV2::QStyleOptionViewItemV2 | ( | const QStyleOptionViewItemV2 & | other | ) | [inline] |
Constructs a copy of other.
Definition at line 465 of file qstyleoption.h.
00465 : QStyleOptionViewItem(Version) { *this = other; }
| QStyleOptionViewItemV2::QStyleOptionViewItemV2 | ( | const QStyleOptionViewItem & | other | ) |
Constructs a QStyleOptionViewItemV2 copy of the other style option which can be either of the QStyleOptionViewItemV2 or QStyleOptionViewItem types.
If the other style option's version is 1, the new style option's ViewItemFeature value is set to QStyleOptionViewItemV2::None. If its version is 2, its ViewItemFeature value is simply copied to the new style option.
Definition at line 720 of file qstyleoption.cpp.
00721 : QStyleOptionViewItem(Version) 00722 { 00723 (void)QStyleOptionViewItemV2::operator=(other); 00724 }
| QStyleOptionViewItemV2::QStyleOptionViewItemV2 | ( | int | version | ) | [protected] |
Definition at line 729 of file qstyleoption.cpp.
00730 : QStyleOptionViewItem(version) 00731 { 00732 00733 }
| QStyleOptionViewItemV2 & QStyleOptionViewItemV2::operator= | ( | const QStyleOptionViewItem & | other | ) |
Assigns the other style option to this style option. The other style option can be either of the QStyleOptionViewItemV2 or QStyleOptionViewItem types.
If the {other} style option's version is 1, this style option's ViewItemFeature value is set to QStyleOptionViewItemV2::None. If its version is 2, its ViewItemFeature value is simply copied to this style option.
Definition at line 745 of file qstyleoption.cpp.
References features, None, and QStyleOption::operator=().
00746 { 00747 QStyleOptionViewItem::operator=(other); 00748 const QStyleOptionViewItemV2 *v2 = qstyleoption_cast<const QStyleOptionViewItemV2 *>(&other); 00749 features = v2 ? v2->features : ViewItemFeatures(QStyleOptionViewItemV2::None); 00750 return *this; 00751 }
Here is the call graph for this function:

| ViewItemFeatures QStyleOptionViewItemV2::features |
Definition at line 462 of file qstyleoption.h.
Referenced by QTableViewPrivate::drawAndClipSpans(), QTableViewPrivate::drawCell(), QItemDelegate::drawDisplay(), QTreeView::drawRow(), operator=(), QItemDelegate::paint(), QTableView::paintEvent(), QListView::paintEvent(), QItemDelegatePrivate::textLayoutBounds(), QListViewPrivate::viewOptionsV2(), and QTableViewPrivate::viewOptionsV2().
1.5.1