2012-09-24 02:28:15 +02:00
|
|
|
/** \ingroup gui
|
|
|
|
* A custom model/view delegate that can display an icon, heading
|
|
|
|
* and detail sections.
|
|
|
|
* @see also QgsDetailedItemData
|
|
|
|
*/
|
|
|
|
class QgsDetailedItemDelegate : QAbstractItemDelegate
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsdetaileditemdelegate.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2015-02-18 17:00:36 +11:00
|
|
|
QgsDetailedItemDelegate( QObject * parent /TransferThis/ = 0 );
|
2012-09-24 02:28:15 +02:00
|
|
|
~QgsDetailedItemDelegate();
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Reimplement for parent class */
|
2012-09-24 02:28:15 +02:00
|
|
|
void paint( QPainter * thePainter,
|
|
|
|
const QStyleOptionViewItem & theOption,
|
|
|
|
const QModelIndex & theIndex ) const;
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Reimplement for parent class */
|
2012-09-24 02:28:15 +02:00
|
|
|
QSize sizeHint( const QStyleOptionViewItem & theOption,
|
|
|
|
const QModelIndex & theIndex ) const;
|
|
|
|
|
|
|
|
void setVerticalSpacing( int theValue );
|
|
|
|
|
|
|
|
int verticalSpacing() const;
|
|
|
|
|
|
|
|
void setHorizontalSpacing( int theValue );
|
|
|
|
|
|
|
|
int horizontalSpacing() const;
|
|
|
|
};
|