A subclass of QStyledItemDelegate which draws a rectangle around selected items.
More...
|
| QtlSelectionRectDelegate (QObject *parent=0, const QColor &color=Qt::black, int width=0, Qt::PenStyle style=Qt::SolidLine, Qt::PenJoinStyle join=Qt::BevelJoin) |
| Constructor. More...
|
|
virtual void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE |
| Renders the delegate using the given painter and style option for the item specified by index. More...
|
|
A subclass of QStyledItemDelegate which draws a rectangle around selected items.
◆ QtlSelectionRectDelegate()
QtlSelectionRectDelegate::QtlSelectionRectDelegate |
( |
QObject * |
parent = 0 , |
|
|
const QColor & |
color = Qt::black , |
|
|
int |
width = 0 , |
|
|
Qt::PenStyle |
style = Qt::SolidLine , |
|
|
Qt::PenJoinStyle |
join = Qt::BevelJoin |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
[in] | parent | Optional parent object. |
[in] | color | Color of the rectangle. Black by default. |
[in] | width | Line width. When zero (the default), use a generic one-pixel width. |
[in] | style | Line style. |
[in] | join | Join style (for angles). |
◆ paint()
void QtlSelectionRectDelegate::paint |
( |
QPainter * |
painter, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
virtual |
Renders the delegate using the given painter and style option for the item specified by index.
Reimplemented from QStyledItemDelegate.
- Parameters
-
[in] | painter | The painter to use. |
[in] | option | The style to use. Typically gives the geometry of the item. |
[in] | index | The index of the item. |
◆ _color
const QColor QtlSelectionRectDelegate::_color |
|
private |
◆ _width
const int QtlSelectionRectDelegate::_width |
|
private |
◆ _style
const Qt::PenStyle QtlSelectionRectDelegate::_style |
|
private |
◆ _join
const Qt::PenJoinStyle QtlSelectionRectDelegate::_join |
|
private |
The documentation for this class was generated from the following files: