PythonQtWrapper_QStandardItem.h
140 lines
| 7.9 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QSTANDARDITEM_H | ||
#define PYTHONQTWRAPPER_QSTANDARDITEM_H | ||||
#include <qstandarditemmodel.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractitemmodel.h> | ||||
#include <qbrush.h> | ||||
#include <qdatastream.h> | ||||
#include <qfont.h> | ||||
#include <qicon.h> | ||||
#include <qlist.h> | ||||
#include <qsize.h> | ||||
#include <qstandarditemmodel.h> | ||||
florianlink
|
r24 | class PythonQtShell_QStandardItem : public QStandardItem | ||
{ | ||||
public: | ||||
PythonQtShell_QStandardItem():QStandardItem(),_wrapper(NULL) {}; | ||||
PythonQtShell_QStandardItem(const QIcon& icon, const QString& text):QStandardItem(icon, text),_wrapper(NULL) {}; | ||||
PythonQtShell_QStandardItem(const QStandardItem& other):QStandardItem(other),_wrapper(NULL) {}; | ||||
PythonQtShell_QStandardItem(const QString& text):QStandardItem(text),_wrapper(NULL) {}; | ||||
PythonQtShell_QStandardItem(int rows, int columns = 1):QStandardItem(rows, columns),_wrapper(NULL) {}; | ||||
virtual QStandardItem* clone() const; | ||||
virtual QVariant data(int role = Qt::UserRole + 1) const; | ||||
virtual bool operator_less(const QStandardItem& other) const; | ||||
virtual void read(QDataStream& in); | ||||
virtual void setData(const QVariant& value, int role = Qt::UserRole + 1); | ||||
virtual int type() const; | ||||
virtual void write(QDataStream& out) const; | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
florianlink
|
r28 | class PythonQtPublicPromoter_QStandardItem : public QStandardItem | ||
{ public: | ||||
inline QStandardItem* promoted_clone() const { return QStandardItem::clone(); } | ||||
inline QVariant promoted_data(int role = Qt::UserRole + 1) const { return QStandardItem::data(role); } | ||||
florianlink
|
r73 | inline int promoted_type() const { return QStandardItem::type(); } | ||
inline void promoted_setData(const QVariant& value, int role = Qt::UserRole + 1) { QStandardItem::setData(value, role); } | ||||
florianlink
|
r28 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QStandardItem : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(ItemType ) | ||||
enum ItemType{ | ||||
Type = QStandardItem::Type, UserType = QStandardItem::UserType}; | ||||
public slots: | ||||
QStandardItem* new_QStandardItem(); | ||||
QStandardItem* new_QStandardItem(const QIcon& icon, const QString& text); | ||||
QStandardItem* new_QStandardItem(const QString& text); | ||||
QStandardItem* new_QStandardItem(int rows, int columns = 1); | ||||
void delete_QStandardItem(QStandardItem* obj) { delete obj; } | ||||
florianlink
|
r73 | QStandardItem* clone(QStandardItem* theWrappedObject) const; | ||
QStandardItem* parent(QStandardItem* theWrappedObject) const; | ||||
void setCheckable(QStandardItem* theWrappedObject, bool checkable); | ||||
void setRowCount(QStandardItem* theWrappedObject, int rows); | ||||
bool isDropEnabled(QStandardItem* theWrappedObject) const; | ||||
bool isTristate(QStandardItem* theWrappedObject) const; | ||||
bool isEnabled(QStandardItem* theWrappedObject) const; | ||||
bool hasChildren(QStandardItem* theWrappedObject) const; | ||||
QStandardItem* takeChild(QStandardItem* theWrappedObject, int row, int column = 0); | ||||
void appendRow(QStandardItem* theWrappedObject, const QList<QStandardItem* >& items); | ||||
void removeRow(QStandardItem* theWrappedObject, int row); | ||||
void setAccessibleDescription(QStandardItem* theWrappedObject, const QString& accessibleDescription); | ||||
void setIcon(QStandardItem* theWrappedObject, const QIcon& icon); | ||||
QVariant data(QStandardItem* theWrappedObject, int role = Qt::UserRole + 1) const; | ||||
QList<QStandardItem* > takeColumn(QStandardItem* theWrappedObject, int column); | ||||
QIcon icon(QStandardItem* theWrappedObject) const; | ||||
void removeColumns(QStandardItem* theWrappedObject, int column, int count); | ||||
int column(QStandardItem* theWrappedObject) const; | ||||
QSize sizeHint(QStandardItem* theWrappedObject) const; | ||||
QString accessibleDescription(QStandardItem* theWrappedObject) const; | ||||
QList<QStandardItem* > takeRow(QStandardItem* theWrappedObject, int row); | ||||
QFont font(QStandardItem* theWrappedObject) const; | ||||
void setColumnCount(QStandardItem* theWrappedObject, int columns); | ||||
void setEnabled(QStandardItem* theWrappedObject, bool enabled); | ||||
florianlink
|
r24 | QStandardItem* child(QStandardItem* theWrappedObject, int row, int column = 0) const; | ||
florianlink
|
r73 | void setSelectable(QStandardItem* theWrappedObject, bool selectable); | ||
QBrush foreground(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r24 | void setSizeHint(QStandardItem* theWrappedObject, const QSize& sizeHint); | ||
florianlink
|
r73 | void setDragEnabled(QStandardItem* theWrappedObject, bool dragEnabled); | ||
florianlink
|
r28 | void setTextAlignment(QStandardItem* theWrappedObject, Qt::Alignment textAlignment); | ||
florianlink
|
r73 | QModelIndex index(QStandardItem* theWrappedObject) const; | ||
void readFrom(QStandardItem* theWrappedObject, QDataStream& in); | ||||
void setToolTip(QStandardItem* theWrappedObject, const QString& toolTip); | ||||
void appendRow(QStandardItem* theWrappedObject, QStandardItem* item); | ||||
void insertRows(QStandardItem* theWrappedObject, int row, int count); | ||||
void insertRows(QStandardItem* theWrappedObject, int row, const QList<QStandardItem* >& items); | ||||
Qt::CheckState checkState(QStandardItem* theWrappedObject) const; | ||||
int columnCount(QStandardItem* theWrappedObject) const; | ||||
bool isSelectable(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r28 | void setAccessibleText(QStandardItem* theWrappedObject, const QString& accessibleText); | ||
florianlink
|
r73 | bool isDragEnabled(QStandardItem* theWrappedObject) const; | ||
int type(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r28 | void setEditable(QStandardItem* theWrappedObject, bool editable); | ||
florianlink
|
r73 | void setForeground(QStandardItem* theWrappedObject, const QBrush& brush); | ||
QString accessibleText(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r28 | void removeColumn(QStandardItem* theWrappedObject, int column); | ||
florianlink
|
r73 | QString whatsThis(QStandardItem* theWrappedObject) const; | ||
bool isEditable(QStandardItem* theWrappedObject) const; | ||||
void setFlags(QStandardItem* theWrappedObject, Qt::ItemFlags flags); | ||||
void setDropEnabled(QStandardItem* theWrappedObject, bool dropEnabled); | ||||
void setChild(QStandardItem* theWrappedObject, int row, QStandardItem* item); | ||||
florianlink
|
r28 | void insertRow(QStandardItem* theWrappedObject, int row, const QList<QStandardItem* >& items); | ||
florianlink
|
r73 | void appendColumn(QStandardItem* theWrappedObject, const QList<QStandardItem* >& items); | ||
void setBackground(QStandardItem* theWrappedObject, const QBrush& brush); | ||||
florianlink
|
r28 | void insertColumn(QStandardItem* theWrappedObject, int column, const QList<QStandardItem* >& items); | ||
florianlink
|
r73 | void setText(QStandardItem* theWrappedObject, const QString& text); | ||
void writeTo(QStandardItem* theWrappedObject, QDataStream& out); | ||||
florianlink
|
r28 | QStandardItemModel* model(QStandardItem* theWrappedObject) const; | ||
void setTristate(QStandardItem* theWrappedObject, bool tristate); | ||||
florianlink
|
r73 | void setCheckState(QStandardItem* theWrappedObject, Qt::CheckState checkState); | ||
void setStatusTip(QStandardItem* theWrappedObject, const QString& statusTip); | ||||
florianlink
|
r24 | void sortChildren(QStandardItem* theWrappedObject, int column, Qt::SortOrder order = Qt::AscendingOrder); | ||
florianlink
|
r28 | void appendRows(QStandardItem* theWrappedObject, const QList<QStandardItem* >& items); | ||
QString toolTip(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r73 | void removeRows(QStandardItem* theWrappedObject, int row, int count); | ||
Qt::Alignment textAlignment(QStandardItem* theWrappedObject) const; | ||||
void setData(QStandardItem* theWrappedObject, const QVariant& value, int role = Qt::UserRole + 1); | ||||
florianlink
|
r28 | void insertRow(QStandardItem* theWrappedObject, int row, QStandardItem* item); | ||
int row(QStandardItem* theWrappedObject) const; | ||||
QString statusTip(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r73 | QString text(QStandardItem* theWrappedObject) const; | ||
void insertColumns(QStandardItem* theWrappedObject, int column, int count); | ||||
bool isCheckable(QStandardItem* theWrappedObject) const; | ||||
void setChild(QStandardItem* theWrappedObject, int row, int column, QStandardItem* item); | ||||
florianlink
|
r28 | QBrush background(QStandardItem* theWrappedObject) const; | ||
florianlink
|
r73 | void setFont(QStandardItem* theWrappedObject, const QFont& font); | ||
florianlink
|
r28 | int rowCount(QStandardItem* theWrappedObject) const; | ||
Qt::ItemFlags flags(QStandardItem* theWrappedObject) const; | ||||
florianlink
|
r73 | void setWhatsThis(QStandardItem* theWrappedObject, const QString& whatsThis); | ||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QSTANDARDITEM_H | ||||