Quark  0.1
ImageDelegate Class Reference

An item delegate that displays an image with an optional border. More...

#include <ImageDelegate.h++>

Inheritance diagram for ImageDelegate:

Public Member Functions

 ImageDelegate (QObject *parent=NULL)
 Constructor. More...
 
void setBorderThickness (int borderThickness)
 Sets the border thickness. More...
 
void setBorderColor (QColor borderColor)
 Sets the border color. More...
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Specified by QAbstractItemDelegate. More...
 
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
 Specified by QAbstractItemDelegate. More...
 

Detailed Description

An item delegate that displays an image with an optional border.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ImageDelegate()

ImageDelegate ( QObject *  parent = NULL)
explicit

Constructor.

Member Function Documentation

◆ paint()

virtual void paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Specified by QAbstractItemDelegate.

◆ setBorderColor()

void setBorderColor ( QColor  borderColor)

Sets the border color.

Parameters
borderColorThe border color.

◆ setBorderThickness()

void setBorderThickness ( int  borderThickness)

Sets the border thickness.

Parameters
borderThicknessThe border thickness, in pixels. If less than 1, no border will be drawn.

◆ sizeHint()

virtual QSize sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Specified by QAbstractItemDelegate.


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