

Definition at line 102 of file actioneditor.cpp.
Public Member Functions | |
| ActionGroupDelegate (QObject *parent) | |
| virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| virtual void | drawFocus (QPainter *, const QStyleOptionViewItem &, const QRect &) const |
| qdesigner_internal::ActionGroupDelegate::ActionGroupDelegate | ( | QObject * | parent | ) | [inline] |
| virtual void qdesigner_internal::ActionGroupDelegate::paint | ( | QPainter * | painter, | |
| const QStyleOptionViewItem & | option, | |||
| const QModelIndex & | index | |||
| ) | const [inline, virtual] |
Renders the delegate using the given painter and style option for the item specified by index.
When reimplementing this function in a subclass, you should update the area held by the option's {QStyleOption::rect}{rect} variable, using the option's {QStyleOption::state}{state} variable to determine the state of the item to be displayed, and adjust the way it is painted accordingly.
For example, a selected item may need to be displayed differently to unselected items, as shown in the following code:
itemviews/pixelator/pixeldelegate.cpp QStyle::State_Selected else
After painting, you should ensure that the painter is returned to its the state it was supplied in when this function was called. For example, it may be useful to call QPainter::save() before painting and QPainter::restore() afterwards.
Reimplemented from QItemDelegate.
Definition at line 108 of file actioneditor.cpp.
References QPainter::fillRect(), QPalette::highlight(), index, QItemDelegate::paint(), QStyleOption::palette, QStyleOption::rect, QStyleOption::state, and QStyle::State_Selected.
00109 { 00110 if (option.state & QStyle::State_Selected) 00111 painter->fillRect(option.rect, option.palette.highlight()); 00112 00113 QItemDelegate::paint(painter, option, index); 00114 }
Here is the call graph for this function:

| virtual void qdesigner_internal::ActionGroupDelegate::drawFocus | ( | QPainter * | , | |
| const QStyleOptionViewItem & | , | |||
| const QRect & | ||||
| ) | const [inline, virtual] |
Renders the region within the rectangle specified by rect, indicating that it has the focus, using the given painter and style option.
Reimplemented from QItemDelegate.
Definition at line 116 of file actioneditor.cpp.
1.5.1