aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtSql
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtSql')
-rw-r--r--PySide/QtSql/CMakeLists.txt50
-rw-r--r--PySide/QtSql/typesystem_sql.xml158
2 files changed, 208 insertions, 0 deletions
diff --git a/PySide/QtSql/CMakeLists.txt b/PySide/QtSql/CMakeLists.txt
new file mode 100644
index 000000000..a41a7ec5d
--- /dev/null
+++ b/PySide/QtSql/CMakeLists.txt
@@ -0,0 +1,50 @@
+project(QtSql)
+
+set(QtSql_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlindex_wrapper.cpp
+
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqldatabase_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqldrivercreatorbase_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqldriver_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlerror_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlfield_wrapper.cpp
+
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlquerymodel_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlquery_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlrecord_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlrelationaldelegate_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlrelationaltablemodel_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlrelation_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqlresult_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsqltablemodel_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qsql_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
+)
+
+execute_generator(sql QtSql_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtSql_SOURCE_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTSQL_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/)
+add_library(QtSql MODULE ${QtSql_SRC})
+set_target_properties(QtSql PROPERTIES PREFIX "")
+target_link_libraries(QtSql
+ pyside
+ ${PYTHON_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTSQL_LIBRARY})
+
+add_dependencies(QtSql QtGui)
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtSql.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
+
diff --git a/PySide/QtSql/typesystem_sql.xml b/PySide/QtSql/typesystem_sql.xml
new file mode 100644
index 000000000..31cc8d329
--- /dev/null
+++ b/PySide/QtSql/typesystem_sql.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<typesystem package="PySide.QtSql">
+ <load-typesystem name="typesystem_gui.xml" generate="no"/>
+
+ <rejection class="QSqlDriverCreator"/>
+ <rejection class="QSqlDriverPlugin"/>
+ <rejection class="QSqlDriverFactoryInterface"/>
+
+ <namespace-type name="QSql">
+ <extra-includes>
+ <include file-name="QtSql/qsql.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+
+ <value-type name="QSqlDatabase">
+ <extra-includes>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="operator=(QSqlDatabase)" remove="all"/>
+ <modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes" />
+ <modify-function signature="open()" allow-thread="yes" />
+ <modify-function signature="open(const QString&amp;, const QString&amp;)" allow-thread="yes" />
+ <modify-function signature="commit()" allow-thread="yes" />
+ <modify-function signature="rollback()" allow-thread="yes" />
+ <modify-function signature="transaction()" allow-thread="yes" />
+ <modify-function signature="registerSqlDriver(const QString &amp;, QSqlDriverCreatorBase*)">
+ <modify-argument index="2">
+ <define-ownership owner="c++"/>
+ </modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QSqlQuery">
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
+ <modify-function signature="exec(const QString &amp;)" rename="exec_" allow-thread="yes" />
+ <modify-function signature="operator=(QSqlQuery)" remove="all"/>
+ <modify-function signature="prepare(const QString&amp;)" allow-thread="yes" />
+ <modify-function signature="clear()" allow-thread="yes" />
+ <modify-function signature="last()" allow-thread="yes" />
+ <modify-function signature="first()" allow-thread="yes" />
+ <modify-function signature="previous()" allow-thread="yes" />
+ <modify-function signature="next()" allow-thread="yes" />
+ <modify-function signature="seek(int,bool)" allow-thread="yes" />
+ </value-type>
+
+ <value-type name="QSqlRecord">
+ <extra-includes>
+ <include file-name="QSqlField" location="global"/>
+ </extra-includes>
+ <modify-function signature="append(QSqlField)" access="non-final"/>
+ <modify-function signature="operator=(QSqlRecord)" remove="all"/>
+ </value-type>
+
+ <value-type name="QSqlError">
+ <modify-function signature="operator=(QSqlError)" remove="all"/>
+ </value-type>
+
+ <value-type name="QSqlIndex">
+ <modify-function signature="operator=(QSqlIndex)" remove="all"/>
+ </value-type>
+
+ <value-type name="QSqlRelation"/>
+
+ <object-type name="QSqlRelationalDelegate"/>
+
+ <value-type name="QSqlField">
+ <modify-function signature="operator=(QSqlField)" remove="all"/>
+ </value-type>
+
+ <object-type name="QSqlDriver">
+ <extra-includes>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="beginTransaction()" allow-thread="yes" />
+ <modify-function signature="commitTransaction()" allow-thread="yes" />
+ <modify-function signature="rollbackTransaction()" allow-thread="yes" />
+ <modify-function signature="open(const QString &amp;, const QString&amp;, const QString&amp;, const QString&amp;, int, const QString&amp;)" allow-thread="yes" />
+ <modify-function signature="handle() const" remove="all"/>
+ </object-type>
+
+ <object-type name="QSqlQueryModel">
+ <modify-function signature="indexInQuery(QModelIndex)const" access="non-final"/>
+ <modify-function signature="setQuery(QSqlQuery)" access="non-final"/>
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlRelationalTableModel">
+ <extra-includes>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlResult">
+ <extra-includes>
+ <include file-name="QSqlError" location="global"/>
+ <include file-name="QSqlQuery" location="global"/>
+ <include file-name="QSqlRecord" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ <modify-function signature="virtual_hook(int,void*)" remove="all" />
+ <modify-function signature="exec()" rename="exec_" allow-thread="yes" />
+ <modify-function signature="fetchLast()" allow-thread="yes" />
+ <modify-function signature="fetchFirst()" allow-thread="yes" />
+ <modify-function signature="fetchNext()" allow-thread="yes" />
+ <modify-function signature="fetchPrevious()" allow-thread="yes" />
+ <modify-function signature="fetch(int)" allow-thread="yes" />
+ <modify-function signature="prepare(QString)" allow-thread="yes" />
+ </object-type>
+ <object-type name="QSqlTableModel">
+ <extra-includes>
+ <include file-name="QSqlIndex" location="global"/>
+ <include file-name="QStringList" location="global"/>
+ <include file-name="QSize" location="global"/>
+ </extra-includes>
+ </object-type>
+ <object-type name="QSqlDriverCreatorBase">
+ <extra-includes>
+ <include file-name="QSqlDriver" location="global"/>
+ </extra-includes>
+ </object-type>
+
+ <enum-type name="QSql::Location"/>
+ <enum-type name="QSql::ParamTypeFlag" flags="QSql::ParamType"/>
+ <enum-type name="QSql::TableType"/>
+ <enum-type name="QSql::NumericalPrecisionPolicy"/>
+ <enum-type name="QSqlDriver::DriverFeature"/>
+ <enum-type name="QSqlDriver::IdentifierType"/>
+ <enum-type name="QSqlDriver::StatementType"/>
+ <enum-type name="QSqlError::ErrorType"/>
+ <enum-type name="QSqlField::RequiredStatus"/>
+ <enum-type name="QSqlQuery::BatchExecutionMode"/>
+ <enum-type name="QSqlResult::BindingSyntax"/>
+ <enum-type name="QSqlResult::VirtualHookOperation"/>
+ <enum-type name="QSqlTableModel::EditStrategy"/>
+
+</typesystem>