KVIrc
4.9.2
DeveloperAPIs
|
Toolkit Abstraction Layer: itemdelegate class. More...
#include <KviTalIconAndRichTextItemDelegate.h>
Public Member Functions | |
KviTalIconAndRichTextItemDelegate (QAbstractItemView *pWidget=0) | |
Constructs the icon and rich text item delegate object. More... | |
void | paint (QPainter *pPainter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
Paints the view. More... | |
void | setDefaultIcon (QPixmap *pPix) |
Sets the default icon. More... | |
void | setDefaultIcon (const QPixmap &oPix) |
void | setIconSize (const QSize &s) |
Set the size of the icons. Should be set in the view constructor. More... | |
void | setMinimumSize (const QSize &s) |
Set the absolute minimum size of the items. Should be set in the view constructor as QListWidget caches the size hints and works really hard to keep them unchanged. More... | |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
Returns the size hint for the view. More... | |
~KviTalIconAndRichTextItemDelegate () | |
Destroys the icon and rich text item delegate object. More... | |
Protected Attributes | |
QPixmap | m_oDefaultPix |
QSize | m_oIconSize |
QSize | m_oMinimumSize |
QAbstractItemView * | m_pParent |
Toolkit Abstraction Layer: itemdelegate class.
KviTalIconAndRichTextItemDelegate::KviTalIconAndRichTextItemDelegate | ( | QAbstractItemView * | pWidget = 0 | ) |
Constructs the icon and rich text item delegate object.
pWidget | The item which we have to delegate for the paint |
|
default |
Destroys the icon and rich text item delegate object.
void KviTalIconAndRichTextItemDelegate::paint | ( | QPainter * | pPainter, |
const QStyleOptionViewItem & | option, | ||
const QModelIndex & | index | ||
) | const |
Paints the view.
pPainter | The painter to draw the view |
option | The style options for the item |
index | The model index for the item |
References LVI_BORDER, LVI_SPACING, m_oDefaultPix, m_oIconSize, w, x, and y.
|
inline |
Sets the default icon.
pPix | The icon pixmap |
Referenced by ThemeManagementDialog::applyCurrentTheme(), and ThemeManagementDialog::ThemeManagementDialog().
|
inline |
|
inline |
Set the size of the icons. Should be set in the view constructor.
References s.
Referenced by ThemeManagementDialog::ThemeManagementDialog().
|
inline |
Set the absolute minimum size of the items. Should be set in the view constructor as QListWidget caches the size hints and works really hard to keep them unchanged.
References s.
Referenced by ThemeManagementDialog::ThemeManagementDialog().
QSize KviTalIconAndRichTextItemDelegate::sizeHint | ( | const QStyleOptionViewItem & | option, |
const QModelIndex & | index | ||
) | const |
Returns the size hint for the view.
option | The style options for the item |
index | The model index for the item |
References h, LVI_AFTER_ICON, LVI_BORDER, m_oIconSize, m_oMinimumSize, and w.
|
protected |
Referenced by paint().
|
protected |
Referenced by paint(), and sizeHint().
|
protected |
Referenced by sizeHint().
|
protected |