PythonQtWrapper_QListWidgetItem.h
90 lines
| 4.5 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QLISTWIDGETITEM_H | ||
#define PYTHONQTWRAPPER_QLISTWIDGETITEM_H | ||||
#include <qlistwidget.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbrush.h> | ||||
#include <qdatastream.h> | ||||
#include <qfont.h> | ||||
#include <qicon.h> | ||||
#include <qlistwidget.h> | ||||
#include <qsize.h> | ||||
florianlink
|
r24 | class PythonQtShell_QListWidgetItem : public QListWidgetItem | ||
{ | ||||
public: | ||||
PythonQtShell_QListWidgetItem(QListWidget* view = 0, int type = Type):QListWidgetItem(view, type),_wrapper(NULL) {}; | ||||
PythonQtShell_QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view = 0, int type = Type):QListWidgetItem(icon, text, view, type),_wrapper(NULL) {}; | ||||
PythonQtShell_QListWidgetItem(const QString& text, QListWidget* view = 0, int type = Type):QListWidgetItem(text, view, type),_wrapper(NULL) {}; | ||||
virtual QListWidgetItem* clone() const; | ||||
virtual QVariant data(int role) const; | ||||
virtual bool operator_less(const QListWidgetItem& other) const; | ||||
virtual void read(QDataStream& in); | ||||
virtual void setBackgroundColor(const QColor& color); | ||||
virtual void setData(int role, const QVariant& value); | ||||
virtual void write(QDataStream& out) const; | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
florianlink
|
r28 | class PythonQtPublicPromoter_QListWidgetItem : public QListWidgetItem | ||
{ public: | ||||
inline void promoted_setData(int role, const QVariant& value) { QListWidgetItem::setData(role, value); } | ||||
inline QListWidgetItem* promoted_clone() const { return QListWidgetItem::clone(); } | ||||
inline QVariant promoted_data(int role) const { return QListWidgetItem::data(role); } | ||||
}; | ||||
florianlink
|
r13 | class PythonQtWrapper_QListWidgetItem : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(ItemType ) | ||||
enum ItemType{ | ||||
Type = QListWidgetItem::Type, UserType = QListWidgetItem::UserType}; | ||||
public slots: | ||||
QListWidgetItem* new_QListWidgetItem(QListWidget* view = 0, int type = Type); | ||||
QListWidgetItem* new_QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view = 0, int type = Type); | ||||
QListWidgetItem* new_QListWidgetItem(const QString& text, QListWidget* view = 0, int type = Type); | ||||
void delete_QListWidgetItem(QListWidgetItem* obj) { delete obj; } | ||||
florianlink
|
r24 | Qt::ItemFlags flags(QListWidgetItem* theWrappedObject) const; | ||
florianlink
|
r28 | void setToolTip(QListWidgetItem* theWrappedObject, const QString& toolTip); | ||
void setCheckState(QListWidgetItem* theWrappedObject, Qt::CheckState state); | ||||
void setSizeHint(QListWidgetItem* theWrappedObject, const QSize& size); | ||||
void setStatusTip(QListWidgetItem* theWrappedObject, const QString& statusTip); | ||||
florianlink
|
r24 | int textAlignment(QListWidgetItem* theWrappedObject) const; | ||
florianlink
|
r28 | void setSelected(QListWidgetItem* theWrappedObject, bool select); | ||
florianlink
|
r24 | QFont font(QListWidgetItem* theWrappedObject) const; | ||
florianlink
|
r13 | void setIcon(QListWidgetItem* theWrappedObject, const QIcon& icon); | ||
void setText(QListWidgetItem* theWrappedObject, const QString& text); | ||||
florianlink
|
r28 | void setTextAlignment(QListWidgetItem* theWrappedObject, int alignment); | ||
QString text(QListWidgetItem* theWrappedObject) const; | ||||
QListWidget* listWidget(QListWidgetItem* theWrappedObject) const; | ||||
florianlink
|
r24 | void setBackground(QListWidgetItem* theWrappedObject, const QBrush& brush); | ||
florianlink
|
r13 | void setWhatsThis(QListWidgetItem* theWrappedObject, const QString& whatsThis); | ||
QString toolTip(QListWidgetItem* theWrappedObject) const; | ||||
florianlink
|
r24 | void setData(QListWidgetItem* theWrappedObject, int role, const QVariant& value); | ||
florianlink
|
r28 | QBrush background(QListWidgetItem* theWrappedObject) const; | ||
florianlink
|
r24 | void setFlags(QListWidgetItem* theWrappedObject, Qt::ItemFlags flags); | ||
florianlink
|
r28 | void readFrom(QListWidgetItem* theWrappedObject, QDataStream& in); | ||
QListWidgetItem* clone(QListWidgetItem* theWrappedObject) const; | ||||
QString statusTip(QListWidgetItem* theWrappedObject) const; | ||||
void setFont(QListWidgetItem* theWrappedObject, const QFont& font); | ||||
florianlink
|
r13 | int type(QListWidgetItem* theWrappedObject) const; | ||
florianlink
|
r28 | QString whatsThis(QListWidgetItem* theWrappedObject) const; | ||
Qt::CheckState checkState(QListWidgetItem* theWrappedObject) const; | ||||
bool isSelected(QListWidgetItem* theWrappedObject) const; | ||||
void setHidden(QListWidgetItem* theWrappedObject, bool hide); | ||||
void setForeground(QListWidgetItem* theWrappedObject, const QBrush& brush); | ||||
QIcon icon(QListWidgetItem* theWrappedObject) const; | ||||
void writeTo(QListWidgetItem* theWrappedObject, QDataStream& out); | ||||
QSize sizeHint(QListWidgetItem* theWrappedObject) const; | ||||
QVariant data(QListWidgetItem* theWrappedObject, int role) const; | ||||
QBrush foreground(QListWidgetItem* theWrappedObject) const; | ||||
bool isHidden(QListWidgetItem* theWrappedObject) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QLISTWIDGETITEM_H | ||||