mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
remove experimental Python bindings
they may be brought back as separate project Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
d43c94daf6
commit
e85437dfcc
34 changed files with 3 additions and 38164 deletions
|
@ -103,7 +103,6 @@ set(KATIE_MAN_FULL "${CMAKE_INSTALL_FULL_MANDIR}" CACHE PATH "Manual pages insta
|
|||
set(KATIE_APPLICATIONS_FULL "${KATIE_DATA_FULL}/applications" CACHE PATH "Desktop applications register installation path")
|
||||
set(KATIE_PIXMAPS_FULL "${KATIE_DATA_FULL}/pixmaps" CACHE PATH "Desktop applications icon installation path")
|
||||
set(KATIE_PKGCONFIG_FULL "${KATIE_DATA_FULL}/pkgconfig" CACHE PATH "pkg-config installation path")
|
||||
set(KATIE_PYTHON_FULL "${KATIE_LIBRARIES_FULL}/python" CACHE PATH "Python packages installation path")
|
||||
set(KATIE_TOOLS_SUFFIX "" CACHE STRING "Tools (moc, uic, rcc, etc.) suffix")
|
||||
katie_setup_paths()
|
||||
|
||||
|
@ -167,9 +166,6 @@ add_feature_info(nsl WITH_NSL "build NSL support")
|
|||
option(KATIE_UTILS "Build maintainance utilities" OFF)
|
||||
add_feature_info(utils KATIE_UTILS "build maintainance utilities")
|
||||
|
||||
option(KATIE_BINDINGS "Build experimental Python bindings" OFF)
|
||||
add_feature_info(bindings KATIE_BINDINGS "build experimental Python bindings")
|
||||
|
||||
option(KATIE_ALLINONE "Build targets from single source file" OFF)
|
||||
add_feature_info(allinone KATIE_ALLINONE "build targets from single source file")
|
||||
|
||||
|
@ -441,24 +437,6 @@ set_package_properties(MySQL PROPERTIES
|
|||
TYPE OPTIONAL
|
||||
)
|
||||
|
||||
if(KATIE_BINDINGS)
|
||||
find_package(Shiboken)
|
||||
set_package_properties(Shiboken PROPERTIES
|
||||
PURPOSE "Python bindings"
|
||||
DESCRIPTION "Generates bindings for C++ libraries using CPython source code"
|
||||
URL "https://wiki.qt.io/PySide"
|
||||
TYPE REQUIRED
|
||||
)
|
||||
|
||||
find_package(PythonLibs)
|
||||
set_package_properties(PythonLibs PROPERTIES
|
||||
PURPOSE "Python bindings"
|
||||
DESCRIPTION "Programming language that lets you work quickly"
|
||||
URL "https://www.python.org/"
|
||||
TYPE REQUIRED
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/genmap.py
|
||||
|
@ -610,11 +588,6 @@ if(KATIE_UTILS)
|
|||
add_subdirectory(util)
|
||||
endif()
|
||||
|
||||
# Python bindings
|
||||
if(KATIE_BINDINGS)
|
||||
add_subdirectory(bindings)
|
||||
endif()
|
||||
|
||||
# the macro calls bellow are generted via the incfsck script
|
||||
katie_generate_obsolete(qabstractlistmodel.h QtCore qabstractitemmodel.h)
|
||||
katie_generate_obsolete(qabstracttablemodel.h QtCore qabstractitemmodel.h)
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bindings")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bindings")
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}/include
|
||||
${CMAKE_BINARY_DIR}/privateinclude
|
||||
${CMAKE_BINARY_DIR}/include/QtCore
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtCore
|
||||
${CMAKE_BINARY_DIR}/include/QtGui
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtGui
|
||||
${CMAKE_BINARY_DIR}/include/QtDBus
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtDBus
|
||||
${CMAKE_BINARY_DIR}/include/QtDeclarative
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtDeclarative
|
||||
${CMAKE_BINARY_DIR}/include/QtDesigner
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtDesigner
|
||||
${CMAKE_BINARY_DIR}/include/QtNetwork
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtNetwork
|
||||
${CMAKE_BINARY_DIR}/include/QtSql
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtSql
|
||||
${CMAKE_BINARY_DIR}/include/QtSvg
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtSvg
|
||||
${CMAKE_BINARY_DIR}/include/QtXml
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtXml
|
||||
${CMAKE_BINARY_DIR}/include/QtXml
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtXml
|
||||
${CMAKE_BINARY_DIR}/include/QtScript
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtScript
|
||||
${CMAKE_BINARY_DIR}/include/QtScriptTools
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtScriptTools
|
||||
${CMAKE_BINARY_DIR}/include/QtTest
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtTest
|
||||
${CMAKE_BINARY_DIR}/include/QtUiTools
|
||||
${CMAKE_BINARY_DIR}/privateinclude/QtUiTools
|
||||
${SHIBOKEN_INCLUDES}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
remove_definitions(
|
||||
-DQT_ASCII_CAST_WARNINGS
|
||||
)
|
||||
|
||||
set(PyKtCore_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qbytearray_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qbytearray_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qchar_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qchar_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qcoreapplication_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qcoreapplication_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qlatin1char_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qlatin1char_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qlatin1string_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qlatin1string_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qobject_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qobject_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qregexp_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qregexp_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qstring_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qstring_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qstringlist_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qstringlist_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qtextboundaryfinder_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qtextboundaryfinder_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qvariant_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/katie_qvariant_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/ktcore_module_wrapper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/KtCore/ktcore_python.h
|
||||
)
|
||||
|
||||
katie_generate_bindings(KtCore ${PyKtCore_SOURCES})
|
||||
|
||||
add_library(PyKtCore MODULE ${PyKtCore_SOURCES})
|
||||
target_link_libraries(PyKtCore
|
||||
KtCore
|
||||
${SHIBOKEN_LIBRARIES}
|
||||
${PYTHON_LIBRARY}
|
||||
)
|
||||
set_target_properties(PyKtCore PROPERTIES PREFIX "")
|
||||
set_target_properties(PyKtCore PROPERTIES OUTPUT_NAME KtCore)
|
||||
|
||||
install(
|
||||
TARGETS PyKtCore
|
||||
DESTINATION ${KATIE_PYTHON_RELATIVE}
|
||||
)
|
File diff suppressed because it is too large
Load diff
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QBYTEARRAY_H
|
||||
#define SBK_KATIE_QBYTEARRAY_H
|
||||
|
||||
#include <qbytearray.h>
|
||||
|
||||
#endif // SBK_KATIE_QBYTEARRAY_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QCHAR_H
|
||||
#define SBK_KATIE_QCHAR_H
|
||||
|
||||
#include <qchar.h>
|
||||
|
||||
#endif // SBK_KATIE_QCHAR_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,85 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_QCOREAPPLICATIONWRAPPER_H
|
||||
#define SBK_QCOREAPPLICATIONWRAPPER_H
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
|
||||
class QCoreApplicationWrapper : public Katie::QCoreApplication
|
||||
{
|
||||
public:
|
||||
QCoreApplicationWrapper(int & argc, char ** argv);
|
||||
inline void aboutToQuit_protected() { Katie::QCoreApplication::aboutToQuit(); }
|
||||
inline void connectNotify_protected(const char * signal) { Katie::QCoreApplication::connectNotify(signal); }
|
||||
void connectNotify(const char * signal) override;
|
||||
inline void destroyed_protected(Katie::QObject * arg__1 = Q_NULLPTR) { Katie::QCoreApplication::destroyed(arg__1); }
|
||||
inline void disconnectNotify_protected(const char * signal) { Katie::QCoreApplication::disconnectNotify(signal); }
|
||||
void disconnectNotify(const char * signal) override;
|
||||
inline int receivers_protected(const char * signal) const { return Katie::QCoreApplication::receivers(signal); }
|
||||
inline Katie::QObject * sender_protected() const { return Katie::QCoreApplication::sender(); }
|
||||
inline int senderSignalIndex_protected() const { return Katie::QCoreApplication::senderSignalIndex(); }
|
||||
inline void unixSignal_protected(int arg__1) { Katie::QCoreApplication::unixSignal(arg__1); }
|
||||
~QCoreApplicationWrapper();
|
||||
};
|
||||
|
||||
# ifndef SBK_QOBJECTWRAPPER_H
|
||||
# define SBK_QOBJECTWRAPPER_H
|
||||
|
||||
// Inherited base class:
|
||||
class QObjectWrapper : public Katie::QObject
|
||||
{
|
||||
public:
|
||||
QObjectWrapper(Katie::QObject * parent = Q_NULLPTR);
|
||||
inline void connectNotify_protected(const char * signal) { Katie::QObject::connectNotify(signal); }
|
||||
void connectNotify(const char * signal) override;
|
||||
inline void destroyed_protected(Katie::QObject * arg__1 = Q_NULLPTR) { Katie::QObject::destroyed(arg__1); }
|
||||
inline void disconnectNotify_protected(const char * signal) { Katie::QObject::disconnectNotify(signal); }
|
||||
void disconnectNotify(const char * signal) override;
|
||||
inline int receivers_protected(const char * signal) const { return Katie::QObject::receivers(signal); }
|
||||
inline Katie::QObject * sender_protected() const { return Katie::QObject::sender(); }
|
||||
inline int senderSignalIndex_protected() const { return Katie::QObject::senderSignalIndex(); }
|
||||
~QObjectWrapper();
|
||||
};
|
||||
|
||||
# endif // SBK_QOBJECTWRAPPER_H
|
||||
|
||||
#endif // SBK_QCOREAPPLICATIONWRAPPER_H
|
||||
|
|
@ -1,339 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
// default includes
|
||||
#include <shiboken.h>
|
||||
#include <typeinfo>
|
||||
|
||||
// module include
|
||||
#include "ktcore_python.h"
|
||||
|
||||
// main header
|
||||
#include "katie_qlatin1char_wrapper.h"
|
||||
|
||||
// inner classes
|
||||
|
||||
// Extra includes
|
||||
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
using namespace Katie;
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
static const char *typeNameOf(const T &t)
|
||||
{
|
||||
const char *typeName = typeid(t).name();
|
||||
auto size = std::strlen(typeName);
|
||||
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
|
||||
if (auto lastStar = strchr(typeName, '*')) {
|
||||
// MSVC: "class QPaintDevice * __ptr64"
|
||||
while (*--lastStar == ' ') {
|
||||
}
|
||||
size = lastStar - typeName + 1;
|
||||
}
|
||||
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
|
||||
if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
|
||||
++typeName;
|
||||
--size;
|
||||
}
|
||||
#endif
|
||||
char *result = new char[size + 1];
|
||||
result[size] = '\0';
|
||||
memcpy(result, typeName, size);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Target ---------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static int
|
||||
Sbk_Katie_QLatin1Char_Init(PyObject* self, PyObject* args, PyObject* kwds)
|
||||
{
|
||||
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
|
||||
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Katie::QLatin1Char >()))
|
||||
return -1;
|
||||
|
||||
::Katie::QLatin1Char* cptr{};
|
||||
int overloadId = -1;
|
||||
PythonToCppFunc pythonToCpp[] = { nullptr };
|
||||
SBK_UNUSED(pythonToCpp)
|
||||
int numArgs = PyTuple_GET_SIZE(args);
|
||||
SBK_UNUSED(numArgs)
|
||||
PyObject* pyArgs[] = {0};
|
||||
|
||||
// invalid argument lengths
|
||||
|
||||
|
||||
if (!PyArg_UnpackTuple(args, "QLatin1Char", 1, 1, &(pyArgs[0])))
|
||||
return -1;
|
||||
|
||||
|
||||
// Overloaded function decisor
|
||||
// 0: QLatin1Char::QLatin1Char(char)
|
||||
if (numArgs == 1
|
||||
&& SbkChar_Check(pyArgs[0]) && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<char>(), (pyArgs[0])))) {
|
||||
overloadId = 0; // QLatin1Char(char)
|
||||
}
|
||||
|
||||
// Function signature not found.
|
||||
if (overloadId == -1) goto Sbk_Katie_QLatin1Char_Init_TypeError;
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
char cppArg0;
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QLatin1Char(char)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QLatin1Char(cppArg0);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Katie::QLatin1Char >(), cptr)) {
|
||||
delete cptr;
|
||||
return -1;
|
||||
}
|
||||
if (!cptr) goto Sbk_Katie_QLatin1Char_Init_TypeError;
|
||||
|
||||
Shiboken::Object::setValidCpp(sbkSelf, true);
|
||||
if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
|
||||
Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
|
||||
}
|
||||
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
Sbk_Katie_QLatin1Char_Init_TypeError:
|
||||
Shiboken::setErrorAboutWrongArguments(args, "KtCore.Katie.QLatin1Char");
|
||||
return -1;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QLatin1CharFunc_toLatin1(PyObject* self)
|
||||
{
|
||||
::Katie::QLatin1Char* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QLatin1Char *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1CHAR_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// toLatin1()const
|
||||
char cppResult = const_cast<const ::Katie::QLatin1Char*>(cppSelf)->toLatin1();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<char>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QLatin1CharFunc_unicode(PyObject* self)
|
||||
{
|
||||
::Katie::QLatin1Char* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QLatin1Char *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1CHAR_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// unicode()const
|
||||
ushort cppResult = const_cast<const ::Katie::QLatin1Char*>(cppSelf)->unicode();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<ushort>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyMethodDef Sbk_Katie_QLatin1Char_methods[] = {
|
||||
{"toLatin1", reinterpret_cast<PyCFunction>(Sbk_Katie_QLatin1CharFunc_toLatin1), METH_NOARGS},
|
||||
{"unicode", reinterpret_cast<PyCFunction>(Sbk_Katie_QLatin1CharFunc_unicode), METH_NOARGS},
|
||||
|
||||
{nullptr, nullptr} // Sentinel
|
||||
};
|
||||
|
||||
} // extern "C"
|
||||
|
||||
static int Sbk_Katie_QLatin1Char_traverse(PyObject* self, visitproc visit, void* arg)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_traverse(self, visit, arg);
|
||||
}
|
||||
static int Sbk_Katie_QLatin1Char_clear(PyObject* self)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
|
||||
}
|
||||
// Class Definition -----------------------------------------------
|
||||
extern "C" {
|
||||
static SbkObjectType *_Sbk_Katie_QLatin1Char_Type = nullptr;
|
||||
static SbkObjectType *Sbk_Katie_QLatin1Char_TypeF(void)
|
||||
{
|
||||
return _Sbk_Katie_QLatin1Char_Type;
|
||||
}
|
||||
|
||||
static PyType_Slot Sbk_Katie_QLatin1Char_slots[] = {
|
||||
{Py_tp_base, nullptr}, // inserted by introduceWrapperType
|
||||
{Py_tp_dealloc, reinterpret_cast<void*>(&SbkDeallocWrapper)},
|
||||
{Py_tp_repr, nullptr},
|
||||
{Py_tp_hash, nullptr},
|
||||
{Py_tp_call, nullptr},
|
||||
{Py_tp_str, nullptr},
|
||||
{Py_tp_getattro, nullptr},
|
||||
{Py_tp_setattro, nullptr},
|
||||
{Py_tp_traverse, reinterpret_cast<void*>(Sbk_Katie_QLatin1Char_traverse)},
|
||||
{Py_tp_clear, reinterpret_cast<void*>(Sbk_Katie_QLatin1Char_clear)},
|
||||
{Py_tp_richcompare, nullptr},
|
||||
{Py_tp_iter, nullptr},
|
||||
{Py_tp_iternext, nullptr},
|
||||
{Py_tp_methods, reinterpret_cast<void*>(Sbk_Katie_QLatin1Char_methods)},
|
||||
{Py_tp_getset, nullptr},
|
||||
{Py_tp_init, reinterpret_cast<void*>(Sbk_Katie_QLatin1Char_Init)},
|
||||
{Py_tp_new, reinterpret_cast<void*>(SbkObjectTpNew)},
|
||||
{0, nullptr}
|
||||
};
|
||||
static PyType_Spec Sbk_Katie_QLatin1Char_spec = {
|
||||
"KtCore.Katie.QLatin1Char",
|
||||
sizeof(SbkObject),
|
||||
0,
|
||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC,
|
||||
Sbk_Katie_QLatin1Char_slots
|
||||
};
|
||||
|
||||
} //extern "C"
|
||||
|
||||
|
||||
// Type conversion functions.
|
||||
|
||||
// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
|
||||
static void QLatin1Char_PythonToCpp_QLatin1Char_PTR(PyObject* pyIn, void* cppOut) {
|
||||
Shiboken::Conversions::pythonToCppPointer(Sbk_Katie_QLatin1Char_TypeF(), pyIn, cppOut);
|
||||
}
|
||||
static PythonToCppFunc is_QLatin1Char_PythonToCpp_QLatin1Char_PTR_Convertible(PyObject* pyIn) {
|
||||
if (pyIn == Py_None)
|
||||
return Shiboken::Conversions::nonePythonToCppNullPtr;
|
||||
if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject*>(Sbk_Katie_QLatin1Char_TypeF())))
|
||||
return QLatin1Char_PythonToCpp_QLatin1Char_PTR;
|
||||
return {};
|
||||
}
|
||||
|
||||
// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
|
||||
static PyObject* QLatin1Char_PTR_CppToPython_QLatin1Char(const void* cppIn) {
|
||||
auto pyOut = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
|
||||
if (pyOut) {
|
||||
Py_INCREF(pyOut);
|
||||
return pyOut;
|
||||
}
|
||||
bool changedTypeName = false;
|
||||
auto tCppIn = reinterpret_cast<const ::Katie::QLatin1Char *>(cppIn);
|
||||
const char *typeName = typeid(*tCppIn).name();
|
||||
auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
|
||||
if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
|
||||
typeName = typeNameOf(tCppIn);
|
||||
changedTypeName = true;
|
||||
}
|
||||
PyObject *result = Shiboken::Object::newObject(Sbk_Katie_QLatin1Char_TypeF(), const_cast<void*>(cppIn), false, /* exactType */ changedTypeName, typeName);
|
||||
if (changedTypeName)
|
||||
delete [] typeName;
|
||||
return result;
|
||||
}
|
||||
|
||||
// The signatures string for the functions.
|
||||
// Multiple signatures have their index "n:" in front.
|
||||
static const char *Katie_QLatin1Char_SignatureStrings[] = {
|
||||
"KtCore.Katie.QLatin1Char(c:char)",
|
||||
"KtCore.Katie.QLatin1Char.toLatin1()->char",
|
||||
"KtCore.Katie.QLatin1Char.unicode()->ushort",
|
||||
nullptr}; // Sentinel
|
||||
|
||||
void init_Katie_QLatin1Char(PyObject* module)
|
||||
{
|
||||
_Sbk_Katie_QLatin1Char_Type = Shiboken::ObjectType::introduceWrapperType(
|
||||
module,
|
||||
"QLatin1Char",
|
||||
"Katie::QLatin1Char*",
|
||||
&Sbk_Katie_QLatin1Char_spec,
|
||||
Katie_QLatin1Char_SignatureStrings,
|
||||
&Shiboken::callCppDestructor< ::Katie::QLatin1Char >,
|
||||
0,
|
||||
0,
|
||||
0 );
|
||||
|
||||
SbkKtCoreTypes[SBK_KATIE_QLATIN1CHAR_IDX]
|
||||
= reinterpret_cast<PyTypeObject*>(Sbk_Katie_QLatin1Char_TypeF());
|
||||
|
||||
// Register Converter
|
||||
SbkConverter* converter = Shiboken::Conversions::createConverter(Sbk_Katie_QLatin1Char_TypeF(),
|
||||
QLatin1Char_PythonToCpp_QLatin1Char_PTR,
|
||||
is_QLatin1Char_PythonToCpp_QLatin1Char_PTR_Convertible,
|
||||
QLatin1Char_PTR_CppToPython_QLatin1Char);
|
||||
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1Char");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1Char*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1Char&");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1Char");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1Char*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1Char&");
|
||||
Shiboken::Conversions::registerConverterName(converter, typeid(::Katie::QLatin1Char).name());
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QLATIN1CHAR_H
|
||||
#define SBK_KATIE_QLATIN1CHAR_H
|
||||
|
||||
#include <qchar.h>
|
||||
|
||||
#endif // SBK_KATIE_QLATIN1CHAR_H
|
||||
|
|
@ -1,552 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
// default includes
|
||||
#include <shiboken.h>
|
||||
#include <typeinfo>
|
||||
|
||||
// module include
|
||||
#include "ktcore_python.h"
|
||||
|
||||
// main header
|
||||
#include "katie_qlatin1string_wrapper.h"
|
||||
|
||||
// inner classes
|
||||
|
||||
// Extra includes
|
||||
#include <qstring.h>
|
||||
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
using namespace Katie;
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
static const char *typeNameOf(const T &t)
|
||||
{
|
||||
const char *typeName = typeid(t).name();
|
||||
auto size = std::strlen(typeName);
|
||||
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
|
||||
if (auto lastStar = strchr(typeName, '*')) {
|
||||
// MSVC: "class QPaintDevice * __ptr64"
|
||||
while (*--lastStar == ' ') {
|
||||
}
|
||||
size = lastStar - typeName + 1;
|
||||
}
|
||||
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
|
||||
if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
|
||||
++typeName;
|
||||
--size;
|
||||
}
|
||||
#endif
|
||||
char *result = new char[size + 1];
|
||||
result[size] = '\0';
|
||||
memcpy(result, typeName, size);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Target ---------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static int
|
||||
Sbk_Katie_QLatin1String_Init(PyObject* self, PyObject* args, PyObject* kwds)
|
||||
{
|
||||
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
|
||||
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Katie::QLatin1String >()))
|
||||
return -1;
|
||||
|
||||
::Katie::QLatin1String* cptr{};
|
||||
int overloadId = -1;
|
||||
PythonToCppFunc pythonToCpp[] = { nullptr };
|
||||
SBK_UNUSED(pythonToCpp)
|
||||
int numArgs = PyTuple_GET_SIZE(args);
|
||||
SBK_UNUSED(numArgs)
|
||||
PyObject* pyArgs[] = {0};
|
||||
|
||||
// invalid argument lengths
|
||||
|
||||
|
||||
if (!PyArg_UnpackTuple(args, "QLatin1String", 1, 1, &(pyArgs[0])))
|
||||
return -1;
|
||||
|
||||
|
||||
// Overloaded function decisor
|
||||
// 0: QLatin1String::QLatin1String(Katie::QLatin1String)
|
||||
// 1: QLatin1String::QLatin1String(const char*)
|
||||
if (numArgs == 1
|
||||
&& Shiboken::String::check(pyArgs[0]) && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArgs[0])))) {
|
||||
overloadId = 1; // QLatin1String(const char*)
|
||||
} else if (numArgs == 1
|
||||
&& (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX]), (pyArgs[0])))) {
|
||||
overloadId = 0; // QLatin1String(Katie::QLatin1String)
|
||||
}
|
||||
|
||||
// Function signature not found.
|
||||
if (overloadId == -1) goto Sbk_Katie_QLatin1String_Init_TypeError;
|
||||
|
||||
// Call function/method
|
||||
switch (overloadId) {
|
||||
case 0: // QLatin1String(const Katie::QLatin1String & QLatin1String)
|
||||
{
|
||||
if (!Shiboken::Object::isValid(pyArgs[0]))
|
||||
return -1;
|
||||
::Katie::QLatin1String cppArg0_local = ::Katie::QLatin1String(static_cast<char*>(nullptr));
|
||||
::Katie::QLatin1String* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX]), pythonToCpp[0]))
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0_local);
|
||||
else
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QLatin1String(Katie::QLatin1String)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QLatin1String(*cppArg0);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: // QLatin1String(const char * s)
|
||||
{
|
||||
const char* cppArg0;
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QLatin1String(const char*)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QLatin1String(cppArg0);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Katie::QLatin1String >(), cptr)) {
|
||||
delete cptr;
|
||||
return -1;
|
||||
}
|
||||
if (!cptr) goto Sbk_Katie_QLatin1String_Init_TypeError;
|
||||
|
||||
Shiboken::Object::setValidCpp(sbkSelf, true);
|
||||
if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
|
||||
Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
|
||||
}
|
||||
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
Sbk_Katie_QLatin1String_Init_TypeError:
|
||||
Shiboken::setErrorAboutWrongArguments(args, "KtCore.Katie.QLatin1String");
|
||||
return -1;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QLatin1StringFunc_latin1(PyObject* self)
|
||||
{
|
||||
::Katie::QLatin1String* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QLatin1String *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// latin1()const
|
||||
const char * cppResult = const_cast<const ::Katie::QLatin1String*>(cppSelf)->latin1();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QLatin1String___copy__(PyObject* self)
|
||||
{
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
::Katie::QLatin1String& cppSelf = *reinterpret_cast< ::Katie::QLatin1String *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult = Shiboken::Conversions::copyToPython(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX]), &cppSelf);
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyMethodDef Sbk_Katie_QLatin1String_methods[] = {
|
||||
{"latin1", reinterpret_cast<PyCFunction>(Sbk_Katie_QLatin1StringFunc_latin1), METH_NOARGS},
|
||||
|
||||
{"__copy__", reinterpret_cast<PyCFunction>(Sbk_Katie_QLatin1String___copy__), METH_NOARGS},
|
||||
{nullptr, nullptr} // Sentinel
|
||||
};
|
||||
|
||||
// Rich comparison
|
||||
static PyObject* Sbk_Katie_QLatin1String_richcompare(PyObject* self, PyObject* pyArg, int op)
|
||||
{
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
::Katie::QLatin1String& cppSelf = *reinterpret_cast< ::Katie::QLatin1String *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
SBK_UNUSED(cppSelf)
|
||||
PyObject* pyResult{};
|
||||
PythonToCppFunc pythonToCpp;
|
||||
SBK_UNUSED(pythonToCpp)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator!=(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf !=(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator!=(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf !=(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
pyResult = Py_True;
|
||||
Py_INCREF(pyResult);
|
||||
}
|
||||
|
||||
break;
|
||||
case Py_LT:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator<(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf <(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator<(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf <(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
goto Sbk_Katie_QLatin1String_RichComparison_TypeError;
|
||||
}
|
||||
|
||||
break;
|
||||
case Py_LE:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator<=(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf <=(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator<=(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf <=(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
goto Sbk_Katie_QLatin1String_RichComparison_TypeError;
|
||||
}
|
||||
|
||||
break;
|
||||
case Py_EQ:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator==(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf ==(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator==(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf ==(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
pyResult = Py_False;
|
||||
Py_INCREF(pyResult);
|
||||
}
|
||||
|
||||
break;
|
||||
case Py_GT:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator>(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf >(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator>(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf >(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
goto Sbk_Katie_QLatin1String_RichComparison_TypeError;
|
||||
}
|
||||
|
||||
break;
|
||||
case Py_GE:
|
||||
if (Shiboken::String::check(pyArg) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyArg)))) {
|
||||
// operator>=(const char * s) const
|
||||
const char* cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
bool cppResult = cppSelf >=(cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArg)))) {
|
||||
// operator>=(const Katie::QString & s) const
|
||||
if (!Shiboken::Object::isValid(pyArg))
|
||||
return {};
|
||||
::Katie::QString cppArg0_local;
|
||||
::Katie::QString* cppArg0 = &cppArg0_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp))
|
||||
pythonToCpp(pyArg, &cppArg0_local);
|
||||
else
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
bool cppResult = cppSelf >=(*cppArg0);
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
} else {
|
||||
goto Sbk_Katie_QLatin1String_RichComparison_TypeError;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
goto Sbk_Katie_QLatin1String_RichComparison_TypeError;
|
||||
}
|
||||
|
||||
if (pyResult && !PyErr_Occurred())
|
||||
return pyResult;
|
||||
Sbk_Katie_QLatin1String_RichComparison_TypeError:
|
||||
PyErr_SetString(PyExc_NotImplementedError, "operator not implemented.");
|
||||
return {};
|
||||
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
static int Sbk_Katie_QLatin1String_traverse(PyObject* self, visitproc visit, void* arg)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_traverse(self, visit, arg);
|
||||
}
|
||||
static int Sbk_Katie_QLatin1String_clear(PyObject* self)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
|
||||
}
|
||||
// Class Definition -----------------------------------------------
|
||||
extern "C" {
|
||||
static SbkObjectType *_Sbk_Katie_QLatin1String_Type = nullptr;
|
||||
static SbkObjectType *Sbk_Katie_QLatin1String_TypeF(void)
|
||||
{
|
||||
return _Sbk_Katie_QLatin1String_Type;
|
||||
}
|
||||
|
||||
static PyType_Slot Sbk_Katie_QLatin1String_slots[] = {
|
||||
{Py_tp_base, nullptr}, // inserted by introduceWrapperType
|
||||
{Py_tp_dealloc, reinterpret_cast<void*>(&SbkDeallocWrapper)},
|
||||
{Py_tp_repr, nullptr},
|
||||
{Py_tp_hash, nullptr},
|
||||
{Py_tp_call, nullptr},
|
||||
{Py_tp_str, nullptr},
|
||||
{Py_tp_getattro, nullptr},
|
||||
{Py_tp_setattro, nullptr},
|
||||
{Py_tp_traverse, reinterpret_cast<void*>(Sbk_Katie_QLatin1String_traverse)},
|
||||
{Py_tp_clear, reinterpret_cast<void*>(Sbk_Katie_QLatin1String_clear)},
|
||||
{Py_tp_richcompare, reinterpret_cast<void*>(Sbk_Katie_QLatin1String_richcompare)},
|
||||
{Py_tp_iter, nullptr},
|
||||
{Py_tp_iternext, nullptr},
|
||||
{Py_tp_methods, reinterpret_cast<void*>(Sbk_Katie_QLatin1String_methods)},
|
||||
{Py_tp_getset, nullptr},
|
||||
{Py_tp_init, reinterpret_cast<void*>(Sbk_Katie_QLatin1String_Init)},
|
||||
{Py_tp_new, reinterpret_cast<void*>(SbkObjectTpNew)},
|
||||
{0, nullptr}
|
||||
};
|
||||
static PyType_Spec Sbk_Katie_QLatin1String_spec = {
|
||||
"KtCore.Katie.QLatin1String",
|
||||
sizeof(SbkObject),
|
||||
0,
|
||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC,
|
||||
Sbk_Katie_QLatin1String_slots
|
||||
};
|
||||
|
||||
} //extern "C"
|
||||
|
||||
|
||||
// Type conversion functions.
|
||||
|
||||
// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
|
||||
static void QLatin1String_PythonToCpp_QLatin1String_PTR(PyObject* pyIn, void* cppOut) {
|
||||
Shiboken::Conversions::pythonToCppPointer(Sbk_Katie_QLatin1String_TypeF(), pyIn, cppOut);
|
||||
}
|
||||
static PythonToCppFunc is_QLatin1String_PythonToCpp_QLatin1String_PTR_Convertible(PyObject* pyIn) {
|
||||
if (pyIn == Py_None)
|
||||
return Shiboken::Conversions::nonePythonToCppNullPtr;
|
||||
if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject*>(Sbk_Katie_QLatin1String_TypeF())))
|
||||
return QLatin1String_PythonToCpp_QLatin1String_PTR;
|
||||
return {};
|
||||
}
|
||||
|
||||
// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
|
||||
static PyObject* QLatin1String_PTR_CppToPython_QLatin1String(const void* cppIn) {
|
||||
auto pyOut = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
|
||||
if (pyOut) {
|
||||
Py_INCREF(pyOut);
|
||||
return pyOut;
|
||||
}
|
||||
bool changedTypeName = false;
|
||||
auto tCppIn = reinterpret_cast<const ::Katie::QLatin1String *>(cppIn);
|
||||
const char *typeName = typeid(*tCppIn).name();
|
||||
auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
|
||||
if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
|
||||
typeName = typeNameOf(tCppIn);
|
||||
changedTypeName = true;
|
||||
}
|
||||
PyObject *result = Shiboken::Object::newObject(Sbk_Katie_QLatin1String_TypeF(), const_cast<void*>(cppIn), false, /* exactType */ changedTypeName, typeName);
|
||||
if (changedTypeName)
|
||||
delete [] typeName;
|
||||
return result;
|
||||
}
|
||||
|
||||
// C++ to Python copy conversion.
|
||||
static PyObject* QLatin1String_COPY_CppToPython_QLatin1String(const void* cppIn) {
|
||||
return Shiboken::Object::newObject(Sbk_Katie_QLatin1String_TypeF(), new ::Katie::QLatin1String(*reinterpret_cast<const ::Katie::QLatin1String*>(cppIn)), true, true);
|
||||
}
|
||||
|
||||
// Python to C++ copy conversion.
|
||||
static void QLatin1String_PythonToCpp_QLatin1String_COPY(PyObject* pyIn, void* cppOut) {
|
||||
*reinterpret_cast<::Katie::QLatin1String*>(cppOut) = *reinterpret_cast< ::Katie::QLatin1String *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX], reinterpret_cast<SbkObject *>(pyIn)));
|
||||
}
|
||||
static PythonToCppFunc is_QLatin1String_PythonToCpp_QLatin1String_COPY_Convertible(PyObject* pyIn) {
|
||||
if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject*>(Sbk_Katie_QLatin1String_TypeF())))
|
||||
return QLatin1String_PythonToCpp_QLatin1String_COPY;
|
||||
return {};
|
||||
}
|
||||
|
||||
// The signatures string for the functions.
|
||||
// Multiple signatures have their index "n:" in front.
|
||||
static const char *Katie_QLatin1String_SignatureStrings[] = {
|
||||
"1:KtCore.Katie.QLatin1String(QLatin1String:KtCore.Katie.QLatin1String)",
|
||||
"0:KtCore.Katie.QLatin1String(s:str)",
|
||||
"KtCore.Katie.QLatin1String.latin1()->str",
|
||||
"KtCore.Katie.QLatin1String.__copy__()",
|
||||
nullptr}; // Sentinel
|
||||
|
||||
void init_Katie_QLatin1String(PyObject* module)
|
||||
{
|
||||
_Sbk_Katie_QLatin1String_Type = Shiboken::ObjectType::introduceWrapperType(
|
||||
module,
|
||||
"QLatin1String",
|
||||
"Katie::QLatin1String",
|
||||
&Sbk_Katie_QLatin1String_spec,
|
||||
Katie_QLatin1String_SignatureStrings,
|
||||
&Shiboken::callCppDestructor< ::Katie::QLatin1String >,
|
||||
0,
|
||||
0,
|
||||
0 );
|
||||
|
||||
SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX]
|
||||
= reinterpret_cast<PyTypeObject*>(Sbk_Katie_QLatin1String_TypeF());
|
||||
|
||||
// Register Converter
|
||||
SbkConverter* converter = Shiboken::Conversions::createConverter(Sbk_Katie_QLatin1String_TypeF(),
|
||||
QLatin1String_PythonToCpp_QLatin1String_PTR,
|
||||
is_QLatin1String_PythonToCpp_QLatin1String_PTR_Convertible,
|
||||
QLatin1String_PTR_CppToPython_QLatin1String,
|
||||
QLatin1String_COPY_CppToPython_QLatin1String);
|
||||
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1String");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1String*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QLatin1String&");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1String");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1String*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QLatin1String&");
|
||||
Shiboken::Conversions::registerConverterName(converter, typeid(::Katie::QLatin1String).name());
|
||||
|
||||
// Add Python to C++ copy (value, not pointer neither reference) conversion to type converter.
|
||||
Shiboken::Conversions::addPythonToCppValueConversion(converter,
|
||||
QLatin1String_PythonToCpp_QLatin1String_COPY,
|
||||
is_QLatin1String_PythonToCpp_QLatin1String_COPY_Convertible);
|
||||
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QLATIN1STRING_H
|
||||
#define SBK_KATIE_QLATIN1STRING_H
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif // SBK_KATIE_QLATIN1STRING_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,62 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_QOBJECTWRAPPER_H
|
||||
#define SBK_QOBJECTWRAPPER_H
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
class QObjectWrapper : public Katie::QObject
|
||||
{
|
||||
public:
|
||||
QObjectWrapper(Katie::QObject * parent = Q_NULLPTR);
|
||||
inline void connectNotify_protected(const char * signal) { Katie::QObject::connectNotify(signal); }
|
||||
void connectNotify(const char * signal) override;
|
||||
inline void destroyed_protected(Katie::QObject * arg__1 = Q_NULLPTR) { Katie::QObject::destroyed(arg__1); }
|
||||
inline void disconnectNotify_protected(const char * signal) { Katie::QObject::disconnectNotify(signal); }
|
||||
void disconnectNotify(const char * signal) override;
|
||||
inline int receivers_protected(const char * signal) const { return Katie::QObject::receivers(signal); }
|
||||
inline Katie::QObject * sender_protected() const { return Katie::QObject::sender(); }
|
||||
inline int senderSignalIndex_protected() const { return Katie::QObject::senderSignalIndex(); }
|
||||
~QObjectWrapper();
|
||||
};
|
||||
|
||||
#endif // SBK_QOBJECTWRAPPER_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QREGEXP_H
|
||||
#define SBK_KATIE_QREGEXP_H
|
||||
|
||||
#include <qregexp.h>
|
||||
|
||||
#endif // SBK_KATIE_QREGEXP_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QSTRING_H
|
||||
#define SBK_KATIE_QSTRING_H
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif // SBK_KATIE_QSTRING_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QSTRINGLIST_H
|
||||
#define SBK_KATIE_QSTRINGLIST_H
|
||||
|
||||
#include <qstringlist.h>
|
||||
|
||||
#endif // SBK_KATIE_QSTRINGLIST_H
|
||||
|
|
@ -1,788 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
// default includes
|
||||
#include <shiboken.h>
|
||||
#include <typeinfo>
|
||||
|
||||
// module include
|
||||
#include "ktcore_python.h"
|
||||
|
||||
// main header
|
||||
#include "katie_qtextboundaryfinder_wrapper.h"
|
||||
|
||||
// inner classes
|
||||
|
||||
// Extra includes
|
||||
#include <qchar.h>
|
||||
#include <qstring.h>
|
||||
#include <qtextboundaryfinder.h>
|
||||
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
using namespace Katie;
|
||||
|
||||
|
||||
|
||||
template <class T>
|
||||
static const char *typeNameOf(const T &t)
|
||||
{
|
||||
const char *typeName = typeid(t).name();
|
||||
auto size = std::strlen(typeName);
|
||||
#if defined(Q_CC_MSVC) // MSVC: "class QPaintDevice * __ptr64"
|
||||
if (auto lastStar = strchr(typeName, '*')) {
|
||||
// MSVC: "class QPaintDevice * __ptr64"
|
||||
while (*--lastStar == ' ') {
|
||||
}
|
||||
size = lastStar - typeName + 1;
|
||||
}
|
||||
#else // g++, Clang: "QPaintDevice *" -> "P12QPaintDevice"
|
||||
if (size > 2 && typeName[0] == 'P' && std::isdigit(typeName[1])) {
|
||||
++typeName;
|
||||
--size;
|
||||
}
|
||||
#endif
|
||||
char *result = new char[size + 1];
|
||||
result[size] = '\0';
|
||||
memcpy(result, typeName, size);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// Target ---------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static int
|
||||
Sbk_Katie_QTextBoundaryFinder_Init(PyObject* self, PyObject* args, PyObject* kwds)
|
||||
{
|
||||
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
|
||||
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Katie::QTextBoundaryFinder >()))
|
||||
return -1;
|
||||
|
||||
::Katie::QTextBoundaryFinder* cptr{};
|
||||
int overloadId = -1;
|
||||
PythonToCppFunc pythonToCpp[] = { nullptr, nullptr, nullptr };
|
||||
SBK_UNUSED(pythonToCpp)
|
||||
int numArgs = PyTuple_GET_SIZE(args);
|
||||
SBK_UNUSED(numArgs)
|
||||
PyObject* pyArgs[] = {0, 0, 0};
|
||||
|
||||
// invalid argument lengths
|
||||
|
||||
|
||||
if (!PyArg_UnpackTuple(args, "QTextBoundaryFinder", 0, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2])))
|
||||
return -1;
|
||||
|
||||
|
||||
// Overloaded function decisor
|
||||
// 0: QTextBoundaryFinder::QTextBoundaryFinder()
|
||||
// 1: QTextBoundaryFinder::QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,const Katie::QChar*,int)
|
||||
// 2: QTextBoundaryFinder::QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,Katie::QString)
|
||||
// 3: QTextBoundaryFinder::QTextBoundaryFinder(Katie::QTextBoundaryFinder)
|
||||
if (numArgs == 0) {
|
||||
overloadId = 0; // QTextBoundaryFinder()
|
||||
} else if (numArgs == 1
|
||||
&& (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX]), (pyArgs[0])))) {
|
||||
overloadId = 3; // QTextBoundaryFinder(Katie::QTextBoundaryFinder)
|
||||
} else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(*PepType_SGTP(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX])->converter, (pyArgs[0])))) {
|
||||
if (numArgs == 3
|
||||
&& (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QCHAR_IDX]), (pyArgs[1])))
|
||||
&& (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArgs[2])))) {
|
||||
overloadId = 1; // QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,const Katie::QChar*,int)
|
||||
} else if (numArgs == 2
|
||||
&& (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), (pyArgs[1])))) {
|
||||
overloadId = 2; // QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,Katie::QString)
|
||||
}
|
||||
}
|
||||
|
||||
// Function signature not found.
|
||||
if (overloadId == -1) goto Sbk_Katie_QTextBoundaryFinder_Init_TypeError;
|
||||
|
||||
// Call function/method
|
||||
switch (overloadId) {
|
||||
case 0: // QTextBoundaryFinder()
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QTextBoundaryFinder()
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QTextBoundaryFinder();
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: // QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType type, const Katie::QChar * chars, const int length)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder::BoundaryType cppArg0{Katie::QTextBoundaryFinder::Grapheme};
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
if (!Shiboken::Object::isValid(pyArgs[1]))
|
||||
return -1;
|
||||
::Katie::QChar* cppArg1;
|
||||
pythonToCpp[1](pyArgs[1], &cppArg1);
|
||||
int cppArg2;
|
||||
pythonToCpp[2](pyArgs[2], &cppArg2);
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,const Katie::QChar*,int)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QTextBoundaryFinder(cppArg0, cppArg1, cppArg2);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: // QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType type, const Katie::QString & string)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder::BoundaryType cppArg0{Katie::QTextBoundaryFinder::Grapheme};
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
if (!Shiboken::Object::isValid(pyArgs[1]))
|
||||
return -1;
|
||||
::Katie::QString cppArg1_local;
|
||||
::Katie::QString* cppArg1 = &cppArg1_local;
|
||||
if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), pythonToCpp[1]))
|
||||
pythonToCpp[1](pyArgs[1], &cppArg1_local);
|
||||
else
|
||||
pythonToCpp[1](pyArgs[1], &cppArg1);
|
||||
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QTextBoundaryFinder(Katie::QTextBoundaryFinder::BoundaryType,Katie::QString)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QTextBoundaryFinder(cppArg0, *cppArg1);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3: // QTextBoundaryFinder(const Katie::QTextBoundaryFinder & other)
|
||||
{
|
||||
if (!Shiboken::Object::isValid(pyArgs[0]))
|
||||
return -1;
|
||||
::Katie::QTextBoundaryFinder* cppArg0;
|
||||
pythonToCpp[0](pyArgs[0], &cppArg0);
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// QTextBoundaryFinder(Katie::QTextBoundaryFinder)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cptr = new ::Katie::QTextBoundaryFinder(*cppArg0);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Katie::QTextBoundaryFinder >(), cptr)) {
|
||||
delete cptr;
|
||||
return -1;
|
||||
}
|
||||
if (!cptr) goto Sbk_Katie_QTextBoundaryFinder_Init_TypeError;
|
||||
|
||||
Shiboken::Object::setValidCpp(sbkSelf, true);
|
||||
if (Shiboken::BindingManager::instance().hasWrapper(cptr)) {
|
||||
Shiboken::BindingManager::instance().releaseWrapper(Shiboken::BindingManager::instance().retrieveWrapper(cptr));
|
||||
}
|
||||
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
Sbk_Katie_QTextBoundaryFinder_Init_TypeError:
|
||||
Shiboken::setErrorAboutWrongArguments(args, "KtCore.Katie.QTextBoundaryFinder");
|
||||
return -1;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_boundaryReasons(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// boundaryReasons()const
|
||||
Katie::QTextBoundaryFinder::BoundaryReasons cppResult = const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->boundaryReasons();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<Katie::QTextBoundaryFinder::BoundaryReasons>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_isAtBoundary(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// isAtBoundary()const
|
||||
bool cppResult = const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->isAtBoundary();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_isValid(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// isValid()const
|
||||
bool cppResult = const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->isValid();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<bool>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_position(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// position()const
|
||||
int cppResult = const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->position();
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_setPosition(PyObject* self, PyObject* pyArg)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
int overloadId = -1;
|
||||
PythonToCppFunc pythonToCpp{};
|
||||
SBK_UNUSED(pythonToCpp)
|
||||
|
||||
// Overloaded function decisor
|
||||
// 0: QTextBoundaryFinder::setPosition(int)
|
||||
if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), (pyArg)))) {
|
||||
overloadId = 0; // setPosition(int)
|
||||
}
|
||||
|
||||
// Function signature not found.
|
||||
if (overloadId == -1) goto Sbk_Katie_QTextBoundaryFinderFunc_setPosition_TypeError;
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
int cppArg0;
|
||||
pythonToCpp(pyArg, &cppArg0);
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// setPosition(int)
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cppSelf->setPosition(cppArg0);
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
return {};
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
|
||||
Sbk_Katie_QTextBoundaryFinderFunc_setPosition_TypeError:
|
||||
Shiboken::setErrorAboutWrongArguments(pyArg, "KtCore.Katie.QTextBoundaryFinder.setPosition");
|
||||
return {};
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_string(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// string()const
|
||||
Katie::QString cppResult = const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->string();
|
||||
pyResult = Shiboken::Conversions::copyToPython(reinterpret_cast<SbkObjectType *>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_toEnd(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// toEnd()
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cppSelf->toEnd();
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
return {};
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_toNextBoundary(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// toNextBoundary()
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
int cppResult = cppSelf->toNextBoundary();
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_toPreviousBoundary(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// toPreviousBoundary()
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
int cppResult = cppSelf->toPreviousBoundary();
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_toStart(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// toStart()
|
||||
PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
|
||||
cppSelf->toStart();
|
||||
PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
return {};
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
static PyObject* Sbk_Katie_QTextBoundaryFinderFunc_type(PyObject* self)
|
||||
{
|
||||
::Katie::QTextBoundaryFinder* cppSelf = nullptr;
|
||||
SBK_UNUSED(cppSelf)
|
||||
if (!Shiboken::Object::isValid(self))
|
||||
return {};
|
||||
cppSelf = reinterpret_cast< ::Katie::QTextBoundaryFinder *>(Shiboken::Conversions::cppPointer(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX], reinterpret_cast<SbkObject *>(self)));
|
||||
PyObject* pyResult{};
|
||||
|
||||
// Call function/method
|
||||
{
|
||||
|
||||
if (!PyErr_Occurred()) {
|
||||
// type()const
|
||||
Katie::QTextBoundaryFinder::BoundaryType cppResult = Katie::QTextBoundaryFinder::BoundaryType(const_cast<const ::Katie::QTextBoundaryFinder*>(cppSelf)->type());
|
||||
pyResult = Shiboken::Conversions::copyToPython(*PepType_SGTP(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX])->converter, &cppResult);
|
||||
}
|
||||
}
|
||||
|
||||
if (PyErr_Occurred() || !pyResult) {
|
||||
Py_XDECREF(pyResult);
|
||||
return {};
|
||||
}
|
||||
return pyResult;
|
||||
}
|
||||
|
||||
static PyMethodDef Sbk_Katie_QTextBoundaryFinder_methods[] = {
|
||||
{"boundaryReasons", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_boundaryReasons), METH_NOARGS},
|
||||
{"isAtBoundary", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_isAtBoundary), METH_NOARGS},
|
||||
{"isValid", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_isValid), METH_NOARGS},
|
||||
{"position", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_position), METH_NOARGS},
|
||||
{"setPosition", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_setPosition), METH_O},
|
||||
{"string", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_string), METH_NOARGS},
|
||||
{"toEnd", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_toEnd), METH_NOARGS},
|
||||
{"toNextBoundary", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_toNextBoundary), METH_NOARGS},
|
||||
{"toPreviousBoundary", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_toPreviousBoundary), METH_NOARGS},
|
||||
{"toStart", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_toStart), METH_NOARGS},
|
||||
{"type", reinterpret_cast<PyCFunction>(Sbk_Katie_QTextBoundaryFinderFunc_type), METH_NOARGS},
|
||||
|
||||
{nullptr, nullptr} // Sentinel
|
||||
};
|
||||
|
||||
} // extern "C"
|
||||
|
||||
static int Sbk_Katie_QTextBoundaryFinder_traverse(PyObject* self, visitproc visit, void* arg)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_traverse(self, visit, arg);
|
||||
}
|
||||
static int Sbk_Katie_QTextBoundaryFinder_clear(PyObject* self)
|
||||
{
|
||||
return reinterpret_cast<PyTypeObject *>(SbkObject_TypeF())->tp_clear(self);
|
||||
}
|
||||
// Class Definition -----------------------------------------------
|
||||
extern "C" {
|
||||
static SbkObjectType *_Sbk_Katie_QTextBoundaryFinder_Type = nullptr;
|
||||
static SbkObjectType *Sbk_Katie_QTextBoundaryFinder_TypeF(void)
|
||||
{
|
||||
return _Sbk_Katie_QTextBoundaryFinder_Type;
|
||||
}
|
||||
|
||||
static PyType_Slot Sbk_Katie_QTextBoundaryFinder_slots[] = {
|
||||
{Py_tp_base, nullptr}, // inserted by introduceWrapperType
|
||||
{Py_tp_dealloc, reinterpret_cast<void*>(&SbkDeallocWrapper)},
|
||||
{Py_tp_repr, nullptr},
|
||||
{Py_tp_hash, nullptr},
|
||||
{Py_tp_call, nullptr},
|
||||
{Py_tp_str, nullptr},
|
||||
{Py_tp_getattro, nullptr},
|
||||
{Py_tp_setattro, nullptr},
|
||||
{Py_tp_traverse, reinterpret_cast<void*>(Sbk_Katie_QTextBoundaryFinder_traverse)},
|
||||
{Py_tp_clear, reinterpret_cast<void*>(Sbk_Katie_QTextBoundaryFinder_clear)},
|
||||
{Py_tp_richcompare, nullptr},
|
||||
{Py_tp_iter, nullptr},
|
||||
{Py_tp_iternext, nullptr},
|
||||
{Py_tp_methods, reinterpret_cast<void*>(Sbk_Katie_QTextBoundaryFinder_methods)},
|
||||
{Py_tp_getset, nullptr},
|
||||
{Py_tp_init, reinterpret_cast<void*>(Sbk_Katie_QTextBoundaryFinder_Init)},
|
||||
{Py_tp_new, reinterpret_cast<void*>(SbkObjectTpNew)},
|
||||
{0, nullptr}
|
||||
};
|
||||
static PyType_Spec Sbk_Katie_QTextBoundaryFinder_spec = {
|
||||
"KtCore.Katie.QTextBoundaryFinder",
|
||||
sizeof(SbkObject),
|
||||
0,
|
||||
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC,
|
||||
Sbk_Katie_QTextBoundaryFinder_slots
|
||||
};
|
||||
|
||||
} //extern "C"
|
||||
|
||||
|
||||
// Type conversion functions.
|
||||
|
||||
// Python to C++ enum conversion.
|
||||
static void Katie_QTextBoundaryFinder_BoundaryType_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryType(PyObject* pyIn, void* cppOut) {
|
||||
*reinterpret_cast<::Katie::QTextBoundaryFinder::BoundaryType*>(cppOut) =
|
||||
static_cast<::Katie::QTextBoundaryFinder::BoundaryType>(Shiboken::Enum::getValue(pyIn));
|
||||
|
||||
}
|
||||
static PythonToCppFunc is_Katie_QTextBoundaryFinder_BoundaryType_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryType_Convertible(PyObject* pyIn) {
|
||||
if (PyObject_TypeCheck(pyIn, SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX]))
|
||||
return Katie_QTextBoundaryFinder_BoundaryType_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryType;
|
||||
return {};
|
||||
}
|
||||
static PyObject* Katie_QTextBoundaryFinder_BoundaryType_CppToPython_Katie_QTextBoundaryFinder_BoundaryType(const void* cppIn) {
|
||||
const int castCppIn = int(*reinterpret_cast<const ::Katie::QTextBoundaryFinder::BoundaryType *>(cppIn));
|
||||
return Shiboken::Enum::newItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX], castCppIn);
|
||||
|
||||
}
|
||||
|
||||
static void Katie_QTextBoundaryFinder_BoundaryReason_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryReason(PyObject* pyIn, void* cppOut) {
|
||||
*reinterpret_cast<::Katie::QTextBoundaryFinder::BoundaryReason*>(cppOut) =
|
||||
static_cast<::Katie::QTextBoundaryFinder::BoundaryReason>(Shiboken::Enum::getValue(pyIn));
|
||||
|
||||
}
|
||||
static PythonToCppFunc is_Katie_QTextBoundaryFinder_BoundaryReason_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryReason_Convertible(PyObject* pyIn) {
|
||||
if (PyObject_TypeCheck(pyIn, SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX]))
|
||||
return Katie_QTextBoundaryFinder_BoundaryReason_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryReason;
|
||||
return {};
|
||||
}
|
||||
static PyObject* Katie_QTextBoundaryFinder_BoundaryReason_CppToPython_Katie_QTextBoundaryFinder_BoundaryReason(const void* cppIn) {
|
||||
const int castCppIn = int(*reinterpret_cast<const ::Katie::QTextBoundaryFinder::BoundaryReason *>(cppIn));
|
||||
return Shiboken::Enum::newItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX], castCppIn);
|
||||
|
||||
}
|
||||
|
||||
// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity).
|
||||
static void QTextBoundaryFinder_PythonToCpp_QTextBoundaryFinder_PTR(PyObject* pyIn, void* cppOut) {
|
||||
Shiboken::Conversions::pythonToCppPointer(Sbk_Katie_QTextBoundaryFinder_TypeF(), pyIn, cppOut);
|
||||
}
|
||||
static PythonToCppFunc is_QTextBoundaryFinder_PythonToCpp_QTextBoundaryFinder_PTR_Convertible(PyObject* pyIn) {
|
||||
if (pyIn == Py_None)
|
||||
return Shiboken::Conversions::nonePythonToCppNullPtr;
|
||||
if (PyObject_TypeCheck(pyIn, reinterpret_cast<PyTypeObject*>(Sbk_Katie_QTextBoundaryFinder_TypeF())))
|
||||
return QTextBoundaryFinder_PythonToCpp_QTextBoundaryFinder_PTR;
|
||||
return {};
|
||||
}
|
||||
|
||||
// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity).
|
||||
static PyObject* QTextBoundaryFinder_PTR_CppToPython_QTextBoundaryFinder(const void* cppIn) {
|
||||
auto pyOut = reinterpret_cast<PyObject*>(Shiboken::BindingManager::instance().retrieveWrapper(cppIn));
|
||||
if (pyOut) {
|
||||
Py_INCREF(pyOut);
|
||||
return pyOut;
|
||||
}
|
||||
bool changedTypeName = false;
|
||||
auto tCppIn = reinterpret_cast<const ::Katie::QTextBoundaryFinder *>(cppIn);
|
||||
const char *typeName = typeid(*tCppIn).name();
|
||||
auto sbkType = Shiboken::ObjectType::typeForTypeName(typeName);
|
||||
if (sbkType && Shiboken::ObjectType::hasSpecialCastFunction(sbkType)) {
|
||||
typeName = typeNameOf(tCppIn);
|
||||
changedTypeName = true;
|
||||
}
|
||||
PyObject *result = Shiboken::Object::newObject(Sbk_Katie_QTextBoundaryFinder_TypeF(), const_cast<void*>(cppIn), false, /* exactType */ changedTypeName, typeName);
|
||||
if (changedTypeName)
|
||||
delete [] typeName;
|
||||
return result;
|
||||
}
|
||||
|
||||
// The signatures string for the functions.
|
||||
// Multiple signatures have their index "n:" in front.
|
||||
static const char *Katie_QTextBoundaryFinder_SignatureStrings[] = {
|
||||
"3:KtCore.Katie.QTextBoundaryFinder()",
|
||||
"2:KtCore.Katie.QTextBoundaryFinder(type:KtCore.Katie.QTextBoundaryFinder.BoundaryType,chars:KtCore.Katie.QChar,length:int)",
|
||||
"1:KtCore.Katie.QTextBoundaryFinder(type:KtCore.Katie.QTextBoundaryFinder.BoundaryType,string:KtCore.Katie.QString)",
|
||||
"0:KtCore.Katie.QTextBoundaryFinder(other:KtCore.Katie.QTextBoundaryFinder)",
|
||||
"KtCore.Katie.QTextBoundaryFinder.boundaryReasons()->Katie.QTextBoundaryFinder.BoundaryReasons",
|
||||
"KtCore.Katie.QTextBoundaryFinder.isAtBoundary()->bool",
|
||||
"KtCore.Katie.QTextBoundaryFinder.isValid()->bool",
|
||||
"KtCore.Katie.QTextBoundaryFinder.position()->int",
|
||||
"KtCore.Katie.QTextBoundaryFinder.setPosition(position:int)",
|
||||
"KtCore.Katie.QTextBoundaryFinder.string()->KtCore.Katie.QString",
|
||||
"KtCore.Katie.QTextBoundaryFinder.toEnd()",
|
||||
"KtCore.Katie.QTextBoundaryFinder.toNextBoundary()->int",
|
||||
"KtCore.Katie.QTextBoundaryFinder.toPreviousBoundary()->int",
|
||||
"KtCore.Katie.QTextBoundaryFinder.toStart()",
|
||||
"KtCore.Katie.QTextBoundaryFinder.type()->KtCore.Katie.QTextBoundaryFinder.BoundaryType",
|
||||
nullptr}; // Sentinel
|
||||
|
||||
void init_Katie_QTextBoundaryFinder(PyObject* module)
|
||||
{
|
||||
_Sbk_Katie_QTextBoundaryFinder_Type = Shiboken::ObjectType::introduceWrapperType(
|
||||
module,
|
||||
"QTextBoundaryFinder",
|
||||
"Katie::QTextBoundaryFinder*",
|
||||
&Sbk_Katie_QTextBoundaryFinder_spec,
|
||||
Katie_QTextBoundaryFinder_SignatureStrings,
|
||||
&Shiboken::callCppDestructor< ::Katie::QTextBoundaryFinder >,
|
||||
0,
|
||||
0,
|
||||
0 );
|
||||
|
||||
SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX]
|
||||
= reinterpret_cast<PyTypeObject*>(Sbk_Katie_QTextBoundaryFinder_TypeF());
|
||||
|
||||
// Register Converter
|
||||
SbkConverter* converter = Shiboken::Conversions::createConverter(Sbk_Katie_QTextBoundaryFinder_TypeF(),
|
||||
QTextBoundaryFinder_PythonToCpp_QTextBoundaryFinder_PTR,
|
||||
is_QTextBoundaryFinder_PythonToCpp_QTextBoundaryFinder_PTR_Convertible,
|
||||
QTextBoundaryFinder_PTR_CppToPython_QTextBoundaryFinder);
|
||||
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QTextBoundaryFinder");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QTextBoundaryFinder*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QTextBoundaryFinder&");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QTextBoundaryFinder");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QTextBoundaryFinder*");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QTextBoundaryFinder&");
|
||||
Shiboken::Conversions::registerConverterName(converter, typeid(::Katie::QTextBoundaryFinder).name());
|
||||
|
||||
|
||||
// Initialization of enums.
|
||||
|
||||
// Initialization of enum 'BoundaryType'.
|
||||
SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX] = Shiboken::Enum::createScopedEnum(Sbk_Katie_QTextBoundaryFinder_TypeF(),
|
||||
"BoundaryType",
|
||||
"KtCore.Katie.QTextBoundaryFinder.BoundaryType",
|
||||
"Katie::QTextBoundaryFinder::BoundaryType");
|
||||
if (!SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX])
|
||||
return;
|
||||
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "Grapheme", (long) Katie::QTextBoundaryFinder::BoundaryType::Grapheme))
|
||||
return;
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "Word", (long) Katie::QTextBoundaryFinder::BoundaryType::Word))
|
||||
return;
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "Line", (long) Katie::QTextBoundaryFinder::BoundaryType::Line))
|
||||
return;
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "Sentence", (long) Katie::QTextBoundaryFinder::BoundaryType::Sentence))
|
||||
return;
|
||||
// Register converter for enum 'Katie::QTextBoundaryFinder::BoundaryType'.
|
||||
{
|
||||
SbkConverter* converter = Shiboken::Conversions::createConverter(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX],
|
||||
Katie_QTextBoundaryFinder_BoundaryType_CppToPython_Katie_QTextBoundaryFinder_BoundaryType);
|
||||
Shiboken::Conversions::addPythonToCppValueConversion(converter,
|
||||
Katie_QTextBoundaryFinder_BoundaryType_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryType,
|
||||
is_Katie_QTextBoundaryFinder_BoundaryType_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryType_Convertible);
|
||||
Shiboken::Enum::setTypeConverter(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX], converter);
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QTextBoundaryFinder::BoundaryType");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QTextBoundaryFinder::BoundaryType");
|
||||
Shiboken::Conversions::registerConverterName(converter, "BoundaryType");
|
||||
}
|
||||
// End of 'BoundaryType' enum.
|
||||
|
||||
// Initialization of enum 'BoundaryReason'.
|
||||
SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX] = Shiboken::Enum::createScopedEnum(Sbk_Katie_QTextBoundaryFinder_TypeF(),
|
||||
"BoundaryReason",
|
||||
"KtCore.Katie.QTextBoundaryFinder.BoundaryReason",
|
||||
"Katie::QTextBoundaryFinder::BoundaryReason");
|
||||
if (!SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX])
|
||||
return;
|
||||
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "NotAtBoundary", (long) Katie::QTextBoundaryFinder::BoundaryReason::NotAtBoundary))
|
||||
return;
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "StartWord", (long) Katie::QTextBoundaryFinder::BoundaryReason::StartWord))
|
||||
return;
|
||||
if (!Shiboken::Enum::createScopedEnumItem(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX],
|
||||
Sbk_Katie_QTextBoundaryFinder_TypeF(), "EndWord", (long) Katie::QTextBoundaryFinder::BoundaryReason::EndWord))
|
||||
return;
|
||||
// Register converter for enum 'Katie::QTextBoundaryFinder::BoundaryReason'.
|
||||
{
|
||||
SbkConverter* converter = Shiboken::Conversions::createConverter(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX],
|
||||
Katie_QTextBoundaryFinder_BoundaryReason_CppToPython_Katie_QTextBoundaryFinder_BoundaryReason);
|
||||
Shiboken::Conversions::addPythonToCppValueConversion(converter,
|
||||
Katie_QTextBoundaryFinder_BoundaryReason_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryReason,
|
||||
is_Katie_QTextBoundaryFinder_BoundaryReason_PythonToCpp_Katie_QTextBoundaryFinder_BoundaryReason_Convertible);
|
||||
Shiboken::Enum::setTypeConverter(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX], converter);
|
||||
Shiboken::Conversions::registerConverterName(converter, "Katie::QTextBoundaryFinder::BoundaryReason");
|
||||
Shiboken::Conversions::registerConverterName(converter, "QTextBoundaryFinder::BoundaryReason");
|
||||
Shiboken::Conversions::registerConverterName(converter, "BoundaryReason");
|
||||
}
|
||||
// End of 'BoundaryReason' enum.
|
||||
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_KATIE_QTEXTBOUNDARYFINDER_H
|
||||
#define SBK_KATIE_QTEXTBOUNDARYFINDER_H
|
||||
|
||||
#include <qtextboundaryfinder.h>
|
||||
|
||||
#endif // SBK_KATIE_QTEXTBOUNDARYFINDER_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,77 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SBK_QVARIANTWRAPPER_H
|
||||
#define SBK_QVARIANTWRAPPER_H
|
||||
|
||||
#include <qvariant.h>
|
||||
|
||||
class QVariantWrapper : public Katie::QVariant
|
||||
{
|
||||
public:
|
||||
QVariantWrapper();
|
||||
QVariantWrapper(Katie::QVariant::Type type);
|
||||
QVariantWrapper(bool b);
|
||||
QVariantWrapper(const Katie::QByteArray & bytearray);
|
||||
QVariantWrapper(const Katie::QChar & qchar);
|
||||
QVariantWrapper(const Katie::QLatin1String & string);
|
||||
QVariantWrapper(const Katie::QRegExp & regExp);
|
||||
QVariantWrapper(const Katie::QString & string);
|
||||
QVariantWrapper(const Katie::QStringList & stringlist);
|
||||
QVariantWrapper(const Katie::QVariant& self) : Katie::QVariant(self)
|
||||
{
|
||||
}
|
||||
|
||||
QVariantWrapper(const char * str);
|
||||
QVariantWrapper(double d);
|
||||
QVariantWrapper(float f);
|
||||
QVariantWrapper(int i);
|
||||
QVariantWrapper(int typeOrUserType, const void * copy);
|
||||
QVariantWrapper(int typeOrUserType, const void * copy, uint flags);
|
||||
QVariantWrapper(long long ll);
|
||||
QVariantWrapper(uint ui);
|
||||
QVariantWrapper(unsigned long long ull);
|
||||
inline bool cmp_protected(const Katie::QVariant & other) const { return Katie::QVariant::cmp(other); }
|
||||
inline void create_protected(int type, const void * copy) { Katie::QVariant::create(type, copy); }
|
||||
~QVariantWrapper();
|
||||
};
|
||||
|
||||
#endif // SBK_QVARIANTWRAPPER_H
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,291 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
** Copyright (C) 2016-2019 Ivailo Monev
|
||||
**
|
||||
** This file is part of the FOO module of the Katie Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||
** contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef SBK_KTCORE_PYTHON_H
|
||||
#define SBK_KTCORE_PYTHON_H
|
||||
|
||||
#include <sbkpython.h>
|
||||
#include <sbkconverter.h>
|
||||
// Binded library includes
|
||||
#include <qchar.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qstring.h>
|
||||
#include <qregexp.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qobject.h>
|
||||
#include <qglobal.h>
|
||||
#include <qnamespace.h>
|
||||
#include <qtextboundaryfinder.h>
|
||||
#include <qvariant.h>
|
||||
// Conversion Includes - Primitive Types
|
||||
|
||||
// Conversion Includes - Container Types
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// Type indices
|
||||
enum : int {
|
||||
SBK_KATIE_QBYTEARRAY_IDX = 0,
|
||||
SBK_KATIE_QCHAR_IDX = 1,
|
||||
SBK_KATIE_QCHAR_SPECIALCHARACTER_IDX = 7,
|
||||
SBK_KATIE_QCHAR_CATEGORY_IDX = 2,
|
||||
SBK_KATIE_QCHAR_DIRECTION_IDX = 5,
|
||||
SBK_KATIE_QCHAR_DECOMPOSITION_IDX = 4,
|
||||
SBK_KATIE_QCHAR_JOINING_IDX = 6,
|
||||
SBK_KATIE_QCHAR_COMBININGCLASS_IDX = 3,
|
||||
SBK_KATIE_QCHAR_UNICODEVERSION_IDX = 8,
|
||||
SBK_KATIE_QCOREAPPLICATION_IDX = 9,
|
||||
SBK_KATIE_QCOREAPPLICATION_ENCODING_IDX = 10,
|
||||
SBK_KATIE_QLATIN1CHAR_IDX = 11,
|
||||
SBK_KATIE_QLATIN1STRING_IDX = 12,
|
||||
SBK_KATIE_QOBJECT_IDX = 13,
|
||||
SBK_KATIE_QREGEXP_IDX = 14,
|
||||
SBK_KATIE_QREGEXP_PATTERNSYNTAX_IDX = 16,
|
||||
SBK_KATIE_QREGEXP_CARETMODE_IDX = 15,
|
||||
SBK_KATIE_QSTRING_IDX = 17,
|
||||
SBK_KATIE_QSTRING_SECTIONFLAG_IDX = 19,
|
||||
SBK_KATIE_QSTRING_SPLITBEHAVIOR_IDX = 20,
|
||||
SBK_KATIE_QSTRING_NORMALIZATIONFORM_IDX = 18,
|
||||
SBK_KATIE_QSTRINGLIST_IDX = 21,
|
||||
SBK_KATIE_QTEXTBOUNDARYFINDER_IDX = 22,
|
||||
SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX = 24,
|
||||
SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX = 23,
|
||||
SBK_KATIE_QVARIANT_IDX = 25,
|
||||
SBK_KATIE_QVARIANT_TYPE_IDX = 26,
|
||||
SBK_KATIE_QTMSGTYPE_IDX = 97,
|
||||
SBK_KATIE_QT_GLOBALCOLOR_IDX = 57,
|
||||
SBK_KATIE_QT_KEYBOARDMODIFIER_IDX = 64,
|
||||
SBK_KATIE_QT_MODIFIER_IDX = 68,
|
||||
SBK_KATIE_QT_MOUSEBUTTON_IDX = 69,
|
||||
SBK_KATIE_QT_ORIENTATION_IDX = 71,
|
||||
SBK_KATIE_QT_FOCUSPOLICY_IDX = 52,
|
||||
SBK_KATIE_QT_SORTORDER_IDX = 79,
|
||||
SBK_KATIE_QT_TILERULE_IDX = 84,
|
||||
SBK_KATIE_QT_ALIGNMENTFLAG_IDX = 27,
|
||||
SBK_KATIE_QT_TEXTFLAG_IDX = 81,
|
||||
SBK_KATIE_QT_TEXTELIDEMODE_IDX = 80,
|
||||
SBK_KATIE_QT_WINDOWTYPE_IDX = 96,
|
||||
SBK_KATIE_QT_WINDOWSTATE_IDX = 95,
|
||||
SBK_KATIE_QT_WIDGETATTRIBUTE_IDX = 92,
|
||||
SBK_KATIE_QT_APPLICATIONATTRIBUTE_IDX = 30,
|
||||
SBK_KATIE_QT_IMAGECONVERSIONFLAG_IDX = 58,
|
||||
SBK_KATIE_QT_BGMODE_IDX = 34,
|
||||
SBK_KATIE_QT_KEY_IDX = 63,
|
||||
SBK_KATIE_QT_ARROWTYPE_IDX = 31,
|
||||
SBK_KATIE_QT_PENSTYLE_IDX = 74,
|
||||
SBK_KATIE_QT_PENCAPSTYLE_IDX = 72,
|
||||
SBK_KATIE_QT_PENJOINSTYLE_IDX = 73,
|
||||
SBK_KATIE_QT_BRUSHSTYLE_IDX = 35,
|
||||
SBK_KATIE_QT_SIZEMODE_IDX = 78,
|
||||
SBK_KATIE_QT_UIEFFECT_IDX = 91,
|
||||
SBK_KATIE_QT_CURSORSHAPE_IDX = 44,
|
||||
SBK_KATIE_QT_TEXTFORMAT_IDX = 82,
|
||||
SBK_KATIE_QT_ASPECTRATIOMODE_IDX = 32,
|
||||
SBK_KATIE_QT_ANCHORATTRIBUTE_IDX = 28,
|
||||
SBK_KATIE_QT_DOCKWIDGETAREA_IDX = 47,
|
||||
SBK_KATIE_QT_DOCKWIDGETAREASIZES_IDX = 48,
|
||||
SBK_KATIE_QT_TOOLBARAREA_IDX = 86,
|
||||
SBK_KATIE_QT_TOOLBARAREASIZES_IDX = 87,
|
||||
SBK_KATIE_QT_DATEFORMAT_IDX = 45,
|
||||
SBK_KATIE_QT_TIMESPEC_IDX = 85,
|
||||
SBK_KATIE_QT_DAYOFWEEK_IDX = 46,
|
||||
SBK_KATIE_QT_SCROLLBARPOLICY_IDX = 75,
|
||||
SBK_KATIE_QT_CASESENSITIVITY_IDX = 36,
|
||||
SBK_KATIE_QT_CORNER_IDX = 42,
|
||||
SBK_KATIE_QT_CONNECTIONTYPE_IDX = 39,
|
||||
SBK_KATIE_QT_SHORTCUTCONTEXT_IDX = 76,
|
||||
SBK_KATIE_QT_FILLRULE_IDX = 51,
|
||||
SBK_KATIE_QT_MASKMODE_IDX = 66,
|
||||
SBK_KATIE_QT_CLIPOPERATION_IDX = 38,
|
||||
SBK_KATIE_QT_ITEMSELECTIONMODE_IDX = 62,
|
||||
SBK_KATIE_QT_TRANSFORMATIONMODE_IDX = 90,
|
||||
SBK_KATIE_QT_AXIS_IDX = 33,
|
||||
SBK_KATIE_QT_FOCUSREASON_IDX = 53,
|
||||
SBK_KATIE_QT_CONTEXTMENUPOLICY_IDX = 40,
|
||||
SBK_KATIE_QT_TOOLBUTTONSTYLE_IDX = 88,
|
||||
SBK_KATIE_QT_LAYOUTDIRECTION_IDX = 65,
|
||||
SBK_KATIE_QT_ANCHORPOINT_IDX = 29,
|
||||
SBK_KATIE_QT_DROPACTION_IDX = 49,
|
||||
SBK_KATIE_QT_CHECKSTATE_IDX = 37,
|
||||
SBK_KATIE_QT_ITEMDATAROLE_IDX = 60,
|
||||
SBK_KATIE_QT_ITEMFLAG_IDX = 61,
|
||||
SBK_KATIE_QT_MATCHFLAG_IDX = 67,
|
||||
SBK_KATIE_QT_WINDOWMODALITY_IDX = 94,
|
||||
SBK_KATIE_QT_TEXTINTERACTIONFLAG_IDX = 83,
|
||||
SBK_KATIE_QT_EVENTPRIORITY_IDX = 50,
|
||||
SBK_KATIE_QT_SIZEHINT_IDX = 77,
|
||||
SBK_KATIE_QT_WINDOWFRAMESECTION_IDX = 93,
|
||||
SBK_KATIE_QT_INITIALIZATION_IDX = 59,
|
||||
SBK_KATIE_QT_COORDINATESYSTEM_IDX = 41,
|
||||
SBK_KATIE_QT_TOUCHPOINTSTATE_IDX = 89,
|
||||
SBK_KATIE_QT_GESTURESTATE_IDX = 55,
|
||||
SBK_KATIE_QT_GESTURETYPE_IDX = 56,
|
||||
SBK_KATIE_QT_GESTUREFLAG_IDX = 54,
|
||||
SBK_KATIE_QT_NAVIGATIONMODE_IDX = 70,
|
||||
SBK_KATIE_QT_CURSORMOVESTYLE_IDX = 43,
|
||||
SBK_KtCore_IDX_COUNT = 98
|
||||
};
|
||||
// This variable stores all Python types exported by this module.
|
||||
extern PyTypeObject** SbkKtCoreTypes;
|
||||
|
||||
// This variable stores the Python module object exported by this module.
|
||||
extern PyObject* SbkKtCoreModuleObject;
|
||||
|
||||
// This variable stores all type converters exported by this module.
|
||||
extern SbkConverter** SbkKtCoreTypeConverters;
|
||||
|
||||
// Converter indices
|
||||
enum : int {
|
||||
SBK_KtCore_CONVERTERS_IDX_COUNT = 1
|
||||
};
|
||||
// Macros for type check
|
||||
|
||||
namespace Shiboken
|
||||
{
|
||||
|
||||
// PyType functions, to get the PyObjectType for a type T
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QtMsgType >() { return SbkKtCoreTypes[SBK_KATIE_QTMSGTYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::GlobalColor >() { return SbkKtCoreTypes[SBK_KATIE_QT_GLOBALCOLOR_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::KeyboardModifier >() { return SbkKtCoreTypes[SBK_KATIE_QT_KEYBOARDMODIFIER_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Modifier >() { return SbkKtCoreTypes[SBK_KATIE_QT_MODIFIER_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::MouseButton >() { return SbkKtCoreTypes[SBK_KATIE_QT_MOUSEBUTTON_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Orientation >() { return SbkKtCoreTypes[SBK_KATIE_QT_ORIENTATION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::FocusPolicy >() { return SbkKtCoreTypes[SBK_KATIE_QT_FOCUSPOLICY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::SortOrder >() { return SbkKtCoreTypes[SBK_KATIE_QT_SORTORDER_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TileRule >() { return SbkKtCoreTypes[SBK_KATIE_QT_TILERULE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::AlignmentFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_ALIGNMENTFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TextFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_TEXTFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TextElideMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_TEXTELIDEMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::WindowType >() { return SbkKtCoreTypes[SBK_KATIE_QT_WINDOWTYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::WindowState >() { return SbkKtCoreTypes[SBK_KATIE_QT_WINDOWSTATE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::WidgetAttribute >() { return SbkKtCoreTypes[SBK_KATIE_QT_WIDGETATTRIBUTE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ApplicationAttribute >() { return SbkKtCoreTypes[SBK_KATIE_QT_APPLICATIONATTRIBUTE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ImageConversionFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_IMAGECONVERSIONFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::BGMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_BGMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Key >() { return SbkKtCoreTypes[SBK_KATIE_QT_KEY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ArrowType >() { return SbkKtCoreTypes[SBK_KATIE_QT_ARROWTYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::PenStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_PENSTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::PenCapStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_PENCAPSTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::PenJoinStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_PENJOINSTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::BrushStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_BRUSHSTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::SizeMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_SIZEMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::UIEffect >() { return SbkKtCoreTypes[SBK_KATIE_QT_UIEFFECT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::CursorShape >() { return SbkKtCoreTypes[SBK_KATIE_QT_CURSORSHAPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TextFormat >() { return SbkKtCoreTypes[SBK_KATIE_QT_TEXTFORMAT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::AspectRatioMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_ASPECTRATIOMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::AnchorAttribute >() { return SbkKtCoreTypes[SBK_KATIE_QT_ANCHORATTRIBUTE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::DockWidgetArea >() { return SbkKtCoreTypes[SBK_KATIE_QT_DOCKWIDGETAREA_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::DockWidgetAreaSizes >() { return SbkKtCoreTypes[SBK_KATIE_QT_DOCKWIDGETAREASIZES_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ToolBarArea >() { return SbkKtCoreTypes[SBK_KATIE_QT_TOOLBARAREA_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ToolBarAreaSizes >() { return SbkKtCoreTypes[SBK_KATIE_QT_TOOLBARAREASIZES_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::DateFormat >() { return SbkKtCoreTypes[SBK_KATIE_QT_DATEFORMAT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TimeSpec >() { return SbkKtCoreTypes[SBK_KATIE_QT_TIMESPEC_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::DayOfWeek >() { return SbkKtCoreTypes[SBK_KATIE_QT_DAYOFWEEK_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ScrollBarPolicy >() { return SbkKtCoreTypes[SBK_KATIE_QT_SCROLLBARPOLICY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::CaseSensitivity >() { return SbkKtCoreTypes[SBK_KATIE_QT_CASESENSITIVITY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Corner >() { return SbkKtCoreTypes[SBK_KATIE_QT_CORNER_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ConnectionType >() { return SbkKtCoreTypes[SBK_KATIE_QT_CONNECTIONTYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ShortcutContext >() { return SbkKtCoreTypes[SBK_KATIE_QT_SHORTCUTCONTEXT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::FillRule >() { return SbkKtCoreTypes[SBK_KATIE_QT_FILLRULE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::MaskMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_MASKMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ClipOperation >() { return SbkKtCoreTypes[SBK_KATIE_QT_CLIPOPERATION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ItemSelectionMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_ITEMSELECTIONMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TransformationMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_TRANSFORMATIONMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Axis >() { return SbkKtCoreTypes[SBK_KATIE_QT_AXIS_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::FocusReason >() { return SbkKtCoreTypes[SBK_KATIE_QT_FOCUSREASON_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ContextMenuPolicy >() { return SbkKtCoreTypes[SBK_KATIE_QT_CONTEXTMENUPOLICY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ToolButtonStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_TOOLBUTTONSTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::LayoutDirection >() { return SbkKtCoreTypes[SBK_KATIE_QT_LAYOUTDIRECTION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::AnchorPoint >() { return SbkKtCoreTypes[SBK_KATIE_QT_ANCHORPOINT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::DropAction >() { return SbkKtCoreTypes[SBK_KATIE_QT_DROPACTION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::CheckState >() { return SbkKtCoreTypes[SBK_KATIE_QT_CHECKSTATE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ItemDataRole >() { return SbkKtCoreTypes[SBK_KATIE_QT_ITEMDATAROLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::ItemFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_ITEMFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::MatchFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_MATCHFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::WindowModality >() { return SbkKtCoreTypes[SBK_KATIE_QT_WINDOWMODALITY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TextInteractionFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_TEXTINTERACTIONFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::EventPriority >() { return SbkKtCoreTypes[SBK_KATIE_QT_EVENTPRIORITY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::SizeHint >() { return SbkKtCoreTypes[SBK_KATIE_QT_SIZEHINT_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::WindowFrameSection >() { return SbkKtCoreTypes[SBK_KATIE_QT_WINDOWFRAMESECTION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::Initialization >() { return SbkKtCoreTypes[SBK_KATIE_QT_INITIALIZATION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::CoordinateSystem >() { return SbkKtCoreTypes[SBK_KATIE_QT_COORDINATESYSTEM_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::TouchPointState >() { return SbkKtCoreTypes[SBK_KATIE_QT_TOUCHPOINTSTATE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::GestureState >() { return SbkKtCoreTypes[SBK_KATIE_QT_GESTURESTATE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::GestureType >() { return SbkKtCoreTypes[SBK_KATIE_QT_GESTURETYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::GestureFlag >() { return SbkKtCoreTypes[SBK_KATIE_QT_GESTUREFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::NavigationMode >() { return SbkKtCoreTypes[SBK_KATIE_QT_NAVIGATIONMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::Qt::CursorMoveStyle >() { return SbkKtCoreTypes[SBK_KATIE_QT_CURSORMOVESTYLE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QByteArray >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QBYTEARRAY_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::SpecialCharacter >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_SPECIALCHARACTER_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::Category >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_CATEGORY_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::Direction >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_DIRECTION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::Decomposition >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_DECOMPOSITION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::Joining >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_JOINING_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::CombiningClass >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_COMBININGCLASS_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar::UnicodeVersion >() { return SbkKtCoreTypes[SBK_KATIE_QCHAR_UNICODEVERSION_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QChar >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QCHAR_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QCoreApplication::Encoding >() { return SbkKtCoreTypes[SBK_KATIE_QCOREAPPLICATION_ENCODING_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QCoreApplication >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QCOREAPPLICATION_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QLatin1Char >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QLATIN1CHAR_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QLatin1String >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QLATIN1STRING_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QObject >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QOBJECT_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QRegExp::PatternSyntax >() { return SbkKtCoreTypes[SBK_KATIE_QREGEXP_PATTERNSYNTAX_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QRegExp::CaretMode >() { return SbkKtCoreTypes[SBK_KATIE_QREGEXP_CARETMODE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QRegExp >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QREGEXP_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QString::SectionFlag >() { return SbkKtCoreTypes[SBK_KATIE_QSTRING_SECTIONFLAG_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QString::SplitBehavior >() { return SbkKtCoreTypes[SBK_KATIE_QSTRING_SPLITBEHAVIOR_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QString::NormalizationForm >() { return SbkKtCoreTypes[SBK_KATIE_QSTRING_NORMALIZATIONFORM_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QString >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QSTRING_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QStringList >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QSTRINGLIST_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QTextBoundaryFinder::BoundaryType >() { return SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYTYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QTextBoundaryFinder::BoundaryReason >() { return SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_BOUNDARYREASON_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QTextBoundaryFinder >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QTEXTBOUNDARYFINDER_IDX]); }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QVariant::Type >() { return SbkKtCoreTypes[SBK_KATIE_QVARIANT_TYPE_IDX]; }
|
||||
template<> inline PyTypeObject* SbkType< ::Katie::QVariant >() { return reinterpret_cast<PyTypeObject*>(SbkKtCoreTypes[SBK_KATIE_QVARIANT_IDX]); }
|
||||
|
||||
} // namespace Shiboken
|
||||
|
||||
#endif // SBK_KTCORE_PYTHON_H
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef PYKTCORE_GLOBAL_H
|
||||
#define PYKTCORE_GLOBAL_H
|
||||
|
||||
#include <shiboken2/shiboken.h>
|
||||
|
||||
#include <QtCore/QtCore>
|
||||
|
||||
#endif // PYKTCORE_GLOBAL_H
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys, KtCore
|
||||
|
||||
a = KtCore.QCoreApplication(0, None)
|
||||
sys.exit(a._exec())
|
|
@ -1,302 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<typesystem package="KtCore">
|
||||
|
||||
<primitive-type name="bool"/>
|
||||
<primitive-type name="int"/>
|
||||
<primitive-type name="uint"/>
|
||||
<primitive-type name="unsigned int"/>
|
||||
<primitive-type name="double"/>
|
||||
<primitive-type name="float"/>
|
||||
<primitive-type name="long"/>
|
||||
<primitive-type name="ulong"/>
|
||||
<primitive-type name="longlong"/>
|
||||
<primitive-type name="long long"/>
|
||||
<primitive-type name="ulonglong"/>
|
||||
<primitive-type name="unsigned long long"/>
|
||||
<primitive-type name="short"/>
|
||||
<primitive-type name="ushort"/>
|
||||
<primitive-type name="char"/>
|
||||
<primitive-type name="uchar"/>
|
||||
<primitive-type name="unsigned char"/>
|
||||
<primitive-type name="pid_t"/>
|
||||
<primitive-type name="size_t"/>
|
||||
<primitive-type name="int64_t"/>
|
||||
<primitive-type name="mode_t"/>
|
||||
<primitive-type name="time_t"/>
|
||||
<primitive-type name="std::string"/>
|
||||
|
||||
<primitive-type name="qint64"/>
|
||||
<primitive-type name="qlonglong"/>
|
||||
|
||||
<template name="cpplist_to_pylist_convertion">
|
||||
PyObject* %out = PyList_New((int) %in.size());
|
||||
%INTYPE::const_iterator it = %in.begin();
|
||||
for (int idx = 0; it != %in.end(); ++it, ++idx) {
|
||||
%INTYPE_0 cppItem(*it);
|
||||
PyList_SET_ITEM(%out, idx, %CONVERTTOPYTHON[%INTYPE_0](cppItem));
|
||||
}
|
||||
return %out;
|
||||
</template>
|
||||
|
||||
<template name="pyseq_to_cpplist_convertion">
|
||||
Shiboken::AutoDecRef seq(PySequence_Fast(%in, 0));
|
||||
for (int i = 0; i < PySequence_Fast_GET_SIZE(seq.object()); i++) {
|
||||
PyObject* pyItem = PySequence_Fast_GET_ITEM(seq.object(), i);
|
||||
%OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem);
|
||||
%out.push_back(cppItem);
|
||||
}
|
||||
</template>
|
||||
|
||||
<template name="cppvector_to_pylist_convertion">
|
||||
PyObject* %out = PyList_New((int) %in.size());
|
||||
%INTYPE::const_iterator it = %in.begin();
|
||||
for (int idx = 0; it != %in.end(); ++it, ++idx) {
|
||||
%INTYPE_0 cppItem(*it);
|
||||
PyList_SET_ITEM(%out, idx, %CONVERTTOPYTHON[%INTYPE_0](cppItem));
|
||||
}
|
||||
return %out;
|
||||
</template>
|
||||
|
||||
<template name="pyseq_to_cppvector_convertion">
|
||||
Shiboken::AutoDecRef seq(PySequence_Fast(%in, 0));
|
||||
for (int i = 0; i < PySequence_Fast_GET_SIZE(seq.object()); i++) {
|
||||
PyObject* pyItem = PySequence_Fast_GET_ITEM(seq.object(), i);
|
||||
%OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem);
|
||||
%out.push_back(cppItem);
|
||||
}
|
||||
</template>
|
||||
|
||||
<template name="cppmap_to_pymap_conversion">
|
||||
PyObject *%out = PyDict_New();
|
||||
for (%INTYPE::const_iterator it = %in.begin(); it != %in.end(); ++it) {
|
||||
%INTYPE_0 key = it->first;
|
||||
%INTYPE_1 value = it->second;
|
||||
PyObject *pyKey = %CONVERTTOPYTHON[%INTYPE_0](key);
|
||||
PyObject *pyValue = %CONVERTTOPYTHON[%INTYPE_1](value);
|
||||
PyDict_SetItem(%out, pyKey, pyValue);
|
||||
Py_DECREF(pyKey);
|
||||
Py_DECREF(pyValue);
|
||||
}
|
||||
return %out;
|
||||
</template>
|
||||
|
||||
<template name="pydict_to_cppmap_conversion">
|
||||
PyObject *key;
|
||||
PyObject *value;
|
||||
Py_ssize_t pos = 0;
|
||||
while (PyDict_Next(%in, &pos, &key, &value)) {
|
||||
%OUTTYPE_0 cppKey = %CONVERTTOCPP[%OUTTYPE_0](key);
|
||||
%OUTTYPE_1 cppValue = %CONVERTTOCPP[%OUTTYPE_1](value);
|
||||
%out[cppKey] = cppValue;
|
||||
}
|
||||
</template>
|
||||
|
||||
<container-type name="std::list" type="list">
|
||||
<include file-name="list" location="global"/>
|
||||
<conversion-rule>
|
||||
<native-to-target>
|
||||
<insert-template name="cpplist_to_pylist_convertion"/>
|
||||
</native-to-target>
|
||||
<target-to-native>
|
||||
<add-conversion type="PySequence">
|
||||
<insert-template name="pyseq_to_cpplist_convertion"/>
|
||||
</add-conversion>
|
||||
</target-to-native>
|
||||
</conversion-rule>
|
||||
</container-type>
|
||||
|
||||
<container-type name="std::vector" type="vector">
|
||||
<include file-name="vector" location="global"/>
|
||||
<conversion-rule>
|
||||
<native-to-target>
|
||||
<insert-template name="cppvector_to_pylist_convertion"/>
|
||||
</native-to-target>
|
||||
<target-to-native>
|
||||
<add-conversion type="PySequence">
|
||||
<insert-template name="pyseq_to_cppvector_convertion"/>
|
||||
</add-conversion>
|
||||
</target-to-native>
|
||||
</conversion-rule>
|
||||
</container-type>
|
||||
|
||||
<container-type name="std::map" type="map">
|
||||
<include file-name="map" location="global"/>
|
||||
<conversion-rule>
|
||||
<native-to-target>
|
||||
<insert-template name="cppmap_to_pymap_conversion"/>
|
||||
</native-to-target>
|
||||
<target-to-native>
|
||||
<add-conversion type="PyDict">
|
||||
<insert-template name="pydict_to_cppmap_conversion"/>
|
||||
</add-conversion>
|
||||
</target-to-native>
|
||||
</conversion-rule>
|
||||
</container-type>
|
||||
|
||||
<container-type name="std::pair" type="pair">
|
||||
<include file-name="utility" location="global"/>
|
||||
<conversion-rule>
|
||||
<native-to-target>
|
||||
PyObject *%out = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(%out, 0, %CONVERTTOPYTHON[%INTYPE_0](%in.first));
|
||||
PyTuple_SET_ITEM(%out, 1, %CONVERTTOPYTHON[%INTYPE_1](%in.second));
|
||||
return %out;
|
||||
</native-to-target>
|
||||
<target-to-native>
|
||||
<add-conversion type="PySequence">
|
||||
%out.first = %CONVERTTOCPP[%OUTTYPE_0](PySequence_Fast_GET_ITEM(%in, 0));
|
||||
%out.second = %CONVERTTOCPP[%OUTTYPE_1](PySequence_Fast_GET_ITEM(%in, 1));
|
||||
</add-conversion>
|
||||
</target-to-native>
|
||||
</conversion-rule>
|
||||
</container-type>
|
||||
|
||||
<!-- using generate="no" to avoid namespaced bindings, this puts types into module namespace -->
|
||||
<namespace-type name="Katie" generate="no">
|
||||
|
||||
<enum-type name="QtMsgType"/>
|
||||
|
||||
<namespace-type name="Qt" generate="no">
|
||||
<enum-type name="AlignmentFlag"/>
|
||||
<enum-type name="AnchorAttribute"/>
|
||||
<enum-type name="AnchorPoint"/>
|
||||
<enum-type name="ApplicationAttribute"/>
|
||||
<enum-type name="ArrowType"/>
|
||||
<enum-type name="AspectRatioMode"/>
|
||||
<enum-type name="Axis"/>
|
||||
<enum-type name="BGMode"/>
|
||||
<enum-type name="BrushStyle"/>
|
||||
<enum-type name="CaseSensitivity"/>
|
||||
<enum-type name="CheckState"/>
|
||||
<enum-type name="ClipOperation"/>
|
||||
<enum-type name="ConnectionType"/>
|
||||
<enum-type name="ContextMenuPolicy"/>
|
||||
<enum-type name="CoordinateSystem"/>
|
||||
<enum-type name="Corner"/>
|
||||
<enum-type name="CursorMoveStyle"/>
|
||||
<enum-type name="CursorShape"/>
|
||||
<enum-type name="DateFormat"/>
|
||||
<enum-type name="DayOfWeek"/>
|
||||
<enum-type name="DockWidgetArea"/>
|
||||
<enum-type name="DockWidgetAreaSizes"/>
|
||||
<enum-type name="DropAction"/>
|
||||
<enum-type name="EventPriority"/>
|
||||
<enum-type name="FillRule"/>
|
||||
<enum-type name="FocusPolicy"/>
|
||||
<enum-type name="FocusReason"/>
|
||||
<enum-type name="GestureFlag"/>
|
||||
<enum-type name="GestureState"/>
|
||||
<enum-type name="GestureType"/>
|
||||
<enum-type name="GlobalColor"/>
|
||||
<enum-type name="ImageConversionFlag"/>
|
||||
<enum-type name="Initialization"/>
|
||||
<enum-type name="ItemDataRole"/>
|
||||
<enum-type name="ItemFlag"/>
|
||||
<enum-type name="ItemSelectionMode"/>
|
||||
<enum-type name="Key"/>
|
||||
<enum-type name="KeyboardModifier"/>
|
||||
<enum-type name="LayoutDirection"/>
|
||||
<enum-type name="MaskMode"/>
|
||||
<enum-type name="MatchFlag"/>
|
||||
<enum-type name="Modifier"/>
|
||||
<enum-type name="MouseButton"/>
|
||||
<enum-type name="NavigationMode"/>
|
||||
<enum-type name="Orientation"/>
|
||||
<enum-type name="PenCapStyle"/>
|
||||
<enum-type name="PenJoinStyle"/>
|
||||
<enum-type name="PenStyle"/>
|
||||
<enum-type name="ScrollBarPolicy"/>
|
||||
<enum-type name="ShortcutContext"/>
|
||||
<enum-type name="SizeHint"/>
|
||||
<enum-type name="SizeMode"/>
|
||||
<enum-type name="SortOrder"/>
|
||||
<enum-type name="TextElideMode"/>
|
||||
<enum-type name="TextFlag"/>
|
||||
<enum-type name="TextFormat"/>
|
||||
<enum-type name="TextInteractionFlag"/>
|
||||
<enum-type name="TileRule"/>
|
||||
<enum-type name="TimeSpec"/>
|
||||
<enum-type name="ToolBarArea"/>
|
||||
<enum-type name="ToolBarAreaSizes"/>
|
||||
<enum-type name="ToolButtonStyle"/>
|
||||
<enum-type name="TouchPointState"/>
|
||||
<enum-type name="TransformationMode"/>
|
||||
<enum-type name="UIEffect"/>
|
||||
<enum-type name="WidgetAttribute"/>
|
||||
<enum-type name="WindowFrameSection"/>
|
||||
<enum-type name="WindowModality"/>
|
||||
<enum-type name="WindowState"/>
|
||||
<enum-type name="WindowType"/>
|
||||
</namespace-type>
|
||||
|
||||
<value-type name="QByteArray">
|
||||
</value-type>
|
||||
|
||||
<value-type name="QChar">
|
||||
<enum-type name="SpecialCharacter"/>
|
||||
<enum-type name="Category"/>
|
||||
<enum-type name="Direction"/>
|
||||
<enum-type name="Decomposition"/>
|
||||
<enum-type name="Joining"/>
|
||||
<enum-type name="CombiningClass"/>
|
||||
<enum-type name="UnicodeVersion"/>
|
||||
</value-type>
|
||||
|
||||
<object-type name="QCoreApplication">
|
||||
<enum-type name="Encoding"/>
|
||||
|
||||
<modify-function signature="QCoreApplication(int &, char**)">
|
||||
<modify-argument index="1">
|
||||
<remove-argument/>
|
||||
<conversion-rule class="native">
|
||||
int %out = PySequence_Size(%PYARG_1);
|
||||
</conversion-rule>
|
||||
</modify-argument>
|
||||
<modify-argument index="2">
|
||||
<replace-type modified-type="PySequence" />
|
||||
<conversion-rule class="native">
|
||||
Shiboken::AutoArrayPointer<char*> %out(%1);
|
||||
for (int i = 0; i < %1; ++i)
|
||||
%out[i] = %CONVERTTOCPP[char*](PySequence_Fast_GET_ITEM(%PYARG_1, i));
|
||||
</conversion-rule>
|
||||
</modify-argument>
|
||||
</modify-function>
|
||||
</object-type>
|
||||
|
||||
<object-type name="QLatin1Char">
|
||||
</object-type>
|
||||
|
||||
<value-type name="QLatin1String">
|
||||
</value-type>
|
||||
|
||||
<object-type name="QObject">
|
||||
</object-type>
|
||||
|
||||
<object-type name="QRegExp">
|
||||
<enum-type name="PatternSyntax"/>
|
||||
<enum-type name="CaretMode"/>
|
||||
</object-type>
|
||||
|
||||
<value-type name="QString">
|
||||
<enum-type name="SectionFlag"/>
|
||||
<!-- <primitive-type name="SectionFlags"/> -->
|
||||
<enum-type name="SplitBehavior"/>
|
||||
<enum-type name="NormalizationForm"/>
|
||||
</value-type>
|
||||
|
||||
<value-type name="QStringList">
|
||||
</value-type>
|
||||
|
||||
<object-type name="QTextBoundaryFinder">
|
||||
<enum-type name="BoundaryType"/>
|
||||
<enum-type name="BoundaryReason"/>
|
||||
<primitive-type name="BoundaryReasons"/>
|
||||
</object-type>
|
||||
|
||||
<value-type name="QVariant">
|
||||
<enum-type name="Type"/>
|
||||
</value-type>
|
||||
|
||||
</namespace-type>
|
||||
|
||||
</typesystem>
|
|
@ -1,86 +0,0 @@
|
|||
# - Try to find Shiboken
|
||||
# Once done this will define
|
||||
#
|
||||
# SHIBOKEN_FOUND - system has Shiboken
|
||||
# SHIBOKEN_INCLUDES - the Shiboken include directory
|
||||
# SHIBOKEN_LIBRARIES - the libraries needed to use Shiboken
|
||||
# SHIBOKEN_BINARY - the binary needed to use Shiboken
|
||||
# SHIBOKEN_VERSION - the Shiboken version
|
||||
#
|
||||
# Copyright (c) 2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(SHIBOKEN_INCLUDES AND SHIBOKEN_LIBRARIES AND SHIBOKEN_BINARY)
|
||||
set(SHIBOKEN_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_SHIBOKEN QUIET shiboken2)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=includedir shiboken2
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE pkg_result
|
||||
ERROR_VARIABLE pkg_error
|
||||
OUTPUT_VARIABLE shiboken_includedir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=python_include_dir shiboken2
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE pkg_result
|
||||
ERROR_VARIABLE pkg_error
|
||||
OUTPUT_VARIABLE python_shiboken_include_dir
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
set(SHIBOKEN_INCLUDES
|
||||
${shiboken_includedir}
|
||||
${python_shiboken_include_dir}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --libs shiboken2
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE pkg_result
|
||||
ERROR_VARIABLE pkg_error
|
||||
OUTPUT_VARIABLE shiboken_libraries
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
set(SHIBOKEN_LIBRARIES)
|
||||
foreach(lib ${shiboken_libraries})
|
||||
# message(STATUS "shiboken_libraries: ${lib}")
|
||||
set(SHIBOKEN_LIBRARIES
|
||||
${SHIBOKEN_LIBRARIES}
|
||||
${lib}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=generator_location shiboken2
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE pkg_result
|
||||
ERROR_VARIABLE pkg_error
|
||||
OUTPUT_VARIABLE SHIBOKEN_BINARY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${PKG_CONFIG_EXECUTABLE} --modversion shiboken2
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE pkg_result
|
||||
ERROR_VARIABLE pkg_error
|
||||
OUTPUT_VARIABLE SHIBOKEN_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Shiboken
|
||||
VERSION_VAR SHIBOKEN_VERSION
|
||||
REQUIRED_VARS SHIBOKEN_INCLUDES SHIBOKEN_LIBRARIES SHIBOKEN_BINARY
|
||||
)
|
||||
|
||||
mark_as_advanced(SHIBOKEN_INCLUDES SHIBOKEN_LIBRARIES SHIBOKEN_BINARY)
|
|
@ -265,7 +265,7 @@ function(KATIE_SETUP_PATHS)
|
|||
set(instpaths
|
||||
_PREFIX _HEADERS _LIBRARIES _BINARIES _PLUGINS _IMPORTS _DATA
|
||||
_TRANSLATIONS _SETTINGS _CMAKE _LDCONF _PROFILE _MAN
|
||||
_APPLICATIONS _PIXMAPS _PKGCONFIG _PYTHON
|
||||
_APPLICATIONS _PIXMAPS _PKGCONFIG
|
||||
)
|
||||
foreach(instpath ${instpaths})
|
||||
string(REGEX REPLACE ".*${CMAKE_INSTALL_PREFIX}/" "" modpath "${KATIE${instpath}_FULL}")
|
||||
|
@ -325,41 +325,3 @@ macro(KATIE_GUI_TEST TESTNAME TESTSOURCES)
|
|||
-DQT_GUI_LIB
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# a macro to generate Python bindings sources
|
||||
macro(KATIE_GENERATE_BINDINGS FORTARGET OUTPUTFILES)
|
||||
set(outputfiles ${OUTPUTFILES} ${ARGN})
|
||||
set(includedirs)
|
||||
get_directory_property(dirincs INCLUDE_DIRECTORIES)
|
||||
foreach(incdir ${SHIBOKEN_INCLUDES} ${dirincs})
|
||||
if(NOT includedirs)
|
||||
set(includedirs "${incdir}")
|
||||
else()
|
||||
set(includedirs "${includedirs}:${incdir}")
|
||||
endif()
|
||||
endforeach()
|
||||
get_target_property(targetsources ${FORTARGET} SOURCES)
|
||||
|
||||
add_custom_command(
|
||||
COMMENT "Generating Python bindings for: ${FORTARGET}"
|
||||
COMMAND ${SHIBOKEN_BINARY}
|
||||
--use-isnull-as-nb_nonzero
|
||||
--enable-return-value-heuristic
|
||||
--enable-parent-ctor-heuristic
|
||||
--avoid-protected-hack
|
||||
--include-paths="${includedirs}"
|
||||
--output-directory="${CMAKE_SOURCE_DIR}/bindings"
|
||||
--license-file="${CMAKE_SOURCE_DIR}/header.BSD"
|
||||
"${CMAKE_SOURCE_DIR}/bindings/${FORTARGET}_global.hpp"
|
||||
"${CMAKE_SOURCE_DIR}/bindings/typesystem_${FORTARGET}.xml"
|
||||
DEPENDS
|
||||
${FORTARGET}
|
||||
${targetsources}
|
||||
"${CMAKE_SOURCE_DIR}/bindings/${FORTARGET}_global.hpp"
|
||||
"${CMAKE_SOURCE_DIR}/bindings/typesystem_${FORTARGET}.xml"
|
||||
"${CMAKE_SOURCE_DIR}/header.BSD"
|
||||
OUTPUT ${outputfiles}
|
||||
)
|
||||
set_source_files_properties(${outputfiles} PROPERTIES GENERATED TRUE)
|
||||
set_source_files_properties(${outputfiles} PROPERTIES SKIP_AUTOGEN ON)
|
||||
endmacro()
|
||||
|
|
|
@ -24,8 +24,6 @@ safe_path_append LD_LIBRARY_PATH "$LD_LIBRARY_PATH" "@KATIE_LIBRARIES_FULL@"
|
|||
|
||||
safe_path_append PKG_CONFIG_PATH "$PKG_CONFIG_PATH" "@KATIE_PKGCONFIG_FULL@"
|
||||
|
||||
safe_path_append PYTHONPATH "$PYTHONPATH" "@KATIE_PYTHON_FULL@"
|
||||
|
||||
export Katie_DIR="@KATIE_CMAKE_FULL@"
|
||||
|
||||
unset -f safe_path_append
|
||||
|
|
|
@ -39,8 +39,7 @@ build() {
|
|||
-DKATIE_LDCONF_FULL=/etc/ld.so.conf.d \
|
||||
-DKATIE_PROFILE_FULL=/etc/profile.d \
|
||||
-DKATIE_TOOLS_SUFFIX="-katie" \
|
||||
-DKATIE_ALLINONE=ON \
|
||||
-DKATIE_BINDINGS=OFF
|
||||
-DKATIE_ALLINONE=ON
|
||||
make
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ override_dh_auto_configure:
|
|||
-DKATIE_SETTINGS_FULL=/etc/xdg \
|
||||
-DKATIE_PROFILE_FULL=/etc/profile.d \
|
||||
-DKATIE_TOOLS_SUFFIX="-katie" \
|
||||
-DKATIE_ALLINONE=OFF \
|
||||
-DKATIE_BINDINGS=OFF
|
||||
-DKATIE_ALLINONE=OFF
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build
|
||||
|
|
Loading…
Add table
Reference in a new issue