##// END OF EJS Templates
added experimental compacting to avoid generation of hundreds of files that all include the same stuff...
added experimental compacting to avoid generation of hundreds of files that all include the same stuff git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@128 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r73:40dc86970256
r92:f97ec94c87a9
Show More
PythonQtWrapper_QItemDelegate.h
92 lines | 6.5 KiB | text/x-c | CLexer
#ifndef PYTHONQTWRAPPER_QITEMDELEGATE_H
#define PYTHONQTWRAPPER_QITEMDELEGATE_H
#include <qitemdelegate.h>
#include <QObject>
#include <PythonQt.h>
#include <QVariant>
#include <qabstractitemmodel.h>
#include <qabstractitemview.h>
#include <qbytearray.h>
#include <qcoreevent.h>
#include <qevent.h>
#include <qfont.h>
#include <qitemdelegate.h>
#include <qitemeditorfactory.h>
#include <qlist.h>
#include <qobject.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qrect.h>
#include <qsize.h>
#include <qstyleoption.h>
#include <qwidget.h>
class PythonQtShell_QItemDelegate : public QItemDelegate
{
public:
PythonQtShell_QItemDelegate(QObject* parent = 0):QItemDelegate(parent),_wrapper(NULL) {};
virtual void childEvent(QChildEvent* arg__1);
virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
virtual void customEvent(QEvent* arg__1);
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 editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index);
virtual bool event(QEvent* arg__1);
virtual bool eventFilter(QObject* object, QEvent* event);
virtual void paint(QPainter* painter, 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 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
virtual void timerEvent(QTimerEvent* arg__1);
virtual void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
PythonQtInstanceWrapper* _wrapper;
};
class PythonQtPublicPromoter_QItemDelegate : public QItemDelegate
{ public:
inline bool promoted_editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) { return QItemDelegate::editorEvent(event, model, option, index); }
inline QWidget* promoted_createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { return QItemDelegate::createEditor(parent, option, index); }
inline void promoted_drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const { QItemDelegate::drawDecoration(painter, option, rect, pixmap); }
inline void promoted_setEditorData(QWidget* editor, const QModelIndex& index) const { QItemDelegate::setEditorData(editor, index); }
inline QSize promoted_sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { return QItemDelegate::sizeHint(option, index); }
inline void promoted_updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const { QItemDelegate::updateEditorGeometry(editor, option, index); }
inline void promoted_drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const { QItemDelegate::drawDisplay(painter, option, rect, text); }
inline void promoted_paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { QItemDelegate::paint(painter, option, index); }
inline bool promoted_eventFilter(QObject* object, QEvent* event) { return QItemDelegate::eventFilter(object, event); }
inline void promoted_drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const { QItemDelegate::drawFocus(painter, option, rect); }
inline void promoted_setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const { QItemDelegate::setModelData(editor, model, index); }
inline void promoted_drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const { QItemDelegate::drawCheck(painter, option, rect, state); }
};
class PythonQtWrapper_QItemDelegate : public QObject
{ Q_OBJECT
public:
public slots:
QItemDelegate* new_QItemDelegate(QObject* parent = 0);
void delete_QItemDelegate(QItemDelegate* obj) { delete obj; }
bool editorEvent(QItemDelegate* theWrappedObject, QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index);
bool hasClipping(QItemDelegate* theWrappedObject) const;
QWidget* createEditor(QItemDelegate* theWrappedObject, QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void drawDecoration(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const;
void setEditorData(QItemDelegate* theWrappedObject, QWidget* editor, const QModelIndex& index) const;
QSize sizeHint(QItemDelegate* theWrappedObject, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void updateEditorGeometry(QItemDelegate* theWrappedObject, QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void drawDisplay(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const;
void paint(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
bool eventFilter(QItemDelegate* theWrappedObject, QObject* object, QEvent* event);
QItemEditorFactory* itemEditorFactory(QItemDelegate* theWrappedObject) const;
void setItemEditorFactory(QItemDelegate* theWrappedObject, QItemEditorFactory* factory);
void drawFocus(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const;
void setClipping(QItemDelegate* theWrappedObject, bool clip);
void setModelData(QItemDelegate* theWrappedObject, QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
void drawCheck(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const;
};
#endif // PYTHONQTWRAPPER_QITEMDELEGATE_H