#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 | 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 |
Definition at line 35 of file qgsdetaileditemdelegate.h.
QgsDetailedItemDelegate::QgsDetailedItemDelegate | ( | QObject * | parent = 0 |
) |
Definition at line 29 of file qgsdetaileditemdelegate.cpp.
References mpCheckBox, setHorizontalSpacing(), and setVerticalSpacing().
QgsDetailedItemDelegate::~QgsDetailedItemDelegate | ( | ) |
void QgsDetailedItemDelegate::paint | ( | QPainter * | thePainter, | |
const QStyleOptionViewItem & | theOption, | |||
const QModelIndex & | theIndex | |||
) | const |
reimplement for parent class
Definition at line 47 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::isRenderedAsWidget(), paintAsWidget(), and paintManually().
QSize QgsDetailedItemDelegate::sizeHint | ( | const QStyleOptionViewItem & | theOption, | |
const QModelIndex & | theIndex | |||
) | const |
reimplement for parent class
Definition at line 71 of file qgsdetaileditemdelegate.cpp.
References height(), QgsDetailedItemData::isRenderedAsWidget(), and mpWidget.
void QgsDetailedItemDelegate::setVerticalSpacing | ( | int | theValue | ) |
Definition at line 312 of file qgsdetaileditemdelegate.cpp.
References mVerticalSpacing.
Referenced by QgsDetailedItemDelegate().
int QgsDetailedItemDelegate::verticalSpacing | ( | ) | const |
Definition at line 306 of file qgsdetaileditemdelegate.cpp.
References mVerticalSpacing.
Referenced by height(), and paintManually().
void QgsDetailedItemDelegate::setHorizontalSpacing | ( | int | theValue | ) |
Definition at line 324 of file qgsdetaileditemdelegate.cpp.
References mHorizontalSpacing.
Referenced by QgsDetailedItemDelegate().
int QgsDetailedItemDelegate::horizontalSpacing | ( | ) | const |
Definition at line 318 of file qgsdetaileditemdelegate.cpp.
References mHorizontalSpacing.
Referenced by height(), and paintManually().
QFont QgsDetailedItemDelegate::detailFont | ( | const QStyleOptionViewItem & | theOption | ) | const [private] |
Definition at line 243 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), paintManually(), and titleFont().
QFont QgsDetailedItemDelegate::titleFont | ( | const QStyleOptionViewItem & | theOption | ) | const [private] |
Definition at line 249 of file qgsdetaileditemdelegate.cpp.
References detailFont().
Referenced by height(), and paintManually().
void QgsDetailedItemDelegate::drawHighlight | ( | const QStyleOptionViewItem & | theOption, | |
QPainter * | thepPainter, | |||
int | theHeight | |||
) | const [private] |
Definition at line 210 of file qgsdetaileditemdelegate.cpp.
Referenced by paintAsWidget(), and paintManually().
QStringList QgsDetailedItemDelegate::wordWrap | ( | QString | theString, | |
QFontMetrics | theMetrics, | |||
int | theWidth | |||
) | const [private] |
Definition at line 258 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), and paintManually().
void QgsDetailedItemDelegate::paintManually | ( | QPainter * | thePainter, | |
const QStyleOptionViewItem & | theOption, | |||
const QgsDetailedItemData | theData | |||
) | const [private] |
Definition at line 96 of file qgsdetaileditemdelegate.cpp.
References 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::paintAsWidget | ( | QPainter * | thePainter, | |
const QStyleOptionViewItem & | theOption, | |||
const QgsDetailedItemData | theData | |||
) | const [private] |
Definition at line 189 of file qgsdetaileditemdelegate.cpp.
References drawHighlight(), height(), QgsDetailedItemData::isChecked(), mpWidget, QgsDetailedItemWidget::setChecked(), and QgsDetailedItemWidget::setData().
Referenced by paint().
int QgsDetailedItemDelegate::height | ( | const QStyleOptionViewItem & | theOption, | |
const QgsDetailedItemData | theData | |||
) | const [private] |
Definition at line 227 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::detail(), detailFont(), horizontalSpacing(), mpCheckBox, titleFont(), verticalSpacing(), and wordWrap().
Referenced by paintAsWidget(), paintManually(), and sizeHint().
Definition at line 76 of file qgsdetaileditemdelegate.h.
Referenced by paintAsWidget(), sizeHint(), and ~QgsDetailedItemDelegate().
QCheckBox* QgsDetailedItemDelegate::mpCheckBox [private] |
Definition at line 77 of file qgsdetaileditemdelegate.h.
Referenced by height(), paintManually(), QgsDetailedItemDelegate(), and ~QgsDetailedItemDelegate().
int QgsDetailedItemDelegate::mVerticalSpacing [private] |
Definition at line 78 of file qgsdetaileditemdelegate.h.
Referenced by setVerticalSpacing(), and verticalSpacing().
int QgsDetailedItemDelegate::mHorizontalSpacing [private] |
Definition at line 79 of file qgsdetaileditemdelegate.h.
Referenced by horizontalSpacing(), and setHorizontalSpacing().