PythonQtWrapper_QItemDelegate.h
92 lines
| 6.5 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QITEMDELEGATE_H | ||
#define PYTHONQTWRAPPER_QITEMDELEGATE_H | ||||
#include <qitemdelegate.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #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> | ||||
florianlink
|
r24 | 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: | ||||
florianlink
|
r28 | inline void promoted_drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const { QItemDelegate::drawFocus(painter, option, rect); } | ||
inline bool promoted_editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) { return QItemDelegate::editorEvent(event, model, option, index); } | ||||
inline void promoted_setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const { QItemDelegate::setModelData(editor, model, index); } | ||||
inline void promoted_setEditorData(QWidget* editor, const QModelIndex& index) const { QItemDelegate::setEditorData(editor, index); } | ||||
inline void promoted_drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const { QItemDelegate::drawDisplay(painter, option, rect, text); } | ||||
inline QSize promoted_sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const { return QItemDelegate::sizeHint(option, index); } | ||||
inline void promoted_drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const { QItemDelegate::drawCheck(painter, option, rect, state); } | ||||
inline void promoted_updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const { QItemDelegate::updateEditorGeometry(editor, option, index); } | ||||
inline QWidget* promoted_createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { return QItemDelegate::createEditor(parent, option, index); } | ||||
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_drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const { QItemDelegate::drawDecoration(painter, option, rect, pixmap); } | ||||
florianlink
|
r24 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QItemDelegate : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
public slots: | ||||
QItemDelegate* new_QItemDelegate(QObject* parent = 0); | ||||
void delete_QItemDelegate(QItemDelegate* obj) { delete obj; } | ||||
florianlink
|
r28 | void drawFocus(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const; | ||
florianlink
|
r24 | bool editorEvent(QItemDelegate* theWrappedObject, QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); | ||
florianlink
|
r28 | void setModelData(QItemDelegate* theWrappedObject, QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; | ||
florianlink
|
r13 | QItemEditorFactory* itemEditorFactory(QItemDelegate* theWrappedObject) const; | ||
florianlink
|
r28 | void setEditorData(QItemDelegate* theWrappedObject, QWidget* editor, const QModelIndex& index) const; | ||
florianlink
|
r24 | void setItemEditorFactory(QItemDelegate* theWrappedObject, QItemEditorFactory* factory); | ||
florianlink
|
r28 | void drawDisplay(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const; | ||
florianlink
|
r24 | QSize sizeHint(QItemDelegate* theWrappedObject, const QStyleOptionViewItem& option, const QModelIndex& index) const; | ||
void drawCheck(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const; | ||||
florianlink
|
r28 | void updateEditorGeometry(QItemDelegate* theWrappedObject, QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; | ||
florianlink
|
r24 | QWidget* createEditor(QItemDelegate* theWrappedObject, QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; | ||
florianlink
|
r13 | void paint(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; | ||
void setClipping(QItemDelegate* theWrappedObject, bool clip); | ||||
florianlink
|
r24 | bool eventFilter(QItemDelegate* theWrappedObject, QObject* object, QEvent* event); | ||
florianlink
|
r28 | bool hasClipping(QItemDelegate* theWrappedObject) const; | ||
void drawDecoration(QItemDelegate* theWrappedObject, QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QITEMDELEGATE_H | ||||