Quantum GIS API Documentation  master-ce49b66
QgsDetailedItemDelegate Class Reference

A custom model/view delegate that can display an icon, heading and detail sections. More...

#include <qgsdetaileditemdelegate.h>

+ Collaboration diagram for QgsDetailedItemDelegate:

List of all members.

Public Member Functions

 QgsDetailedItemDelegate (QObject *parent=0)
 ~QgsDetailedItemDelegate ()
int horizontalSpacing () const
void paint (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QModelIndex &theIndex) const
 reimplement for parent class
void setHorizontalSpacing (int theValue)
void setVerticalSpacing (int theValue)
QSize sizeHint (const QStyleOptionViewItem &theOption, const QModelIndex &theIndex) const
 reimplement for parent class
int verticalSpacing () const

Private Member Functions

QFont categoryFont (const QStyleOptionViewItem &theOption) const
QFont detailFont (const QStyleOptionViewItem &theOption) const
void drawHighlight (const QStyleOptionViewItem &theOption, QPainter *thepPainter, int theHeight) const
int height (const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const
void paintAsWidget (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const
void paintManually (QPainter *thePainter, const QStyleOptionViewItem &theOption, const QgsDetailedItemData theData) const
QFont titleFont (const QStyleOptionViewItem &theOption) const
QStringList wordWrap (QString theString, QFontMetrics theMetrics, int theWidth) const

Private Attributes

int mHorizontalSpacing
QCheckBox * mpCheckBox
QgsDetailedItemWidgetmpWidget
int mVerticalSpacing

Detailed Description

A custom model/view delegate that can display an icon, heading and detail sections.

See also:
also QgsDetailedItemData

Definition at line 34 of file qgsdetaileditemdelegate.h.


Constructor & Destructor Documentation


Member Function Documentation

QFont QgsDetailedItemDelegate::categoryFont ( const QStyleOptionViewItem &  theOption) const [private]

Definition at line 309 of file qgsdetaileditemdelegate.cpp.

Referenced by height(), and paintManually().

QFont QgsDetailedItemDelegate::detailFont ( const QStyleOptionViewItem &  theOption) const [private]

Definition at line 303 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 262 of file qgsdetaileditemdelegate.cpp.

Referenced by paintAsWidget(), and paintManually().

int QgsDetailedItemDelegate::height ( const QStyleOptionViewItem &  theOption,
const QgsDetailedItemData  theData 
) const [private]

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().

void QgsDetailedItemDelegate::paintAsWidget ( QPainter *  thePainter,
const QStyleOptionViewItem &  theOption,
const QgsDetailedItemData  theData 
) const [private]

Definition at line 393 of file qgsdetaileditemdelegate.cpp.

References mHorizontalSpacing.

Referenced by QgsDetailedItemDelegate().

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.

QFont QgsDetailedItemDelegate::titleFont ( const QStyleOptionViewItem &  theOption) const [private]

Definition at line 316 of file qgsdetaileditemdelegate.cpp.

References detailFont().

Referenced by height(), and paintManually().

Definition at line 375 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 325 of file qgsdetaileditemdelegate.cpp.

Referenced by height(), and paintManually().


Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines