7,6 → 7,8 |
#include <QSize> |
#include <QSpinBox> |
#include <QMap> |
#include <QTableView> |
|
#include "iconform.h" |
|
//! [0] |
62,12 → 64,36 |
class CPictureDelegate : public QItemDelegate |
{ |
mutable QPixmap m_pxPicture; |
public: |
private: |
QTableView *tblView; |
|
public: |
CPictureDelegate( QObject *parent ); |
|
QWidget *createEditor( |
QWidget *parent, |
const QStyleOptionViewItem &option, |
const QModelIndex &index) const; |
|
void setEditorData(QWidget *editor, |
const QModelIndex &index) const; |
|
void setModelData(QWidget *editor, |
QAbstractItemModel *model, |
const QModelIndex &index) const; |
|
|
void updateEditorGeometry( |
QWidget *editor, |
const QStyleOptionViewItem &option, |
const QModelIndex &index) const; |
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, |
const QModelIndex &index) const; |
|
void setTableView(QTableView* table); |
|
|
//QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; |
}; |
|