42 #ifndef QITEMDELEGATE_H 43 #define QITEMDELEGATE_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 70 bool hasClipping()
const;
71 void setClipping(
bool clip);
102 const QRect &rect)
const;
135 #endif // QT_NO_ITEMVIEWS 141 #endif // QITEMDELEGATE_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...
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.
bool clipping
if the delegate should clip the paint events
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 QFont class specifies a font used for drawing text.
The QItemDelegate class provides display and editing facilities for data items from a model...
The QModelIndex class is used to locate data in a data model.
The QRect class defines a rectangle in the plane using integer precision.
The QPixmap class is an off-screen image representation that can be used as a paint device...
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.
The QPalette class contains color groups for each widget state.