42 #ifndef QSTYLEDITEMDELEGATE_H 43 #define QSTYLEDITEMDELEGATE_H 45 #include <QtGui/qabstractitemdelegate.h> 46 #include <QtCore/qstring.h> 47 #include <QtGui/qpixmap.h> 48 #include <QtCore/qvariant.h> 56 #ifndef QT_NO_ITEMVIEWS 110 #endif // QT_NO_ITEMVIEWS 116 #endif // QSTYLEDITEMDELEGATE_H The QVariant class acts like a union for the most common Qt data types.
The QPainter class performs low-level painting on widgets and other paint devices.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
This pure abstract function must be reimplemented if you want to provide custom rendering.
The QAbstractItemDelegate class is used to display and edit data items from a model.
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
#define QT_END_NAMESPACE
This macro expands to.
virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
Updates the geometry of the editor for the item with the given index, according to the rectangle spec...
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const =0
This pure abstract function must be reimplemented if you want to provide custom rendering.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Sets the data for the item at the given index in the model to the contents of the given editor...
The QStyledItemDelegate class provides display and editing facilities for data items from a model...
virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
When editing of an item starts, this function is called with the event that triggered the editing...
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Returns the editor to be used for editing the data item with the given index.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual bool eventFilter(QObject *, QEvent *)
Filters events if this object has been installed as an event filter for the watched object...
The QAbstractItemModel class provides the abstract interface for item model classes.
The QModelIndex class is used to locate data in a data model.
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Sets the contents of the given editor to the data for the item at the given index.
The QEvent class is the base class of all event classes.