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:
|
2017-05-03 07:45:22 +02: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 */
|
2017-02-21 18:14:58 +01:00
|
|
|
void paint( QPainter * painter,
|
|
|
|
const QStyleOptionViewItem & option,
|
2017-05-03 07:45:22 +02:00
|
|
|
const QModelIndex &index ) const;
|
2015-07-29 11:52:14 +02:00
|
|
|
/** Reimplement for parent class */
|
2017-02-21 18:14:58 +01:00
|
|
|
QSize sizeHint( const QStyleOptionViewItem & option,
|
2017-05-03 07:45:22 +02:00
|
|
|
const QModelIndex &index ) const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
void setVerticalSpacing( int value );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
int verticalSpacing() const;
|
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
void setHorizontalSpacing( int value );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
int horizontalSpacing() const;
|
|
|
|
};
|