QGIS API Documentation
2.2.0-Valmiera
|
A custom model/view delegate that can display an icon, heading and detail sections. More...
#include <qgsdetaileditemdelegate.h>
Public Member Functions | |
QgsDetailedItemDelegate (QObject *parent=0) | |
~QgsDetailedItemDelegate () | |
void | paint (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QModelIndex &theIndex) const |
reimplement for parent class | |
QSize | sizeHint (const QStyleOptionViewItem &theOption, const QModelIndex &theIndex) const |
reimplement for parent class | |
void | setVerticalSpacing (int theValue) |
int | verticalSpacing () const |
void | setHorizontalSpacing (int theValue) |
int | horizontalSpacing () const |
Private Member Functions | |
QFont | detailFont (const QStyleOptionViewItem &theOption) const |
QFont | categoryFont (const QStyleOptionViewItem &theOption) const |
QFont | titleFont (const QStyleOptionViewItem &theOption) const |
void | drawHighlight (const QStyleOptionViewItem &theOption, QPainter *thepPainter, int theHeight) const |
QStringList | wordWrap (QString theString, QFontMetrics theMetrics, int theWidth) const |
void | paintManually (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const |
void | paintAsWidget (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const |
int | height (const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const |
Private Attributes | |
QgsDetailedItemWidget * | mpWidget |
QCheckBox * | mpCheckBox |
int | mVerticalSpacing |
int | mHorizontalSpacing |
A custom model/view delegate that can display an icon, heading and detail sections.
Definition at line 34 of file qgsdetaileditemdelegate.h.
QgsDetailedItemDelegate::QgsDetailedItemDelegate | ( | QObject * | parent = 0 | ) |
Definition at line 28 of file qgsdetaileditemdelegate.cpp.
References mpCheckBox, setHorizontalSpacing(), and setVerticalSpacing().
QgsDetailedItemDelegate::~QgsDetailedItemDelegate | ( | ) |
Definition at line 40 of file qgsdetaileditemdelegate.cpp.
References mpCheckBox, and mpWidget.
|
private |
Definition at line 309 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), and paintManually().
|
private |
Definition at line 303 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), paintManually(), and titleFont().
|
private |
Definition at line 262 of file qgsdetaileditemdelegate.cpp.
Referenced by paintAsWidget(), and paintManually().
|
private |
Definition at line 279 of file qgsdetaileditemdelegate.cpp.
References categoryFont(), QgsDetailedItemData::detail(), detailFont(), horizontalSpacing(), mpCheckBox, titleFont(), verticalSpacing(), and wordWrap().
Referenced by paintAsWidget(), paintManually(), and sizeHint().
int QgsDetailedItemDelegate::horizontalSpacing | ( | ) | const |
Definition at line 387 of file qgsdetaileditemdelegate.cpp.
References mHorizontalSpacing.
Referenced by height(), and paintManually().
void QgsDetailedItemDelegate::paint | ( | QPainter * | thePainter, |
const QStyleOptionViewItem & | theOption, | ||
const QModelIndex & | theIndex | ||
) | const |
reimplement for parent class
Definition at line 46 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::isRenderedAsWidget(), paintAsWidget(), and paintManually().
|
private |
Definition at line 241 of file qgsdetaileditemdelegate.cpp.
References drawHighlight(), height(), QgsDetailedItemData::isChecked(), mpWidget, QgsDetailedItemWidget::setChecked(), and QgsDetailedItemWidget::setData().
Referenced by paint().
|
private |
Definition at line 95 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::category(), categoryFont(), QgsDetailedItemData::detail(), detailFont(), drawHighlight(), height(), horizontalSpacing(), QgsDetailedItemData::icon(), QgsDetailedItemData::isCheckable(), QgsDetailedItemData::isChecked(), QgsDetailedItemData::isEnabled(), mpCheckBox, QgsDetailedItemData::title(), titleFont(), verticalSpacing(), and wordWrap().
Referenced by paint().
void QgsDetailedItemDelegate::setHorizontalSpacing | ( | int | theValue | ) |
Definition at line 393 of file qgsdetaileditemdelegate.cpp.
References mHorizontalSpacing.
Referenced by QgsDetailedItemDelegate().
void QgsDetailedItemDelegate::setVerticalSpacing | ( | int | theValue | ) |
Definition at line 381 of file qgsdetaileditemdelegate.cpp.
References mVerticalSpacing.
Referenced by QgsDetailedItemDelegate().
QSize QgsDetailedItemDelegate::sizeHint | ( | const QStyleOptionViewItem & | theOption, |
const QModelIndex & | theIndex | ||
) | const |
reimplement for parent class
Definition at line 70 of file qgsdetaileditemdelegate.cpp.
References height(), QgsDetailedItemData::isRenderedAsWidget(), and mpWidget.
|
private |
Definition at line 316 of file qgsdetaileditemdelegate.cpp.
References detailFont().
Referenced by height(), and paintManually().
int QgsDetailedItemDelegate::verticalSpacing | ( | ) | const |
Definition at line 375 of file qgsdetaileditemdelegate.cpp.
References mVerticalSpacing.
Referenced by height(), and paintManually().
|
private |
Definition at line 325 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), and paintManually().
|
private |
Definition at line 79 of file qgsdetaileditemdelegate.h.
Referenced by horizontalSpacing(), and setHorizontalSpacing().
|
private |
Definition at line 77 of file qgsdetaileditemdelegate.h.
Referenced by height(), paintManually(), QgsDetailedItemDelegate(), and ~QgsDetailedItemDelegate().
|
private |
Definition at line 76 of file qgsdetaileditemdelegate.h.
Referenced by paintAsWidget(), sizeHint(), and ~QgsDetailedItemDelegate().
|
private |
Definition at line 78 of file qgsdetaileditemdelegate.h.
Referenced by setVerticalSpacing(), and verticalSpacing().