PythonQtWrapper_QSqlQueryModel.h
111 lines
| 6.4 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QSQLQUERYMODEL_H | ||
#define PYTHONQTWRAPPER_QSQLQUERYMODEL_H | ||||
#include <qsqlquerymodel.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QSize> | ||
#include <QSqlError> | ||||
#include <QSqlQuery> | ||||
#include <QSqlRecord> | ||||
#include <QStringList> | ||||
#include <QVariant> | ||||
#include <qabstractitemmodel.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qdatastream.h> | ||||
#include <qlist.h> | ||||
#include <qmimedata.h> | ||||
#include <qobject.h> | ||||
#include <qsize.h> | ||||
#include <qsqldatabase.h> | ||||
#include <qsqlerror.h> | ||||
#include <qsqlquery.h> | ||||
#include <qsqlrecord.h> | ||||
#include <qstringlist.h> | ||||
florianlink
|
r24 | class PythonQtShell_QSqlQueryModel : public QSqlQueryModel | ||
{ | ||||
public: | ||||
PythonQtShell_QSqlQueryModel(QObject* parent = 0):QSqlQueryModel(parent),_wrapper(NULL) {}; | ||||
virtual QModelIndex buddy(const QModelIndex& index) const; | ||||
virtual bool canFetchMore(const QModelIndex& parent = QModelIndex()) const; | ||||
virtual void childEvent(QChildEvent* arg__1); | ||||
virtual void clear(); | ||||
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; | ||||
virtual void customEvent(QEvent* arg__1); | ||||
virtual QVariant data(const QModelIndex& item, int role = Qt::DisplayRole) const; | ||||
virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); | ||||
virtual bool event(QEvent* arg__1); | ||||
virtual bool eventFilter(QObject* arg__1, QEvent* arg__2); | ||||
virtual void fetchMore(const QModelIndex& parent = QModelIndex()); | ||||
virtual Qt::ItemFlags flags(const QModelIndex& index) const; | ||||
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; | ||||
virtual QModelIndex index(int row, int column, const QModelIndex& parent) const; | ||||
virtual bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()); | ||||
virtual bool insertRows(int row, int count, const QModelIndex& parent); | ||||
virtual QMap<int , QVariant > itemData(const QModelIndex& index) const; | ||||
virtual QList<QModelIndex > match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; | ||||
virtual QMimeData* mimeData(const QList<QModelIndex >& indexes) const; | ||||
virtual QStringList mimeTypes() const; | ||||
virtual void queryChange(); | ||||
virtual bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); | ||||
virtual bool removeRows(int row, int count, const QModelIndex& parent); | ||||
virtual void revert(); | ||||
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const; | ||||
virtual bool setData(const QModelIndex& index, const QVariant& value, int role); | ||||
virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole); | ||||
virtual bool setItemData(const QModelIndex& index, const QMap<int , QVariant >& roles); | ||||
virtual void sort(int column, Qt::SortOrder order); | ||||
virtual QSize span(const QModelIndex& index) const; | ||||
virtual bool submit(); | ||||
virtual Qt::DropActions supportedDropActions() const; | ||||
virtual void timerEvent(QTimerEvent* arg__1); | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
class PythonQtPublicPromoter_QSqlQueryModel : public QSqlQueryModel | ||||
{ public: | ||||
florianlink
|
r73 | inline int promoted_columnCount(const QModelIndex& parent = QModelIndex()) const { return QSqlQueryModel::columnCount(parent); } | ||
florianlink
|
r28 | inline QVariant promoted_data(const QModelIndex& item, int role = Qt::DisplayRole) const { return QSqlQueryModel::data(item, role); } | ||
inline void promoted_queryChange() { QSqlQueryModel::queryChange(); } | ||||
florianlink
|
r73 | inline bool promoted_setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole) { return QSqlQueryModel::setHeaderData(section, orientation, value, role); } | ||
inline void promoted_fetchMore(const QModelIndex& parent = QModelIndex()) { QSqlQueryModel::fetchMore(parent); } | ||||
florianlink
|
r28 | inline void promoted_clear() { QSqlQueryModel::clear(); } | ||
florianlink
|
r73 | inline int promoted_rowCount(const QModelIndex& parent = QModelIndex()) const { return QSqlQueryModel::rowCount(parent); } | ||
inline bool promoted_insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()) { return QSqlQueryModel::insertColumns(column, count, parent); } | ||||
florianlink
|
r28 | inline bool promoted_removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()) { return QSqlQueryModel::removeColumns(column, count, parent); } | ||
inline bool promoted_canFetchMore(const QModelIndex& parent = QModelIndex()) const { return QSqlQueryModel::canFetchMore(parent); } | ||||
inline QVariant promoted_headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const { return QSqlQueryModel::headerData(section, orientation, role); } | ||||
florianlink
|
r24 | }; | ||
florianlink
|
r13 | class PythonQtWrapper_QSqlQueryModel : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
public slots: | ||||
QSqlQueryModel* new_QSqlQueryModel(QObject* parent = 0); | ||||
void delete_QSqlQueryModel(QSqlQueryModel* obj) { delete obj; } | ||||
florianlink
|
r73 | int columnCount(QSqlQueryModel* theWrappedObject, const QModelIndex& parent = QModelIndex()) const; | ||
florianlink
|
r28 | QVariant data(QSqlQueryModel* theWrappedObject, const QModelIndex& item, int role = Qt::DisplayRole) const; | ||
void queryChange(QSqlQueryModel* theWrappedObject); | ||||
florianlink
|
r73 | bool setHeaderData(QSqlQueryModel* theWrappedObject, int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole); | ||
QSqlRecord record(QSqlQueryModel* theWrappedObject) const; | ||||
void fetchMore(QSqlQueryModel* theWrappedObject, const QModelIndex& parent = QModelIndex()); | ||||
florianlink
|
r13 | void clear(QSqlQueryModel* theWrappedObject); | ||
florianlink
|
r73 | int rowCount(QSqlQueryModel* theWrappedObject, const QModelIndex& parent = QModelIndex()) const; | ||
void setQuery(QSqlQueryModel* theWrappedObject, const QString& query, const QSqlDatabase& db = QSqlDatabase()); | ||||
bool insertColumns(QSqlQueryModel* theWrappedObject, int column, int count, const QModelIndex& parent = QModelIndex()); | ||||
florianlink
|
r24 | QSqlError lastError(QSqlQueryModel* theWrappedObject) const; | ||
bool removeColumns(QSqlQueryModel* theWrappedObject, int column, int count, const QModelIndex& parent = QModelIndex()); | ||||
bool canFetchMore(QSqlQueryModel* theWrappedObject, const QModelIndex& parent = QModelIndex()) const; | ||||
florianlink
|
r73 | void setQuery(QSqlQueryModel* theWrappedObject, const QSqlQuery& query); | ||
florianlink
|
r24 | QVariant headerData(QSqlQueryModel* theWrappedObject, int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; | ||
florianlink
|
r13 | QSqlQuery query(QSqlQueryModel* theWrappedObject) const; | ||
florianlink
|
r73 | QSqlRecord record(QSqlQueryModel* theWrappedObject, int row) const; | ||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QSQLQUERYMODEL_H | ||||