From b968f2b47ff748aa6f0f22a1e9b0ecf1e31326d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Thu, 25 Feb 2021 21:29:21 +0100 Subject: [PATCH] =?UTF-8?q?#730:=20providing=20a=20new=20Qt=20module=20nam?= =?UTF-8?q?ed=20QtUiTools=20for=20QUiLoader=20class=20s=E2=80=A6=20(#735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #730: providing a new Qt module named QtUiTools for QUiLoader class support. * Fixed a compile error on Mac * Added QtUiTools to some more places * Fixed a linker issue in the QtUiTools Python lib * On occasion fixed a infinite recursion problem in the debugger The recursion happened because by mistake I instantiated a QApplication inside an in-application Python script. This crashed the debugger due to infinite recursion. This is not a real use case but to prevent similar issues, a recursion sentinel was added. * Removed QCoreApplication#notify from script bindings Reasoning: "notify" made standalone scripts using QApplication and QUiLoader virtually impossible. Problem description: - When a QApplication object is instantiated, e.g. in Python, the Qt binding will install reimplementation hooks as the object may be dynamically extended. - A notify is virtual this means the *every* "notify" call in the application is routed through the interpreter. - For one thing this will slow down the application - But as "notify" is called a zillion times this has more than this side effect. - Specifically "notify" is called from within the QWidget constructor to indicate a new widget. Then, if a QDialog for example is instatiated, it's base class constructor will call "notify" when the object isn't ready yet. - This has another severe side effect: as the object isn't ready yet, it gets registered in the Python space with the wrong class and QDialog is not visible as such. To mitigate these problems, the most efficient solution is to disable "notify" in general. There is hardly any use case in a script environment (in C++, apart from hacking the only reasonable use case is exception handling, but this does not apply to scripts). For providing the call functionality of "notify" you should better use "postEvent" or "sendEvent" anyway. So farewell QCoreApplication.notify ... * Fixed python test for QtUiTools module * Fixed UiTools test on Qt4 - QUiLoader needs an application object Co-authored-by: Kazunari Sekigawa --- .gitignore | 1 + scripts/mkqtdecl.sh | 4 +- scripts/mkqtdecl4/QtUiTools/allofqt.cpp | 1 + scripts/mkqtdecl4/mkqtdecl.conf | 12 + scripts/mkqtdecl5/QtUiTools/allofqt.cpp | 1 + scripts/mkqtdecl5/mkqtdecl.conf | 13 + .../qt4/QtCore/gsiDeclQCoreApplication.cc | 67 - src/gsiqt/qt4/QtGui/gsiDeclQApplication.cc | 67 - src/gsiqt/qt4/QtUiTools/QtUiTools.pri | 13 + src/gsiqt/qt4/QtUiTools/QtUiTools.pro | 20 + src/gsiqt/qt4/QtUiTools/gsiDeclQUiLoader.cc | 1093 +++++++++++++++++ .../QtUiTools/gsiDeclQtUiToolsTypeTraits.h | 86 ++ src/gsiqt/qt4/QtUiTools/gsiQtExternals.h | 48 + src/gsiqt/qt4/QtUiTools/gsiQtUiToolsCommon.h | 25 + src/gsiqt/qt4/QtUiTools/gsiQtUiToolsMain.cc | 11 + src/gsiqt/qt4/qt4.pro | 4 +- .../qt5/QtCore/gsiDeclQCoreApplication.cc | 67 - src/gsiqt/qt5/QtGui/gsiDeclQGuiApplication.cc | 67 - src/gsiqt/qt5/QtUiTools/QtUiTools.pri | 13 + src/gsiqt/qt5/QtUiTools/QtUiTools.pro | 20 + src/gsiqt/qt5/QtUiTools/gsiDeclQUiLoader.cc | 1045 ++++++++++++++++ .../QtUiTools/gsiDeclQtUiToolsTypeTraits.h | 138 +++ src/gsiqt/qt5/QtUiTools/gsiQtExternals.h | 48 + src/gsiqt/qt5/QtUiTools/gsiQtUiToolsCommon.h | 25 + src/gsiqt/qt5/QtUiTools/gsiQtUiToolsMain.cc | 11 + .../qt5/QtWidgets/gsiDeclQApplication.cc | 67 - src/gsiqt/qt5/qt5.pro | 4 +- src/gsiqt/qtbasic/gsiQtUiToolsExternals.h | 27 + src/klayout.pri | 4 +- src/klayout_main/klayout_main/klayout.cc | 12 + .../klayout_main/klayout_main.pro | 2 +- src/lay/lay/doc/programming/qt_binding.xml | 1 + src/lay/lay/layMacroEditorDialog.cc | 86 +- src/lay/lay/layMacroEditorDialog.h | 2 +- src/lay/lay/layMacroEditorPage.cc | 20 +- src/pymod/QtCore/QtCoreMain.cc | 1 + src/pymod/QtUiTools/QtUiTools.pro | 11 + src/pymod/QtUiTools/QtUiToolsMain.cc | 33 + src/pymod/__init__.py.qt4 | 2 +- src/pymod/__init__.py.qt5 | 2 +- src/pymod/pymod.pro | 4 +- src/pymod/unit_tests/pymod_tests.cc | 1 + src/tl/tl/tlTimer.cc | 2 + testdata/pymod/import_QtUiTools.py | 43 + 44 files changed, 2843 insertions(+), 381 deletions(-) create mode 100644 scripts/mkqtdecl4/QtUiTools/allofqt.cpp create mode 100644 scripts/mkqtdecl5/QtUiTools/allofqt.cpp create mode 100644 src/gsiqt/qt4/QtUiTools/QtUiTools.pri create mode 100644 src/gsiqt/qt4/QtUiTools/QtUiTools.pro create mode 100644 src/gsiqt/qt4/QtUiTools/gsiDeclQUiLoader.cc create mode 100644 src/gsiqt/qt4/QtUiTools/gsiDeclQtUiToolsTypeTraits.h create mode 100644 src/gsiqt/qt4/QtUiTools/gsiQtExternals.h create mode 100644 src/gsiqt/qt4/QtUiTools/gsiQtUiToolsCommon.h create mode 100644 src/gsiqt/qt4/QtUiTools/gsiQtUiToolsMain.cc create mode 100644 src/gsiqt/qt5/QtUiTools/QtUiTools.pri create mode 100644 src/gsiqt/qt5/QtUiTools/QtUiTools.pro create mode 100644 src/gsiqt/qt5/QtUiTools/gsiDeclQUiLoader.cc create mode 100644 src/gsiqt/qt5/QtUiTools/gsiDeclQtUiToolsTypeTraits.h create mode 100644 src/gsiqt/qt5/QtUiTools/gsiQtExternals.h create mode 100644 src/gsiqt/qt5/QtUiTools/gsiQtUiToolsCommon.h create mode 100644 src/gsiqt/qt5/QtUiTools/gsiQtUiToolsMain.cc create mode 100644 src/gsiqt/qtbasic/gsiQtUiToolsExternals.h create mode 100644 src/pymod/QtUiTools/QtUiTools.pro create mode 100644 src/pymod/QtUiTools/QtUiToolsMain.cc create mode 100755 testdata/pymod/import_QtUiTools.py diff --git a/.gitignore b/.gitignore index c53e2de59..93210c161 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ build-* bin-* mkqtdecl.tmp +mkqtdecl5.tmp testtmp *build.macos* *bin.macos* diff --git a/scripts/mkqtdecl.sh b/scripts/mkqtdecl.sh index bd240bb85..8a0f462e6 100755 --- a/scripts/mkqtdecl.sh +++ b/scripts/mkqtdecl.sh @@ -49,8 +49,8 @@ inst_dir5=`pwd`/scripts/mkqtdecl5 src_dir=`pwd`/src src_name4=gsiqt/qt4 src_name5=gsiqt/qt5 -qt_mods4="QtCore QtGui QtDesigner QtNetwork QtSql QtXml" -qt_mods5="QtCore QtGui QtWidgets QtDesigner QtNetwork QtPrintSupport QtSql QtSvg QtXml QtXmlPatterns QtMultimedia" +qt_mods4="QtCore QtGui QtDesigner QtNetwork QtSql QtXml QtUiTools" +qt_mods5="QtCore QtGui QtWidgets QtDesigner QtNetwork QtPrintSupport QtSql QtSvg QtXml QtXmlPatterns QtMultimedia QtUiTools" src_name=$src_name4 inst_dir=$inst_dir4 diff --git a/scripts/mkqtdecl4/QtUiTools/allofqt.cpp b/scripts/mkqtdecl4/QtUiTools/allofqt.cpp new file mode 100644 index 000000000..efa38a675 --- /dev/null +++ b/scripts/mkqtdecl4/QtUiTools/allofqt.cpp @@ -0,0 +1 @@ +#include "QtUiTools/QUiLoader" diff --git a/scripts/mkqtdecl4/mkqtdecl.conf b/scripts/mkqtdecl4/mkqtdecl.conf index b6bc2f11d..92973c77b 100644 --- a/scripts/mkqtdecl4/mkqtdecl.conf +++ b/scripts/mkqtdecl4/mkqtdecl.conf @@ -302,6 +302,13 @@ rename "QProcess", /QProcess::finished\(int[\s\w]*\)/, "finished_int" # disambig drop_method "QCoreApplication", /QCoreApplication::QCoreApplication/ add_native_qapp_ctor_impl("QCoreApplication") +# Reasoning: "notify" is hardly needed (use postEvent or sendEvent instead). Reimplementing remains as a use case. +# Reimplementing this method however is questionable: providing an reimplementation hook has severe consequences as even +# Qt object constructors will route over this slot and invoke interpreter calls. This will for example lead to preliminary +# binding of Qt objects to Python objects, hence spoil their object identity. +drop_method "QCoreApplication", /QCoreApplication::notify/ +drop_method "QApplication", /QApplication::notify/ + # alternative implementation for QObject::findChild add_native_impl_QObject_findChild @@ -886,6 +893,11 @@ no_copy_ctor "QFormLayout" no_copy_ctor "QXmlParseException" no_copy_ctor "QNetworkAccessManager" +# -------------------------------------------------------------- +# QtUiTools + +include "QUiLoader", [ "", "", "", "", "", "", "", "", "" ] + # -------------------------------------------------------------- # events and properties # NOTE: to generate these files use scripts/mkqtdecl/mkqtdecl_extract_props.rb diff --git a/scripts/mkqtdecl5/QtUiTools/allofqt.cpp b/scripts/mkqtdecl5/QtUiTools/allofqt.cpp new file mode 100644 index 000000000..efa38a675 --- /dev/null +++ b/scripts/mkqtdecl5/QtUiTools/allofqt.cpp @@ -0,0 +1 @@ +#include "QtUiTools/QUiLoader" diff --git a/scripts/mkqtdecl5/mkqtdecl.conf b/scripts/mkqtdecl5/mkqtdecl.conf index 4d5b23f09..2a9f3a688 100644 --- a/scripts/mkqtdecl5/mkqtdecl.conf +++ b/scripts/mkqtdecl5/mkqtdecl.conf @@ -375,6 +375,14 @@ rename "QProcess", /QProcess::finished\(int[\s\w]*\)/, "finished_int" # disambig drop_method "QCoreApplication", /QCoreApplication::QCoreApplication/ add_native_qapp_ctor_impl("QCoreApplication") +# Reasoning: "notify" is hardly needed (use postEvent or sendEvent instead). Reimplementing remains as a use case. +# Reimplementing this method however is questionable: providing an reimplementation hook has severe consequences as even +# Qt object constructors will route over this slot and invoke interpreter calls. This will for example lead to preliminary +# binding of Qt objects to Python objects, hence spoil their object identity. +drop_method "QCoreApplication", /QCoreApplication::notify/ +drop_method "QApplication", /QApplication::notify/ +drop_method "QGuiApplication", /QGuiApplication::notify/ + # alternative implementation for QObject::findChild add_native_impl_QObject_findChild @@ -1210,6 +1218,11 @@ rename "QNetworkSession", /QNetworkSession::error\(QNetworkSession::/, "error_si rename "QSqlDriver", /QSqlDriver::notification\(const\s+QString\s*\&\s*\w*\s*\)/, "notification" # disambiguator rename "QSqlDriver", /QSqlDriver::notification\(const\s+QString\s*\&\s*\w*\s*,/, "notification_withData" # disambiguator +# -------------------------------------------------------------- +# QtUiTools + +include "QUiLoader", [ "", "", "", "", "", "", "", "", "" ] + # -------------------------------------------------------------- # events and properties # NOTE: to generate these files use scripts/mkqtdecl/mkqtdecl_extract_props.rb diff --git a/src/gsiqt/qt4/QtCore/gsiDeclQCoreApplication.cc b/src/gsiqt/qt4/QtCore/gsiDeclQCoreApplication.cc index 0241de6be..236cad6bb 100644 --- a/src/gsiqt/qt4/QtCore/gsiDeclQCoreApplication.cc +++ b/src/gsiqt/qt4/QtCore/gsiDeclQCoreApplication.cc @@ -77,28 +77,6 @@ static void _call_f_filterEvent_2477 (const qt_gsi::GenericMethod * /*decl*/, vo } -// bool QCoreApplication::notify(QObject *, QEvent *) - - -static void _init_f_notify_2411 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_f_notify_2411 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = gsi::arg_reader() (args, heap); - QEvent *arg2 = gsi::arg_reader() (args, heap); - ret.write ((bool)((QCoreApplication *)cls)->notify (arg1, arg2)); -} - - // static void QCoreApplication::addLibraryPath(const QString &) @@ -941,7 +919,6 @@ static gsi::Methods methods_QCoreApplication () { gsi::Methods methods; methods += new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo); methods += new qt_gsi::GenericMethod ("filterEvent", "@brief Method bool QCoreApplication::filterEvent(void *message, long int *result)\n", false, &_init_f_filterEvent_2477, &_call_f_filterEvent_2477); - methods += new qt_gsi::GenericMethod ("notify", "@brief Method bool QCoreApplication::notify(QObject *, QEvent *)\n", false, &_init_f_notify_2411, &_call_f_notify_2411); methods += gsi::qt_signal ("aboutToQuit()", "aboutToQuit", "@brief Signal declaration for QCoreApplication::aboutToQuit()\nYou can bind a procedure to this signal."); methods += gsi::qt_signal ("destroyed(QObject *)", "destroyed", gsi::arg("arg1"), "@brief Signal declaration for QCoreApplication::destroyed(QObject *)\nYou can bind a procedure to this signal."); methods += gsi::qt_signal ("unixSignal(int)", "unixSignal", gsi::arg("arg1"), "@brief Signal declaration for QCoreApplication::unixSignal(int)\nYou can bind a procedure to this signal."); @@ -1054,21 +1031,6 @@ public: } } - // [adaptor impl] bool QCoreApplication::notify(QObject *, QEvent *) - bool cbs_notify_2411_0(QObject *arg1, QEvent *arg2) - { - return QCoreApplication::notify(arg1, arg2); - } - - virtual bool notify(QObject *arg1, QEvent *arg2) - { - if (cb_notify_2411_0.can_issue()) { - return cb_notify_2411_0.issue(&QCoreApplication_Adaptor::cbs_notify_2411_0, arg1, arg2); - } else { - return QCoreApplication::notify(arg1, arg2); - } - } - // [emitter impl] void QCoreApplication::aboutToQuit() void emitter_QCoreApplication_aboutToQuit_0() { @@ -1163,7 +1125,6 @@ public: } gsi::Callback cb_eventFilter_2411_0; - gsi::Callback cb_notify_2411_0; gsi::Callback cb_childEvent_1701_0; gsi::Callback cb_customEvent_1217_0; gsi::Callback cb_disconnectNotify_1731_0; @@ -1326,32 +1287,6 @@ static void _set_callback_cbs_eventFilter_2411_0 (void *cls, const gsi::Callback } -// bool QCoreApplication::notify(QObject *, QEvent *) - -static void _init_cbs_notify_2411_0 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_cbs_notify_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = args.read (heap); - QEvent *arg2 = args.read (heap); - ret.write ((bool)((QCoreApplication_Adaptor *)cls)->cbs_notify_2411_0 (arg1, arg2)); -} - -static void _set_callback_cbs_notify_2411_0 (void *cls, const gsi::Callback &cb) -{ - ((QCoreApplication_Adaptor *)cls)->cb_notify_2411_0 = cb; -} - - // exposed int QCoreApplication::receivers(const char *signal) static void _init_fp_receivers_c1731 (qt_gsi::GenericMethod *decl) @@ -1445,8 +1380,6 @@ static gsi::Methods methods_QCoreApplication_Adaptor () { methods += new qt_gsi::GenericMethod ("*event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0); methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QCoreApplication::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0); methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@brief Virtual method bool QCoreApplication::notify(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@hide", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0, &_set_callback_cbs_notify_2411_0); methods += new qt_gsi::GenericMethod ("*receivers", "@brief Method int QCoreApplication::receivers(const char *signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_receivers_c1731, &_call_fp_receivers_c1731); methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QCoreApplication::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0); methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QCoreApplication::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0); diff --git a/src/gsiqt/qt4/QtGui/gsiDeclQApplication.cc b/src/gsiqt/qt4/QtGui/gsiDeclQApplication.cc index 8f7b30aea..4fed3d98c 100644 --- a/src/gsiqt/qt4/QtGui/gsiDeclQApplication.cc +++ b/src/gsiqt/qt4/QtGui/gsiDeclQApplication.cc @@ -101,28 +101,6 @@ static void _call_f_isSessionRestored_c0 (const qt_gsi::GenericMethod * /*decl*/ } -// bool QApplication::notify(QObject *, QEvent *) - - -static void _init_f_notify_2411 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_f_notify_2411 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = gsi::arg_reader() (args, heap); - QEvent *arg2 = gsi::arg_reader() (args, heap); - ret.write ((bool)((QApplication *)cls)->notify (arg1, arg2)); -} - - // QString QApplication::sessionId() @@ -1534,7 +1512,6 @@ static gsi::Methods methods_QApplication () { methods += new qt_gsi::GenericMethod (":autoSipEnabled", "@brief Method bool QApplication::autoSipEnabled()\n", true, &_init_f_autoSipEnabled_c0, &_call_f_autoSipEnabled_c0); methods += new qt_gsi::GenericMethod (":inputContext", "@brief Method QInputContext *QApplication::inputContext()\n", true, &_init_f_inputContext_c0, &_call_f_inputContext_c0); methods += new qt_gsi::GenericMethod ("isSessionRestored?", "@brief Method bool QApplication::isSessionRestored()\n", true, &_init_f_isSessionRestored_c0, &_call_f_isSessionRestored_c0); - methods += new qt_gsi::GenericMethod ("notify", "@brief Method bool QApplication::notify(QObject *, QEvent *)\nThis is a reimplementation of QCoreApplication::notify", false, &_init_f_notify_2411, &_call_f_notify_2411); methods += new qt_gsi::GenericMethod ("sessionId", "@brief Method QString QApplication::sessionId()\n", true, &_init_f_sessionId_c0, &_call_f_sessionId_c0); methods += new qt_gsi::GenericMethod ("sessionKey", "@brief Method QString QApplication::sessionKey()\n", true, &_init_f_sessionKey_c0, &_call_f_sessionKey_c0); methods += new qt_gsi::GenericMethod ("setAutoSipEnabled|autoSipEnabled=", "@brief Method void QApplication::setAutoSipEnabled(const bool enabled)\n", false, &_init_f_setAutoSipEnabled_1559, &_call_f_setAutoSipEnabled_1559); @@ -1686,21 +1663,6 @@ public: } } - // [adaptor impl] bool QApplication::notify(QObject *, QEvent *) - bool cbs_notify_2411_0(QObject *arg1, QEvent *arg2) - { - return QApplication::notify(arg1, arg2); - } - - virtual bool notify(QObject *arg1, QEvent *arg2) - { - if (cb_notify_2411_0.can_issue()) { - return cb_notify_2411_0.issue(&QApplication_Adaptor::cbs_notify_2411_0, arg1, arg2); - } else { - return QApplication::notify(arg1, arg2); - } - } - // [emitter impl] void QApplication::aboutToQuit() void emitter_QApplication_aboutToQuit_0() { @@ -1813,7 +1775,6 @@ public: } gsi::Callback cb_eventFilter_2411_0; - gsi::Callback cb_notify_2411_0; gsi::Callback cb_childEvent_1701_0; gsi::Callback cb_customEvent_1217_0; gsi::Callback cb_disconnectNotify_1731_0; @@ -2025,32 +1986,6 @@ static void _call_emitter_lastWindowClosed_0 (const qt_gsi::GenericMethod * /*de } -// bool QApplication::notify(QObject *, QEvent *) - -static void _init_cbs_notify_2411_0 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_cbs_notify_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = args.read (heap); - QEvent *arg2 = args.read (heap); - ret.write ((bool)((QApplication_Adaptor *)cls)->cbs_notify_2411_0 (arg1, arg2)); -} - -static void _set_callback_cbs_notify_2411_0 (void *cls, const gsi::Callback &cb) -{ - ((QApplication_Adaptor *)cls)->cb_notify_2411_0 = cb; -} - - // exposed int QApplication::receivers(const char *signal) static void _init_fp_receivers_c1731 (qt_gsi::GenericMethod *decl) @@ -2147,8 +2082,6 @@ static gsi::Methods methods_QApplication_Adaptor () { methods += new qt_gsi::GenericMethod ("emit_focusChanged", "@brief Emitter for signal void QApplication::focusChanged(QWidget *old, QWidget *now)\nCall this method to emit this signal.", false, &_init_emitter_focusChanged_2522, &_call_emitter_focusChanged_2522); methods += new qt_gsi::GenericMethod ("emit_fontDatabaseChanged", "@brief Emitter for signal void QApplication::fontDatabaseChanged()\nCall this method to emit this signal.", false, &_init_emitter_fontDatabaseChanged_0, &_call_emitter_fontDatabaseChanged_0); methods += new qt_gsi::GenericMethod ("emit_lastWindowClosed", "@brief Emitter for signal void QApplication::lastWindowClosed()\nCall this method to emit this signal.", false, &_init_emitter_lastWindowClosed_0, &_call_emitter_lastWindowClosed_0); - methods += new qt_gsi::GenericMethod ("notify", "@brief Virtual method bool QApplication::notify(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@hide", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0, &_set_callback_cbs_notify_2411_0); methods += new qt_gsi::GenericMethod ("*receivers", "@brief Method int QApplication::receivers(const char *signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_receivers_c1731, &_call_fp_receivers_c1731); methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QApplication::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0); methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QApplication::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0); diff --git a/src/gsiqt/qt4/QtUiTools/QtUiTools.pri b/src/gsiqt/qt4/QtUiTools/QtUiTools.pri new file mode 100644 index 000000000..616643bc8 --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/QtUiTools.pri @@ -0,0 +1,13 @@ +# +# Partial QMAKE project file for Qt bindings +# +# DO NOT EDIT THIS FILE. +# This file has been created automatically +# + +SOURCES += \ + gsiQtUiToolsMain.cc \ + $$PWD/gsiDeclQUiLoader.cc + +HEADERS += gsiQtUiToolsCommon.h + diff --git a/src/gsiqt/qt4/QtUiTools/QtUiTools.pro b/src/gsiqt/qt4/QtUiTools/QtUiTools.pro new file mode 100644 index 000000000..58b1f6c0c --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/QtUiTools.pro @@ -0,0 +1,20 @@ + + +DESTDIR = $$OUT_PWD/../../.. +TARGET = klayout_QtUiTools + +include($$PWD/../../../lib.pri) + +DEFINES += MAKE_GSI_QTUITOOLS_LIBRARY + +INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC +DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC + +LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic + +SOURCES += \ + +HEADERS += \ + +include(QtUiTools.pri) + diff --git a/src/gsiqt/qt4/QtUiTools/gsiDeclQUiLoader.cc b/src/gsiqt/qt4/QtUiTools/gsiDeclQUiLoader.cc new file mode 100644 index 000000000..5cb3472f3 --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/gsiDeclQUiLoader.cc @@ -0,0 +1,1093 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/** +* @file gsiDeclQUiLoader.cc +* +* DO NOT EDIT THIS FILE. +* This file has been created automatically +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gsiQt.h" +#include "gsiQtUiToolsCommon.h" +#include "gsiDeclQtUiToolsTypeTraits.h" +#include + +// ----------------------------------------------------------------------- +// class QUiLoader + +// get static meta object + +static void _init_smo (qt_gsi::GenericStaticMethod *decl) +{ + decl->set_return (); +} + +static void _call_smo (const qt_gsi::GenericStaticMethod *, gsi::SerialArgs &, gsi::SerialArgs &ret) +{ + ret.write (QUiLoader::staticMetaObject); +} + + +// void QUiLoader::addPluginPath(const QString &path) + + +static void _init_f_addPluginPath_2025 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("path"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_addPluginPath_2025 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->addPluginPath (arg1); +} + + +// QStringList QUiLoader::availableLayouts() + + +static void _init_f_availableLayouts_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_availableLayouts_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->availableLayouts ()); +} + + +// QStringList QUiLoader::availableWidgets() + + +static void _init_f_availableWidgets_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_availableWidgets_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->availableWidgets ()); +} + + +// void QUiLoader::clearPluginPaths() + + +static void _init_f_clearPluginPaths_0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_clearPluginPaths_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->clearPluginPaths (); +} + + +// QAction *QUiLoader::createAction(QObject *parent, const QString &name) + + +static void _init_f_createAction_3219 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name", true, "QString()"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_createAction_3219 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QAction *)((QUiLoader *)cls)->createAction (arg1, arg2)); +} + + +// QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + + +static void _init_f_createActionGroup_3219 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name", true, "QString()"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_createActionGroup_3219 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QActionGroup *)((QUiLoader *)cls)->createActionGroup (arg1, arg2)); +} + + +// QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + + +static void _init_f_createLayout_5136 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent", true, "0"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name", true, "QString()"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_createLayout_5136 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + QObject *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QLayout *)((QUiLoader *)cls)->createLayout (arg1, arg2, arg3)); +} + + +// QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + + +static void _init_f_createWidget_5149 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent", true, "0"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name", true, "QString()"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_createWidget_5149 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + QWidget *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QWidget *)((QUiLoader *)cls)->createWidget (arg1, arg2, arg3)); +} + + +// bool QUiLoader::isLanguageChangeEnabled() + + +static void _init_f_isLanguageChangeEnabled_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_isLanguageChangeEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((bool)((QUiLoader *)cls)->isLanguageChangeEnabled ()); +} + + +// bool QUiLoader::isScriptingEnabled() + + +static void _init_f_isScriptingEnabled_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_isScriptingEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((bool)((QUiLoader *)cls)->isScriptingEnabled ()); +} + + +// bool QUiLoader::isTranslationEnabled() + + +static void _init_f_isTranslationEnabled_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_isTranslationEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((bool)((QUiLoader *)cls)->isTranslationEnabled ()); +} + + +// QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget) + + +static void _init_f_load_2654 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("device"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parentWidget", true, "0"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_load_2654 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QIODevice *arg1 = gsi::arg_reader() (args, heap); + QWidget *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write ((QWidget *)((QUiLoader *)cls)->load (arg1, arg2)); +} + + +// QStringList QUiLoader::pluginPaths() + + +static void _init_f_pluginPaths_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_pluginPaths_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->pluginPaths ()); +} + + +// void QUiLoader::setLanguageChangeEnabled(bool enabled) + + +static void _init_f_setLanguageChangeEnabled_864 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("enabled"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setLanguageChangeEnabled_864 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + bool arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setLanguageChangeEnabled (arg1); +} + + +// void QUiLoader::setScriptingEnabled(bool enabled) + + +static void _init_f_setScriptingEnabled_864 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("enabled"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setScriptingEnabled_864 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + bool arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setScriptingEnabled (arg1); +} + + +// void QUiLoader::setTranslationEnabled(bool enabled) + + +static void _init_f_setTranslationEnabled_864 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("enabled"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setTranslationEnabled_864 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + bool arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setTranslationEnabled (arg1); +} + + +// void QUiLoader::setWorkingDirectory(const QDir &dir) + + +static void _init_f_setWorkingDirectory_1681 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("dir"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setWorkingDirectory_1681 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QDir &arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setWorkingDirectory (arg1); +} + + +// QDir QUiLoader::workingDirectory() + + +static void _init_f_workingDirectory_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_workingDirectory_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QDir)((QUiLoader *)cls)->workingDirectory ()); +} + + +// static QString QUiLoader::tr(const char *s, const char *c) + + +static void _init_f_tr_3354 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c", true, "0"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_tr_3354 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write ((QString)QUiLoader::tr (arg1, arg2)); +} + + +// static QString QUiLoader::tr(const char *s, const char *c, int n) + + +static void _init_f_tr_4013 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("n"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_tr_4013 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = gsi::arg_reader() (args, heap); + int arg3 = gsi::arg_reader() (args, heap); + ret.write ((QString)QUiLoader::tr (arg1, arg2, arg3)); +} + + +// static QString QUiLoader::trUtf8(const char *s, const char *c) + + +static void _init_f_trUtf8_3354 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c", true, "0"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_trUtf8_3354 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write ((QString)QUiLoader::trUtf8 (arg1, arg2)); +} + + +// static QString QUiLoader::trUtf8(const char *s, const char *c, int n) + + +static void _init_f_trUtf8_4013 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("n"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_trUtf8_4013 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = gsi::arg_reader() (args, heap); + int arg3 = gsi::arg_reader() (args, heap); + ret.write ((QString)QUiLoader::trUtf8 (arg1, arg2, arg3)); +} + + +namespace gsi +{ + +static gsi::Methods methods_QUiLoader () { + gsi::Methods methods; + methods += new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo); + methods += new qt_gsi::GenericMethod ("addPluginPath", "@brief Method void QUiLoader::addPluginPath(const QString &path)\n", false, &_init_f_addPluginPath_2025, &_call_f_addPluginPath_2025); + methods += new qt_gsi::GenericMethod ("availableLayouts", "@brief Method QStringList QUiLoader::availableLayouts()\n", true, &_init_f_availableLayouts_c0, &_call_f_availableLayouts_c0); + methods += new qt_gsi::GenericMethod ("availableWidgets", "@brief Method QStringList QUiLoader::availableWidgets()\n", true, &_init_f_availableWidgets_c0, &_call_f_availableWidgets_c0); + methods += new qt_gsi::GenericMethod ("clearPluginPaths", "@brief Method void QUiLoader::clearPluginPaths()\n", false, &_init_f_clearPluginPaths_0, &_call_f_clearPluginPaths_0); + methods += new qt_gsi::GenericMethod ("createAction", "@brief Method QAction *QUiLoader::createAction(QObject *parent, const QString &name)\n", false, &_init_f_createAction_3219, &_call_f_createAction_3219); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@brief Method QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name)\n", false, &_init_f_createActionGroup_3219, &_call_f_createActionGroup_3219); + methods += new qt_gsi::GenericMethod ("createLayout", "@brief Method QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name)\n", false, &_init_f_createLayout_5136, &_call_f_createLayout_5136); + methods += new qt_gsi::GenericMethod ("createWidget", "@brief Method QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)\n", false, &_init_f_createWidget_5149, &_call_f_createWidget_5149); + methods += new qt_gsi::GenericMethod ("isLanguageChangeEnabled?", "@brief Method bool QUiLoader::isLanguageChangeEnabled()\n", true, &_init_f_isLanguageChangeEnabled_c0, &_call_f_isLanguageChangeEnabled_c0); + methods += new qt_gsi::GenericMethod ("isScriptingEnabled?", "@brief Method bool QUiLoader::isScriptingEnabled()\n", true, &_init_f_isScriptingEnabled_c0, &_call_f_isScriptingEnabled_c0); + methods += new qt_gsi::GenericMethod ("isTranslationEnabled?", "@brief Method bool QUiLoader::isTranslationEnabled()\n", true, &_init_f_isTranslationEnabled_c0, &_call_f_isTranslationEnabled_c0); + methods += new qt_gsi::GenericMethod ("load", "@brief Method QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget)\n", false, &_init_f_load_2654, &_call_f_load_2654); + methods += new qt_gsi::GenericMethod ("pluginPaths", "@brief Method QStringList QUiLoader::pluginPaths()\n", true, &_init_f_pluginPaths_c0, &_call_f_pluginPaths_c0); + methods += new qt_gsi::GenericMethod ("setLanguageChangeEnabled", "@brief Method void QUiLoader::setLanguageChangeEnabled(bool enabled)\n", false, &_init_f_setLanguageChangeEnabled_864, &_call_f_setLanguageChangeEnabled_864); + methods += new qt_gsi::GenericMethod ("setScriptingEnabled", "@brief Method void QUiLoader::setScriptingEnabled(bool enabled)\n", false, &_init_f_setScriptingEnabled_864, &_call_f_setScriptingEnabled_864); + methods += new qt_gsi::GenericMethod ("setTranslationEnabled", "@brief Method void QUiLoader::setTranslationEnabled(bool enabled)\n", false, &_init_f_setTranslationEnabled_864, &_call_f_setTranslationEnabled_864); + methods += new qt_gsi::GenericMethod ("setWorkingDirectory", "@brief Method void QUiLoader::setWorkingDirectory(const QDir &dir)\n", false, &_init_f_setWorkingDirectory_1681, &_call_f_setWorkingDirectory_1681); + methods += new qt_gsi::GenericMethod ("workingDirectory", "@brief Method QDir QUiLoader::workingDirectory()\n", true, &_init_f_workingDirectory_c0, &_call_f_workingDirectory_c0); + methods += new qt_gsi::GenericStaticMethod ("tr", "@brief Static method QString QUiLoader::tr(const char *s, const char *c)\nThis method is static and can be called without an instance.", &_init_f_tr_3354, &_call_f_tr_3354); + methods += new qt_gsi::GenericStaticMethod ("tr", "@brief Static method QString QUiLoader::tr(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_tr_4013, &_call_f_tr_4013); + methods += new qt_gsi::GenericStaticMethod ("trUtf8", "@brief Static method QString QUiLoader::trUtf8(const char *s, const char *c)\nThis method is static and can be called without an instance.", &_init_f_trUtf8_3354, &_call_f_trUtf8_3354); + methods += new qt_gsi::GenericStaticMethod ("trUtf8", "@brief Static method QString QUiLoader::trUtf8(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_trUtf8_4013, &_call_f_trUtf8_4013); + return methods; +} + +gsi::Class &qtdecl_QObject (); + +qt_gsi::QtNativeClass decl_QUiLoader (qtdecl_QObject (), "QtUiTools", "QUiLoader_Native", + methods_QUiLoader (), + "@hide\n@alias QUiLoader"); + +GSI_QTUITOOLS_PUBLIC gsi::Class &qtdecl_QUiLoader () { return decl_QUiLoader; } + +} + + +class QUiLoader_Adaptor : public QUiLoader, public qt_gsi::QtObjectBase +{ +public: + + virtual ~QUiLoader_Adaptor(); + + // [adaptor ctor] QUiLoader::QUiLoader(QObject *parent) + QUiLoader_Adaptor() : QUiLoader() + { + qt_gsi::QtObjectBase::init (this); + } + + // [adaptor ctor] QUiLoader::QUiLoader(QObject *parent) + QUiLoader_Adaptor(QObject *parent) : QUiLoader(parent) + { + qt_gsi::QtObjectBase::init (this); + } + + // [expose] void QUiLoader::destroyed(QObject *) + void fp_QUiLoader_destroyed_1302 (QObject *arg1) { + QUiLoader::destroyed(arg1); + } + + // [expose] int QUiLoader::receivers(const char *signal) + int fp_QUiLoader_receivers_c1731 (const char *signal) const { + return QUiLoader::receivers(signal); + } + + // [expose] QObject *QUiLoader::sender() + QObject * fp_QUiLoader_sender_c0 () const { + return QUiLoader::sender(); + } + + // [adaptor impl] QAction *QUiLoader::createAction(QObject *parent, const QString &name) + QAction * cbs_createAction_3219_2(QObject *parent, const QString &name) + { + return QUiLoader::createAction(parent, name); + } + + virtual QAction * createAction(QObject *parent, const QString &name) + { + if (cb_createAction_3219_2.can_issue()) { + return cb_createAction_3219_2.issue(&QUiLoader_Adaptor::cbs_createAction_3219_2, parent, name); + } else { + return QUiLoader::createAction(parent, name); + } + } + + // [adaptor impl] QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + QActionGroup * cbs_createActionGroup_3219_2(QObject *parent, const QString &name) + { + return QUiLoader::createActionGroup(parent, name); + } + + virtual QActionGroup * createActionGroup(QObject *parent, const QString &name) + { + if (cb_createActionGroup_3219_2.can_issue()) { + return cb_createActionGroup_3219_2.issue(&QUiLoader_Adaptor::cbs_createActionGroup_3219_2, parent, name); + } else { + return QUiLoader::createActionGroup(parent, name); + } + } + + // [adaptor impl] QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + QLayout * cbs_createLayout_5136_2(const QString &className, QObject *parent, const QString &name) + { + return QUiLoader::createLayout(className, parent, name); + } + + virtual QLayout * createLayout(const QString &className, QObject *parent, const QString &name) + { + if (cb_createLayout_5136_2.can_issue()) { + return cb_createLayout_5136_2.issue(&QUiLoader_Adaptor::cbs_createLayout_5136_2, className, parent, name); + } else { + return QUiLoader::createLayout(className, parent, name); + } + } + + // [adaptor impl] QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + QWidget * cbs_createWidget_5149_2(const QString &className, QWidget *parent, const QString &name) + { + return QUiLoader::createWidget(className, parent, name); + } + + virtual QWidget * createWidget(const QString &className, QWidget *parent, const QString &name) + { + if (cb_createWidget_5149_2.can_issue()) { + return cb_createWidget_5149_2.issue(&QUiLoader_Adaptor::cbs_createWidget_5149_2, className, parent, name); + } else { + return QUiLoader::createWidget(className, parent, name); + } + } + + // [adaptor impl] bool QUiLoader::event(QEvent *) + bool cbs_event_1217_0(QEvent *arg1) + { + return QUiLoader::event(arg1); + } + + virtual bool event(QEvent *arg1) + { + if (cb_event_1217_0.can_issue()) { + return cb_event_1217_0.issue(&QUiLoader_Adaptor::cbs_event_1217_0, arg1); + } else { + return QUiLoader::event(arg1); + } + } + + // [adaptor impl] bool QUiLoader::eventFilter(QObject *, QEvent *) + bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2) + { + return QUiLoader::eventFilter(arg1, arg2); + } + + virtual bool eventFilter(QObject *arg1, QEvent *arg2) + { + if (cb_eventFilter_2411_0.can_issue()) { + return cb_eventFilter_2411_0.issue(&QUiLoader_Adaptor::cbs_eventFilter_2411_0, arg1, arg2); + } else { + return QUiLoader::eventFilter(arg1, arg2); + } + } + + // [adaptor impl] void QUiLoader::childEvent(QChildEvent *) + void cbs_childEvent_1701_0(QChildEvent *arg1) + { + QUiLoader::childEvent(arg1); + } + + virtual void childEvent(QChildEvent *arg1) + { + if (cb_childEvent_1701_0.can_issue()) { + cb_childEvent_1701_0.issue(&QUiLoader_Adaptor::cbs_childEvent_1701_0, arg1); + } else { + QUiLoader::childEvent(arg1); + } + } + + // [adaptor impl] void QUiLoader::customEvent(QEvent *) + void cbs_customEvent_1217_0(QEvent *arg1) + { + QUiLoader::customEvent(arg1); + } + + virtual void customEvent(QEvent *arg1) + { + if (cb_customEvent_1217_0.can_issue()) { + cb_customEvent_1217_0.issue(&QUiLoader_Adaptor::cbs_customEvent_1217_0, arg1); + } else { + QUiLoader::customEvent(arg1); + } + } + + // [adaptor impl] void QUiLoader::disconnectNotify(const char *signal) + void cbs_disconnectNotify_1731_0(const char *signal) + { + QUiLoader::disconnectNotify(signal); + } + + virtual void disconnectNotify(const char *signal) + { + if (cb_disconnectNotify_1731_0.can_issue()) { + cb_disconnectNotify_1731_0.issue(&QUiLoader_Adaptor::cbs_disconnectNotify_1731_0, signal); + } else { + QUiLoader::disconnectNotify(signal); + } + } + + // [adaptor impl] void QUiLoader::timerEvent(QTimerEvent *) + void cbs_timerEvent_1730_0(QTimerEvent *arg1) + { + QUiLoader::timerEvent(arg1); + } + + virtual void timerEvent(QTimerEvent *arg1) + { + if (cb_timerEvent_1730_0.can_issue()) { + cb_timerEvent_1730_0.issue(&QUiLoader_Adaptor::cbs_timerEvent_1730_0, arg1); + } else { + QUiLoader::timerEvent(arg1); + } + } + + gsi::Callback cb_createAction_3219_2; + gsi::Callback cb_createActionGroup_3219_2; + gsi::Callback cb_createLayout_5136_2; + gsi::Callback cb_createWidget_5149_2; + gsi::Callback cb_event_1217_0; + gsi::Callback cb_eventFilter_2411_0; + gsi::Callback cb_childEvent_1701_0; + gsi::Callback cb_customEvent_1217_0; + gsi::Callback cb_disconnectNotify_1731_0; + gsi::Callback cb_timerEvent_1730_0; +}; + +QUiLoader_Adaptor::~QUiLoader_Adaptor() { } + +// Constructor QUiLoader::QUiLoader(QObject *parent) (adaptor class) + +static void _init_ctor_QUiLoader_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + decl->set_return_new (); +} + +static void _call_ctor_QUiLoader_Adaptor_1302 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write (new QUiLoader_Adaptor (arg1)); +} + + +// void QUiLoader::childEvent(QChildEvent *) + +static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_childEvent_1701_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QChildEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_childEvent_1701_0 (arg1); +} + +static void _set_callback_cbs_childEvent_1701_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_childEvent_1701_0 = cb; +} + + +// QAction *QUiLoader::createAction(QObject *parent, const QString &name) + +static void _init_cbs_createAction_3219_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_createAction_3219_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + const QString &arg2 = args.read (heap); + ret.write ((QAction *)((QUiLoader_Adaptor *)cls)->cbs_createAction_3219_2 (arg1, arg2)); +} + +static void _set_callback_cbs_createAction_3219_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createAction_3219_2 = cb; +} + + +// QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + +static void _init_cbs_createActionGroup_3219_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_createActionGroup_3219_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + const QString &arg2 = args.read (heap); + ret.write ((QActionGroup *)((QUiLoader_Adaptor *)cls)->cbs_createActionGroup_3219_2 (arg1, arg2)); +} + +static void _set_callback_cbs_createActionGroup_3219_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createActionGroup_3219_2 = cb; +} + + +// QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + +static void _init_cbs_createLayout_5136_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_cbs_createLayout_5136_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = args.read (heap); + QObject *arg2 = args.read (heap); + const QString &arg3 = args.read (heap); + ret.write ((QLayout *)((QUiLoader_Adaptor *)cls)->cbs_createLayout_5136_2 (arg1, arg2, arg3)); +} + +static void _set_callback_cbs_createLayout_5136_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createLayout_5136_2 = cb; +} + + +// QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + +static void _init_cbs_createWidget_5149_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_cbs_createWidget_5149_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = args.read (heap); + QWidget *arg2 = args.read (heap); + const QString &arg3 = args.read (heap); + ret.write ((QWidget *)((QUiLoader_Adaptor *)cls)->cbs_createWidget_5149_2 (arg1, arg2, arg3)); +} + +static void _set_callback_cbs_createWidget_5149_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createWidget_5149_2 = cb; +} + + +// void QUiLoader::customEvent(QEvent *) + +static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_customEvent_1217_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_customEvent_1217_0 (arg1); +} + +static void _set_callback_cbs_customEvent_1217_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_customEvent_1217_0 = cb; +} + + +// exposed void QUiLoader::destroyed(QObject *) + +static void _init_fp_destroyed_1302 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1", true, "0"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_fp_destroyed_1302 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->fp_QUiLoader_destroyed_1302 (arg1); +} + + +// void QUiLoader::disconnectNotify(const char *signal) + +static void _init_cbs_disconnectNotify_1731_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("signal"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_disconnectNotify_1731_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_disconnectNotify_1731_0 (arg1); +} + +static void _set_callback_cbs_disconnectNotify_1731_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_disconnectNotify_1731_0 = cb; +} + + +// bool QUiLoader::event(QEvent *) + +static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_event_1217_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QEvent *arg1 = args.read (heap); + ret.write ((bool)((QUiLoader_Adaptor *)cls)->cbs_event_1217_0 (arg1)); +} + +static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_event_1217_0 = cb; +} + + +// bool QUiLoader::eventFilter(QObject *, QEvent *) + +static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("arg2"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_eventFilter_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + QEvent *arg2 = args.read (heap); + ret.write ((bool)((QUiLoader_Adaptor *)cls)->cbs_eventFilter_2411_0 (arg1, arg2)); +} + +static void _set_callback_cbs_eventFilter_2411_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_eventFilter_2411_0 = cb; +} + + +// exposed int QUiLoader::receivers(const char *signal) + +static void _init_fp_receivers_c1731 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("signal"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_fp_receivers_c1731 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + ret.write ((int)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_receivers_c1731 (arg1)); +} + + +// exposed QObject *QUiLoader::sender() + +static void _init_fp_sender_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_fp_sender_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QObject *)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_sender_c0 ()); +} + + +// void QUiLoader::timerEvent(QTimerEvent *) + +static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_timerEvent_1730_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QTimerEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_timerEvent_1730_0 (arg1); +} + +static void _set_callback_cbs_timerEvent_1730_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_timerEvent_1730_0 = cb; +} + + +namespace gsi +{ + +gsi::Class &qtdecl_QUiLoader (); + +static gsi::Methods methods_QUiLoader_Adaptor () { + gsi::Methods methods; + methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QUiLoader::QUiLoader(QObject *parent)\nThis method creates an object of class QUiLoader.", &_init_ctor_QUiLoader_Adaptor_1302, &_call_ctor_QUiLoader_Adaptor_1302); + methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QUiLoader::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0); + methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0); + methods += new qt_gsi::GenericMethod ("createAction", "@brief Virtual method QAction *QUiLoader::createAction(QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createAction_3219_2, &_call_cbs_createAction_3219_2); + methods += new qt_gsi::GenericMethod ("createAction", "@hide", false, &_init_cbs_createAction_3219_2, &_call_cbs_createAction_3219_2, &_set_callback_cbs_createAction_3219_2); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@brief Virtual method QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createActionGroup_3219_2, &_call_cbs_createActionGroup_3219_2); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@hide", false, &_init_cbs_createActionGroup_3219_2, &_call_cbs_createActionGroup_3219_2, &_set_callback_cbs_createActionGroup_3219_2); + methods += new qt_gsi::GenericMethod ("createLayout", "@brief Virtual method QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createLayout_5136_2, &_call_cbs_createLayout_5136_2); + methods += new qt_gsi::GenericMethod ("createLayout", "@hide", false, &_init_cbs_createLayout_5136_2, &_call_cbs_createLayout_5136_2, &_set_callback_cbs_createLayout_5136_2); + methods += new qt_gsi::GenericMethod ("createWidget", "@brief Virtual method QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createWidget_5149_2, &_call_cbs_createWidget_5149_2); + methods += new qt_gsi::GenericMethod ("createWidget", "@hide", false, &_init_cbs_createWidget_5149_2, &_call_cbs_createWidget_5149_2, &_set_callback_cbs_createWidget_5149_2); + methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QUiLoader::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0); + methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0); + methods += new qt_gsi::GenericMethod ("*destroyed", "@brief Method void QUiLoader::destroyed(QObject *)\nThis method is protected and can only be called from inside a derived class.", false, &_init_fp_destroyed_1302, &_call_fp_destroyed_1302); + methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@brief Virtual method void QUiLoader::disconnectNotify(const char *signal)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_disconnectNotify_1731_0, &_call_cbs_disconnectNotify_1731_0); + methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@hide", false, &_init_cbs_disconnectNotify_1731_0, &_call_cbs_disconnectNotify_1731_0, &_set_callback_cbs_disconnectNotify_1731_0); + methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QUiLoader::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0); + methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0); + methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QUiLoader::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0); + methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0); + methods += new qt_gsi::GenericMethod ("*receivers", "@brief Method int QUiLoader::receivers(const char *signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_receivers_c1731, &_call_fp_receivers_c1731); + methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QUiLoader::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0); + methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QUiLoader::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0); + methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0); + return methods; +} + +gsi::Class decl_QUiLoader_Adaptor (qtdecl_QUiLoader (), "QtUiTools", "QUiLoader", + methods_QUiLoader_Adaptor (), + "@qt\n@brief Binding of QUiLoader"); + +} + diff --git a/src/gsiqt/qt4/QtUiTools/gsiDeclQtUiToolsTypeTraits.h b/src/gsiqt/qt4/QtUiTools/gsiDeclQtUiToolsTypeTraits.h new file mode 100644 index 000000000..1f14fe99e --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/gsiDeclQtUiToolsTypeTraits.h @@ -0,0 +1,86 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/** +* @file generated/gsiDeclQtUiToolsTypeTraits.h +* @brief Type traits for the Qt binding classes +* +* DO NOT EDIT THIS FILE. +* This file has been created automatically +*/ + +#ifndef _HDR_gsiDeclQtUiToolsTypeTraits +#define _HDR_gsiDeclQtUiToolsTypeTraits + +#include "gsiTypes.h" + + +struct QMetaObject; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QObject; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QObject_Adaptor; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QSysInfo; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QUiLoader; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QUiLoader_Adaptor; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class Qt_Namespace; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; +} + + +#endif diff --git a/src/gsiqt/qt4/QtUiTools/gsiQtExternals.h b/src/gsiqt/qt4/QtUiTools/gsiQtExternals.h new file mode 100644 index 000000000..789b4e182 --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/gsiQtExternals.h @@ -0,0 +1,48 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/* + External declarations for for Qt bindings + + DO NOT EDIT THIS FILE. + This file has been created automatically +*/ + +#if !defined(HDR_gsiQtUiToolsExternals) +#define HDR_gsiQtUiToolsExternals + +#include "gsiClass.h" +#include "gsiQtUiToolsCommon.h" + +class QUiLoader; + +namespace tl { template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; } + +namespace gsi { GSI_QTUITOOLS_PUBLIC gsi::Class &qtdecl_QUiLoader (); } + + +#define QT_EXTERNAL_BASE(X) gsi::qtdecl_##X(), + +#endif + diff --git a/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsCommon.h b/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsCommon.h new file mode 100644 index 000000000..49782546e --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsCommon.h @@ -0,0 +1,25 @@ +/** + * Common header for Qt binding definition library + * + * DO NOT EDIT THIS FILE. + * This file has been created automatically + */ + +#include "tlDefs.h" + +#if !defined(HDR_gsiQtUiToolsCommon_h) +# define HDR_gsiQtUiToolsCommon_h + +# ifdef MAKE_GSI_QTUITOOLS_LIBRARY +# define GSI_QTUITOOLS_PUBLIC DEF_INSIDE_PUBLIC +# define GSI_QTUITOOLS_PUBLIC_TEMPLATE DEF_INSIDE_PUBLIC_TEMPLATE +# define GSI_QTUITOOLS_LOCAL DEF_INSIDE_LOCAL +# else +# define GSI_QTUITOOLS_PUBLIC DEF_OUTSIDE_PUBLIC +# define GSI_QTUITOOLS_PUBLIC_TEMPLATE DEF_OUTSIDE_PUBLIC_TEMPLATE +# define GSI_QTUITOOLS_LOCAL DEF_OUTSIDE_LOCAL +# endif + +#define FORCE_LINK_GSI_QTUITOOLS GSI_QTUITOOLS_PUBLIC int _force_link_gsiQtUiTools_f (); int _force_link_gsiQtUiTools = _force_link_gsiQtUiTools_f (); + +#endif diff --git a/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsMain.cc b/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsMain.cc new file mode 100644 index 000000000..fce03b11f --- /dev/null +++ b/src/gsiqt/qt4/QtUiTools/gsiQtUiToolsMain.cc @@ -0,0 +1,11 @@ +/** + * Main source file for Qt binding definition library + * + * DO NOT EDIT THIS FILE. + * This file has been created automatically + */ + +#include "gsiQtUiToolsCommon.h" + +GSI_QTUITOOLS_PUBLIC int _force_link_gsiQtUiTools_f () { return 0; } + diff --git a/src/gsiqt/qt4/qt4.pro b/src/gsiqt/qt4/qt4.pro index 36c09917d..31fab2d54 100644 --- a/src/gsiqt/qt4/qt4.pro +++ b/src/gsiqt/qt4/qt4.pro @@ -7,10 +7,12 @@ SUBDIRS = \ QtXml \ QtSql \ QtNetwork \ - QtDesigner + QtDesigner \ + QtUiTools QtGui.depends += QtCore QtNetwork.depends += QtCore QtSql.depends += QtCore QtDesigner.depends += QtCore QtXml.depends += QtCore +QtUiTools.depends += QtCore diff --git a/src/gsiqt/qt5/QtCore/gsiDeclQCoreApplication.cc b/src/gsiqt/qt5/QtCore/gsiDeclQCoreApplication.cc index 5d239046a..c47df8fb5 100644 --- a/src/gsiqt/qt5/QtCore/gsiDeclQCoreApplication.cc +++ b/src/gsiqt/qt5/QtCore/gsiDeclQCoreApplication.cc @@ -72,28 +72,6 @@ static void _call_f_installNativeEventFilter_3266 (const qt_gsi::GenericMethod * } -// bool QCoreApplication::notify(QObject *, QEvent *) - - -static void _init_f_notify_2411 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_f_notify_2411 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = gsi::arg_reader() (args, heap); - QEvent *arg2 = gsi::arg_reader() (args, heap); - ret.write ((bool)((QCoreApplication *)cls)->notify (arg1, arg2)); -} - - // void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter *filterObj) @@ -924,7 +902,6 @@ static gsi::Methods methods_QCoreApplication () { gsi::Methods methods; methods += new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo); methods += new qt_gsi::GenericMethod ("installNativeEventFilter", "@brief Method void QCoreApplication::installNativeEventFilter(QAbstractNativeEventFilter *filterObj)\n", false, &_init_f_installNativeEventFilter_3266, &_call_f_installNativeEventFilter_3266); - methods += new qt_gsi::GenericMethod ("notify", "@brief Method bool QCoreApplication::notify(QObject *, QEvent *)\n", false, &_init_f_notify_2411, &_call_f_notify_2411); methods += new qt_gsi::GenericMethod ("removeNativeEventFilter", "@brief Method void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter *filterObj)\n", false, &_init_f_removeNativeEventFilter_3266, &_call_f_removeNativeEventFilter_3266); methods += gsi::qt_signal ("aboutToQuit()", "aboutToQuit", "@brief Signal declaration for QCoreApplication::aboutToQuit()\nYou can bind a procedure to this signal."); methods += gsi::qt_signal ("applicationNameChanged()", "applicationNameChanged", "@brief Signal declaration for QCoreApplication::applicationNameChanged()\nYou can bind a procedure to this signal."); @@ -1076,21 +1053,6 @@ public: } } - // [adaptor impl] bool QCoreApplication::notify(QObject *, QEvent *) - bool cbs_notify_2411_0(QObject *arg1, QEvent *arg2) - { - return QCoreApplication::notify(arg1, arg2); - } - - virtual bool notify(QObject *arg1, QEvent *arg2) - { - if (cb_notify_2411_0.can_issue()) { - return cb_notify_2411_0.issue(&QCoreApplication_Adaptor::cbs_notify_2411_0, arg1, arg2); - } else { - return QCoreApplication::notify(arg1, arg2); - } - } - // [emitter impl] void QCoreApplication::objectNameChanged(const QString &objectName) void emitter_QCoreApplication_objectNameChanged_4567(const QString &objectName) { @@ -1186,7 +1148,6 @@ public: } gsi::Callback cb_eventFilter_2411_0; - gsi::Callback cb_notify_2411_0; gsi::Callback cb_childEvent_1701_0; gsi::Callback cb_customEvent_1217_0; gsi::Callback cb_disconnectNotify_2394_0; @@ -1395,32 +1356,6 @@ static void _call_fp_isSignalConnected_c2394 (const qt_gsi::GenericMethod * /*de } -// bool QCoreApplication::notify(QObject *, QEvent *) - -static void _init_cbs_notify_2411_0 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_cbs_notify_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = args.read (heap); - QEvent *arg2 = args.read (heap); - ret.write ((bool)((QCoreApplication_Adaptor *)cls)->cbs_notify_2411_0 (arg1, arg2)); -} - -static void _set_callback_cbs_notify_2411_0 (void *cls, const gsi::Callback &cb) -{ - ((QCoreApplication_Adaptor *)cls)->cb_notify_2411_0 = cb; -} - - // emitter void QCoreApplication::objectNameChanged(const QString &objectName) static void _init_emitter_objectNameChanged_4567 (qt_gsi::GenericMethod *decl) @@ -1559,8 +1494,6 @@ static gsi::Methods methods_QCoreApplication_Adaptor () { methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QCoreApplication::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0); methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0); methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QCoreApplication::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394); - methods += new qt_gsi::GenericMethod ("notify", "@brief Virtual method bool QCoreApplication::notify(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@hide", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0, &_set_callback_cbs_notify_2411_0); methods += new qt_gsi::GenericMethod ("emit_objectNameChanged", "@brief Emitter for signal void QCoreApplication::objectNameChanged(const QString &objectName)\nCall this method to emit this signal.", false, &_init_emitter_objectNameChanged_4567, &_call_emitter_objectNameChanged_4567); methods += new qt_gsi::GenericMethod ("emit_organizationDomainChanged", "@brief Emitter for signal void QCoreApplication::organizationDomainChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationDomainChanged_0, &_call_emitter_organizationDomainChanged_0); methods += new qt_gsi::GenericMethod ("emit_organizationNameChanged", "@brief Emitter for signal void QCoreApplication::organizationNameChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationNameChanged_0, &_call_emitter_organizationNameChanged_0); diff --git a/src/gsiqt/qt5/QtGui/gsiDeclQGuiApplication.cc b/src/gsiqt/qt5/QtGui/gsiDeclQGuiApplication.cc index 1bbefdc67..a8d1d07c8 100644 --- a/src/gsiqt/qt5/QtGui/gsiDeclQGuiApplication.cc +++ b/src/gsiqt/qt5/QtGui/gsiDeclQGuiApplication.cc @@ -99,28 +99,6 @@ static void _call_f_isSessionRestored_c0 (const qt_gsi::GenericMethod * /*decl*/ } -// bool QGuiApplication::notify(QObject *, QEvent *) - - -static void _init_f_notify_2411 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_f_notify_2411 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = gsi::arg_reader() (args, heap); - QEvent *arg2 = gsi::arg_reader() (args, heap); - ret.write ((bool)((QGuiApplication *)cls)->notify (arg1, arg2)); -} - - // QString QGuiApplication::sessionId() @@ -831,7 +809,6 @@ static gsi::Methods methods_QGuiApplication () { methods += new qt_gsi::GenericMethod ("devicePixelRatio", "@brief Method double QGuiApplication::devicePixelRatio()\n", true, &_init_f_devicePixelRatio_c0, &_call_f_devicePixelRatio_c0); methods += new qt_gsi::GenericMethod ("isSavingSession?", "@brief Method bool QGuiApplication::isSavingSession()\n", true, &_init_f_isSavingSession_c0, &_call_f_isSavingSession_c0); methods += new qt_gsi::GenericMethod ("isSessionRestored?", "@brief Method bool QGuiApplication::isSessionRestored()\n", true, &_init_f_isSessionRestored_c0, &_call_f_isSessionRestored_c0); - methods += new qt_gsi::GenericMethod ("notify", "@brief Method bool QGuiApplication::notify(QObject *, QEvent *)\nThis is a reimplementation of QCoreApplication::notify", false, &_init_f_notify_2411, &_call_f_notify_2411); methods += new qt_gsi::GenericMethod ("sessionId", "@brief Method QString QGuiApplication::sessionId()\n", true, &_init_f_sessionId_c0, &_call_f_sessionId_c0); methods += new qt_gsi::GenericMethod ("sessionKey", "@brief Method QString QGuiApplication::sessionKey()\n", true, &_init_f_sessionKey_c0, &_call_f_sessionKey_c0); methods += gsi::qt_signal ("aboutToQuit()", "aboutToQuit", "@brief Signal declaration for QGuiApplication::aboutToQuit()\nYou can bind a procedure to this signal."); @@ -1034,21 +1011,6 @@ public: emit QGuiApplication::layoutDirectionChanged(direction); } - // [adaptor impl] bool QGuiApplication::notify(QObject *, QEvent *) - bool cbs_notify_2411_0(QObject *arg1, QEvent *arg2) - { - return QGuiApplication::notify(arg1, arg2); - } - - virtual bool notify(QObject *arg1, QEvent *arg2) - { - if (cb_notify_2411_0.can_issue()) { - return cb_notify_2411_0.issue(&QGuiApplication_Adaptor::cbs_notify_2411_0, arg1, arg2); - } else { - return QGuiApplication::notify(arg1, arg2); - } - } - // [emitter impl] void QGuiApplication::objectNameChanged(const QString &objectName) void emitter_QGuiApplication_objectNameChanged_4567(const QString &objectName) { @@ -1168,7 +1130,6 @@ public: } gsi::Callback cb_eventFilter_2411_0; - gsi::Callback cb_notify_2411_0; gsi::Callback cb_childEvent_1701_0; gsi::Callback cb_customEvent_1217_0; gsi::Callback cb_disconnectNotify_2394_0; @@ -1495,32 +1456,6 @@ static void _call_emitter_layoutDirectionChanged_2316 (const qt_gsi::GenericMeth } -// bool QGuiApplication::notify(QObject *, QEvent *) - -static void _init_cbs_notify_2411_0 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_cbs_notify_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = args.read (heap); - QEvent *arg2 = args.read (heap); - ret.write ((bool)((QGuiApplication_Adaptor *)cls)->cbs_notify_2411_0 (arg1, arg2)); -} - -static void _set_callback_cbs_notify_2411_0 (void *cls, const gsi::Callback &cb) -{ - ((QGuiApplication_Adaptor *)cls)->cb_notify_2411_0 = cb; -} - - // emitter void QGuiApplication::objectNameChanged(const QString &objectName) static void _init_emitter_objectNameChanged_4567 (qt_gsi::GenericMethod *decl) @@ -1738,8 +1673,6 @@ static gsi::Methods methods_QGuiApplication_Adaptor () { methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QGuiApplication::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394); methods += new qt_gsi::GenericMethod ("emit_lastWindowClosed", "@brief Emitter for signal void QGuiApplication::lastWindowClosed()\nCall this method to emit this signal.", false, &_init_emitter_lastWindowClosed_0, &_call_emitter_lastWindowClosed_0); methods += new qt_gsi::GenericMethod ("emit_layoutDirectionChanged", "@brief Emitter for signal void QGuiApplication::layoutDirectionChanged(Qt::LayoutDirection direction)\nCall this method to emit this signal.", false, &_init_emitter_layoutDirectionChanged_2316, &_call_emitter_layoutDirectionChanged_2316); - methods += new qt_gsi::GenericMethod ("notify", "@brief Virtual method bool QGuiApplication::notify(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@hide", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0, &_set_callback_cbs_notify_2411_0); methods += new qt_gsi::GenericMethod ("emit_objectNameChanged", "@brief Emitter for signal void QGuiApplication::objectNameChanged(const QString &objectName)\nCall this method to emit this signal.", false, &_init_emitter_objectNameChanged_4567, &_call_emitter_objectNameChanged_4567); methods += new qt_gsi::GenericMethod ("emit_organizationDomainChanged", "@brief Emitter for signal void QGuiApplication::organizationDomainChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationDomainChanged_0, &_call_emitter_organizationDomainChanged_0); methods += new qt_gsi::GenericMethod ("emit_organizationNameChanged", "@brief Emitter for signal void QGuiApplication::organizationNameChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationNameChanged_0, &_call_emitter_organizationNameChanged_0); diff --git a/src/gsiqt/qt5/QtUiTools/QtUiTools.pri b/src/gsiqt/qt5/QtUiTools/QtUiTools.pri new file mode 100644 index 000000000..616643bc8 --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/QtUiTools.pri @@ -0,0 +1,13 @@ +# +# Partial QMAKE project file for Qt bindings +# +# DO NOT EDIT THIS FILE. +# This file has been created automatically +# + +SOURCES += \ + gsiQtUiToolsMain.cc \ + $$PWD/gsiDeclQUiLoader.cc + +HEADERS += gsiQtUiToolsCommon.h + diff --git a/src/gsiqt/qt5/QtUiTools/QtUiTools.pro b/src/gsiqt/qt5/QtUiTools/QtUiTools.pro new file mode 100644 index 000000000..58b1f6c0c --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/QtUiTools.pro @@ -0,0 +1,20 @@ + + +DESTDIR = $$OUT_PWD/../../.. +TARGET = klayout_QtUiTools + +include($$PWD/../../../lib.pri) + +DEFINES += MAKE_GSI_QTUITOOLS_LIBRARY + +INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC +DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC + +LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic + +SOURCES += \ + +HEADERS += \ + +include(QtUiTools.pri) + diff --git a/src/gsiqt/qt5/QtUiTools/gsiDeclQUiLoader.cc b/src/gsiqt/qt5/QtUiTools/gsiDeclQUiLoader.cc new file mode 100644 index 000000000..90698b958 --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/gsiDeclQUiLoader.cc @@ -0,0 +1,1045 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/** +* @file gsiDeclQUiLoader.cc +* +* DO NOT EDIT THIS FILE. +* This file has been created automatically +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gsiQt.h" +#include "gsiQtUiToolsCommon.h" +#include "gsiDeclQtUiToolsTypeTraits.h" +#include + +// ----------------------------------------------------------------------- +// class QUiLoader + +// get static meta object + +static void _init_smo (qt_gsi::GenericStaticMethod *decl) +{ + decl->set_return (); +} + +static void _call_smo (const qt_gsi::GenericStaticMethod *, gsi::SerialArgs &, gsi::SerialArgs &ret) +{ + ret.write (QUiLoader::staticMetaObject); +} + + +// void QUiLoader::addPluginPath(const QString &path) + + +static void _init_f_addPluginPath_2025 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("path"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_addPluginPath_2025 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->addPluginPath (arg1); +} + + +// QStringList QUiLoader::availableLayouts() + + +static void _init_f_availableLayouts_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_availableLayouts_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->availableLayouts ()); +} + + +// QStringList QUiLoader::availableWidgets() + + +static void _init_f_availableWidgets_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_availableWidgets_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->availableWidgets ()); +} + + +// void QUiLoader::clearPluginPaths() + + +static void _init_f_clearPluginPaths_0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_clearPluginPaths_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->clearPluginPaths (); +} + + +// QAction *QUiLoader::createAction(QObject *parent, const QString &name) + + +static void _init_f_createAction_3219 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name", true, "QString()"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_createAction_3219 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QAction *)((QUiLoader *)cls)->createAction (arg1, arg2)); +} + + +// QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + + +static void _init_f_createActionGroup_3219 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name", true, "QString()"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_createActionGroup_3219 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QActionGroup *)((QUiLoader *)cls)->createActionGroup (arg1, arg2)); +} + + +// QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + + +static void _init_f_createLayout_5136 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent", true, "0"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name", true, "QString()"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_createLayout_5136 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + QObject *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QLayout *)((QUiLoader *)cls)->createLayout (arg1, arg2, arg3)); +} + + +// QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + + +static void _init_f_createWidget_5149 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent", true, "0"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name", true, "QString()"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_createWidget_5149 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = gsi::arg_reader() (args, heap); + QWidget *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + const QString &arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (QString(), heap); + ret.write ((QWidget *)((QUiLoader *)cls)->createWidget (arg1, arg2, arg3)); +} + + +// QString QUiLoader::errorString() + + +static void _init_f_errorString_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_errorString_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QString)((QUiLoader *)cls)->errorString ()); +} + + +// bool QUiLoader::isLanguageChangeEnabled() + + +static void _init_f_isLanguageChangeEnabled_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_isLanguageChangeEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((bool)((QUiLoader *)cls)->isLanguageChangeEnabled ()); +} + + +// bool QUiLoader::isTranslationEnabled() + + +static void _init_f_isTranslationEnabled_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_isTranslationEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((bool)((QUiLoader *)cls)->isTranslationEnabled ()); +} + + +// QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget) + + +static void _init_f_load_2654 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("device"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parentWidget", true, "0"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_f_load_2654 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QIODevice *arg1 = gsi::arg_reader() (args, heap); + QWidget *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write ((QWidget *)((QUiLoader *)cls)->load (arg1, arg2)); +} + + +// QStringList QUiLoader::pluginPaths() + + +static void _init_f_pluginPaths_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_pluginPaths_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QStringList)((QUiLoader *)cls)->pluginPaths ()); +} + + +// void QUiLoader::setLanguageChangeEnabled(bool enabled) + + +static void _init_f_setLanguageChangeEnabled_864 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("enabled"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setLanguageChangeEnabled_864 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + bool arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setLanguageChangeEnabled (arg1); +} + + +// void QUiLoader::setTranslationEnabled(bool enabled) + + +static void _init_f_setTranslationEnabled_864 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("enabled"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setTranslationEnabled_864 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + bool arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setTranslationEnabled (arg1); +} + + +// void QUiLoader::setWorkingDirectory(const QDir &dir) + + +static void _init_f_setWorkingDirectory_1681 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("dir"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_f_setWorkingDirectory_1681 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QDir &arg1 = gsi::arg_reader() (args, heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader *)cls)->setWorkingDirectory (arg1); +} + + +// QDir QUiLoader::workingDirectory() + + +static void _init_f_workingDirectory_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_f_workingDirectory_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QDir)((QUiLoader *)cls)->workingDirectory ()); +} + + +// static QString QUiLoader::tr(const char *s, const char *c, int n) + + +static void _init_f_tr_4013 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c", true, "__null"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("n", true, "-1"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_tr_4013 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (__null, heap); + int arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (-1, heap); + ret.write ((QString)QUiLoader::tr (arg1, arg2, arg3)); +} + + +// static QString QUiLoader::trUtf8(const char *s, const char *c, int n) + + +static void _init_f_trUtf8_4013 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("s"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("c", true, "__null"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("n", true, "-1"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_f_trUtf8_4013 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + const char *arg2 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (__null, heap); + int arg3 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (-1, heap); + ret.write ((QString)QUiLoader::trUtf8 (arg1, arg2, arg3)); +} + + +namespace gsi +{ + +static gsi::Methods methods_QUiLoader () { + gsi::Methods methods; + methods += new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo); + methods += new qt_gsi::GenericMethod ("addPluginPath", "@brief Method void QUiLoader::addPluginPath(const QString &path)\n", false, &_init_f_addPluginPath_2025, &_call_f_addPluginPath_2025); + methods += new qt_gsi::GenericMethod ("availableLayouts", "@brief Method QStringList QUiLoader::availableLayouts()\n", true, &_init_f_availableLayouts_c0, &_call_f_availableLayouts_c0); + methods += new qt_gsi::GenericMethod ("availableWidgets", "@brief Method QStringList QUiLoader::availableWidgets()\n", true, &_init_f_availableWidgets_c0, &_call_f_availableWidgets_c0); + methods += new qt_gsi::GenericMethod ("clearPluginPaths", "@brief Method void QUiLoader::clearPluginPaths()\n", false, &_init_f_clearPluginPaths_0, &_call_f_clearPluginPaths_0); + methods += new qt_gsi::GenericMethod ("createAction", "@brief Method QAction *QUiLoader::createAction(QObject *parent, const QString &name)\n", false, &_init_f_createAction_3219, &_call_f_createAction_3219); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@brief Method QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name)\n", false, &_init_f_createActionGroup_3219, &_call_f_createActionGroup_3219); + methods += new qt_gsi::GenericMethod ("createLayout", "@brief Method QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name)\n", false, &_init_f_createLayout_5136, &_call_f_createLayout_5136); + methods += new qt_gsi::GenericMethod ("createWidget", "@brief Method QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)\n", false, &_init_f_createWidget_5149, &_call_f_createWidget_5149); + methods += new qt_gsi::GenericMethod ("errorString", "@brief Method QString QUiLoader::errorString()\n", true, &_init_f_errorString_c0, &_call_f_errorString_c0); + methods += new qt_gsi::GenericMethod ("isLanguageChangeEnabled?", "@brief Method bool QUiLoader::isLanguageChangeEnabled()\n", true, &_init_f_isLanguageChangeEnabled_c0, &_call_f_isLanguageChangeEnabled_c0); + methods += new qt_gsi::GenericMethod ("isTranslationEnabled?", "@brief Method bool QUiLoader::isTranslationEnabled()\n", true, &_init_f_isTranslationEnabled_c0, &_call_f_isTranslationEnabled_c0); + methods += new qt_gsi::GenericMethod ("load", "@brief Method QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget)\n", false, &_init_f_load_2654, &_call_f_load_2654); + methods += new qt_gsi::GenericMethod ("pluginPaths", "@brief Method QStringList QUiLoader::pluginPaths()\n", true, &_init_f_pluginPaths_c0, &_call_f_pluginPaths_c0); + methods += new qt_gsi::GenericMethod ("setLanguageChangeEnabled", "@brief Method void QUiLoader::setLanguageChangeEnabled(bool enabled)\n", false, &_init_f_setLanguageChangeEnabled_864, &_call_f_setLanguageChangeEnabled_864); + methods += new qt_gsi::GenericMethod ("setTranslationEnabled", "@brief Method void QUiLoader::setTranslationEnabled(bool enabled)\n", false, &_init_f_setTranslationEnabled_864, &_call_f_setTranslationEnabled_864); + methods += new qt_gsi::GenericMethod ("setWorkingDirectory", "@brief Method void QUiLoader::setWorkingDirectory(const QDir &dir)\n", false, &_init_f_setWorkingDirectory_1681, &_call_f_setWorkingDirectory_1681); + methods += new qt_gsi::GenericMethod ("workingDirectory", "@brief Method QDir QUiLoader::workingDirectory()\n", true, &_init_f_workingDirectory_c0, &_call_f_workingDirectory_c0); + methods += new qt_gsi::GenericStaticMethod ("tr", "@brief Static method QString QUiLoader::tr(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_tr_4013, &_call_f_tr_4013); + methods += new qt_gsi::GenericStaticMethod ("trUtf8", "@brief Static method QString QUiLoader::trUtf8(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_trUtf8_4013, &_call_f_trUtf8_4013); + return methods; +} + +gsi::Class &qtdecl_QObject (); + +qt_gsi::QtNativeClass decl_QUiLoader (qtdecl_QObject (), "QtUiTools", "QUiLoader_Native", + methods_QUiLoader (), + "@hide\n@alias QUiLoader"); + +GSI_QTUITOOLS_PUBLIC gsi::Class &qtdecl_QUiLoader () { return decl_QUiLoader; } + +} + + +class QUiLoader_Adaptor : public QUiLoader, public qt_gsi::QtObjectBase +{ +public: + + virtual ~QUiLoader_Adaptor(); + + // [adaptor ctor] QUiLoader::QUiLoader(QObject *parent) + QUiLoader_Adaptor() : QUiLoader() + { + qt_gsi::QtObjectBase::init (this); + } + + // [adaptor ctor] QUiLoader::QUiLoader(QObject *parent) + QUiLoader_Adaptor(QObject *parent) : QUiLoader(parent) + { + qt_gsi::QtObjectBase::init (this); + } + + // [expose] bool QUiLoader::isSignalConnected(const QMetaMethod &signal) + bool fp_QUiLoader_isSignalConnected_c2394 (const QMetaMethod &signal) const { + return QUiLoader::isSignalConnected(signal); + } + + // [expose] int QUiLoader::receivers(const char *signal) + int fp_QUiLoader_receivers_c1731 (const char *signal) const { + return QUiLoader::receivers(signal); + } + + // [expose] QObject *QUiLoader::sender() + QObject * fp_QUiLoader_sender_c0 () const { + return QUiLoader::sender(); + } + + // [expose] int QUiLoader::senderSignalIndex() + int fp_QUiLoader_senderSignalIndex_c0 () const { + return QUiLoader::senderSignalIndex(); + } + + // [adaptor impl] QAction *QUiLoader::createAction(QObject *parent, const QString &name) + QAction * cbs_createAction_3219_2(QObject *parent, const QString &name) + { + return QUiLoader::createAction(parent, name); + } + + virtual QAction * createAction(QObject *parent, const QString &name) + { + if (cb_createAction_3219_2.can_issue()) { + return cb_createAction_3219_2.issue(&QUiLoader_Adaptor::cbs_createAction_3219_2, parent, name); + } else { + return QUiLoader::createAction(parent, name); + } + } + + // [adaptor impl] QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + QActionGroup * cbs_createActionGroup_3219_2(QObject *parent, const QString &name) + { + return QUiLoader::createActionGroup(parent, name); + } + + virtual QActionGroup * createActionGroup(QObject *parent, const QString &name) + { + if (cb_createActionGroup_3219_2.can_issue()) { + return cb_createActionGroup_3219_2.issue(&QUiLoader_Adaptor::cbs_createActionGroup_3219_2, parent, name); + } else { + return QUiLoader::createActionGroup(parent, name); + } + } + + // [adaptor impl] QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + QLayout * cbs_createLayout_5136_2(const QString &className, QObject *parent, const QString &name) + { + return QUiLoader::createLayout(className, parent, name); + } + + virtual QLayout * createLayout(const QString &className, QObject *parent, const QString &name) + { + if (cb_createLayout_5136_2.can_issue()) { + return cb_createLayout_5136_2.issue(&QUiLoader_Adaptor::cbs_createLayout_5136_2, className, parent, name); + } else { + return QUiLoader::createLayout(className, parent, name); + } + } + + // [adaptor impl] QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + QWidget * cbs_createWidget_5149_2(const QString &className, QWidget *parent, const QString &name) + { + return QUiLoader::createWidget(className, parent, name); + } + + virtual QWidget * createWidget(const QString &className, QWidget *parent, const QString &name) + { + if (cb_createWidget_5149_2.can_issue()) { + return cb_createWidget_5149_2.issue(&QUiLoader_Adaptor::cbs_createWidget_5149_2, className, parent, name); + } else { + return QUiLoader::createWidget(className, parent, name); + } + } + + // [adaptor impl] bool QUiLoader::event(QEvent *) + bool cbs_event_1217_0(QEvent *arg1) + { + return QUiLoader::event(arg1); + } + + virtual bool event(QEvent *arg1) + { + if (cb_event_1217_0.can_issue()) { + return cb_event_1217_0.issue(&QUiLoader_Adaptor::cbs_event_1217_0, arg1); + } else { + return QUiLoader::event(arg1); + } + } + + // [adaptor impl] bool QUiLoader::eventFilter(QObject *, QEvent *) + bool cbs_eventFilter_2411_0(QObject *arg1, QEvent *arg2) + { + return QUiLoader::eventFilter(arg1, arg2); + } + + virtual bool eventFilter(QObject *arg1, QEvent *arg2) + { + if (cb_eventFilter_2411_0.can_issue()) { + return cb_eventFilter_2411_0.issue(&QUiLoader_Adaptor::cbs_eventFilter_2411_0, arg1, arg2); + } else { + return QUiLoader::eventFilter(arg1, arg2); + } + } + + // [adaptor impl] void QUiLoader::childEvent(QChildEvent *) + void cbs_childEvent_1701_0(QChildEvent *arg1) + { + QUiLoader::childEvent(arg1); + } + + virtual void childEvent(QChildEvent *arg1) + { + if (cb_childEvent_1701_0.can_issue()) { + cb_childEvent_1701_0.issue(&QUiLoader_Adaptor::cbs_childEvent_1701_0, arg1); + } else { + QUiLoader::childEvent(arg1); + } + } + + // [adaptor impl] void QUiLoader::customEvent(QEvent *) + void cbs_customEvent_1217_0(QEvent *arg1) + { + QUiLoader::customEvent(arg1); + } + + virtual void customEvent(QEvent *arg1) + { + if (cb_customEvent_1217_0.can_issue()) { + cb_customEvent_1217_0.issue(&QUiLoader_Adaptor::cbs_customEvent_1217_0, arg1); + } else { + QUiLoader::customEvent(arg1); + } + } + + // [adaptor impl] void QUiLoader::disconnectNotify(const QMetaMethod &signal) + void cbs_disconnectNotify_2394_0(const QMetaMethod &signal) + { + QUiLoader::disconnectNotify(signal); + } + + virtual void disconnectNotify(const QMetaMethod &signal) + { + if (cb_disconnectNotify_2394_0.can_issue()) { + cb_disconnectNotify_2394_0.issue(&QUiLoader_Adaptor::cbs_disconnectNotify_2394_0, signal); + } else { + QUiLoader::disconnectNotify(signal); + } + } + + // [adaptor impl] void QUiLoader::timerEvent(QTimerEvent *) + void cbs_timerEvent_1730_0(QTimerEvent *arg1) + { + QUiLoader::timerEvent(arg1); + } + + virtual void timerEvent(QTimerEvent *arg1) + { + if (cb_timerEvent_1730_0.can_issue()) { + cb_timerEvent_1730_0.issue(&QUiLoader_Adaptor::cbs_timerEvent_1730_0, arg1); + } else { + QUiLoader::timerEvent(arg1); + } + } + + gsi::Callback cb_createAction_3219_2; + gsi::Callback cb_createActionGroup_3219_2; + gsi::Callback cb_createLayout_5136_2; + gsi::Callback cb_createWidget_5149_2; + gsi::Callback cb_event_1217_0; + gsi::Callback cb_eventFilter_2411_0; + gsi::Callback cb_childEvent_1701_0; + gsi::Callback cb_customEvent_1217_0; + gsi::Callback cb_disconnectNotify_2394_0; + gsi::Callback cb_timerEvent_1730_0; +}; + +QUiLoader_Adaptor::~QUiLoader_Adaptor() { } + +// Constructor QUiLoader::QUiLoader(QObject *parent) (adaptor class) + +static void _init_ctor_QUiLoader_Adaptor_1302 (qt_gsi::GenericStaticMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent", true, "0"); + decl->add_arg (argspec_0); + decl->set_return_new (); +} + +static void _call_ctor_QUiLoader_Adaptor_1302 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args ? gsi::arg_reader() (args, heap) : gsi::arg_maker() (0, heap); + ret.write (new QUiLoader_Adaptor (arg1)); +} + + +// void QUiLoader::childEvent(QChildEvent *) + +static void _init_cbs_childEvent_1701_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_childEvent_1701_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QChildEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_childEvent_1701_0 (arg1); +} + +static void _set_callback_cbs_childEvent_1701_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_childEvent_1701_0 = cb; +} + + +// QAction *QUiLoader::createAction(QObject *parent, const QString &name) + +static void _init_cbs_createAction_3219_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_createAction_3219_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + const QString &arg2 = args.read (heap); + ret.write ((QAction *)((QUiLoader_Adaptor *)cls)->cbs_createAction_3219_2 (arg1, arg2)); +} + +static void _set_callback_cbs_createAction_3219_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createAction_3219_2 = cb; +} + + +// QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name) + +static void _init_cbs_createActionGroup_3219_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("parent"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("name"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_createActionGroup_3219_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + const QString &arg2 = args.read (heap); + ret.write ((QActionGroup *)((QUiLoader_Adaptor *)cls)->cbs_createActionGroup_3219_2 (arg1, arg2)); +} + +static void _set_callback_cbs_createActionGroup_3219_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createActionGroup_3219_2 = cb; +} + + +// QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name) + +static void _init_cbs_createLayout_5136_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_cbs_createLayout_5136_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = args.read (heap); + QObject *arg2 = args.read (heap); + const QString &arg3 = args.read (heap); + ret.write ((QLayout *)((QUiLoader_Adaptor *)cls)->cbs_createLayout_5136_2 (arg1, arg2, arg3)); +} + +static void _set_callback_cbs_createLayout_5136_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createLayout_5136_2 = cb; +} + + +// QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) + +static void _init_cbs_createWidget_5149_2 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("className"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("parent"); + decl->add_arg (argspec_1); + static gsi::ArgSpecBase argspec_2 ("name"); + decl->add_arg (argspec_2); + decl->set_return (); +} + +static void _call_cbs_createWidget_5149_2 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QString &arg1 = args.read (heap); + QWidget *arg2 = args.read (heap); + const QString &arg3 = args.read (heap); + ret.write ((QWidget *)((QUiLoader_Adaptor *)cls)->cbs_createWidget_5149_2 (arg1, arg2, arg3)); +} + +static void _set_callback_cbs_createWidget_5149_2 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_createWidget_5149_2 = cb; +} + + +// void QUiLoader::customEvent(QEvent *) + +static void _init_cbs_customEvent_1217_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_customEvent_1217_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_customEvent_1217_0 (arg1); +} + +static void _set_callback_cbs_customEvent_1217_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_customEvent_1217_0 = cb; +} + + +// void QUiLoader::disconnectNotify(const QMetaMethod &signal) + +static void _init_cbs_disconnectNotify_2394_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("signal"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_disconnectNotify_2394_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QMetaMethod &arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_disconnectNotify_2394_0 (arg1); +} + +static void _set_callback_cbs_disconnectNotify_2394_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_disconnectNotify_2394_0 = cb; +} + + +// bool QUiLoader::event(QEvent *) + +static void _init_cbs_event_1217_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_event_1217_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QEvent *arg1 = args.read (heap); + ret.write ((bool)((QUiLoader_Adaptor *)cls)->cbs_event_1217_0 (arg1)); +} + +static void _set_callback_cbs_event_1217_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_event_1217_0 = cb; +} + + +// bool QUiLoader::eventFilter(QObject *, QEvent *) + +static void _init_cbs_eventFilter_2411_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + static gsi::ArgSpecBase argspec_1 ("arg2"); + decl->add_arg (argspec_1); + decl->set_return (); +} + +static void _call_cbs_eventFilter_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QObject *arg1 = args.read (heap); + QEvent *arg2 = args.read (heap); + ret.write ((bool)((QUiLoader_Adaptor *)cls)->cbs_eventFilter_2411_0 (arg1, arg2)); +} + +static void _set_callback_cbs_eventFilter_2411_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_eventFilter_2411_0 = cb; +} + + +// exposed bool QUiLoader::isSignalConnected(const QMetaMethod &signal) + +static void _init_fp_isSignalConnected_c2394 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("signal"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_fp_isSignalConnected_c2394 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const QMetaMethod &arg1 = gsi::arg_reader() (args, heap); + ret.write ((bool)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_isSignalConnected_c2394 (arg1)); +} + + +// exposed int QUiLoader::receivers(const char *signal) + +static void _init_fp_receivers_c1731 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("signal"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_fp_receivers_c1731 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + const char *arg1 = gsi::arg_reader() (args, heap); + ret.write ((int)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_receivers_c1731 (arg1)); +} + + +// exposed QObject *QUiLoader::sender() + +static void _init_fp_sender_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_fp_sender_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((QObject *)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_sender_c0 ()); +} + + +// exposed int QUiLoader::senderSignalIndex() + +static void _init_fp_senderSignalIndex_c0 (qt_gsi::GenericMethod *decl) +{ + decl->set_return (); +} + +static void _call_fp_senderSignalIndex_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + ret.write ((int)((QUiLoader_Adaptor *)cls)->fp_QUiLoader_senderSignalIndex_c0 ()); +} + + +// void QUiLoader::timerEvent(QTimerEvent *) + +static void _init_cbs_timerEvent_1730_0 (qt_gsi::GenericMethod *decl) +{ + static gsi::ArgSpecBase argspec_0 ("arg1"); + decl->add_arg (argspec_0); + decl->set_return (); +} + +static void _call_cbs_timerEvent_1730_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) +{ + __SUPPRESS_UNUSED_WARNING(args); + tl::Heap heap; + QTimerEvent *arg1 = args.read (heap); + __SUPPRESS_UNUSED_WARNING(ret); + ((QUiLoader_Adaptor *)cls)->cbs_timerEvent_1730_0 (arg1); +} + +static void _set_callback_cbs_timerEvent_1730_0 (void *cls, const gsi::Callback &cb) +{ + ((QUiLoader_Adaptor *)cls)->cb_timerEvent_1730_0 = cb; +} + + +namespace gsi +{ + +gsi::Class &qtdecl_QUiLoader (); + +static gsi::Methods methods_QUiLoader_Adaptor () { + gsi::Methods methods; + methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QUiLoader::QUiLoader(QObject *parent)\nThis method creates an object of class QUiLoader.", &_init_ctor_QUiLoader_Adaptor_1302, &_call_ctor_QUiLoader_Adaptor_1302); + methods += new qt_gsi::GenericMethod ("*childEvent", "@brief Virtual method void QUiLoader::childEvent(QChildEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0); + methods += new qt_gsi::GenericMethod ("*childEvent", "@hide", false, &_init_cbs_childEvent_1701_0, &_call_cbs_childEvent_1701_0, &_set_callback_cbs_childEvent_1701_0); + methods += new qt_gsi::GenericMethod ("createAction", "@brief Virtual method QAction *QUiLoader::createAction(QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createAction_3219_2, &_call_cbs_createAction_3219_2); + methods += new qt_gsi::GenericMethod ("createAction", "@hide", false, &_init_cbs_createAction_3219_2, &_call_cbs_createAction_3219_2, &_set_callback_cbs_createAction_3219_2); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@brief Virtual method QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createActionGroup_3219_2, &_call_cbs_createActionGroup_3219_2); + methods += new qt_gsi::GenericMethod ("createActionGroup", "@hide", false, &_init_cbs_createActionGroup_3219_2, &_call_cbs_createActionGroup_3219_2, &_set_callback_cbs_createActionGroup_3219_2); + methods += new qt_gsi::GenericMethod ("createLayout", "@brief Virtual method QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createLayout_5136_2, &_call_cbs_createLayout_5136_2); + methods += new qt_gsi::GenericMethod ("createLayout", "@hide", false, &_init_cbs_createLayout_5136_2, &_call_cbs_createLayout_5136_2, &_set_callback_cbs_createLayout_5136_2); + methods += new qt_gsi::GenericMethod ("createWidget", "@brief Virtual method QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_createWidget_5149_2, &_call_cbs_createWidget_5149_2); + methods += new qt_gsi::GenericMethod ("createWidget", "@hide", false, &_init_cbs_createWidget_5149_2, &_call_cbs_createWidget_5149_2, &_set_callback_cbs_createWidget_5149_2); + methods += new qt_gsi::GenericMethod ("*customEvent", "@brief Virtual method void QUiLoader::customEvent(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0); + methods += new qt_gsi::GenericMethod ("*customEvent", "@hide", false, &_init_cbs_customEvent_1217_0, &_call_cbs_customEvent_1217_0, &_set_callback_cbs_customEvent_1217_0); + methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@brief Virtual method void QUiLoader::disconnectNotify(const QMetaMethod &signal)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_disconnectNotify_2394_0, &_call_cbs_disconnectNotify_2394_0); + methods += new qt_gsi::GenericMethod ("*disconnectNotify", "@hide", false, &_init_cbs_disconnectNotify_2394_0, &_call_cbs_disconnectNotify_2394_0, &_set_callback_cbs_disconnectNotify_2394_0); + methods += new qt_gsi::GenericMethod ("event", "@brief Virtual method bool QUiLoader::event(QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0); + methods += new qt_gsi::GenericMethod ("event", "@hide", false, &_init_cbs_event_1217_0, &_call_cbs_event_1217_0, &_set_callback_cbs_event_1217_0); + methods += new qt_gsi::GenericMethod ("eventFilter", "@brief Virtual method bool QUiLoader::eventFilter(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0); + methods += new qt_gsi::GenericMethod ("eventFilter", "@hide", false, &_init_cbs_eventFilter_2411_0, &_call_cbs_eventFilter_2411_0, &_set_callback_cbs_eventFilter_2411_0); + methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QUiLoader::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394); + methods += new qt_gsi::GenericMethod ("*receivers", "@brief Method int QUiLoader::receivers(const char *signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_receivers_c1731, &_call_fp_receivers_c1731); + methods += new qt_gsi::GenericMethod ("*sender", "@brief Method QObject *QUiLoader::sender()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_sender_c0, &_call_fp_sender_c0); + methods += new qt_gsi::GenericMethod ("*senderSignalIndex", "@brief Method int QUiLoader::senderSignalIndex()\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_senderSignalIndex_c0, &_call_fp_senderSignalIndex_c0); + methods += new qt_gsi::GenericMethod ("*timerEvent", "@brief Virtual method void QUiLoader::timerEvent(QTimerEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0); + methods += new qt_gsi::GenericMethod ("*timerEvent", "@hide", false, &_init_cbs_timerEvent_1730_0, &_call_cbs_timerEvent_1730_0, &_set_callback_cbs_timerEvent_1730_0); + return methods; +} + +gsi::Class decl_QUiLoader_Adaptor (qtdecl_QUiLoader (), "QtUiTools", "QUiLoader", + methods_QUiLoader_Adaptor (), + "@qt\n@brief Binding of QUiLoader"); + +} + diff --git a/src/gsiqt/qt5/QtUiTools/gsiDeclQtUiToolsTypeTraits.h b/src/gsiqt/qt5/QtUiTools/gsiDeclQtUiToolsTypeTraits.h new file mode 100644 index 000000000..85928cc3b --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/gsiDeclQtUiToolsTypeTraits.h @@ -0,0 +1,138 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/** +* @file generated/gsiDeclQtUiToolsTypeTraits.h +* @brief Type traits for the Qt binding classes +* +* DO NOT EDIT THIS FILE. +* This file has been created automatically +*/ + +#ifndef _HDR_gsiDeclQtUiToolsTypeTraits +#define _HDR_gsiDeclQtUiToolsTypeTraits + +#include "gsiTypes.h" + + +struct QByteArrayDataPtr; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QMessageLogContext; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QMessageLogger; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +struct QMetaObject; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +#include +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QObject; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QObject_Adaptor; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QRegExp; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QSignalBlocker; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; +} + +struct QStringDataPtr; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QStringMatcher; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QSysInfo; +namespace tl { +template <> struct type_traits : public type_traits { +}; +} + +class QUiLoader; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class QUiLoader_Adaptor; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; +} + +class Qt_Namespace; +namespace tl { +template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; +} + + +#endif diff --git a/src/gsiqt/qt5/QtUiTools/gsiQtExternals.h b/src/gsiqt/qt5/QtUiTools/gsiQtExternals.h new file mode 100644 index 000000000..789b4e182 --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/gsiQtExternals.h @@ -0,0 +1,48 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +/* + External declarations for for Qt bindings + + DO NOT EDIT THIS FILE. + This file has been created automatically +*/ + +#if !defined(HDR_gsiQtUiToolsExternals) +#define HDR_gsiQtUiToolsExternals + +#include "gsiClass.h" +#include "gsiQtUiToolsCommon.h" + +class QUiLoader; + +namespace tl { template <> struct type_traits : public type_traits { + typedef tl::false_tag has_copy_constructor; +}; } + +namespace gsi { GSI_QTUITOOLS_PUBLIC gsi::Class &qtdecl_QUiLoader (); } + + +#define QT_EXTERNAL_BASE(X) gsi::qtdecl_##X(), + +#endif + diff --git a/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsCommon.h b/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsCommon.h new file mode 100644 index 000000000..49782546e --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsCommon.h @@ -0,0 +1,25 @@ +/** + * Common header for Qt binding definition library + * + * DO NOT EDIT THIS FILE. + * This file has been created automatically + */ + +#include "tlDefs.h" + +#if !defined(HDR_gsiQtUiToolsCommon_h) +# define HDR_gsiQtUiToolsCommon_h + +# ifdef MAKE_GSI_QTUITOOLS_LIBRARY +# define GSI_QTUITOOLS_PUBLIC DEF_INSIDE_PUBLIC +# define GSI_QTUITOOLS_PUBLIC_TEMPLATE DEF_INSIDE_PUBLIC_TEMPLATE +# define GSI_QTUITOOLS_LOCAL DEF_INSIDE_LOCAL +# else +# define GSI_QTUITOOLS_PUBLIC DEF_OUTSIDE_PUBLIC +# define GSI_QTUITOOLS_PUBLIC_TEMPLATE DEF_OUTSIDE_PUBLIC_TEMPLATE +# define GSI_QTUITOOLS_LOCAL DEF_OUTSIDE_LOCAL +# endif + +#define FORCE_LINK_GSI_QTUITOOLS GSI_QTUITOOLS_PUBLIC int _force_link_gsiQtUiTools_f (); int _force_link_gsiQtUiTools = _force_link_gsiQtUiTools_f (); + +#endif diff --git a/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsMain.cc b/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsMain.cc new file mode 100644 index 000000000..fce03b11f --- /dev/null +++ b/src/gsiqt/qt5/QtUiTools/gsiQtUiToolsMain.cc @@ -0,0 +1,11 @@ +/** + * Main source file for Qt binding definition library + * + * DO NOT EDIT THIS FILE. + * This file has been created automatically + */ + +#include "gsiQtUiToolsCommon.h" + +GSI_QTUITOOLS_PUBLIC int _force_link_gsiQtUiTools_f () { return 0; } + diff --git a/src/gsiqt/qt5/QtWidgets/gsiDeclQApplication.cc b/src/gsiqt/qt5/QtWidgets/gsiDeclQApplication.cc index d50d182d1..3b90953fd 100644 --- a/src/gsiqt/qt5/QtWidgets/gsiDeclQApplication.cc +++ b/src/gsiqt/qt5/QtWidgets/gsiDeclQApplication.cc @@ -69,28 +69,6 @@ static void _call_f_autoSipEnabled_c0 (const qt_gsi::GenericMethod * /*decl*/, v } -// bool QApplication::notify(QObject *, QEvent *) - - -static void _init_f_notify_2411 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_f_notify_2411 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = gsi::arg_reader() (args, heap); - QEvent *arg2 = gsi::arg_reader() (args, heap); - ret.write ((bool)((QApplication *)cls)->notify (arg1, arg2)); -} - - // void QApplication::setAutoSipEnabled(const bool enabled) @@ -1074,7 +1052,6 @@ static gsi::Methods methods_QApplication () { gsi::Methods methods; methods += new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo); methods += new qt_gsi::GenericMethod (":autoSipEnabled", "@brief Method bool QApplication::autoSipEnabled()\n", true, &_init_f_autoSipEnabled_c0, &_call_f_autoSipEnabled_c0); - methods += new qt_gsi::GenericMethod ("notify", "@brief Method bool QApplication::notify(QObject *, QEvent *)\nThis is a reimplementation of QGuiApplication::notify", false, &_init_f_notify_2411, &_call_f_notify_2411); methods += new qt_gsi::GenericMethod ("setAutoSipEnabled|autoSipEnabled=", "@brief Method void QApplication::setAutoSipEnabled(const bool enabled)\n", false, &_init_f_setAutoSipEnabled_1559, &_call_f_setAutoSipEnabled_1559); methods += new qt_gsi::GenericMethod ("setStyleSheet|styleSheet=", "@brief Method void QApplication::setStyleSheet(const QString &sheet)\n", false, &_init_f_setStyleSheet_2025, &_call_f_setStyleSheet_2025); methods += new qt_gsi::GenericMethod (":styleSheet", "@brief Method QString QApplication::styleSheet()\n", true, &_init_f_styleSheet_c0, &_call_f_styleSheet_c0); @@ -1296,21 +1273,6 @@ public: emit QApplication::layoutDirectionChanged(direction); } - // [adaptor impl] bool QApplication::notify(QObject *, QEvent *) - bool cbs_notify_2411_0(QObject *arg1, QEvent *arg2) - { - return QApplication::notify(arg1, arg2); - } - - virtual bool notify(QObject *arg1, QEvent *arg2) - { - if (cb_notify_2411_0.can_issue()) { - return cb_notify_2411_0.issue(&QApplication_Adaptor::cbs_notify_2411_0, arg1, arg2); - } else { - return QApplication::notify(arg1, arg2); - } - } - // [emitter impl] void QApplication::objectNameChanged(const QString &objectName) void emitter_QApplication_objectNameChanged_4567(const QString &objectName) { @@ -1430,7 +1392,6 @@ public: } gsi::Callback cb_eventFilter_2411_0; - gsi::Callback cb_notify_2411_0; gsi::Callback cb_childEvent_1701_0; gsi::Callback cb_customEvent_1217_0; gsi::Callback cb_disconnectNotify_2394_0; @@ -1778,32 +1739,6 @@ static void _call_emitter_layoutDirectionChanged_2316 (const qt_gsi::GenericMeth } -// bool QApplication::notify(QObject *, QEvent *) - -static void _init_cbs_notify_2411_0 (qt_gsi::GenericMethod *decl) -{ - static gsi::ArgSpecBase argspec_0 ("arg1"); - decl->add_arg (argspec_0); - static gsi::ArgSpecBase argspec_1 ("arg2"); - decl->add_arg (argspec_1); - decl->set_return (); -} - -static void _call_cbs_notify_2411_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) -{ - __SUPPRESS_UNUSED_WARNING(args); - tl::Heap heap; - QObject *arg1 = args.read (heap); - QEvent *arg2 = args.read (heap); - ret.write ((bool)((QApplication_Adaptor *)cls)->cbs_notify_2411_0 (arg1, arg2)); -} - -static void _set_callback_cbs_notify_2411_0 (void *cls, const gsi::Callback &cb) -{ - ((QApplication_Adaptor *)cls)->cb_notify_2411_0 = cb; -} - - // emitter void QApplication::objectNameChanged(const QString &objectName) static void _init_emitter_objectNameChanged_4567 (qt_gsi::GenericMethod *decl) @@ -2022,8 +1957,6 @@ static gsi::Methods methods_QApplication_Adaptor () { methods += new qt_gsi::GenericMethod ("*isSignalConnected", "@brief Method bool QApplication::isSignalConnected(const QMetaMethod &signal)\nThis method is protected and can only be called from inside a derived class.", true, &_init_fp_isSignalConnected_c2394, &_call_fp_isSignalConnected_c2394); methods += new qt_gsi::GenericMethod ("emit_lastWindowClosed", "@brief Emitter for signal void QApplication::lastWindowClosed()\nCall this method to emit this signal.", false, &_init_emitter_lastWindowClosed_0, &_call_emitter_lastWindowClosed_0); methods += new qt_gsi::GenericMethod ("emit_layoutDirectionChanged", "@brief Emitter for signal void QApplication::layoutDirectionChanged(Qt::LayoutDirection direction)\nCall this method to emit this signal.", false, &_init_emitter_layoutDirectionChanged_2316, &_call_emitter_layoutDirectionChanged_2316); - methods += new qt_gsi::GenericMethod ("notify", "@brief Virtual method bool QApplication::notify(QObject *, QEvent *)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0); - methods += new qt_gsi::GenericMethod ("notify", "@hide", false, &_init_cbs_notify_2411_0, &_call_cbs_notify_2411_0, &_set_callback_cbs_notify_2411_0); methods += new qt_gsi::GenericMethod ("emit_objectNameChanged", "@brief Emitter for signal void QApplication::objectNameChanged(const QString &objectName)\nCall this method to emit this signal.", false, &_init_emitter_objectNameChanged_4567, &_call_emitter_objectNameChanged_4567); methods += new qt_gsi::GenericMethod ("emit_organizationDomainChanged", "@brief Emitter for signal void QApplication::organizationDomainChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationDomainChanged_0, &_call_emitter_organizationDomainChanged_0); methods += new qt_gsi::GenericMethod ("emit_organizationNameChanged", "@brief Emitter for signal void QApplication::organizationNameChanged()\nCall this method to emit this signal.", false, &_init_emitter_organizationNameChanged_0, &_call_emitter_organizationNameChanged_0); diff --git a/src/gsiqt/qt5/qt5.pro b/src/gsiqt/qt5/qt5.pro index 5a435a3b8..7b882b8bc 100644 --- a/src/gsiqt/qt5/qt5.pro +++ b/src/gsiqt/qt5/qt5.pro @@ -12,7 +12,8 @@ SUBDIRS = \ QtPrintSupport \ QtSvg \ QtXmlPatterns \ - QtXml + QtXml \ + QtUiTools QtGui.depends += QtCore QtNetwork.depends += QtCore @@ -24,3 +25,4 @@ QtPrintSupport.depends += QtCore QtWidgets QtSvg.depends += QtCore QtWidgets QtXmlPatterns.depends += QtCore QtXml.depends += QtCore +QtUiTools.depends += QtCore diff --git a/src/gsiqt/qtbasic/gsiQtUiToolsExternals.h b/src/gsiqt/qtbasic/gsiQtUiToolsExternals.h new file mode 100644 index 000000000..341ff42d5 --- /dev/null +++ b/src/gsiqt/qtbasic/gsiQtUiToolsExternals.h @@ -0,0 +1,27 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#if QT_VERSION >= 0x050000 +# include "../qt5/QtUiTools/gsiQtExternals.h" +#else +# include "../qt4/QtUiTools/gsiQtExternals.h" +#endif diff --git a/src/klayout.pri b/src/klayout.pri index e7b3807b7..cffd8ab63 100644 --- a/src/klayout.pri +++ b/src/klayout.pri @@ -163,13 +163,13 @@ equals(HAVE_QT, "0") { QT += core network xml sql equals(HAVE_QT5, "1") { - QT += designer printsupport widgets + QT += designer printsupport widgets uitools equals(HAVE_QTBINDINGS, "1") { QT += multimedia multimediawidgets xmlpatterns svg gui } } else { # questionable: use uitools instead? - CONFIG += designer + CONFIG += designer uitools } } diff --git a/src/klayout_main/klayout_main/klayout.cc b/src/klayout_main/klayout_main/klayout.cc index fd1561980..8091c7196 100644 --- a/src/klayout_main/klayout_main/klayout.cc +++ b/src/klayout_main/klayout_main/klayout.cc @@ -51,18 +51,30 @@ // pulls in the Qt GSI binding modules # include "gsiQtGuiExternals.h" +# include "gsiQtWidgetsExternals.h" # include "gsiQtCoreExternals.h" +# include "gsiQtMultimediaExternals.h" +# include "gsiQtPrintSupportExternals.h" # include "gsiQtXmlExternals.h" +# include "gsiQtXmlPatternsExternals.h" # include "gsiQtSqlExternals.h" +# include "gsiQtSvgExternals.h" # include "gsiQtNetworkExternals.h" # include "gsiQtDesignerExternals.h" +# include "gsiQtUiToolsExternals.h" FORCE_LINK_GSI_QTCORE FORCE_LINK_GSI_QTGUI +FORCE_LINK_GSI_QTWIDGETS +FORCE_LINK_GSI_QTMULTIMEDIA +FORCE_LINK_GSI_QTPRINTSUPPORT FORCE_LINK_GSI_QTXML +FORCE_LINK_GSI_QTXMLPATTERNS FORCE_LINK_GSI_QTDESIGNER FORCE_LINK_GSI_QTNETWORK FORCE_LINK_GSI_QTSQL +FORCE_LINK_GSI_QTSVG +FORCE_LINK_GSI_QTUITOOLS #else # define QT_EXTERNAL_BASE(x) diff --git a/src/klayout_main/klayout_main/klayout_main.pro b/src/klayout_main/klayout_main/klayout_main.pro index 64abec3bd..0200f2285 100644 --- a/src/klayout_main/klayout_main/klayout_main.pro +++ b/src/klayout_main/klayout_main/klayout_main.pro @@ -25,7 +25,7 @@ INCLUDEPATH += $$QTBASIC_INC DEPENDPATH += $$QTBASIC_INC equals(HAVE_QTBINDINGS, "1") { - LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtXml -lklayout_QtNetwork -lklayout_QtSql -lklayout_QtDesigner + LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtXml -lklayout_QtNetwork -lklayout_QtSql -lklayout_QtDesigner -lklayout_QtUiTools equals(HAVE_QT5, "1") { LIBS += -lklayout_QtMultimedia -lklayout_QtPrintSupport -lklayout_QtSvg -lklayout_QtWidgets -lklayout_QtXmlPatterns } diff --git a/src/lay/lay/doc/programming/qt_binding.xml b/src/lay/lay/doc/programming/qt_binding.xml index 7d5c22b3a..9ba46caef 100644 --- a/src/lay/lay/doc/programming/qt_binding.xml +++ b/src/lay/lay/doc/programming/qt_binding.xml @@ -30,6 +30,7 @@
  • QtSql: database support
  • QtNetwork: various network protocols and supporting classes
  • QtDesigner: dynamically load designer files (.ui)
  • +
  • QtUiTools: dynamically load designer files (.ui)
  • QtMultimedia (Qt5): multimedia support
  • QtPrintSupport (Qt5): print support
  • QtSvg (Qt5): SVG implementation
  • diff --git a/src/lay/lay/layMacroEditorDialog.cc b/src/lay/lay/layMacroEditorDialog.cc index ac46f6402..a5acce812 100644 --- a/src/lay/lay/layMacroEditorDialog.cc +++ b/src/lay/lay/layMacroEditorDialog.cc @@ -244,6 +244,7 @@ MacroEditorDialog::MacroEditorDialog (lay::Dispatcher *pr, lym::MacroCollection m_highlighters (this), m_in_exec (false), m_in_breakpoint (false), + m_ignore_exec_events (false), mp_exec_controller (0), mp_current_interpreter (0), m_continue (false), @@ -2850,54 +2851,77 @@ MacroEditorDialog::start_exec (gsi::Interpreter *ec) if (m_in_exec) { tl_assert (ec != mp_exec_controller); return; + } else if (m_ignore_exec_events) { + return; } - m_file_to_widget.clear (); - m_include_expanders.clear (); - m_include_paths_to_ids.clear (); - m_include_file_id_cache.clear (); + // prevents recursion + m_ignore_exec_events = true; - m_last_process_events = tl::Clock::current (); + try { - m_in_exec = true; - mp_exec_controller = ec; - m_in_breakpoint = false; - m_continue = true; - m_trace_count = 0; - m_current_stack_depth = -1; - m_process_events_interval = 0.05; + m_file_to_widget.clear (); + m_include_expanders.clear (); + m_include_paths_to_ids.clear (); + m_include_file_id_cache.clear (); - for (std::map::const_iterator f = m_tab_widgets.begin (); f != m_tab_widgets.end (); ++f) { - f->second->exec_model ()->set_current_line (-1); - f->second->exec_model ()->set_run_mode (true); + m_last_process_events = tl::Clock::current (); + + m_in_exec = true; + mp_exec_controller = ec; + m_in_breakpoint = false; + m_continue = true; + m_trace_count = 0; + m_current_stack_depth = -1; + m_process_events_interval = 0.05; + + for (std::map::const_iterator f = m_tab_widgets.begin (); f != m_tab_widgets.end (); ++f) { + f->second->exec_model ()->set_current_line (-1); + f->second->exec_model ()->set_run_mode (true); + } + + do_update_ui_to_run_mode (); + + } catch (...) { + // .. ignore exceptions here .. } - do_update_ui_to_run_mode (); + m_ignore_exec_events = false; } void MacroEditorDialog::end_exec (gsi::Interpreter *ec) { - // ignore calls from other interpreters - if (m_in_exec && ec != mp_exec_controller) { + if ((m_in_exec && ec != mp_exec_controller) || m_ignore_exec_events) { return; } - if (QApplication::activeModalWidget () == this) { - // close this window if it was shown in modal mode - QDialog::accept (); + // prevents recursion + m_ignore_exec_events = true; + + try { + + m_in_exec = false; + mp_exec_controller = 0; + m_continue = false; + m_current_stack_depth = -1; + + if (QApplication::activeModalWidget () == this) { + // close this window if it was shown in modal mode + QDialog::accept (); + } + + for (std::map::const_iterator f = m_tab_widgets.begin (); f != m_tab_widgets.end (); ++f) { + f->second->exec_model ()->set_run_mode (false); + } + + do_update_ui_to_run_mode (); + + } catch (...) { + // .. ignore exceptions here .. } - m_in_exec = false; - mp_exec_controller = 0; - m_continue = false; - m_current_stack_depth = -1; - - for (std::map::const_iterator f = m_tab_widgets.begin (); f != m_tab_widgets.end (); ++f) { - f->second->exec_model ()->set_run_mode (false); - } - - do_update_ui_to_run_mode (); + m_ignore_exec_events = false; } const size_t pseudo_file_offset = std::numeric_limits::max () / 2; diff --git a/src/lay/lay/layMacroEditorDialog.h b/src/lay/lay/layMacroEditorDialog.h index fd60dbb0b..750715f79 100644 --- a/src/lay/lay/layMacroEditorDialog.h +++ b/src/lay/lay/layMacroEditorDialog.h @@ -323,7 +323,7 @@ private: std::map m_include_paths_to_ids; std::map, std::pair > m_include_file_id_cache; std::vector m_macro_trees; - bool m_in_exec, m_in_breakpoint; + bool m_in_exec, m_in_breakpoint, m_ignore_exec_events; gsi::Interpreter *mp_exec_controller, *mp_current_interpreter; bool m_continue; int m_trace_count; diff --git a/src/lay/lay/layMacroEditorPage.cc b/src/lay/lay/layMacroEditorPage.cc index 3e6b34b7b..10fe4c9e6 100644 --- a/src/lay/lay/layMacroEditorPage.cc +++ b/src/lay/lay/layMacroEditorPage.cc @@ -25,6 +25,7 @@ #include "lymMacroInterpreter.h" #include "tlExceptions.h" #include "tlString.h" +#include "layQtTools.h" #include #include @@ -584,12 +585,23 @@ void MacroEditorPage::current_line_changed () void MacroEditorPage::run_mode_changed () { - if (mp_exec_model->run_mode ()) { - set_error_line (0); + // this prevents recursion when the following lines trigger anything that routes through the interpreter + bool bl = mp_exec_model->blockSignals (true); + + try { + + if (mp_exec_model->run_mode ()) { + set_error_line (0); + } + + mp_text->setReadOnly (! mp_macro || mp_macro->is_readonly () || mp_exec_model->run_mode ()); + update_extra_selections (); + + } catch (...) { + // .. ignore exceptions here .. } - mp_text->setReadOnly (! mp_macro || mp_macro->is_readonly () || mp_exec_model->run_mode ()); - update_extra_selections (); + mp_exec_model->blockSignals (bl); } void MacroEditorPage::breakpoints_changed () diff --git a/src/pymod/QtCore/QtCoreMain.cc b/src/pymod/QtCore/QtCoreMain.cc index 246cc8276..494255582 100644 --- a/src/pymod/QtCore/QtCoreMain.cc +++ b/src/pymod/QtCore/QtCoreMain.cc @@ -37,3 +37,4 @@ FORCE_LINK_GSI_QTGUI FORCE_LINK_GSI_QTWIDGETS DEFINE_PYMOD(QtCore, "QtCore", "KLayout/Qt module 'QtCore'") + diff --git a/src/pymod/QtUiTools/QtUiTools.pro b/src/pymod/QtUiTools/QtUiTools.pro new file mode 100644 index 000000000..616b04042 --- /dev/null +++ b/src/pymod/QtUiTools/QtUiTools.pro @@ -0,0 +1,11 @@ + +TARGET = QtUiTools + +include($$PWD/../pymod.pri) + +SOURCES = \ + QtUiToolsMain.cc \ + +HEADERS += \ + +LIBS += -lklayout_QtUiTools -lklayout_QtCore diff --git a/src/pymod/QtUiTools/QtUiToolsMain.cc b/src/pymod/QtUiTools/QtUiToolsMain.cc new file mode 100644 index 000000000..49d8fbc34 --- /dev/null +++ b/src/pymod/QtUiTools/QtUiToolsMain.cc @@ -0,0 +1,33 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2021 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "../pymodHelper.h" + +// To force linking of the QtCore module +#include "../../gsiqt/qtbasic/gsiQtCoreExternals.h" +FORCE_LINK_GSI_QTCORE + +#include "../../gsiqt/qtbasic/gsiQtUiToolsExternals.h" +FORCE_LINK_GSI_QTUITOOLS + +DEFINE_PYMOD(QtUiTools, "QtUiTools", "KLayout/Qt module 'QtUiTools'") + diff --git a/src/pymod/__init__.py.qt4 b/src/pymod/__init__.py.qt4 index 1404dbe71..7ca1f3e1b 100644 --- a/src/pymod/__init__.py.qt4 +++ b/src/pymod/__init__.py.qt4 @@ -1,5 +1,5 @@ # klayout library definition file -__all__ = [ "tl", "db", "lib", "rdb", "QtCore", "QtGui", "QtXml", "QtSql", "QtNetwork", "QtDesigner", "lay" ] +__all__ = [ "tl", "db", "lib", "rdb", "QtCore", "QtGui", "QtXml", "QtSql", "QtNetwork", "QtDesigner", "QtUiTools", "lay" ] diff --git a/src/pymod/__init__.py.qt5 b/src/pymod/__init__.py.qt5 index 6077d2f06..c6d2339fa 100644 --- a/src/pymod/__init__.py.qt5 +++ b/src/pymod/__init__.py.qt5 @@ -2,7 +2,7 @@ # klayout library definition file __all__ = [ "tl", "db", "lib", "rdb", - "QtCore", "QtGui", "QtNetwork", "QtSql", "QtWidgets", "QtDesigner", + "QtCore", "QtGui", "QtNetwork", "QtSql", "QtWidgets", "QtDesigner", "QtUiTools", "QtMultimedia", "QtPrintSupport", "QtSvg", "QtXmlPatterns", "QtXml", "lay" ] diff --git a/src/pymod/pymod.pro b/src/pymod/pymod.pro index 3cd7e2fe6..82f6124f1 100644 --- a/src/pymod/pymod.pro +++ b/src/pymod/pymod.pro @@ -20,6 +20,7 @@ SUBDIRS = \ QtSql \ QtWidgets \ QtDesigner \ + QtUiTools \ QtMultimedia \ QtPrintSupport \ QtSvg \ @@ -34,7 +35,8 @@ SUBDIRS = \ QtXml \ QtSql \ QtNetwork \ - QtDesigner + QtDesigner \ + QtUiTools } } diff --git a/src/pymod/unit_tests/pymod_tests.cc b/src/pymod/unit_tests/pymod_tests.cc index 1c5c5e72d..16de70c82 100644 --- a/src/pymod/unit_tests/pymod_tests.cc +++ b/src/pymod/unit_tests/pymod_tests.cc @@ -98,6 +98,7 @@ PYMODTEST (import_QtXml, "import_QtXml.py") PYMODTEST (import_QtSql, "import_QtSql.py") PYMODTEST (import_QtNetwork, "import_QtNetwork.py") PYMODTEST (import_QtDesigner, "import_QtDesigner.py") +PYMODTEST (import_QtUiTools, "import_QtUiTools.py") #if QT_VERSION >= 0x50000 diff --git a/src/tl/tl/tlTimer.cc b/src/tl/tl/tlTimer.cc index 35b384616..3827989fc 100644 --- a/src/tl/tl/tlTimer.cc +++ b/src/tl/tl/tlTimer.cc @@ -31,6 +31,8 @@ #elif defined(__MACH__) # include # include +# include +# include #else # include # include diff --git a/testdata/pymod/import_QtUiTools.py b/testdata/pymod/import_QtUiTools.py new file mode 100755 index 000000000..811e12200 --- /dev/null +++ b/testdata/pymod/import_QtUiTools.py @@ -0,0 +1,43 @@ +# KLayout Layout Viewer +# Copyright (C) 2006-2021 Matthias Koefferlein +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +import klayout.QtCore as QtCore +import klayout.QtUiTools as QtUiTools +import unittest +import sys + +# Tests the basic abilities of the module + +class BasicTest(unittest.TestCase): + + def test_1(self): + self.assertEqual("QUiLoader" in QtUiTools.__all__, True) + + def test_2(self): + app = QtCore.QCoreApplication([ "appname" ]) + q = QtUiTools.QUiLoader() + +# run unit tests +if __name__ == '__main__': + suite = unittest.TestSuite() + suite = unittest.TestLoader().loadTestsFromTestCase(BasicTest) + + if not unittest.TextTestRunner(verbosity = 1).run(suite).wasSuccessful(): + sys.exit(1) + +