PythonQtWrapper_QItemSelectionModel.h
68 lines
| 3.7 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QITEMSELECTIONMODEL_H | ||
#define PYTHONQTWRAPPER_QITEMSELECTIONMODEL_H | ||||
#include <qitemselectionmodel.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qabstractitemmodel.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qitemselectionmodel.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
florianlink
|
r24 | class PythonQtShell_QItemSelectionModel : public QItemSelectionModel | ||
{ | ||||
public: | ||||
PythonQtShell_QItemSelectionModel(QAbstractItemModel* model):QItemSelectionModel(model),_wrapper(NULL) {}; | ||||
PythonQtShell_QItemSelectionModel(QAbstractItemModel* model, QObject* parent):QItemSelectionModel(model, parent),_wrapper(NULL) {}; | ||||
virtual void childEvent(QChildEvent* arg__1); | ||||
virtual void clear(); | ||||
virtual void customEvent(QEvent* arg__1); | ||||
virtual bool event(QEvent* arg__1); | ||||
virtual bool eventFilter(QObject* arg__1, QEvent* arg__2); | ||||
virtual void reset(); | ||||
virtual void select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command); | ||||
virtual void select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command); | ||||
virtual void timerEvent(QTimerEvent* arg__1); | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
florianlink
|
r28 | class PythonQtPublicPromoter_QItemSelectionModel : public QItemSelectionModel | ||
{ public: | ||||
inline void promoted_reset() { QItemSelectionModel::reset(); } | ||||
inline void promoted_clear() { QItemSelectionModel::clear(); } | ||||
inline void promoted_select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) { QItemSelectionModel::select(selection, command); } | ||||
inline void promoted_select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) { QItemSelectionModel::select(index, command); } | ||||
}; | ||||
florianlink
|
r13 | class PythonQtWrapper_QItemSelectionModel : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(SelectionFlag ) | ||||
enum SelectionFlag{ | ||||
NoUpdate = QItemSelectionModel::NoUpdate, Clear = QItemSelectionModel::Clear, Select = QItemSelectionModel::Select, Deselect = QItemSelectionModel::Deselect, Toggle = QItemSelectionModel::Toggle, Current = QItemSelectionModel::Current, Rows = QItemSelectionModel::Rows, Columns = QItemSelectionModel::Columns, SelectCurrent = QItemSelectionModel::SelectCurrent, ToggleCurrent = QItemSelectionModel::ToggleCurrent, ClearAndSelect = QItemSelectionModel::ClearAndSelect}; | ||||
public slots: | ||||
QItemSelectionModel* new_QItemSelectionModel(QAbstractItemModel* model); | ||||
QItemSelectionModel* new_QItemSelectionModel(QAbstractItemModel* model, QObject* parent); | ||||
void delete_QItemSelectionModel(QItemSelectionModel* obj) { delete obj; } | ||||
florianlink
|
r28 | QList<QModelIndex > selectedIndexes(QItemSelectionModel* theWrappedObject) const; | ||
florianlink
|
r24 | const QAbstractItemModel* model(QItemSelectionModel* theWrappedObject) const; | ||
QModelIndex currentIndex(QItemSelectionModel* theWrappedObject) const; | ||||
florianlink
|
r28 | bool rowIntersectsSelection(QItemSelectionModel* theWrappedObject, int row, const QModelIndex& parent) const; | ||
florianlink
|
r13 | QList<QModelIndex > selectedRows(QItemSelectionModel* theWrappedObject, int column = 0) const; | ||
florianlink
|
r28 | const QItemSelection selection(QItemSelectionModel* theWrappedObject) const; | ||
bool isSelected(QItemSelectionModel* theWrappedObject, const QModelIndex& index) const; | ||||
bool columnIntersectsSelection(QItemSelectionModel* theWrappedObject, int column, const QModelIndex& parent) const; | ||||
florianlink
|
r24 | QList<QModelIndex > selectedColumns(QItemSelectionModel* theWrappedObject, int row = 0) const; | ||
florianlink
|
r28 | bool isColumnSelected(QItemSelectionModel* theWrappedObject, int column, const QModelIndex& parent) const; | ||
bool isRowSelected(QItemSelectionModel* theWrappedObject, int row, const QModelIndex& parent) const; | ||||
bool hasSelection(QItemSelectionModel* theWrappedObject) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QITEMSELECTIONMODEL_H | ||||