|
Quantum GIS API Documentation
1.7.4
|
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 | 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 35 of file qgsdetaileditemdelegate.h.
| QgsDetailedItemDelegate::QgsDetailedItemDelegate | ( | QObject * | parent = 0 | ) |
Definition at line 29 of file qgsdetaileditemdelegate.cpp.
References mpCheckBox, setHorizontalSpacing(), and setVerticalSpacing().
Definition at line 41 of file qgsdetaileditemdelegate.cpp.
References mpCheckBox, and mpWidget.
| QFont QgsDetailedItemDelegate::detailFont | ( | const QStyleOptionViewItem & | theOption | ) | const [private] |
Definition at line 261 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), paintManually(), and titleFont().
| void QgsDetailedItemDelegate::drawHighlight | ( | const QStyleOptionViewItem & | theOption, |
| QPainter * | thepPainter, | ||
| int | theHeight | ||
| ) | const [private] |
Definition at line 228 of file qgsdetaileditemdelegate.cpp.
Referenced by paintAsWidget(), and paintManually().
| int QgsDetailedItemDelegate::height | ( | const QStyleOptionViewItem & | theOption, |
| const QgsDetailedItemData | theData | ||
| ) | const [private] |
Definition at line 245 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::detail(), detailFont(), horizontalSpacing(), mpCheckBox, titleFont(), verticalSpacing(), and wordWrap().
Referenced by paintAsWidget(), paintManually(), and sizeHint().
| int QgsDetailedItemDelegate::horizontalSpacing | ( | ) | const |
Definition at line 336 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 47 of file qgsdetaileditemdelegate.cpp.
References QgsDetailedItemData::isRenderedAsWidget(), paintAsWidget(), and paintManually().
| void QgsDetailedItemDelegate::paintAsWidget | ( | QPainter * | thePainter, |
| const QStyleOptionViewItem & | theOption, | ||
| const QgsDetailedItemData | theData | ||
| ) | const [private] |
Definition at line 207 of file qgsdetaileditemdelegate.cpp.
References drawHighlight(), height(), QgsDetailedItemData::isChecked(), mpWidget, QgsDetailedItemWidget::setChecked(), and QgsDetailedItemWidget::setData().
Referenced by paint().
| 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::setHorizontalSpacing | ( | int | theValue | ) |
Definition at line 342 of file qgsdetaileditemdelegate.cpp.
References mHorizontalSpacing.
Referenced by QgsDetailedItemDelegate().
| void QgsDetailedItemDelegate::setVerticalSpacing | ( | int | theValue | ) |
Definition at line 330 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 71 of file qgsdetaileditemdelegate.cpp.
References height(), QgsDetailedItemData::isRenderedAsWidget(), and mpWidget.
| QFont QgsDetailedItemDelegate::titleFont | ( | const QStyleOptionViewItem & | theOption | ) | const [private] |
Definition at line 267 of file qgsdetaileditemdelegate.cpp.
References detailFont().
Referenced by height(), and paintManually().
| int QgsDetailedItemDelegate::verticalSpacing | ( | ) | const |
Definition at line 324 of file qgsdetaileditemdelegate.cpp.
References mVerticalSpacing.
Referenced by height(), and paintManually().
| QStringList QgsDetailedItemDelegate::wordWrap | ( | QString | theString, |
| QFontMetrics | theMetrics, | ||
| int | theWidth | ||
| ) | const [private] |
Definition at line 276 of file qgsdetaileditemdelegate.cpp.
Referenced by height(), and paintManually().
int QgsDetailedItemDelegate::mHorizontalSpacing [private] |
Definition at line 79 of file qgsdetaileditemdelegate.h.
Referenced by horizontalSpacing(), and setHorizontalSpacing().
QCheckBox* QgsDetailedItemDelegate::mpCheckBox [private] |
Definition at line 77 of file qgsdetaileditemdelegate.h.
Referenced by height(), paintManually(), QgsDetailedItemDelegate(), and ~QgsDetailedItemDelegate().
Definition at line 76 of file qgsdetaileditemdelegate.h.
Referenced by paintAsWidget(), sizeHint(), and ~QgsDetailedItemDelegate().
int QgsDetailedItemDelegate::mVerticalSpacing [private] |
Definition at line 78 of file qgsdetaileditemdelegate.h.
Referenced by setVerticalSpacing(), and verticalSpacing().
1.7.6.1