Quantum GIS API Documentation  1.7.4
Public Member Functions | Private Member Functions | Private Attributes
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:
Collaboration graph
[legend]

List of all members.

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

QgsDetailedItemWidgetmpWidget
QCheckBox * mpCheckBox
int mVerticalSpacing
int mHorizontalSpacing

Detailed Description

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

See also:
also QgsDetailedItemData

Definition at line 35 of file qgsdetaileditemdelegate.h.


Constructor & Destructor Documentation

Definition at line 41 of file qgsdetaileditemdelegate.cpp.

References mpCheckBox, and mpWidget.


Member Function Documentation

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 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]
void QgsDetailedItemDelegate::paintManually ( QPainter *  thePainter,
const QStyleOptionViewItem &  theOption,
const QgsDetailedItemData  theData 
) const [private]

Definition at line 342 of file qgsdetaileditemdelegate.cpp.

References mHorizontalSpacing.

Referenced by QgsDetailedItemDelegate().

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

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


Member Data Documentation

Definition at line 79 of file qgsdetaileditemdelegate.h.

Referenced by horizontalSpacing(), and setHorizontalSpacing().

Definition at line 76 of file qgsdetaileditemdelegate.h.

Referenced by paintAsWidget(), sizeHint(), and ~QgsDetailedItemDelegate().

Definition at line 78 of file qgsdetaileditemdelegate.h.

Referenced by setVerticalSpacing(), and verticalSpacing().


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