// qitemdelegate.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class QItemDelegate : QAbstractItemDelegate { %TypeHeaderCode #include %End public: explicit QItemDelegate(QObject *parent /TransferThis/ = 0); virtual ~QItemDelegate(); virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; virtual void setEditorData(QWidget *editor, const QModelIndex &index) const; virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; QItemEditorFactory *itemEditorFactory() const; void setItemEditorFactory(QItemEditorFactory *factory); %If (Qt_4_2_0 -) bool hasClipping() const; %End %If (Qt_4_2_0 -) void setClipping(bool clip); %End protected: %If (Qt_4_2_0 -) void drawBackground(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; %End virtual void drawCheck(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, Qt::CheckState state) const; virtual void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap) const; virtual void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const; virtual void drawFocus(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect) const; virtual bool eventFilter(QObject *object, QEvent *event); virtual bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index); private: QItemDelegate(const QItemDelegate &); };