QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlSelectionRectDelegate Class Reference

A subclass of QStyledItemDelegate which draws a rectangle around selected items. More...

Inheritance diagram for QtlSelectionRectDelegate:

Public Member Functions

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

Private Attributes

const QColor _color
 Color of the rectangle. More...
 
const Qt::PenJoinStyle _join
 Join style (for angles). More...
 
const Qt::PenStyle _style
 Line style. More...
 
const int _width
 Line width. More...
 

Detailed Description

A subclass of QStyledItemDelegate which draws a rectangle around selected items.

Constructor & Destructor Documentation

◆ 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]parentOptional parent object.
[in]colorColor of the rectangle. Black by default.
[in]widthLine width. When zero (the default), use a generic one-pixel width.
[in]styleLine style.
[in]joinJoin style (for angles).

Member Function Documentation

◆ 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]painterThe painter to use.
[in]optionThe style to use. Typically gives the geometry of the item.
[in]indexThe index of the item.

Member Data Documentation

◆ _color

const QColor QtlSelectionRectDelegate::_color
private

Color of the rectangle.

◆ _width

const int QtlSelectionRectDelegate::_width
private

Line width.

◆ _style

const Qt::PenStyle QtlSelectionRectDelegate::_style
private

Line style.

◆ _join

const Qt::PenJoinStyle QtlSelectionRectDelegate::_join
private

Join style (for angles).


The documentation for this class was generated from the following files: