QgsDetailedItemDelegate Class Reference
[QGIS gui library.]

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

QgsDetailedItemDelegate::QgsDetailedItemDelegate ( QObject *  parent = 0  ) 

QgsDetailedItemDelegate::~QgsDetailedItemDelegate (  ) 

Definition at line 41 of file qgsdetaileditemdelegate.cpp.

References mpCheckBox, and mpWidget.


Member Function Documentation

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]

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

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


Member Data Documentation

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

Definition at line 79 of file qgsdetaileditemdelegate.h.

Referenced by horizontalSpacing(), and setHorizontalSpacing().


The documentation for this class was generated from the following files:

Generated on Sat Feb 4 19:17:32 2012 for Quantum GIS API Documentation by  doxygen 1.5.6