|
|
#include "PythonQtWrapper_QSqlTableModel.h"
|
|
|
|
|
|
#include <PythonQtSignalReceiver.h>
|
|
|
#include <PythonQtMethodInfo.h>
|
|
|
#include <PythonQtConversion.h>
|
|
|
#include <QSize>
|
|
|
#include <QSqlIndex>
|
|
|
#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 <qsqlindex.h>
|
|
|
#include <qsqlquery.h>
|
|
|
#include <qsqlrecord.h>
|
|
|
#include <qstringlist.h>
|
|
|
|
|
|
QModelIndex PythonQtShell_QSqlTableModel::buddy(const QModelIndex& index) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "buddy");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"buddy(QSqlTableModel*,const QModelIndex& )");
|
|
|
QModelIndex returnValue;
|
|
|
void* args[2] = {NULL, (void*)&index};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QModelIndex *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::buddy(index);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::canFetchMore(const QModelIndex& parent) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "canFetchMore");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"canFetchMore(QSqlTableModel*,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[2] = {NULL, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::canFetchMore(parent);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::childEvent(QChildEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "childEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"childEvent(QSqlTableModel*,QChildEvent* )");
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::childEvent(arg__1);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::clear()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "clear");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"clear(QSqlTableModel*)");
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::clear();
|
|
|
}
|
|
|
int PythonQtShell_QSqlTableModel::columnCount(const QModelIndex& parent) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "columnCount");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"columnCount(QSqlTableModel*,const QModelIndex& )");
|
|
|
int returnValue;
|
|
|
void* args[2] = {NULL, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((int *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::columnCount(parent);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::customEvent(QEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "customEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"customEvent(QSqlTableModel*,QEvent* )");
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::customEvent(arg__1);
|
|
|
}
|
|
|
QVariant PythonQtShell_QSqlTableModel::data(const QModelIndex& idx, int role) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "data");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"data(QSqlTableModel*,const QModelIndex& ,int )");
|
|
|
QVariant returnValue;
|
|
|
void* args[3] = {NULL, (void*)&idx, (void*)&role};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QVariant *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::data(idx, role);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::deleteRowFromTable(int row)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "deleteRowFromTable");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"deleteRowFromTable(QSqlTableModel*,int )");
|
|
|
bool returnValue;
|
|
|
void* args[2] = {NULL, (void*)&row};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::deleteRowFromTable(row);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "dropMimeData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"dropMimeData(QSqlTableModel*,const QMimeData* ,Qt::DropAction ,int ,int ,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[6] = {NULL, (void*)&data, (void*)&action, (void*)&row, (void*)&column, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::dropMimeData(data, action, row, column, parent);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::event(QEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "event");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"event(QSqlTableModel*,QEvent* )");
|
|
|
bool returnValue;
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::event(arg__1);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::eventFilter(QObject* arg__1, QEvent* arg__2)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "eventFilter");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"eventFilter(QSqlTableModel*,QObject* ,QEvent* )");
|
|
|
bool returnValue;
|
|
|
void* args[3] = {NULL, (void*)&arg__1, (void*)&arg__2};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::eventFilter(arg__1, arg__2);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::fetchMore(const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "fetchMore");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"fetchMore(QSqlTableModel*,const QModelIndex& )");
|
|
|
void* args[2] = {NULL, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::fetchMore(parent);
|
|
|
}
|
|
|
Qt::ItemFlags PythonQtShell_QSqlTableModel::flags(const QModelIndex& index) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "flags");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"flags(QSqlTableModel*,const QModelIndex& )");
|
|
|
Qt::ItemFlags returnValue;
|
|
|
void* args[2] = {NULL, (void*)&index};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((Qt::ItemFlags *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::flags(index);
|
|
|
}
|
|
|
QVariant PythonQtShell_QSqlTableModel::headerData(int section, Qt::Orientation orientation, int role) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "headerData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"headerData(QSqlTableModel*,int ,Qt::Orientation ,int )");
|
|
|
QVariant returnValue;
|
|
|
void* args[4] = {NULL, (void*)§ion, (void*)&orientation, (void*)&role};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QVariant *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::headerData(section, orientation, role);
|
|
|
}
|
|
|
QModelIndex PythonQtShell_QSqlTableModel::index(int row, int column, const QModelIndex& parent) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "index");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"index(QSqlTableModel*,int ,int ,const QModelIndex& )");
|
|
|
QModelIndex returnValue;
|
|
|
void* args[4] = {NULL, (void*)&row, (void*)&column, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QModelIndex *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::index(row, column, parent);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::insertColumns(int column, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "insertColumns");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"insertColumns(QSqlTableModel*,int ,int ,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[4] = {NULL, (void*)&column, (void*)&count, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::insertColumns(column, count, parent);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::insertRowIntoTable(const QSqlRecord& values)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "insertRowIntoTable");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"insertRowIntoTable(QSqlTableModel*,const QSqlRecord& )");
|
|
|
bool returnValue;
|
|
|
void* args[2] = {NULL, (void*)&values};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::insertRowIntoTable(values);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::insertRows(int row, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "insertRows");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"insertRows(QSqlTableModel*,int ,int ,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[4] = {NULL, (void*)&row, (void*)&count, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::insertRows(row, count, parent);
|
|
|
}
|
|
|
QMap<int , QVariant > PythonQtShell_QSqlTableModel::itemData(const QModelIndex& index) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "itemData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"itemData(QSqlTableModel*,const QModelIndex& )");
|
|
|
QMap<int , QVariant > returnValue;
|
|
|
void* args[2] = {NULL, (void*)&index};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QMap<int , QVariant > *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::itemData(index);
|
|
|
}
|
|
|
QList<QModelIndex > PythonQtShell_QSqlTableModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "match");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"match(QSqlTableModel*,const QModelIndex& ,int ,const QVariant& ,int ,Qt::MatchFlags )");
|
|
|
QList<QModelIndex > returnValue;
|
|
|
void* args[6] = {NULL, (void*)&start, (void*)&role, (void*)&value, (void*)&hits, (void*)&flags};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QList<QModelIndex > *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::match(start, role, value, hits, flags);
|
|
|
}
|
|
|
QMimeData* PythonQtShell_QSqlTableModel::mimeData(const QList<QModelIndex >& indexes) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mimeData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"mimeData(QSqlTableModel*,const QList<QModelIndex >& )");
|
|
|
QMimeData* returnValue;
|
|
|
void* args[2] = {NULL, (void*)&indexes};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QMimeData* *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::mimeData(indexes);
|
|
|
}
|
|
|
QStringList PythonQtShell_QSqlTableModel::mimeTypes() const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "mimeTypes");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"mimeTypes(QSqlTableModel*)");
|
|
|
QStringList returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QStringList *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::mimeTypes();
|
|
|
}
|
|
|
QString PythonQtShell_QSqlTableModel::orderByClause() const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "orderByClause");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"orderByClause(QSqlTableModel*)");
|
|
|
QString returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QString *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::orderByClause();
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::queryChange()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "queryChange");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"queryChange(QSqlTableModel*)");
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::queryChange();
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::removeColumns(int column, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "removeColumns");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"removeColumns(QSqlTableModel*,int ,int ,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[4] = {NULL, (void*)&column, (void*)&count, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::removeColumns(column, count, parent);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::removeRows(int row, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "removeRows");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"removeRows(QSqlTableModel*,int ,int ,const QModelIndex& )");
|
|
|
bool returnValue;
|
|
|
void* args[4] = {NULL, (void*)&row, (void*)&count, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::removeRows(row, count, parent);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::revert()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "revert");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"revert(QSqlTableModel*)");
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::revert();
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::revertRow(int row)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "revertRow");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"revertRow(QSqlTableModel*,int )");
|
|
|
void* args[2] = {NULL, (void*)&row};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::revertRow(row);
|
|
|
}
|
|
|
int PythonQtShell_QSqlTableModel::rowCount(const QModelIndex& parent) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "rowCount");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"rowCount(QSqlTableModel*,const QModelIndex& )");
|
|
|
int returnValue;
|
|
|
void* args[2] = {NULL, (void*)&parent};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((int *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::rowCount(parent);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::select()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "select");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"select(QSqlTableModel*)");
|
|
|
bool returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::select();
|
|
|
}
|
|
|
QString PythonQtShell_QSqlTableModel::selectStatement() const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "selectStatement");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"selectStatement(QSqlTableModel*)");
|
|
|
QString returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QString *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::selectStatement();
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setData(QSqlTableModel*,const QModelIndex& ,const QVariant& ,int )");
|
|
|
bool returnValue;
|
|
|
void* args[4] = {NULL, (void*)&index, (void*)&value, (void*)&role};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::setData(index, value, role);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::setEditStrategy(QSqlTableModel::EditStrategy strategy)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setEditStrategy");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setEditStrategy(QSqlTableModel*,QSqlTableModel::EditStrategy )");
|
|
|
void* args[2] = {NULL, (void*)&strategy};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::setEditStrategy(strategy);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::setFilter(const QString& filter)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setFilter");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setFilter(QSqlTableModel*,const QString& )");
|
|
|
void* args[2] = {NULL, (void*)&filter};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::setFilter(filter);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setHeaderData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setHeaderData(QSqlTableModel*,int ,Qt::Orientation ,const QVariant& ,int )");
|
|
|
bool returnValue;
|
|
|
void* args[5] = {NULL, (void*)§ion, (void*)&orientation, (void*)&value, (void*)&role};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::setHeaderData(section, orientation, value, role);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::setItemData(const QModelIndex& index, const QMap<int , QVariant >& roles)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setItemData");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setItemData(QSqlTableModel*,const QModelIndex& ,const QMap<int , QVariant >& )");
|
|
|
bool returnValue;
|
|
|
void* args[3] = {NULL, (void*)&index, (void*)&roles};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::setItemData(index, roles);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::setSort(int column, Qt::SortOrder order)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setSort");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setSort(QSqlTableModel*,int ,Qt::SortOrder )");
|
|
|
void* args[3] = {NULL, (void*)&column, (void*)&order};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::setSort(column, order);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::setTable(const QString& tableName)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setTable");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"setTable(QSqlTableModel*,const QString& )");
|
|
|
void* args[2] = {NULL, (void*)&tableName};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::setTable(tableName);
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::sort(int column, Qt::SortOrder order)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "sort");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"sort(QSqlTableModel*,int ,Qt::SortOrder )");
|
|
|
void* args[3] = {NULL, (void*)&column, (void*)&order};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::sort(column, order);
|
|
|
}
|
|
|
QSize PythonQtShell_QSqlTableModel::span(const QModelIndex& index) const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "span");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"span(QSqlTableModel*,const QModelIndex& )");
|
|
|
QSize returnValue;
|
|
|
void* args[2] = {NULL, (void*)&index};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((QSize *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::span(index);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::submit()
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "submit");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"submit(QSqlTableModel*)");
|
|
|
bool returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::submit();
|
|
|
}
|
|
|
Qt::DropActions PythonQtShell_QSqlTableModel::supportedDropActions() const
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "supportedDropActions");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"supportedDropActions(QSqlTableModel*)");
|
|
|
Qt::DropActions returnValue;
|
|
|
void* args[1] = {NULL};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((Qt::DropActions *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::supportedDropActions();
|
|
|
}
|
|
|
void PythonQtShell_QSqlTableModel::timerEvent(QTimerEvent* arg__1)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "timerEvent");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"timerEvent(QSqlTableModel*,QTimerEvent* )");
|
|
|
void* args[2] = {NULL, (void*)&arg__1};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
QSqlTableModel::timerEvent(arg__1);
|
|
|
}
|
|
|
bool PythonQtShell_QSqlTableModel::updateRowInTable(int row, const QSqlRecord& values)
|
|
|
{
|
|
|
if (_wrapper) {
|
|
|
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "updateRowInTable");
|
|
|
PyErr_Clear();
|
|
|
if (obj && !PythonQtSlotFunction_Check(obj)) {
|
|
|
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
|
|
|
&PythonQtWrapper_QSqlTableModel::staticMetaObject,
|
|
|
"updateRowInTable(QSqlTableModel*,int ,const QSqlRecord& )");
|
|
|
bool returnValue;
|
|
|
void* args[3] = {NULL, (void*)&row, (void*)&values};
|
|
|
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
|
|
|
if (result) {
|
|
|
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
|
|
|
if (args[0]!=&returnValue) {
|
|
|
returnValue = *((bool *)args[0]);
|
|
|
}
|
|
|
}
|
|
|
if (result) { Py_DECREF(result); }
|
|
|
Py_DECREF(obj);
|
|
|
return returnValue;
|
|
|
}
|
|
|
}
|
|
|
return QSqlTableModel::updateRowInTable(row, values);
|
|
|
}
|
|
|
QSqlTableModel* PythonQtWrapper_QSqlTableModel::new_QSqlTableModel(QObject* parent, QSqlDatabase db)
|
|
|
{
|
|
|
return new PythonQtShell_QSqlTableModel(parent, db); }
|
|
|
|
|
|
QSqlTableModel::EditStrategy PythonQtWrapper_QSqlTableModel::editStrategy(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->editStrategy();
|
|
|
}
|
|
|
|
|
|
Qt::ItemFlags PythonQtWrapper_QSqlTableModel::flags(QSqlTableModel* theWrappedObject, const QModelIndex& index) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_flags(index);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::setData(QSqlTableModel* theWrappedObject, const QModelIndex& index, const QVariant& value, int role)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_setData(index, value, role);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::removeRows(QSqlTableModel* theWrappedObject, int row, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_removeRows(row, count, parent);
|
|
|
}
|
|
|
|
|
|
int PythonQtWrapper_QSqlTableModel::rowCount(QSqlTableModel* theWrappedObject, const QModelIndex& parent) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_rowCount(parent);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::insertRows(QSqlTableModel* theWrappedObject, int row, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_insertRows(row, count, parent);
|
|
|
}
|
|
|
|
|
|
int PythonQtWrapper_QSqlTableModel::fieldIndex(QSqlTableModel* theWrappedObject, const QString& fieldName) const
|
|
|
{
|
|
|
return theWrappedObject->fieldIndex(fieldName);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::setTable(QSqlTableModel* theWrappedObject, const QString& tableName)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_setTable(tableName);
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QSqlTableModel::tableName(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->tableName();
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::setFilter(QSqlTableModel* theWrappedObject, const QString& filter)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_setFilter(filter);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::removeColumns(QSqlTableModel* theWrappedObject, int column, int count, const QModelIndex& parent)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_removeColumns(column, count, parent);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::deleteRowFromTable(QSqlTableModel* theWrappedObject, int row)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_deleteRowFromTable(row);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::clear(QSqlTableModel* theWrappedObject)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_clear();
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::setRecord(QSqlTableModel* theWrappedObject, int row, const QSqlRecord& record)
|
|
|
{
|
|
|
return theWrappedObject->setRecord(row, record);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::select(QSqlTableModel* theWrappedObject)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_select();
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::sort(QSqlTableModel* theWrappedObject, int column, Qt::SortOrder order)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_sort(column, order);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::isDirty(QSqlTableModel* theWrappedObject, const QModelIndex& index) const
|
|
|
{
|
|
|
return theWrappedObject->isDirty(index);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::insertRecord(QSqlTableModel* theWrappedObject, int row, const QSqlRecord& record)
|
|
|
{
|
|
|
return theWrappedObject->insertRecord(row, record);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::insertRowIntoTable(QSqlTableModel* theWrappedObject, const QSqlRecord& values)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_insertRowIntoTable(values);
|
|
|
}
|
|
|
|
|
|
bool PythonQtWrapper_QSqlTableModel::updateRowInTable(QSqlTableModel* theWrappedObject, int row, const QSqlRecord& values)
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_updateRowInTable(row, values);
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QSqlTableModel::orderByClause(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_orderByClause();
|
|
|
}
|
|
|
|
|
|
QVariant PythonQtWrapper_QSqlTableModel::data(QSqlTableModel* theWrappedObject, const QModelIndex& idx, int role) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_data(idx, role);
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QSqlTableModel::filter(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->filter();
|
|
|
}
|
|
|
|
|
|
QVariant PythonQtWrapper_QSqlTableModel::headerData(QSqlTableModel* theWrappedObject, int section, Qt::Orientation orientation, int role) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_headerData(section, orientation, role);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::revertRow(QSqlTableModel* theWrappedObject, int row)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_revertRow(row);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::setSort(QSqlTableModel* theWrappedObject, int column, Qt::SortOrder order)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_setSort(column, order);
|
|
|
}
|
|
|
|
|
|
void PythonQtWrapper_QSqlTableModel::setEditStrategy(QSqlTableModel* theWrappedObject, QSqlTableModel::EditStrategy strategy)
|
|
|
{
|
|
|
((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_setEditStrategy(strategy);
|
|
|
}
|
|
|
|
|
|
QString PythonQtWrapper_QSqlTableModel::selectStatement(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return ((PythonQtPublicPromoter_QSqlTableModel*)theWrappedObject)->promoted_selectStatement();
|
|
|
}
|
|
|
|
|
|
QSqlIndex PythonQtWrapper_QSqlTableModel::primaryKey(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->primaryKey();
|
|
|
}
|
|
|
|
|
|
QSqlDatabase PythonQtWrapper_QSqlTableModel::database(QSqlTableModel* theWrappedObject) const
|
|
|
{
|
|
|
return theWrappedObject->database();
|
|
|
}
|
|
|
|
|
|
|