diff --git a/.gitignore b/.gitignore index dee88c0f..6e2e35e0 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ examples/modelview_color6/modelview_color6 examples/libraries/extras-scintillaedit/extras-scintillaedit examples/libraries/qt-multimedia/qt-multimedia examples/libraries/qt-network/qt-network +examples/libraries/qt-pdf/qt-pdf examples/libraries/qt-printsupport/qt-printsupport examples/libraries/qt-script/qt-script examples/libraries/qt-svg/qt-svg @@ -43,6 +44,7 @@ examples/libraries/qt-webkit/qt-webkit examples/libraries/qt6-multimedia/qt6-multimedia examples/libraries/qt6-network/qt6-network examples/libraries/qt6-network-sctp/qt6-network-sctp +examples/libraries/qt6-pdf/qt6-pdf examples/libraries/qt6-webengine/qt6-webengine examples/libraries/restricted-extras-charts6/restricted-extras-charts6 examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla diff --git a/README.md b/README.md index 3625e7f1..88d35c91 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ For dynamic linking, with the system Qt (Qt 5): apt install qtbase5-dev build-essential golang-go # Debian / Ubuntu (Full) -apt install qtbase5-dev libqscintilla2-qt5-dev libqt5svg5-dev libqt5webchannel5-dev libqt5webkit5-dev qtbase5-private-dev qtmultimedia5-dev qtwebengine5-dev qtwebengine5-private-dev build-essential golang-go +apt install qtbase5-dev libqscintilla2-qt5-dev libqt5svg5-dev libqt5webchannel5-dev libqt5webkit5-dev qtbase5-private-dev qtmultimedia5-dev qtpdf5-dev qtwebengine5-dev qtwebengine5-private-dev build-essential golang-go ``` For dynamic linking, with the system Qt (Qt 6): @@ -159,10 +159,10 @@ For dynamic linking, with the system Qt (Qt 6): apt install qt6-base-dev build-essential golang-go # Debian / Ubuntu (Full) -apt install qt6-base-dev libqscintilla2-qt6-dev qt6-base-private-dev qt6-charts-dev qt6-multimedia-dev qt6-svg-dev qt6-webchannel-dev qt6-webengine-dev qt6-declarative-dev qml6-module-qtquick-{controls,shapes,layouts,templates,window} build-essential golang-go +apt install qt6-base-dev libqscintilla2-qt6-dev qt6-base-private-dev qt6-charts-dev qt6-multimedia-dev qt6-pdf-dev qt6-svg-dev qt6-webchannel-dev qt6-webengine-dev qt6-declarative-dev qml6-module-qtquick-{controls,shapes,layouts,templates,window} build-essential golang-go # Fedora -dnf install qt6-qtbase-devel qscintilla-qt6-devel qt6-qtcharts-devel qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qtwebchannel-devel qt6-qtwebengine-devel qt6-qtdeclarative-devel golang +dnf install qt6-qtbase-devel qscintilla-qt6-devel qt6-qtcharts-devel qt6-qtmultimedia-devel qt6-qtpdf-devel qt6-qtsvg-devel qt6-qtwebchannel-devel qt6-qtwebengine-devel qt6-qtdeclarative-devel golang # Manjaro pamac install qt6-base qscintilla-qt6 qt6-charts qt6-multimedia qt6-svg qt6-webchannel qt6-webengine qt6-declarative go @@ -260,7 +260,7 @@ To add an icon and other properties to the .exe, you can use [the go-winres tool pkg install git pkg install devel/pkgconf pkg install go -pkg install qt6-base qt6-charts qt6-multimedia qt6-svg qt6-webchannel qt6-webengine qt6-declarative qscintilla2-qt6 +pkg install qt6-base qt6-charts qt6-multimedia qt6-pdf qt6-svg qt6-webchannel qt6-webengine qt6-declarative qscintilla2-qt6 go build -ldflags '-s -w' ``` diff --git a/cmd/genbindings/config-libraries.go b/cmd/genbindings/config-libraries.go index f8f4460a..b6cc5d77 100644 --- a/cmd/genbindings/config-libraries.go +++ b/cmd/genbindings/config-libraries.go @@ -200,6 +200,22 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + // Qt 5 PDF + // Depends on QtCore/Gui/Widgets + generate( + "qt/pdf", + []string{ + "/usr/include/x86_64-linux-gnu/qt5/QtPdf", + "/usr/include/x86_64-linux-gnu/qt5/QtPdfWidgets", + }, + AllowAllHeaders, + clangBin, + pkgConfigCflags("Qt5PdfWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + + // Depends on QtCore/Gui/Widgets, QPrintSupport generate( "qt-restricted-extras/qscintilla", @@ -434,6 +450,23 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) { ClangMatchSameHeaderDefinitionOnly, ) + + // Qt 6 PDF + generate( + "qt6/pdf", + []string{ + "/usr/include/x86_64-linux-gnu/qt6/QtPdf", + "/usr/include/x86_64-linux-gnu/qt6/QtPdfWidgets", + }, + AllowAllHeaders, + clangBin, + "--std=c++17 "+pkgConfigCflags("Qt6PdfWidgets"), + outDir, + ClangMatchSameHeaderDefinitionOnly, + ) + + + // Qt 6 Charts // Depends on QtCore/Gui/Widgets generate( diff --git a/docker/genbindings.Dockerfile b/docker/genbindings.Dockerfile index 6b2d8925..73f8850b 100644 --- a/docker/genbindings.Dockerfile +++ b/docker/genbindings.Dockerfile @@ -5,6 +5,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ golang-go \ qtbase5-dev \ qtmultimedia5-dev \ + qtpdf5-dev \ qtscript5-dev \ libqt5svg5-dev \ libqt5webkit5-dev \ @@ -13,6 +14,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ qt6-charts-dev \ qt6-declarative-dev \ qt6-multimedia-dev \ + qt6-pdf-dev \ qt6-svg-dev \ qt6-webengine-dev \ libqscintilla2-qt5-dev \ diff --git a/examples/libraries/qt-pdf/example.pdf b/examples/libraries/qt-pdf/example.pdf new file mode 100644 index 00000000..47141f88 Binary files /dev/null and b/examples/libraries/qt-pdf/example.pdf differ diff --git a/examples/libraries/qt-pdf/main.go b/examples/libraries/qt-pdf/main.go new file mode 100644 index 00000000..79812de7 --- /dev/null +++ b/examples/libraries/qt-pdf/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "os" + + "github.com/mappu/miqt/qt" + "github.com/mappu/miqt/qt/pdf" +) + +func main() { + + qt.NewQApplication(os.Args) + + d := pdf.NewQPdfDocument() + d.Load("example.pdf") + + p := pdf.NewQPdfView2() + p.SetWindowTitle("Qt 5 PDF Example") + p.SetMinimumSize2(650, 600) + p.SetPageMode(pdf.QPdfView__MultiPage) + p.SetZoomMode(pdf.QPdfView__FitInView) + p.SetDocument(d) + + p.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt-pdf/screenshot.png b/examples/libraries/qt-pdf/screenshot.png new file mode 100644 index 00000000..17cbfc68 Binary files /dev/null and b/examples/libraries/qt-pdf/screenshot.png differ diff --git a/examples/libraries/qt6-pdf/example.pdf b/examples/libraries/qt6-pdf/example.pdf new file mode 100644 index 00000000..47141f88 Binary files /dev/null and b/examples/libraries/qt6-pdf/example.pdf differ diff --git a/examples/libraries/qt6-pdf/main.go b/examples/libraries/qt6-pdf/main.go new file mode 100644 index 00000000..030e98c8 --- /dev/null +++ b/examples/libraries/qt6-pdf/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "os" + + qt "github.com/mappu/miqt/qt6" + "github.com/mappu/miqt/qt6/pdf" +) + +func main() { + + qt.NewQApplication(os.Args) + + d := pdf.NewQPdfDocument() + d.Load("example.pdf") + + p := pdf.NewQPdfView2() + p.SetWindowTitle("Qt 6 PDF Example") + p.SetMinimumSize2(650, 600) + p.SetPageMode(pdf.QPdfView__MultiPage) + p.SetZoomMode(pdf.QPdfView__FitInView) + p.SetDocument(d) + + p.Show() + + qt.QApplication_Exec() +} diff --git a/examples/libraries/qt6-pdf/screenshot.png b/examples/libraries/qt6-pdf/screenshot.png new file mode 100644 index 00000000..05715ee0 Binary files /dev/null and b/examples/libraries/qt6-pdf/screenshot.png differ diff --git a/qt/pdf/cflags.go b/qt/pdf/cflags.go new file mode 100644 index 00000000..7b7510b1 --- /dev/null +++ b/qt/pdf/cflags.go @@ -0,0 +1,7 @@ +package pdf + +/* +#cgo pkg-config: Qt5PdfWidgets +*/ +import "C" + diff --git a/qt/pdf/gen_qpdfbookmarkmodel.cpp b/qt/pdf/gen_qpdfbookmarkmodel.cpp new file mode 100644 index 00000000..39fbbde8 --- /dev/null +++ b/qt/pdf/gen_qpdfbookmarkmodel.cpp @@ -0,0 +1,2266 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfbookmarkmodel.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfBookmarkModel_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfBookmarkModel_structureModeChanged(intptr_t, int); +QVariant* miqt_exec_callback_QPdfBookmarkModel_data(const QPdfBookmarkModel*, intptr_t, QModelIndex*, int); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_index(const QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_parent(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_rowCount(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_columnCount(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +struct miqt_map /* of int to struct miqt_string */ miqt_exec_callback_QPdfBookmarkModel_roleNames(const QPdfBookmarkModel*, intptr_t); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_sibling(const QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_hasChildren(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_setData(QPdfBookmarkModel*, intptr_t, QModelIndex*, QVariant*, int); +QVariant* miqt_exec_callback_QPdfBookmarkModel_headerData(const QPdfBookmarkModel*, intptr_t, int, int, int); +bool miqt_exec_callback_QPdfBookmarkModel_setHeaderData(QPdfBookmarkModel*, intptr_t, int, int, QVariant*, int); +struct miqt_map /* of int to QVariant* */ miqt_exec_callback_QPdfBookmarkModel_itemData(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_setItemData(QPdfBookmarkModel*, intptr_t, QModelIndex*, struct miqt_map /* of int to QVariant* */ ); +struct miqt_array /* of struct miqt_string */ miqt_exec_callback_QPdfBookmarkModel_mimeTypes(const QPdfBookmarkModel*, intptr_t); +QMimeData* miqt_exec_callback_QPdfBookmarkModel_mimeData(const QPdfBookmarkModel*, intptr_t, struct miqt_array /* of QModelIndex* */ ); +bool miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(const QPdfBookmarkModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_dropMimeData(QPdfBookmarkModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(const QPdfBookmarkModel*, intptr_t); +int miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(const QPdfBookmarkModel*, intptr_t); +bool miqt_exec_callback_QPdfBookmarkModel_insertRows(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_insertColumns(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_removeRows(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_removeColumns(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_moveRows(QPdfBookmarkModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +bool miqt_exec_callback_QPdfBookmarkModel_moveColumns(QPdfBookmarkModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +void miqt_exec_callback_QPdfBookmarkModel_fetchMore(QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_canFetchMore(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_flags(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfBookmarkModel_sort(QPdfBookmarkModel*, intptr_t, int, int); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_buddy(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +struct miqt_array /* of QModelIndex* */ miqt_exec_callback_QPdfBookmarkModel_match(const QPdfBookmarkModel*, intptr_t, QModelIndex*, int, QVariant*, int, int); +QSize* miqt_exec_callback_QPdfBookmarkModel_span(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_submit(QPdfBookmarkModel*, intptr_t); +void miqt_exec_callback_QPdfBookmarkModel_revert(QPdfBookmarkModel*, intptr_t); +bool miqt_exec_callback_QPdfBookmarkModel_event(QPdfBookmarkModel*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfBookmarkModel_eventFilter(QPdfBookmarkModel*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfBookmarkModel_timerEvent(QPdfBookmarkModel*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfBookmarkModel_childEvent(QPdfBookmarkModel*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfBookmarkModel_customEvent(QPdfBookmarkModel*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfBookmarkModel_connectNotify(QPdfBookmarkModel*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(QPdfBookmarkModel*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfBookmarkModel final : public QPdfBookmarkModel { +public: + + MiqtVirtualQPdfBookmarkModel(): QPdfBookmarkModel() {}; + MiqtVirtualQPdfBookmarkModel(QObject* parent): QPdfBookmarkModel(parent) {}; + + virtual ~MiqtVirtualQPdfBookmarkModel() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__data == 0) { + return QPdfBookmarkModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_data(this, handle__data, sigval1, sigval2); + + return *callback_return_value; + } + + friend QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__index == 0) { + return QPdfBookmarkModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_index(this, handle__index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__parent == 0) { + return QPdfBookmarkModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_parent(this, handle__parent, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__rowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__rowCount == 0) { + return QPdfBookmarkModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_rowCount(this, handle__rowCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__columnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__columnCount == 0) { + return QPdfBookmarkModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_columnCount(this, handle__columnCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__roleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__roleNames == 0) { + return QPdfBookmarkModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_roleNames(this, handle__roleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__sibling == 0) { + return QPdfBookmarkModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_sibling(this, handle__sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__hasChildren == 0) { + return QPdfBookmarkModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_hasChildren(this, handle__hasChildren, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__setData == 0) { + return QPdfBookmarkModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setData(this, handle__setData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__headerData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__headerData == 0) { + return QPdfBookmarkModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_headerData(this, handle__headerData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__setHeaderData == 0) { + return QPdfBookmarkModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setHeaderData(this, handle__setHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__itemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__itemData == 0) { + return QPdfBookmarkModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_itemData(this, handle__itemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__setItemData == 0) { + return QPdfBookmarkModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setItemData(this, handle__setItemData, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__mimeTypes == 0) { + return QPdfBookmarkModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_mimeTypes(this, handle__mimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__mimeData == 0) { + return QPdfBookmarkModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_mimeData(this, handle__mimeData, sigval1); + + return callback_return_value; + } + + friend QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__canDropMimeData == 0) { + return QPdfBookmarkModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(this, handle__canDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__dropMimeData == 0) { + return QPdfBookmarkModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_dropMimeData(this, handle__dropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__supportedDropActions == 0) { + return QPdfBookmarkModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(this, handle__supportedDropActions); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__supportedDragActions == 0) { + return QPdfBookmarkModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(this, handle__supportedDragActions); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__insertRows == 0) { + return QPdfBookmarkModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_insertRows(this, handle__insertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__insertColumns == 0) { + return QPdfBookmarkModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_insertColumns(this, handle__insertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__removeRows == 0) { + return QPdfBookmarkModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_removeRows(this, handle__removeRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__removeColumns == 0) { + return QPdfBookmarkModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_removeColumns(this, handle__removeColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveRows == 0) { + return QPdfBookmarkModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_moveRows(this, handle__moveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveColumns == 0) { + return QPdfBookmarkModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_moveColumns(this, handle__moveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__fetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__fetchMore == 0) { + QPdfBookmarkModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QPdfBookmarkModel_fetchMore(this, handle__fetchMore, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__canFetchMore == 0) { + return QPdfBookmarkModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_canFetchMore(this, handle__canFetchMore, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__flags == 0) { + return QPdfBookmarkModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_flags(this, handle__flags, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__sort == 0) { + QPdfBookmarkModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QPdfBookmarkModel_sort(this, handle__sort, sigval1, sigval2); + + + } + + friend void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order); + + // cgo.Handle value for overwritten implementation + intptr_t handle__buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__buddy == 0) { + return QPdfBookmarkModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_buddy(this, handle__buddy, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__match == 0) { + return QPdfBookmarkModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_match(this, handle__match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); + + // cgo.Handle value for overwritten implementation + intptr_t handle__span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__span == 0) { + return QPdfBookmarkModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_span(this, handle__span, sigval1); + + return *callback_return_value; + } + + friend QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__submit == 0) { + return QPdfBookmarkModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_submit(this, handle__submit); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_submit(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__revert == 0) { + QPdfBookmarkModel::revert(); + return; + } + + + miqt_exec_callback_QPdfBookmarkModel_revert(this, handle__revert); + + + } + + friend void QPdfBookmarkModel_virtualbase_revert(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfBookmarkModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfBookmarkModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfBookmarkModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfBookmarkModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfBookmarkModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfBookmarkModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfBookmarkModel_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfBookmarkModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend void QPdfBookmarkModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self); + friend QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); + friend void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); + friend bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); + friend void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); + friend bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); + friend void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); + friend bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); + friend void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); + friend void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); + friend struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); + friend QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfBookmarkModel* QPdfBookmarkModel_new() { + return new MiqtVirtualQPdfBookmarkModel(); +} + +QPdfBookmarkModel* QPdfBookmarkModel_new2(QObject* parent) { + return new MiqtVirtualQPdfBookmarkModel(parent); +} + +void QPdfBookmarkModel_virtbase(QPdfBookmarkModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); +} + +QMetaObject* QPdfBookmarkModel_metaObject(const QPdfBookmarkModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfBookmarkModel_metacast(QPdfBookmarkModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfBookmarkModel_tr(const char* s) { + QString _ret = QPdfBookmarkModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfBookmarkModel_trUtf8(const char* s) { + QString _ret = QPdfBookmarkModel::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QPdfDocument* QPdfBookmarkModel_document(const QPdfBookmarkModel* self) { + return self->document(); +} + +void QPdfBookmarkModel_setDocument(QPdfBookmarkModel* self, QPdfDocument* document) { + self->setDocument(document); +} + +int QPdfBookmarkModel_structureMode(const QPdfBookmarkModel* self) { + QPdfBookmarkModel::StructureMode _ret = self->structureMode(); + return static_cast(_ret); +} + +void QPdfBookmarkModel_setStructureMode(QPdfBookmarkModel* self, int mode) { + self->setStructureMode(static_cast(mode)); +} + +QVariant* QPdfBookmarkModel_data(const QPdfBookmarkModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +QModelIndex* QPdfBookmarkModel_index(const QPdfBookmarkModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +} + +QModelIndex* QPdfBookmarkModel_parent(const QPdfBookmarkModel* self, QModelIndex* index) { + return new QModelIndex(self->parent(*index)); +} + +int QPdfBookmarkModel_rowCount(const QPdfBookmarkModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +int QPdfBookmarkModel_columnCount(const QPdfBookmarkModel* self, QModelIndex* parent) { + return self->columnCount(*parent); +} + +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_roleNames(const QPdfBookmarkModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +void QPdfBookmarkModel_documentChanged(QPdfBookmarkModel* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfBookmarkModel_connect_documentChanged(QPdfBookmarkModel* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel::connect(self, static_cast(&QPdfBookmarkModel::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfBookmarkModel_documentChanged(slot, sigval1); + }); +} + +void QPdfBookmarkModel_structureModeChanged(QPdfBookmarkModel* self, int structureMode) { + self->structureModeChanged(static_cast(structureMode)); +} + +void QPdfBookmarkModel_connect_structureModeChanged(QPdfBookmarkModel* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel::connect(self, static_cast(&QPdfBookmarkModel::structureModeChanged), self, [=](QPdfBookmarkModel::StructureMode structureMode) { + QPdfBookmarkModel::StructureMode structureMode_ret = structureMode; + int sigval1 = static_cast(structureMode_ret); + miqt_exec_callback_QPdfBookmarkModel_structureModeChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfBookmarkModel_tr2(const char* s, const char* c) { + QString _ret = QPdfBookmarkModel::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfBookmarkModel_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfBookmarkModel::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfBookmarkModel_trUtf82(const char* s, const char* c) { + QString _ret = QPdfBookmarkModel::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfBookmarkModel_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfBookmarkModel::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfBookmarkModel_override_virtual_data(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__data = slot; + return true; +} + +QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role) { + + return new QVariant(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::data(*index, static_cast(role))); + +} + +bool QPdfBookmarkModel_override_virtual_index(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__index = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::index(static_cast(row), static_cast(column), *parent)); + +} + +bool QPdfBookmarkModel_override_virtual_parent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__parent = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::parent(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_rowCount(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__rowCount = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::rowCount(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_columnCount(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__columnCount = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::columnCount(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_roleNames(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__roleNames = slot; + return true; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self) { + + QHash _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_sibling(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sibling = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::sibling(static_cast(row), static_cast(column), *idx)); + +} + +bool QPdfBookmarkModel_override_virtual_hasChildren(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hasChildren = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::hasChildren(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_setData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setData(*index, *value, static_cast(role)); + +} + +bool QPdfBookmarkModel_override_virtual_headerData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__headerData = slot; + return true; +} + +QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role) { + + return new QVariant(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + +} + +bool QPdfBookmarkModel_override_virtual_setHeaderData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setHeaderData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + +} + +bool QPdfBookmarkModel_override_virtual_itemData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__itemData = slot; + return true; +} + +struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index) { + + QMap _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_setItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setItemData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setItemData(*index, roles_QMap); + +} + +bool QPdfBookmarkModel_override_virtual_mimeTypes(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeTypes = slot; + return true; +} + +struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self) { + + QStringList _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_mimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeData = slot; + return true; +} + +QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::mimeData(indexes_QList); + +} + +bool QPdfBookmarkModel_override_virtual_canDropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canDropMimeData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_dropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropMimeData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_supportedDropActions(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDropActions = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::supportedDropActions(); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_supportedDragActions(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDragActions = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::supportedDragActions(); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_insertRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::insertRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_insertColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::insertColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_removeRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::removeRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_removeColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::removeColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_moveRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfBookmarkModel_override_virtual_moveColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfBookmarkModel_override_virtual_fetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__fetchMore = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::fetchMore(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_canFetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canFetchMore = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::canFetchMore(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_flags(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__flags = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index) { + + Qt::ItemFlags _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::flags(*index); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_sort(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sort = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::sort(static_cast(column), static_cast(order)); + +} + +bool QPdfBookmarkModel_override_virtual_buddy(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__buddy = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::buddy(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_match(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__match = slot; + return true; +} + +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + + QModelIndexList _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_span(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__span = slot; + return true; +} + +QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index) { + + return new QSize(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::span(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_submit(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__submit = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_submit(void* self) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::submit(); + +} + +bool QPdfBookmarkModel_override_virtual_revert(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__revert = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_revert(void* self) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::revert(); + +} + +bool QPdfBookmarkModel_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::event(event); + +} + +bool QPdfBookmarkModel_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::eventFilter(watched, event); + +} + +bool QPdfBookmarkModel_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::timerEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::childEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::customEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::connectNotify(*signal); + +} + +bool QPdfBookmarkModel_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::disconnectNotify(*signal); + +} + +void QPdfBookmarkModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->resetInternalData(); + +} + +QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QModelIndex(self_cast->createIndex(static_cast(row), static_cast(column))); + +} + +void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + self_cast->encodeData(indexes_QList, *stream); + +} + +bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->decodeData(static_cast(row), static_cast(column), *parent, *stream); + +} + +void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertRows(); + +} + +void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveRows(); + +} + +bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveRows(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationRow)); + +} + +void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveRows(); + +} + +void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertColumns(); + +} + +void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveColumns(); + +} + +bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveColumns(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationColumn)); + +} + +void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveColumns(); + +} + +void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginResetModel(); + +} + +void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endResetModel(); + +} + +void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->changePersistentIndex(*from, *to); + +} + +void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList from_QList; + from_QList.reserve(from.len); + QModelIndex** from_arr = static_cast(from.data); + for(size_t i = 0; i < from.len; ++i) { + from_QList.push_back(*(from_arr[i])); + } + QModelIndexList to_QList; + to_QList.reserve(to.len); + QModelIndex** to_arr = static_cast(to.data); + for(size_t i = 0; i < to.len; ++i) { + to_QList.push_back(*(to_arr[i])); + } + + self_cast->changePersistentIndexList(from_QList, to_QList); + +} + +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return (struct miqt_array){}; + } + + *_dynamic_cast_ok = true; + + QModelIndexList _ret = self_cast->persistentIndexList(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfBookmarkModel_delete(QPdfBookmarkModel* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfbookmarkmodel.go b/qt/pdf/gen_qpdfbookmarkmodel.go new file mode 100644 index 00000000..23e1a658 --- /dev/null +++ b/qt/pdf/gen_qpdfbookmarkmodel.go @@ -0,0 +1,1964 @@ +package pdf + +/* + +#include "gen_qpdfbookmarkmodel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfBookmarkModel__StructureMode int + +const ( + QPdfBookmarkModel__TreeMode QPdfBookmarkModel__StructureMode = 0 + QPdfBookmarkModel__ListMode QPdfBookmarkModel__StructureMode = 1 +) + +type QPdfBookmarkModel__Role int + +const ( + QPdfBookmarkModel__TitleRole QPdfBookmarkModel__Role = 0 + QPdfBookmarkModel__LevelRole QPdfBookmarkModel__Role = 256 + QPdfBookmarkModel__PageNumberRole QPdfBookmarkModel__Role = 257 +) + +type QPdfBookmarkModel struct { + h *C.QPdfBookmarkModel + *qt.QAbstractItemModel +} + +func (this *QPdfBookmarkModel) cPointer() *C.QPdfBookmarkModel { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfBookmarkModel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfBookmarkModel constructs the type using only CGO pointers. +func newQPdfBookmarkModel(h *C.QPdfBookmarkModel) *QPdfBookmarkModel { + if h == nil { + return nil + } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QPdfBookmarkModel_virtbase(h, &outptr_QAbstractItemModel) + + return &QPdfBookmarkModel{h: h, + QAbstractItemModel: qt.UnsafeNewQAbstractItemModel(unsafe.Pointer(outptr_QAbstractItemModel))} +} + +// UnsafeNewQPdfBookmarkModel constructs the type using only unsafe pointers. +func UnsafeNewQPdfBookmarkModel(h unsafe.Pointer) *QPdfBookmarkModel { + return newQPdfBookmarkModel((*C.QPdfBookmarkModel)(h)) +} + +// NewQPdfBookmarkModel constructs a new QPdfBookmarkModel object. +func NewQPdfBookmarkModel() *QPdfBookmarkModel { + + return newQPdfBookmarkModel(C.QPdfBookmarkModel_new()) +} + +// NewQPdfBookmarkModel2 constructs a new QPdfBookmarkModel object. +func NewQPdfBookmarkModel2(parent *qt.QObject) *QPdfBookmarkModel { + + return newQPdfBookmarkModel(C.QPdfBookmarkModel_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfBookmarkModel_metaObject(this.h))) +} + +func (this *QPdfBookmarkModel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfBookmarkModel_metacast(this.h, param1_Cstring)) +} + +func QPdfBookmarkModel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfBookmarkModel_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfBookmarkModel) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfBookmarkModel_document(this.h)) +} + +func (this *QPdfBookmarkModel) SetDocument(document *QPdfDocument) { + C.QPdfBookmarkModel_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfBookmarkModel) StructureMode() QPdfBookmarkModel__StructureMode { + return (QPdfBookmarkModel__StructureMode)(C.QPdfBookmarkModel_structureMode(this.h)) +} + +func (this *QPdfBookmarkModel) SetStructureMode(mode QPdfBookmarkModel__StructureMode) { + C.QPdfBookmarkModel_setStructureMode(this.h, (C.int)(mode)) +} + +func (this *QPdfBookmarkModel) Data(index *qt.QModelIndex, role int) *qt.QVariant { + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_data(this.h, (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) Index(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex { + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_index(this.h, (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) Parent(index *qt.QModelIndex) *qt.QModelIndex { + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_parent(this.h, (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) RowCount(parent *qt.QModelIndex) int { + return (int)(C.QPdfBookmarkModel_rowCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) ColumnCount(parent *qt.QModelIndex) int { + return (int)(C.QPdfBookmarkModel_columnCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) RoleNames() map[int][]byte { + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_roleNames(this.h) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QPdfBookmarkModel) DocumentChanged(document *QPdfDocument) { + C.QPdfBookmarkModel_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfBookmarkModel) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfBookmarkModel_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfBookmarkModel_documentChanged +func miqt_exec_callback_QPdfBookmarkModel_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfBookmarkModel) StructureModeChanged(structureMode QPdfBookmarkModel__StructureMode) { + C.QPdfBookmarkModel_structureModeChanged(this.h, (C.int)(structureMode)) +} +func (this *QPdfBookmarkModel) OnStructureModeChanged(slot func(structureMode QPdfBookmarkModel__StructureMode)) { + C.QPdfBookmarkModel_connect_structureModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfBookmarkModel_structureModeChanged +func miqt_exec_callback_QPdfBookmarkModel_structureModeChanged(cb C.intptr_t, structureMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(structureMode QPdfBookmarkModel__StructureMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfBookmarkModel__StructureMode)(structureMode) + + gofunc(slotval1) +} + +func QPdfBookmarkModel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfBookmarkModel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfBookmarkModel_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfBookmarkModel_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// ResetInternalData can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) ResetInternalData() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_resetInternalData(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// CreateIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) CreateIndex(row int, column int) qt.QModelIndex { + + var _dynamic_cast_ok C.bool = false + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_protectedbase_createIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EncodeData can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EncodeData(indexes []qt.QModelIndex, stream *qt.QDataStream) { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_encodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), indexes_ma, (*C.QDataStream)(stream.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// DecodeData can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) DecodeData(row int, column int, parent *qt.QModelIndex, stream *qt.QDataStream) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_decodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()), (*C.QDataStream)(stream.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// BeginInsertRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginInsertRows(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndInsertRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginRemoveRows(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndRemoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginMoveRows(sourceParent *qt.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt.QModelIndex, destinationRow int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_beginMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationRow))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndMoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginInsertColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginInsertColumns(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndInsertColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginRemoveColumns(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndRemoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginMoveColumns(sourceParent *qt.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt.QModelIndex, destinationColumn int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_beginMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationColumn))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndMoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginResetModel can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndResetModel can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) ChangePersistentIndex(from *qt.QModelIndex, to *qt.QModelIndex) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_changePersistentIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(from.UnsafePointer()), (*C.QModelIndex)(to.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndexList can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) ChangePersistentIndexList(from []qt.QModelIndex, to []qt.QModelIndex) { + from_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(from)))) + defer C.free(unsafe.Pointer(from_CArray)) + for i := range from { + from_CArray[i] = (*C.QModelIndex)(from[i].UnsafePointer()) + } + from_ma := C.struct_miqt_array{len: C.size_t(len(from)), data: unsafe.Pointer(from_CArray)} + to_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(to)))) + defer C.free(unsafe.Pointer(to_CArray)) + for i := range to { + to_CArray[i] = (*C.QModelIndex)(to[i].UnsafePointer()) + } + to_ma := C.struct_miqt_array{len: C.size_t(len(to)), data: unsafe.Pointer(to_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_changePersistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h), from_ma, to_ma) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// PersistentIndexList can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) PersistentIndexList() []qt.QModelIndex { + + var _dynamic_cast_ok C.bool = false + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_protectedbase_persistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + _ret := make([]qt.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + _method_ret := _ret + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfBookmarkModel_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfBookmarkModel_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfBookmarkModel_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Data(index *qt.QModelIndex, role int) *qt.QVariant { + + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_data(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnData(slot func(super func(index *qt.QModelIndex, role int) *qt.QVariant, index *qt.QModelIndex, role int) *qt.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_data +func miqt_exec_callback_QPdfBookmarkModel_data(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, role int) *qt.QVariant, index *qt.QModelIndex, role int) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Index(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnIndex(slot func(super func(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex, row int, column int, parent *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_index +func miqt_exec_callback_QPdfBookmarkModel_index(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex, row int, column int, parent *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Parent(index *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_parent(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnParent(slot func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_parent +func miqt_exec_callback_QPdfBookmarkModel_parent(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Parent, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RowCount(parent *qt.QModelIndex) int { + + return (int)(C.QPdfBookmarkModel_virtualbase_rowCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRowCount(slot func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) { + ok := C.QPdfBookmarkModel_override_virtual_rowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_rowCount +func miqt_exec_callback_QPdfBookmarkModel_rowCount(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ColumnCount(parent *qt.QModelIndex) int { + + return (int)(C.QPdfBookmarkModel_virtualbase_columnCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnColumnCount(slot func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) { + ok := C.QPdfBookmarkModel_override_virtual_columnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_columnCount +func miqt_exec_callback_QPdfBookmarkModel_columnCount(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_virtualbase_roleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfBookmarkModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + ok := C.QPdfBookmarkModel_override_virtual_roleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_roleNames +func miqt_exec_callback_QPdfBookmarkModel_roleNames(self *C.QPdfBookmarkModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + if len(virtualReturn_v) > 0 { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + } else { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Sibling(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(idx.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnSibling(slot func(super func(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex, row int, column int, idx *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_sibling +func miqt_exec_callback_QPdfBookmarkModel_sibling(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex, row int, column int, idx *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_HasChildren(parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_hasChildren(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnHasChildren(slot func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_hasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_hasChildren +func miqt_exec_callback_QPdfBookmarkModel_hasChildren(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetData(index *qt.QModelIndex, value *qt.QVariant, role int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_setData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfBookmarkModel) OnSetData(slot func(super func(index *qt.QModelIndex, value *qt.QVariant, role int) bool, index *qt.QModelIndex, value *qt.QVariant, role int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setData +func miqt_exec_callback_QPdfBookmarkModel_setData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, value *qt.QVariant, role int) bool, index *qt.QModelIndex, value *qt.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_HeaderData(section int, orientation qt.Orientation, role int) *qt.QVariant { + + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_headerData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnHeaderData(slot func(super func(section int, orientation qt.Orientation, role int) *qt.QVariant, section int, orientation qt.Orientation, role int) *qt.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_headerData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_headerData +func miqt_exec_callback_QPdfBookmarkModel_headerData(self *C.QPdfBookmarkModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt.Orientation, role int) *qt.QVariant, section int, orientation qt.Orientation, role int) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt.Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetHeaderData(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_setHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfBookmarkModel) OnSetHeaderData(slot func(super func(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool, section int, orientation qt.Orientation, value *qt.QVariant, role int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setHeaderData +func miqt_exec_callback_QPdfBookmarkModel_setHeaderData(self *C.QPdfBookmarkModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool, section int, orientation qt.Orientation, value *qt.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt.Orientation)(orientation) + + slotval3 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ItemData(index *qt.QModelIndex) map[int]qt.QVariant { + + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_virtualbase_itemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())) + _ret := make(map[int]qt.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_Values[i])) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfBookmarkModel) OnItemData(slot func(super func(index *qt.QModelIndex) map[int]qt.QVariant, index *qt.QModelIndex) map[int]qt.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_itemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_itemData +func miqt_exec_callback_QPdfBookmarkModel_itemData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) map[int]qt.QVariant, index *qt.QModelIndex) map[int]qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = (*C.QVariant)(virtualReturn_v.UnsafePointer()) + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetItemData(index *qt.QModelIndex, roles map[int]qt.QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = (*C.QVariant)(roles_v.UnsafePointer()) + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QPdfBookmarkModel_virtualbase_setItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), roles_mm)) + +} +func (this *QPdfBookmarkModel) OnSetItemData(slot func(super func(index *qt.QModelIndex, roles map[int]qt.QVariant) bool, index *qt.QModelIndex, roles map[int]qt.QVariant) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setItemData +func miqt_exec_callback_QPdfBookmarkModel_setItemData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, roles map[int]qt.QVariant) bool, index *qt.QModelIndex, roles map[int]qt.QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]qt.QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(roles_Values[i])) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_virtualbase_mimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QPdfBookmarkModel) OnMimeTypes(slot func(super func() []string) []string) { + ok := C.QPdfBookmarkModel_override_virtual_mimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_mimeTypes +func miqt_exec_callback_QPdfBookmarkModel_mimeTypes(self *C.QPdfBookmarkModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MimeData(indexes []qt.QModelIndex) *qt.QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_mimeData(unsafe.Pointer(this.h), indexes_ma))) + +} +func (this *QPdfBookmarkModel) OnMimeData(slot func(super func(indexes []qt.QModelIndex) *qt.QMimeData, indexes []qt.QModelIndex) *qt.QMimeData) { + ok := C.QPdfBookmarkModel_override_virtual_mimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_mimeData +func miqt_exec_callback_QPdfBookmarkModel_mimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []qt.QModelIndex) *qt.QMimeData, indexes []qt.QModelIndex) *qt.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]qt.QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(indexes_outCast[i])) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MimeData, slotval1) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CanDropMimeData(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_canDropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnCanDropMimeData(slot func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_canDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_canDropMimeData +func miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_DropMimeData(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_dropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnDropMimeData(slot func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_dropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_dropMimeData +func miqt_exec_callback_QPdfBookmarkModel_dropMimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SupportedDropActions() qt.DropAction { + + return (qt.DropAction)(C.QPdfBookmarkModel_virtualbase_supportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSupportedDropActions(slot func(super func() qt.DropAction) qt.DropAction) { + ok := C.QPdfBookmarkModel_override_virtual_supportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_supportedDropActions +func miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(self *C.QPdfBookmarkModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt.DropAction) qt.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SupportedDragActions() qt.DropAction { + + return (qt.DropAction)(C.QPdfBookmarkModel_virtualbase_supportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSupportedDragActions(slot func(super func() qt.DropAction) qt.DropAction) { + ok := C.QPdfBookmarkModel_override_virtual_supportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_supportedDragActions +func miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(self *C.QPdfBookmarkModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt.DropAction) qt.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_InsertRows(row int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_insertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnInsertRows(slot func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_insertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_insertRows +func miqt_exec_callback_QPdfBookmarkModel_insertRows(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_InsertColumns(column int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_insertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnInsertColumns(slot func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_insertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_insertColumns +func miqt_exec_callback_QPdfBookmarkModel_insertColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RemoveRows(row int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_removeRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRemoveRows(slot func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_removeRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_removeRows +func miqt_exec_callback_QPdfBookmarkModel_removeRows(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RemoveColumns(column int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_removeColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRemoveColumns(slot func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_removeColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_removeColumns +func miqt_exec_callback_QPdfBookmarkModel_removeColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MoveRows(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_moveRows(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceRow), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfBookmarkModel) OnMoveRows(slot func(super func(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_moveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_moveRows +func miqt_exec_callback_QPdfBookmarkModel_moveRows(self *C.QPdfBookmarkModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := qt.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MoveColumns(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_moveColumns(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceColumn), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfBookmarkModel) OnMoveColumns(slot func(super func(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_moveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_moveColumns +func miqt_exec_callback_QPdfBookmarkModel_moveColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := qt.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_FetchMore(parent *qt.QModelIndex) { + + C.QPdfBookmarkModel_virtualbase_fetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnFetchMore(slot func(super func(parent *qt.QModelIndex), parent *qt.QModelIndex)) { + ok := C.QPdfBookmarkModel_override_virtual_fetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_fetchMore +func miqt_exec_callback_QPdfBookmarkModel_fetchMore(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex), parent *qt.QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CanFetchMore(parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_canFetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnCanFetchMore(slot func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_canFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_canFetchMore +func miqt_exec_callback_QPdfBookmarkModel_canFetchMore(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Flags(index *qt.QModelIndex) qt.ItemFlag { + + return (qt.ItemFlag)(C.QPdfBookmarkModel_virtualbase_flags(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnFlags(slot func(super func(index *qt.QModelIndex) qt.ItemFlag, index *qt.QModelIndex) qt.ItemFlag) { + ok := C.QPdfBookmarkModel_override_virtual_flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_flags +func miqt_exec_callback_QPdfBookmarkModel_flags(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) qt.ItemFlag, index *qt.QModelIndex) qt.ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Sort(column int, order qt.SortOrder) { + + C.QPdfBookmarkModel_virtualbase_sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QPdfBookmarkModel) OnSort(slot func(super func(column int, order qt.SortOrder), column int, order qt.SortOrder)) { + ok := C.QPdfBookmarkModel_override_virtual_sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_sort +func miqt_exec_callback_QPdfBookmarkModel_sort(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order qt.SortOrder), column int, order qt.SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (qt.SortOrder)(order) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Buddy(index *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_buddy(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnBuddy(slot func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_buddy +func miqt_exec_callback_QPdfBookmarkModel_buddy(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Buddy, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Match(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex { + + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_virtualbase_match(unsafe.Pointer(this.h), (*C.QModelIndex)(start.UnsafePointer()), (C.int)(role), (*C.QVariant)(value.UnsafePointer()), (C.int)(hits), (C.int)(flags)) + _ret := make([]qt.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QPdfBookmarkModel) OnMatch(slot func(super func(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex, start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_match +func miqt_exec_callback_QPdfBookmarkModel_match(self *C.QPdfBookmarkModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex, start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(start)) + + slotval2 := (int)(role) + + slotval3 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(hits) + + slotval5 := (qt.MatchFlag)(flags) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (*C.QModelIndex)(virtualReturn[i].UnsafePointer()) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Span(index *qt.QModelIndex) *qt.QSize { + + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_span(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnSpan(slot func(super func(index *qt.QModelIndex) *qt.QSize, index *qt.QModelIndex) *qt.QSize) { + ok := C.QPdfBookmarkModel_override_virtual_span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_span +func miqt_exec_callback_QPdfBookmarkModel_span(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) *qt.QSize, index *qt.QModelIndex) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Span, slotval1) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Submit() bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_submit(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSubmit(slot func(super func() bool) bool) { + ok := C.QPdfBookmarkModel_override_virtual_submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_submit +func miqt_exec_callback_QPdfBookmarkModel_submit(self *C.QPdfBookmarkModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Revert() { + + C.QPdfBookmarkModel_virtualbase_revert(unsafe.Pointer(this.h)) + +} +func (this *QPdfBookmarkModel) OnRevert(slot func(super func())) { + ok := C.QPdfBookmarkModel_override_virtual_revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_revert +func miqt_exec_callback_QPdfBookmarkModel_revert(self *C.QPdfBookmarkModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + ok := C.QPdfBookmarkModel_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_event +func miqt_exec_callback_QPdfBookmarkModel_event(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + ok := C.QPdfBookmarkModel_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_eventFilter +func miqt_exec_callback_QPdfBookmarkModel_eventFilter(self *C.QPdfBookmarkModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfBookmarkModel_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_timerEvent +func miqt_exec_callback_QPdfBookmarkModel_timerEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfBookmarkModel_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_childEvent +func miqt_exec_callback_QPdfBookmarkModel_childEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfBookmarkModel_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_customEvent +func miqt_exec_callback_QPdfBookmarkModel_customEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfBookmarkModel_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfBookmarkModel_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_connectNotify +func miqt_exec_callback_QPdfBookmarkModel_connectNotify(self *C.QPdfBookmarkModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfBookmarkModel_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfBookmarkModel_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_disconnectNotify +func miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(self *C.QPdfBookmarkModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfBookmarkModel) Delete() { + C.QPdfBookmarkModel_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfBookmarkModel) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfBookmarkModel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfbookmarkmodel.h b/qt/pdf/gen_qpdfbookmarkmodel.h new file mode 100644 index 00000000..eb462d3a --- /dev/null +++ b/qt/pdf/gen_qpdfbookmarkmodel.h @@ -0,0 +1,187 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFBOOKMARKMODEL_H +#define MIQT_QT_PDF_GEN_QPDFBOOKMARKMODEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractItemModel; +class QChildEvent; +class QDataStream; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QMimeData; +class QModelIndex; +class QObject; +class QPdfBookmarkModel; +class QPdfDocument; +class QSize; +class QTimerEvent; +class QVariant; +#else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QChildEvent QChildEvent; +typedef struct QDataStream QDataStream; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; +typedef struct QPdfBookmarkModel QPdfBookmarkModel; +typedef struct QPdfDocument QPdfDocument; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfBookmarkModel* QPdfBookmarkModel_new(); +QPdfBookmarkModel* QPdfBookmarkModel_new2(QObject* parent); +void QPdfBookmarkModel_virtbase(QPdfBookmarkModel* src, QAbstractItemModel** outptr_QAbstractItemModel); +QMetaObject* QPdfBookmarkModel_metaObject(const QPdfBookmarkModel* self); +void* QPdfBookmarkModel_metacast(QPdfBookmarkModel* self, const char* param1); +struct miqt_string QPdfBookmarkModel_tr(const char* s); +struct miqt_string QPdfBookmarkModel_trUtf8(const char* s); +QPdfDocument* QPdfBookmarkModel_document(const QPdfBookmarkModel* self); +void QPdfBookmarkModel_setDocument(QPdfBookmarkModel* self, QPdfDocument* document); +int QPdfBookmarkModel_structureMode(const QPdfBookmarkModel* self); +void QPdfBookmarkModel_setStructureMode(QPdfBookmarkModel* self, int mode); +QVariant* QPdfBookmarkModel_data(const QPdfBookmarkModel* self, QModelIndex* index, int role); +QModelIndex* QPdfBookmarkModel_index(const QPdfBookmarkModel* self, int row, int column, QModelIndex* parent); +QModelIndex* QPdfBookmarkModel_parent(const QPdfBookmarkModel* self, QModelIndex* index); +int QPdfBookmarkModel_rowCount(const QPdfBookmarkModel* self, QModelIndex* parent); +int QPdfBookmarkModel_columnCount(const QPdfBookmarkModel* self, QModelIndex* parent); +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_roleNames(const QPdfBookmarkModel* self); +void QPdfBookmarkModel_documentChanged(QPdfBookmarkModel* self, QPdfDocument* document); +void QPdfBookmarkModel_connect_documentChanged(QPdfBookmarkModel* self, intptr_t slot); +void QPdfBookmarkModel_structureModeChanged(QPdfBookmarkModel* self, int structureMode); +void QPdfBookmarkModel_connect_structureModeChanged(QPdfBookmarkModel* self, intptr_t slot); +struct miqt_string QPdfBookmarkModel_tr2(const char* s, const char* c); +struct miqt_string QPdfBookmarkModel_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfBookmarkModel_trUtf82(const char* s, const char* c); +struct miqt_string QPdfBookmarkModel_trUtf83(const char* s, const char* c, int n); +bool QPdfBookmarkModel_override_virtual_data(void* self, intptr_t slot); +QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role); +bool QPdfBookmarkModel_override_virtual_index(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_parent(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_rowCount(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_columnCount(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_roleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self); +bool QPdfBookmarkModel_override_virtual_sibling(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); +bool QPdfBookmarkModel_override_virtual_hasChildren(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_setData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); +bool QPdfBookmarkModel_override_virtual_headerData(void* self, intptr_t slot); +QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role); +bool QPdfBookmarkModel_override_virtual_setHeaderData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); +bool QPdfBookmarkModel_override_virtual_itemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_setItemData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +bool QPdfBookmarkModel_override_virtual_mimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self); +bool QPdfBookmarkModel_override_virtual_mimeData(void* self, intptr_t slot); +QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +bool QPdfBookmarkModel_override_virtual_canDropMimeData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_dropMimeData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_supportedDropActions(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self); +bool QPdfBookmarkModel_override_virtual_supportedDragActions(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self); +bool QPdfBookmarkModel_override_virtual_insertRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_insertColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_removeRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_removeColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_moveRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfBookmarkModel_override_virtual_moveColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfBookmarkModel_override_virtual_fetchMore(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_canFetchMore(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_flags(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_sort(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order); +bool QPdfBookmarkModel_override_virtual_buddy(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +bool QPdfBookmarkModel_override_virtual_span(void* self, intptr_t slot); +QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_submit(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_submit(void* self); +bool QPdfBookmarkModel_override_virtual_revert(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_revert(void* self); +bool QPdfBookmarkModel_override_virtual_event(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event); +bool QPdfBookmarkModel_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfBookmarkModel_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfBookmarkModel_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfBookmarkModel_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfBookmarkModel_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfBookmarkModel_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +void QPdfBookmarkModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self); +QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); +void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); +bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); +void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); +bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); +void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); +bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); +void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); +void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); +QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfBookmarkModel_delete(QPdfBookmarkModel* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfdestination.cpp b/qt/pdf/gen_qpdfdestination.cpp new file mode 100644 index 00000000..30c31e6e --- /dev/null +++ b/qt/pdf/gen_qpdfdestination.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include "gen_qpdfdestination.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfDestination* QPdfDestination_new(QPdfDestination* other) { + return new QPdfDestination(*other); +} + +void QPdfDestination_operatorAssign(QPdfDestination* self, QPdfDestination* other) { + self->operator=(*other); +} + +void QPdfDestination_swap(QPdfDestination* self, QPdfDestination* other) { + self->swap(*other); +} + +bool QPdfDestination_isValid(const QPdfDestination* self) { + return self->isValid(); +} + +int QPdfDestination_page(const QPdfDestination* self) { + return self->page(); +} + +QPointF* QPdfDestination_location(const QPdfDestination* self) { + return new QPointF(self->location()); +} + +double QPdfDestination_zoom(const QPdfDestination* self) { + qreal _ret = self->zoom(); + return static_cast(_ret); +} + +void QPdfDestination_delete(QPdfDestination* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfdestination.go b/qt/pdf/gen_qpdfdestination.go new file mode 100644 index 00000000..31f76e82 --- /dev/null +++ b/qt/pdf/gen_qpdfdestination.go @@ -0,0 +1,93 @@ +package pdf + +/* + +#include "gen_qpdfdestination.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QPdfDestination struct { + h *C.QPdfDestination +} + +func (this *QPdfDestination) cPointer() *C.QPdfDestination { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfDestination) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfDestination constructs the type using only CGO pointers. +func newQPdfDestination(h *C.QPdfDestination) *QPdfDestination { + if h == nil { + return nil + } + + return &QPdfDestination{h: h} +} + +// UnsafeNewQPdfDestination constructs the type using only unsafe pointers. +func UnsafeNewQPdfDestination(h unsafe.Pointer) *QPdfDestination { + return newQPdfDestination((*C.QPdfDestination)(h)) +} + +// NewQPdfDestination constructs a new QPdfDestination object. +func NewQPdfDestination(other *QPdfDestination) *QPdfDestination { + + return newQPdfDestination(C.QPdfDestination_new(other.cPointer())) +} + +func (this *QPdfDestination) OperatorAssign(other *QPdfDestination) { + C.QPdfDestination_operatorAssign(this.h, other.cPointer()) +} + +func (this *QPdfDestination) Swap(other *QPdfDestination) { + C.QPdfDestination_swap(this.h, other.cPointer()) +} + +func (this *QPdfDestination) IsValid() bool { + return (bool)(C.QPdfDestination_isValid(this.h)) +} + +func (this *QPdfDestination) Page() int { + return (int)(C.QPdfDestination_page(this.h)) +} + +func (this *QPdfDestination) Location() *qt.QPointF { + _goptr := qt.UnsafeNewQPointF(unsafe.Pointer(C.QPdfDestination_location(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDestination) Zoom() float64 { + return (float64)(C.QPdfDestination_zoom(this.h)) +} + +// Delete this object from C++ memory. +func (this *QPdfDestination) Delete() { + C.QPdfDestination_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfDestination) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfDestination) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfdestination.h b/qt/pdf/gen_qpdfdestination.h new file mode 100644 index 00000000..ff9ebe1d --- /dev/null +++ b/qt/pdf/gen_qpdfdestination.h @@ -0,0 +1,38 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFDESTINATION_H +#define MIQT_QT_PDF_GEN_QPDFDESTINATION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfDestination; +class QPointF; +#else +typedef struct QPdfDestination QPdfDestination; +typedef struct QPointF QPointF; +#endif + +QPdfDestination* QPdfDestination_new(QPdfDestination* other); +void QPdfDestination_operatorAssign(QPdfDestination* self, QPdfDestination* other); +void QPdfDestination_swap(QPdfDestination* self, QPdfDestination* other); +bool QPdfDestination_isValid(const QPdfDestination* self); +int QPdfDestination_page(const QPdfDestination* self); +QPointF* QPdfDestination_location(const QPdfDestination* self); +double QPdfDestination_zoom(const QPdfDestination* self); +void QPdfDestination_delete(QPdfDestination* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfdocument.cpp b/qt/pdf/gen_qpdfdocument.cpp new file mode 100644 index 00000000..cd3530b4 --- /dev/null +++ b/qt/pdf/gen_qpdfdocument.cpp @@ -0,0 +1,560 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfdocument.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfDocument_passwordChanged(intptr_t); +void miqt_exec_callback_QPdfDocument_passwordRequired(intptr_t); +void miqt_exec_callback_QPdfDocument_statusChanged(intptr_t, int); +void miqt_exec_callback_QPdfDocument_pageCountChanged(intptr_t, int); +bool miqt_exec_callback_QPdfDocument_event(QPdfDocument*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfDocument_eventFilter(QPdfDocument*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfDocument_timerEvent(QPdfDocument*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfDocument_childEvent(QPdfDocument*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfDocument_customEvent(QPdfDocument*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfDocument_connectNotify(QPdfDocument*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfDocument_disconnectNotify(QPdfDocument*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfDocument final : public QPdfDocument { +public: + + MiqtVirtualQPdfDocument(): QPdfDocument() {}; + MiqtVirtualQPdfDocument(QObject* parent): QPdfDocument(parent) {}; + + virtual ~MiqtVirtualQPdfDocument() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfDocument::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfDocument_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfDocument_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfDocument::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfDocument_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfDocument::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfDocument::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfDocument::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfDocument::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfDocument_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfDocument::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfDocument_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfDocument* QPdfDocument_new() { + return new MiqtVirtualQPdfDocument(); +} + +QPdfDocument* QPdfDocument_new2(QObject* parent) { + return new MiqtVirtualQPdfDocument(parent); +} + +void QPdfDocument_virtbase(QPdfDocument* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfDocument_metaObject(const QPdfDocument* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfDocument_metacast(QPdfDocument* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfDocument_tr(const char* s) { + QString _ret = QPdfDocument::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfDocument_trUtf8(const char* s) { + QString _ret = QPdfDocument::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QPdfDocument_load(QPdfDocument* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + QPdfDocument::DocumentError _ret = self->load(fileName_QString); + return static_cast(_ret); +} + +int QPdfDocument_status(const QPdfDocument* self) { + QPdfDocument::Status _ret = self->status(); + return static_cast(_ret); +} + +void QPdfDocument_loadWithDevice(QPdfDocument* self, QIODevice* device) { + self->load(device); +} + +void QPdfDocument_setPassword(QPdfDocument* self, struct miqt_string password) { + QString password_QString = QString::fromUtf8(password.data, password.len); + self->setPassword(password_QString); +} + +struct miqt_string QPdfDocument_password(const QPdfDocument* self) { + QString _ret = self->password(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QVariant* QPdfDocument_metaData(const QPdfDocument* self, int field) { + return new QVariant(self->metaData(static_cast(field))); +} + +int QPdfDocument_error(const QPdfDocument* self) { + QPdfDocument::DocumentError _ret = self->error(); + return static_cast(_ret); +} + +void QPdfDocument_close(QPdfDocument* self) { + self->close(); +} + +int QPdfDocument_pageCount(const QPdfDocument* self) { + return self->pageCount(); +} + +QSizeF* QPdfDocument_pageSize(const QPdfDocument* self, int page) { + return new QSizeF(self->pageSize(static_cast(page))); +} + +QImage* QPdfDocument_render(QPdfDocument* self, int page, QSize* imageSize) { + return new QImage(self->render(static_cast(page), *imageSize)); +} + +QPdfSelection* QPdfDocument_getSelection(QPdfDocument* self, int page, QPointF* start, QPointF* end) { + return new QPdfSelection(self->getSelection(static_cast(page), *start, *end)); +} + +QPdfSelection* QPdfDocument_getSelectionAtIndex(QPdfDocument* self, int page, int startIndex, int maxLength) { + return new QPdfSelection(self->getSelectionAtIndex(static_cast(page), static_cast(startIndex), static_cast(maxLength))); +} + +QPdfSelection* QPdfDocument_getAllText(QPdfDocument* self, int page) { + return new QPdfSelection(self->getAllText(static_cast(page))); +} + +void QPdfDocument_passwordChanged(QPdfDocument* self) { + self->passwordChanged(); +} + +void QPdfDocument_connect_passwordChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::passwordChanged), self, [=]() { + miqt_exec_callback_QPdfDocument_passwordChanged(slot); + }); +} + +void QPdfDocument_passwordRequired(QPdfDocument* self) { + self->passwordRequired(); +} + +void QPdfDocument_connect_passwordRequired(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::passwordRequired), self, [=]() { + miqt_exec_callback_QPdfDocument_passwordRequired(slot); + }); +} + +void QPdfDocument_statusChanged(QPdfDocument* self, int status) { + self->statusChanged(static_cast(status)); +} + +void QPdfDocument_connect_statusChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::statusChanged), self, [=](QPdfDocument::Status status) { + QPdfDocument::Status status_ret = status; + int sigval1 = static_cast(status_ret); + miqt_exec_callback_QPdfDocument_statusChanged(slot, sigval1); + }); +} + +void QPdfDocument_pageCountChanged(QPdfDocument* self, int pageCount) { + self->pageCountChanged(static_cast(pageCount)); +} + +void QPdfDocument_connect_pageCountChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::pageCountChanged), self, [=](int pageCount) { + int sigval1 = pageCount; + miqt_exec_callback_QPdfDocument_pageCountChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfDocument_tr2(const char* s, const char* c) { + QString _ret = QPdfDocument::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfDocument_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfDocument::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfDocument_trUtf82(const char* s, const char* c) { + QString _ret = QPdfDocument::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfDocument_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfDocument::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QImage* QPdfDocument_render2(QPdfDocument* self, int page, QSize* imageSize, QPdfDocumentRenderOptions* options) { + return new QImage(self->render(static_cast(page), *imageSize, *options)); +} + +bool QPdfDocument_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfDocument_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::event(event); + +} + +bool QPdfDocument_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::eventFilter(watched, event); + +} + +bool QPdfDocument_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::timerEvent(event); + +} + +bool QPdfDocument_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::childEvent(event); + +} + +bool QPdfDocument_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::customEvent(event); + +} + +bool QPdfDocument_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::connectNotify(*signal); + +} + +bool QPdfDocument_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::disconnectNotify(*signal); + +} + +QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfDocument_delete(QPdfDocument* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfdocument.go b/qt/pdf/gen_qpdfdocument.go new file mode 100644 index 00000000..66412fa9 --- /dev/null +++ b/qt/pdf/gen_qpdfdocument.go @@ -0,0 +1,590 @@ +package pdf + +/* + +#include "gen_qpdfdocument.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfDocument__Status int + +const ( + QPdfDocument__Null QPdfDocument__Status = 0 + QPdfDocument__Loading QPdfDocument__Status = 1 + QPdfDocument__Ready QPdfDocument__Status = 2 + QPdfDocument__Unloading QPdfDocument__Status = 3 + QPdfDocument__Error QPdfDocument__Status = 4 +) + +type QPdfDocument__DocumentError int + +const ( + QPdfDocument__NoError QPdfDocument__DocumentError = 0 + QPdfDocument__UnknownError QPdfDocument__DocumentError = 1 + QPdfDocument__DataNotYetAvailableError QPdfDocument__DocumentError = 2 + QPdfDocument__FileNotFoundError QPdfDocument__DocumentError = 3 + QPdfDocument__InvalidFileFormatError QPdfDocument__DocumentError = 4 + QPdfDocument__IncorrectPasswordError QPdfDocument__DocumentError = 5 + QPdfDocument__UnsupportedSecuritySchemeError QPdfDocument__DocumentError = 6 +) + +type QPdfDocument__MetaDataField int + +const ( + QPdfDocument__Title QPdfDocument__MetaDataField = 0 + QPdfDocument__Subject QPdfDocument__MetaDataField = 1 + QPdfDocument__Author QPdfDocument__MetaDataField = 2 + QPdfDocument__Keywords QPdfDocument__MetaDataField = 3 + QPdfDocument__Producer QPdfDocument__MetaDataField = 4 + QPdfDocument__Creator QPdfDocument__MetaDataField = 5 + QPdfDocument__CreationDate QPdfDocument__MetaDataField = 6 + QPdfDocument__ModificationDate QPdfDocument__MetaDataField = 7 +) + +type QPdfDocument struct { + h *C.QPdfDocument + *qt.QObject +} + +func (this *QPdfDocument) cPointer() *C.QPdfDocument { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfDocument) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfDocument constructs the type using only CGO pointers. +func newQPdfDocument(h *C.QPdfDocument) *QPdfDocument { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfDocument_virtbase(h, &outptr_QObject) + + return &QPdfDocument{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfDocument constructs the type using only unsafe pointers. +func UnsafeNewQPdfDocument(h unsafe.Pointer) *QPdfDocument { + return newQPdfDocument((*C.QPdfDocument)(h)) +} + +// NewQPdfDocument constructs a new QPdfDocument object. +func NewQPdfDocument() *QPdfDocument { + + return newQPdfDocument(C.QPdfDocument_new()) +} + +// NewQPdfDocument2 constructs a new QPdfDocument object. +func NewQPdfDocument2(parent *qt.QObject) *QPdfDocument { + + return newQPdfDocument(C.QPdfDocument_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfDocument) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfDocument_metaObject(this.h))) +} + +func (this *QPdfDocument) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfDocument_metacast(this.h, param1_Cstring)) +} + +func QPdfDocument_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfDocument_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) Load(fileName string) QPdfDocument__DocumentError { + fileName_ms := C.struct_miqt_string{} + fileName_ms.data = C.CString(fileName) + fileName_ms.len = C.size_t(len(fileName)) + defer C.free(unsafe.Pointer(fileName_ms.data)) + return (QPdfDocument__DocumentError)(C.QPdfDocument_load(this.h, fileName_ms)) +} + +func (this *QPdfDocument) Status() QPdfDocument__Status { + return (QPdfDocument__Status)(C.QPdfDocument_status(this.h)) +} + +func (this *QPdfDocument) LoadWithDevice(device *qt.QIODevice) { + C.QPdfDocument_loadWithDevice(this.h, (*C.QIODevice)(device.UnsafePointer())) +} + +func (this *QPdfDocument) SetPassword(password string) { + password_ms := C.struct_miqt_string{} + password_ms.data = C.CString(password) + password_ms.len = C.size_t(len(password)) + defer C.free(unsafe.Pointer(password_ms.data)) + C.QPdfDocument_setPassword(this.h, password_ms) +} + +func (this *QPdfDocument) Password() string { + var _ms C.struct_miqt_string = C.QPdfDocument_password(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) MetaData(field QPdfDocument__MetaDataField) *qt.QVariant { + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfDocument_metaData(this.h, (C.int)(field)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) Error() QPdfDocument__DocumentError { + return (QPdfDocument__DocumentError)(C.QPdfDocument_error(this.h)) +} + +func (this *QPdfDocument) Close() { + C.QPdfDocument_close(this.h) +} + +func (this *QPdfDocument) PageCount() int { + return (int)(C.QPdfDocument_pageCount(this.h)) +} + +func (this *QPdfDocument) PageSize(page int) *qt.QSizeF { + _goptr := qt.UnsafeNewQSizeF(unsafe.Pointer(C.QPdfDocument_pageSize(this.h, (C.int)(page)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) Render(page int, imageSize qt.QSize) *qt.QImage { + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QPdfDocument_render(this.h, (C.int)(page), (*C.QSize)(imageSize.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetSelection(page int, start qt.QPointF, end qt.QPointF) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getSelection(this.h, (C.int)(page), (*C.QPointF)(start.UnsafePointer()), (*C.QPointF)(end.UnsafePointer()))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetSelectionAtIndex(page int, startIndex int, maxLength int) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getSelectionAtIndex(this.h, (C.int)(page), (C.int)(startIndex), (C.int)(maxLength))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetAllText(page int) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getAllText(this.h, (C.int)(page))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) PasswordChanged() { + C.QPdfDocument_passwordChanged(this.h) +} +func (this *QPdfDocument) OnPasswordChanged(slot func()) { + C.QPdfDocument_connect_passwordChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_passwordChanged +func miqt_exec_callback_QPdfDocument_passwordChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfDocument) PasswordRequired() { + C.QPdfDocument_passwordRequired(this.h) +} +func (this *QPdfDocument) OnPasswordRequired(slot func()) { + C.QPdfDocument_connect_passwordRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_passwordRequired +func miqt_exec_callback_QPdfDocument_passwordRequired(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfDocument) StatusChanged(status QPdfDocument__Status) { + C.QPdfDocument_statusChanged(this.h, (C.int)(status)) +} +func (this *QPdfDocument) OnStatusChanged(slot func(status QPdfDocument__Status)) { + C.QPdfDocument_connect_statusChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_statusChanged +func miqt_exec_callback_QPdfDocument_statusChanged(cb C.intptr_t, status C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(status QPdfDocument__Status)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfDocument__Status)(status) + + gofunc(slotval1) +} + +func (this *QPdfDocument) PageCountChanged(pageCount int) { + C.QPdfDocument_pageCountChanged(this.h, (C.int)(pageCount)) +} +func (this *QPdfDocument) OnPageCountChanged(slot func(pageCount int)) { + C.QPdfDocument_connect_pageCountChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_pageCountChanged +func miqt_exec_callback_QPdfDocument_pageCountChanged(cb C.intptr_t, pageCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageCount) + + gofunc(slotval1) +} + +func QPdfDocument_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfDocument_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfDocument_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfDocument_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) Render2(page int, imageSize qt.QSize, options QPdfDocumentRenderOptions) *qt.QImage { + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QPdfDocument_render2(this.h, (C.int)(page), (*C.QSize)(imageSize.UnsafePointer()), options.cPointer()))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Sender can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfDocument_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfDocument_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfDocument_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfDocument_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfDocument) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPdfDocument_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfDocument) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + ok := C.QPdfDocument_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_event +func miqt_exec_callback_QPdfDocument_event(self *C.QPdfDocument, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfDocument{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfDocument) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QPdfDocument_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfDocument) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + ok := C.QPdfDocument_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_eventFilter +func miqt_exec_callback_QPdfDocument_eventFilter(self *C.QPdfDocument, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfDocument{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfDocument) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfDocument_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfDocument_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_timerEvent +func miqt_exec_callback_QPdfDocument_timerEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfDocument_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfDocument_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_childEvent +func miqt_exec_callback_QPdfDocument_childEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfDocument_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfDocument_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_customEvent +func miqt_exec_callback_QPdfDocument_customEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfDocument_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfDocument) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfDocument_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_connectNotify +func miqt_exec_callback_QPdfDocument_connectNotify(self *C.QPdfDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfDocument_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfDocument) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfDocument_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_disconnectNotify +func miqt_exec_callback_QPdfDocument_disconnectNotify(self *C.QPdfDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfDocument) Delete() { + C.QPdfDocument_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfDocument) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfDocument) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfdocument.h b/qt/pdf/gen_qpdfdocument.h new file mode 100644 index 00000000..506d1547 --- /dev/null +++ b/qt/pdf/gen_qpdfdocument.h @@ -0,0 +1,109 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFDOCUMENT_H +#define MIQT_QT_PDF_GEN_QPDFDOCUMENT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QIODevice; +class QImage; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfDocument; +class QPdfDocumentRenderOptions; +class QPdfSelection; +class QPointF; +class QSize; +class QSizeF; +class QTimerEvent; +class QVariant; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QIODevice QIODevice; +typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QPdfSelection QPdfSelection; +typedef struct QPointF QPointF; +typedef struct QSize QSize; +typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfDocument* QPdfDocument_new(); +QPdfDocument* QPdfDocument_new2(QObject* parent); +void QPdfDocument_virtbase(QPdfDocument* src, QObject** outptr_QObject); +QMetaObject* QPdfDocument_metaObject(const QPdfDocument* self); +void* QPdfDocument_metacast(QPdfDocument* self, const char* param1); +struct miqt_string QPdfDocument_tr(const char* s); +struct miqt_string QPdfDocument_trUtf8(const char* s); +int QPdfDocument_load(QPdfDocument* self, struct miqt_string fileName); +int QPdfDocument_status(const QPdfDocument* self); +void QPdfDocument_loadWithDevice(QPdfDocument* self, QIODevice* device); +void QPdfDocument_setPassword(QPdfDocument* self, struct miqt_string password); +struct miqt_string QPdfDocument_password(const QPdfDocument* self); +QVariant* QPdfDocument_metaData(const QPdfDocument* self, int field); +int QPdfDocument_error(const QPdfDocument* self); +void QPdfDocument_close(QPdfDocument* self); +int QPdfDocument_pageCount(const QPdfDocument* self); +QSizeF* QPdfDocument_pageSize(const QPdfDocument* self, int page); +QImage* QPdfDocument_render(QPdfDocument* self, int page, QSize* imageSize); +QPdfSelection* QPdfDocument_getSelection(QPdfDocument* self, int page, QPointF* start, QPointF* end); +QPdfSelection* QPdfDocument_getSelectionAtIndex(QPdfDocument* self, int page, int startIndex, int maxLength); +QPdfSelection* QPdfDocument_getAllText(QPdfDocument* self, int page); +void QPdfDocument_passwordChanged(QPdfDocument* self); +void QPdfDocument_connect_passwordChanged(QPdfDocument* self, intptr_t slot); +void QPdfDocument_passwordRequired(QPdfDocument* self); +void QPdfDocument_connect_passwordRequired(QPdfDocument* self, intptr_t slot); +void QPdfDocument_statusChanged(QPdfDocument* self, int status); +void QPdfDocument_connect_statusChanged(QPdfDocument* self, intptr_t slot); +void QPdfDocument_pageCountChanged(QPdfDocument* self, int pageCount); +void QPdfDocument_connect_pageCountChanged(QPdfDocument* self, intptr_t slot); +struct miqt_string QPdfDocument_tr2(const char* s, const char* c); +struct miqt_string QPdfDocument_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfDocument_trUtf82(const char* s, const char* c); +struct miqt_string QPdfDocument_trUtf83(const char* s, const char* c, int n); +QImage* QPdfDocument_render2(QPdfDocument* self, int page, QSize* imageSize, QPdfDocumentRenderOptions* options); +bool QPdfDocument_override_virtual_event(void* self, intptr_t slot); +bool QPdfDocument_virtualbase_event(void* self, QEvent* event); +bool QPdfDocument_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfDocument_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfDocument_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfDocument_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfDocument_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfDocument_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfDocument_delete(QPdfDocument* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfdocumentrenderoptions.cpp b/qt/pdf/gen_qpdfdocumentrenderoptions.cpp new file mode 100644 index 00000000..5a566fc0 --- /dev/null +++ b/qt/pdf/gen_qpdfdocumentrenderoptions.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include "gen_qpdfdocumentrenderoptions.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new() { + return new QPdfDocumentRenderOptions(); +} + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new2(QPdfDocumentRenderOptions* param1) { + return new QPdfDocumentRenderOptions(*param1); +} + +int QPdfDocumentRenderOptions_rotation(const QPdfDocumentRenderOptions* self) { + QPdf::Rotation _ret = self->rotation(); + return static_cast(_ret); +} + +void QPdfDocumentRenderOptions_setRotation(QPdfDocumentRenderOptions* self, int r) { + self->setRotation(static_cast(r)); +} + +int QPdfDocumentRenderOptions_renderFlags(const QPdfDocumentRenderOptions* self) { + QPdf::RenderFlags _ret = self->renderFlags(); + return static_cast(_ret); +} + +void QPdfDocumentRenderOptions_setRenderFlags(QPdfDocumentRenderOptions* self, int r) { + self->setRenderFlags(static_cast(r)); +} + +QRect* QPdfDocumentRenderOptions_scaledClipRect(const QPdfDocumentRenderOptions* self) { + return new QRect(self->scaledClipRect()); +} + +void QPdfDocumentRenderOptions_setScaledClipRect(QPdfDocumentRenderOptions* self, QRect* r) { + self->setScaledClipRect(*r); +} + +QSize* QPdfDocumentRenderOptions_scaledSize(const QPdfDocumentRenderOptions* self) { + return new QSize(self->scaledSize()); +} + +void QPdfDocumentRenderOptions_setScaledSize(QPdfDocumentRenderOptions* self, QSize* s) { + self->setScaledSize(*s); +} + +void QPdfDocumentRenderOptions_delete(QPdfDocumentRenderOptions* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfdocumentrenderoptions.go b/qt/pdf/gen_qpdfdocumentrenderoptions.go new file mode 100644 index 00000000..aab3d9ae --- /dev/null +++ b/qt/pdf/gen_qpdfdocumentrenderoptions.go @@ -0,0 +1,109 @@ +package pdf + +/* + +#include "gen_qpdfdocumentrenderoptions.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QPdfDocumentRenderOptions struct { + h *C.QPdfDocumentRenderOptions +} + +func (this *QPdfDocumentRenderOptions) cPointer() *C.QPdfDocumentRenderOptions { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfDocumentRenderOptions) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfDocumentRenderOptions constructs the type using only CGO pointers. +func newQPdfDocumentRenderOptions(h *C.QPdfDocumentRenderOptions) *QPdfDocumentRenderOptions { + if h == nil { + return nil + } + + return &QPdfDocumentRenderOptions{h: h} +} + +// UnsafeNewQPdfDocumentRenderOptions constructs the type using only unsafe pointers. +func UnsafeNewQPdfDocumentRenderOptions(h unsafe.Pointer) *QPdfDocumentRenderOptions { + return newQPdfDocumentRenderOptions((*C.QPdfDocumentRenderOptions)(h)) +} + +// NewQPdfDocumentRenderOptions constructs a new QPdfDocumentRenderOptions object. +func NewQPdfDocumentRenderOptions() *QPdfDocumentRenderOptions { + + return newQPdfDocumentRenderOptions(C.QPdfDocumentRenderOptions_new()) +} + +// NewQPdfDocumentRenderOptions2 constructs a new QPdfDocumentRenderOptions object. +func NewQPdfDocumentRenderOptions2(param1 *QPdfDocumentRenderOptions) *QPdfDocumentRenderOptions { + + return newQPdfDocumentRenderOptions(C.QPdfDocumentRenderOptions_new2(param1.cPointer())) +} + +func (this *QPdfDocumentRenderOptions) Rotation() QPdf__Rotation { + return (QPdf__Rotation)(C.QPdfDocumentRenderOptions_rotation(this.h)) +} + +func (this *QPdfDocumentRenderOptions) SetRotation(r QPdf__Rotation) { + C.QPdfDocumentRenderOptions_setRotation(this.h, (C.int)(r)) +} + +func (this *QPdfDocumentRenderOptions) RenderFlags() QPdf__RenderFlag { + return (QPdf__RenderFlag)(C.QPdfDocumentRenderOptions_renderFlags(this.h)) +} + +func (this *QPdfDocumentRenderOptions) SetRenderFlags(r QPdf__RenderFlag) { + C.QPdfDocumentRenderOptions_setRenderFlags(this.h, (C.int)(r)) +} + +func (this *QPdfDocumentRenderOptions) ScaledClipRect() *qt.QRect { + _goptr := qt.UnsafeNewQRect(unsafe.Pointer(C.QPdfDocumentRenderOptions_scaledClipRect(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocumentRenderOptions) SetScaledClipRect(r *qt.QRect) { + C.QPdfDocumentRenderOptions_setScaledClipRect(this.h, (*C.QRect)(r.UnsafePointer())) +} + +func (this *QPdfDocumentRenderOptions) ScaledSize() *qt.QSize { + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfDocumentRenderOptions_scaledSize(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocumentRenderOptions) SetScaledSize(s *qt.QSize) { + C.QPdfDocumentRenderOptions_setScaledSize(this.h, (*C.QSize)(s.UnsafePointer())) +} + +// Delete this object from C++ memory. +func (this *QPdfDocumentRenderOptions) Delete() { + C.QPdfDocumentRenderOptions_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfDocumentRenderOptions) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfDocumentRenderOptions) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfdocumentrenderoptions.h b/qt/pdf/gen_qpdfdocumentrenderoptions.h new file mode 100644 index 00000000..52ef7ad9 --- /dev/null +++ b/qt/pdf/gen_qpdfdocumentrenderoptions.h @@ -0,0 +1,43 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFDOCUMENTRENDEROPTIONS_H +#define MIQT_QT_PDF_GEN_QPDFDOCUMENTRENDEROPTIONS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfDocumentRenderOptions; +class QRect; +class QSize; +#else +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QRect QRect; +typedef struct QSize QSize; +#endif + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new(); +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new2(QPdfDocumentRenderOptions* param1); +int QPdfDocumentRenderOptions_rotation(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setRotation(QPdfDocumentRenderOptions* self, int r); +int QPdfDocumentRenderOptions_renderFlags(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setRenderFlags(QPdfDocumentRenderOptions* self, int r); +QRect* QPdfDocumentRenderOptions_scaledClipRect(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setScaledClipRect(QPdfDocumentRenderOptions* self, QRect* r); +QSize* QPdfDocumentRenderOptions_scaledSize(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setScaledSize(QPdfDocumentRenderOptions* self, QSize* s); +void QPdfDocumentRenderOptions_delete(QPdfDocumentRenderOptions* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfnamespace.cpp b/qt/pdf/gen_qpdfnamespace.cpp new file mode 100644 index 00000000..08afd803 --- /dev/null +++ b/qt/pdf/gen_qpdfnamespace.cpp @@ -0,0 +1,11 @@ +#include +#include "gen_qpdfnamespace.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + diff --git a/qt/pdf/gen_qpdfnamespace.go b/qt/pdf/gen_qpdfnamespace.go new file mode 100644 index 00000000..0012f7e6 --- /dev/null +++ b/qt/pdf/gen_qpdfnamespace.go @@ -0,0 +1,31 @@ +package pdf + +/* + +#include "gen_qpdfnamespace.h" +#include + +*/ +import "C" + +type QPdf__Rotation int + +const ( + QPdf__Rotate0 QPdf__Rotation = 0 + QPdf__Rotate90 QPdf__Rotation = 1 + QPdf__Rotate180 QPdf__Rotation = 2 + QPdf__Rotate270 QPdf__Rotation = 3 +) + +type QPdf__RenderFlag int + +const ( + QPdf__NoRenderFlags QPdf__RenderFlag = 0 + QPdf__RenderAnnotations QPdf__RenderFlag = 1 + QPdf__RenderOptimizedForLcd QPdf__RenderFlag = 2 + QPdf__RenderGrayscale QPdf__RenderFlag = 4 + QPdf__RenderForceHalftone QPdf__RenderFlag = 8 + QPdf__RenderTextAliased QPdf__RenderFlag = 16 + QPdf__RenderImageAliased QPdf__RenderFlag = 32 + QPdf__RenderPathAliased QPdf__RenderFlag = 64 +) diff --git a/qt/pdf/gen_qpdfnamespace.h b/qt/pdf/gen_qpdfnamespace.h new file mode 100644 index 00000000..58826980 --- /dev/null +++ b/qt/pdf/gen_qpdfnamespace.h @@ -0,0 +1,25 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFNAMESPACE_H +#define MIQT_QT_PDF_GEN_QPDFNAMESPACE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +#else +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfpagenavigation.cpp b/qt/pdf/gen_qpdfpagenavigation.cpp new file mode 100644 index 00000000..86b7d054 --- /dev/null +++ b/qt/pdf/gen_qpdfpagenavigation.cpp @@ -0,0 +1,530 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfpagenavigation.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfPageNavigation_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfPageNavigation_currentPageChanged(intptr_t, int); +void miqt_exec_callback_QPdfPageNavigation_pageCountChanged(intptr_t, int); +void miqt_exec_callback_QPdfPageNavigation_canGoToPreviousPageChanged(intptr_t, bool); +void miqt_exec_callback_QPdfPageNavigation_canGoToNextPageChanged(intptr_t, bool); +bool miqt_exec_callback_QPdfPageNavigation_event(QPdfPageNavigation*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfPageNavigation_eventFilter(QPdfPageNavigation*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfPageNavigation_timerEvent(QPdfPageNavigation*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfPageNavigation_childEvent(QPdfPageNavigation*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfPageNavigation_customEvent(QPdfPageNavigation*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfPageNavigation_connectNotify(QPdfPageNavigation*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfPageNavigation_disconnectNotify(QPdfPageNavigation*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfPageNavigation final : public QPdfPageNavigation { +public: + + MiqtVirtualQPdfPageNavigation(): QPdfPageNavigation() {}; + MiqtVirtualQPdfPageNavigation(QObject* parent): QPdfPageNavigation(parent) {}; + + virtual ~MiqtVirtualQPdfPageNavigation() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfPageNavigation::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageNavigation_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfPageNavigation_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfPageNavigation::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageNavigation_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfPageNavigation_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfPageNavigation::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigation_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfPageNavigation_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfPageNavigation::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigation_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfPageNavigation_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfPageNavigation::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigation_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfPageNavigation_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfPageNavigation::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageNavigation_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfPageNavigation_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfPageNavigation::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageNavigation_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfPageNavigation_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QObject* QPdfPageNavigation_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageNavigation_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageNavigation_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfPageNavigation_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfPageNavigation* QPdfPageNavigation_new() { + return new MiqtVirtualQPdfPageNavigation(); +} + +QPdfPageNavigation* QPdfPageNavigation_new2(QObject* parent) { + return new MiqtVirtualQPdfPageNavigation(parent); +} + +void QPdfPageNavigation_virtbase(QPdfPageNavigation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfPageNavigation_metaObject(const QPdfPageNavigation* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfPageNavigation_metacast(QPdfPageNavigation* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfPageNavigation_tr(const char* s) { + QString _ret = QPdfPageNavigation::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageNavigation_trUtf8(const char* s) { + QString _ret = QPdfPageNavigation::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QPdfDocument* QPdfPageNavigation_document(const QPdfPageNavigation* self) { + return self->document(); +} + +void QPdfPageNavigation_setDocument(QPdfPageNavigation* self, QPdfDocument* document) { + self->setDocument(document); +} + +int QPdfPageNavigation_currentPage(const QPdfPageNavigation* self) { + return self->currentPage(); +} + +void QPdfPageNavigation_setCurrentPage(QPdfPageNavigation* self, int currentPage) { + self->setCurrentPage(static_cast(currentPage)); +} + +int QPdfPageNavigation_pageCount(const QPdfPageNavigation* self) { + return self->pageCount(); +} + +bool QPdfPageNavigation_canGoToPreviousPage(const QPdfPageNavigation* self) { + return self->canGoToPreviousPage(); +} + +bool QPdfPageNavigation_canGoToNextPage(const QPdfPageNavigation* self) { + return self->canGoToNextPage(); +} + +void QPdfPageNavigation_goToPreviousPage(QPdfPageNavigation* self) { + self->goToPreviousPage(); +} + +void QPdfPageNavigation_goToNextPage(QPdfPageNavigation* self) { + self->goToNextPage(); +} + +void QPdfPageNavigation_documentChanged(QPdfPageNavigation* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfPageNavigation_connect_documentChanged(QPdfPageNavigation* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation::connect(self, static_cast(&QPdfPageNavigation::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfPageNavigation_documentChanged(slot, sigval1); + }); +} + +void QPdfPageNavigation_currentPageChanged(QPdfPageNavigation* self, int currentPage) { + self->currentPageChanged(static_cast(currentPage)); +} + +void QPdfPageNavigation_connect_currentPageChanged(QPdfPageNavigation* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation::connect(self, static_cast(&QPdfPageNavigation::currentPageChanged), self, [=](int currentPage) { + int sigval1 = currentPage; + miqt_exec_callback_QPdfPageNavigation_currentPageChanged(slot, sigval1); + }); +} + +void QPdfPageNavigation_pageCountChanged(QPdfPageNavigation* self, int pageCount) { + self->pageCountChanged(static_cast(pageCount)); +} + +void QPdfPageNavigation_connect_pageCountChanged(QPdfPageNavigation* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation::connect(self, static_cast(&QPdfPageNavigation::pageCountChanged), self, [=](int pageCount) { + int sigval1 = pageCount; + miqt_exec_callback_QPdfPageNavigation_pageCountChanged(slot, sigval1); + }); +} + +void QPdfPageNavigation_canGoToPreviousPageChanged(QPdfPageNavigation* self, bool canGo) { + self->canGoToPreviousPageChanged(canGo); +} + +void QPdfPageNavigation_connect_canGoToPreviousPageChanged(QPdfPageNavigation* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation::connect(self, static_cast(&QPdfPageNavigation::canGoToPreviousPageChanged), self, [=](bool canGo) { + bool sigval1 = canGo; + miqt_exec_callback_QPdfPageNavigation_canGoToPreviousPageChanged(slot, sigval1); + }); +} + +void QPdfPageNavigation_canGoToNextPageChanged(QPdfPageNavigation* self, bool canGo) { + self->canGoToNextPageChanged(canGo); +} + +void QPdfPageNavigation_connect_canGoToNextPageChanged(QPdfPageNavigation* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation::connect(self, static_cast(&QPdfPageNavigation::canGoToNextPageChanged), self, [=](bool canGo) { + bool sigval1 = canGo; + miqt_exec_callback_QPdfPageNavigation_canGoToNextPageChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfPageNavigation_tr2(const char* s, const char* c) { + QString _ret = QPdfPageNavigation::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageNavigation_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfPageNavigation::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageNavigation_trUtf82(const char* s, const char* c) { + QString _ret = QPdfPageNavigation::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageNavigation_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfPageNavigation::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfPageNavigation_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfPageNavigation_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::event(event); + +} + +bool QPdfPageNavigation_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfPageNavigation_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::eventFilter(watched, event); + +} + +bool QPdfPageNavigation_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfPageNavigation_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::timerEvent(event); + +} + +bool QPdfPageNavigation_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfPageNavigation_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::childEvent(event); + +} + +bool QPdfPageNavigation_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfPageNavigation_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::customEvent(event); + +} + +bool QPdfPageNavigation_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfPageNavigation_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::connectNotify(*signal); + +} + +bool QPdfPageNavigation_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfPageNavigation_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageNavigation*)(self) )->QPdfPageNavigation::disconnectNotify(*signal); + +} + +QObject* QPdfPageNavigation_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfPageNavigation_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfPageNavigation_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfPageNavigation_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfPageNavigation* self_cast = dynamic_cast( (QPdfPageNavigation*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfPageNavigation_delete(QPdfPageNavigation* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfpagenavigation.go b/qt/pdf/gen_qpdfpagenavigation.go new file mode 100644 index 00000000..aef54356 --- /dev/null +++ b/qt/pdf/gen_qpdfpagenavigation.go @@ -0,0 +1,532 @@ +package pdf + +/* + +#include "gen_qpdfpagenavigation.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfPageNavigation struct { + h *C.QPdfPageNavigation + *qt.QObject +} + +func (this *QPdfPageNavigation) cPointer() *C.QPdfPageNavigation { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfPageNavigation) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfPageNavigation constructs the type using only CGO pointers. +func newQPdfPageNavigation(h *C.QPdfPageNavigation) *QPdfPageNavigation { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfPageNavigation_virtbase(h, &outptr_QObject) + + return &QPdfPageNavigation{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfPageNavigation constructs the type using only unsafe pointers. +func UnsafeNewQPdfPageNavigation(h unsafe.Pointer) *QPdfPageNavigation { + return newQPdfPageNavigation((*C.QPdfPageNavigation)(h)) +} + +// NewQPdfPageNavigation constructs a new QPdfPageNavigation object. +func NewQPdfPageNavigation() *QPdfPageNavigation { + + return newQPdfPageNavigation(C.QPdfPageNavigation_new()) +} + +// NewQPdfPageNavigation2 constructs a new QPdfPageNavigation object. +func NewQPdfPageNavigation2(parent *qt.QObject) *QPdfPageNavigation { + + return newQPdfPageNavigation(C.QPdfPageNavigation_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfPageNavigation) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfPageNavigation_metaObject(this.h))) +} + +func (this *QPdfPageNavigation) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfPageNavigation_metacast(this.h, param1_Cstring)) +} + +func QPdfPageNavigation_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageNavigation_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageNavigation) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfPageNavigation_document(this.h)) +} + +func (this *QPdfPageNavigation) SetDocument(document *QPdfDocument) { + C.QPdfPageNavigation_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfPageNavigation) CurrentPage() int { + return (int)(C.QPdfPageNavigation_currentPage(this.h)) +} + +func (this *QPdfPageNavigation) SetCurrentPage(currentPage int) { + C.QPdfPageNavigation_setCurrentPage(this.h, (C.int)(currentPage)) +} + +func (this *QPdfPageNavigation) PageCount() int { + return (int)(C.QPdfPageNavigation_pageCount(this.h)) +} + +func (this *QPdfPageNavigation) CanGoToPreviousPage() bool { + return (bool)(C.QPdfPageNavigation_canGoToPreviousPage(this.h)) +} + +func (this *QPdfPageNavigation) CanGoToNextPage() bool { + return (bool)(C.QPdfPageNavigation_canGoToNextPage(this.h)) +} + +func (this *QPdfPageNavigation) GoToPreviousPage() { + C.QPdfPageNavigation_goToPreviousPage(this.h) +} + +func (this *QPdfPageNavigation) GoToNextPage() { + C.QPdfPageNavigation_goToNextPage(this.h) +} + +func (this *QPdfPageNavigation) DocumentChanged(document *QPdfDocument) { + C.QPdfPageNavigation_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfPageNavigation) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfPageNavigation_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigation_documentChanged +func miqt_exec_callback_QPdfPageNavigation_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigation) CurrentPageChanged(currentPage int) { + C.QPdfPageNavigation_currentPageChanged(this.h, (C.int)(currentPage)) +} +func (this *QPdfPageNavigation) OnCurrentPageChanged(slot func(currentPage int)) { + C.QPdfPageNavigation_connect_currentPageChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigation_currentPageChanged +func miqt_exec_callback_QPdfPageNavigation_currentPageChanged(cb C.intptr_t, currentPage C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(currentPage int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(currentPage) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigation) PageCountChanged(pageCount int) { + C.QPdfPageNavigation_pageCountChanged(this.h, (C.int)(pageCount)) +} +func (this *QPdfPageNavigation) OnPageCountChanged(slot func(pageCount int)) { + C.QPdfPageNavigation_connect_pageCountChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigation_pageCountChanged +func miqt_exec_callback_QPdfPageNavigation_pageCountChanged(cb C.intptr_t, pageCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageCount) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigation) CanGoToPreviousPageChanged(canGo bool) { + C.QPdfPageNavigation_canGoToPreviousPageChanged(this.h, (C.bool)(canGo)) +} +func (this *QPdfPageNavigation) OnCanGoToPreviousPageChanged(slot func(canGo bool)) { + C.QPdfPageNavigation_connect_canGoToPreviousPageChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigation_canGoToPreviousPageChanged +func miqt_exec_callback_QPdfPageNavigation_canGoToPreviousPageChanged(cb C.intptr_t, canGo C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(canGo bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(canGo) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigation) CanGoToNextPageChanged(canGo bool) { + C.QPdfPageNavigation_canGoToNextPageChanged(this.h, (C.bool)(canGo)) +} +func (this *QPdfPageNavigation) OnCanGoToNextPageChanged(slot func(canGo bool)) { + C.QPdfPageNavigation_connect_canGoToNextPageChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigation_canGoToNextPageChanged +func miqt_exec_callback_QPdfPageNavigation_canGoToNextPageChanged(cb C.intptr_t, canGo C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(canGo bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(canGo) + + gofunc(slotval1) +} + +func QPdfPageNavigation_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageNavigation_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageNavigation_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageNavigation_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigation_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// Sender can only be called from a QPdfPageNavigation that was directly constructed. +func (this *QPdfPageNavigation) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfPageNavigation_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfPageNavigation that was directly constructed. +func (this *QPdfPageNavigation) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageNavigation_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfPageNavigation that was directly constructed. +func (this *QPdfPageNavigation) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageNavigation_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfPageNavigation that was directly constructed. +func (this *QPdfPageNavigation) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfPageNavigation_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfPageNavigation) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPdfPageNavigation_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageNavigation) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + ok := C.QPdfPageNavigation_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_event +func miqt_exec_callback_QPdfPageNavigation_event(self *C.QPdfPageNavigation, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageNavigation) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QPdfPageNavigation_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageNavigation) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + ok := C.QPdfPageNavigation_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_eventFilter +func miqt_exec_callback_QPdfPageNavigation_eventFilter(self *C.QPdfPageNavigation, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageNavigation) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfPageNavigation_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigation) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfPageNavigation_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_timerEvent +func miqt_exec_callback_QPdfPageNavigation_timerEvent(self *C.QPdfPageNavigation, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfPageNavigation) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfPageNavigation_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigation) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfPageNavigation_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_childEvent +func miqt_exec_callback_QPdfPageNavigation_childEvent(self *C.QPdfPageNavigation, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfPageNavigation) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfPageNavigation_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigation) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfPageNavigation_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_customEvent +func miqt_exec_callback_QPdfPageNavigation_customEvent(self *C.QPdfPageNavigation, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfPageNavigation) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfPageNavigation_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageNavigation) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfPageNavigation_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_connectNotify +func miqt_exec_callback_QPdfPageNavigation_connectNotify(self *C.QPdfPageNavigation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfPageNavigation) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfPageNavigation_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageNavigation) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfPageNavigation_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigation_disconnectNotify +func miqt_exec_callback_QPdfPageNavigation_disconnectNotify(self *C.QPdfPageNavigation, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageNavigation{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfPageNavigation) Delete() { + C.QPdfPageNavigation_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfPageNavigation) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfPageNavigation) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfpagenavigation.h b/qt/pdf/gen_qpdfpagenavigation.h new file mode 100644 index 00000000..31480811 --- /dev/null +++ b/qt/pdf/gen_qpdfpagenavigation.h @@ -0,0 +1,91 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFPAGENAVIGATION_H +#define MIQT_QT_PDF_GEN_QPDFPAGENAVIGATION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfDocument; +class QPdfPageNavigation; +class QTimerEvent; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfPageNavigation QPdfPageNavigation; +typedef struct QTimerEvent QTimerEvent; +#endif + +QPdfPageNavigation* QPdfPageNavigation_new(); +QPdfPageNavigation* QPdfPageNavigation_new2(QObject* parent); +void QPdfPageNavigation_virtbase(QPdfPageNavigation* src, QObject** outptr_QObject); +QMetaObject* QPdfPageNavigation_metaObject(const QPdfPageNavigation* self); +void* QPdfPageNavigation_metacast(QPdfPageNavigation* self, const char* param1); +struct miqt_string QPdfPageNavigation_tr(const char* s); +struct miqt_string QPdfPageNavigation_trUtf8(const char* s); +QPdfDocument* QPdfPageNavigation_document(const QPdfPageNavigation* self); +void QPdfPageNavigation_setDocument(QPdfPageNavigation* self, QPdfDocument* document); +int QPdfPageNavigation_currentPage(const QPdfPageNavigation* self); +void QPdfPageNavigation_setCurrentPage(QPdfPageNavigation* self, int currentPage); +int QPdfPageNavigation_pageCount(const QPdfPageNavigation* self); +bool QPdfPageNavigation_canGoToPreviousPage(const QPdfPageNavigation* self); +bool QPdfPageNavigation_canGoToNextPage(const QPdfPageNavigation* self); +void QPdfPageNavigation_goToPreviousPage(QPdfPageNavigation* self); +void QPdfPageNavigation_goToNextPage(QPdfPageNavigation* self); +void QPdfPageNavigation_documentChanged(QPdfPageNavigation* self, QPdfDocument* document); +void QPdfPageNavigation_connect_documentChanged(QPdfPageNavigation* self, intptr_t slot); +void QPdfPageNavigation_currentPageChanged(QPdfPageNavigation* self, int currentPage); +void QPdfPageNavigation_connect_currentPageChanged(QPdfPageNavigation* self, intptr_t slot); +void QPdfPageNavigation_pageCountChanged(QPdfPageNavigation* self, int pageCount); +void QPdfPageNavigation_connect_pageCountChanged(QPdfPageNavigation* self, intptr_t slot); +void QPdfPageNavigation_canGoToPreviousPageChanged(QPdfPageNavigation* self, bool canGo); +void QPdfPageNavigation_connect_canGoToPreviousPageChanged(QPdfPageNavigation* self, intptr_t slot); +void QPdfPageNavigation_canGoToNextPageChanged(QPdfPageNavigation* self, bool canGo); +void QPdfPageNavigation_connect_canGoToNextPageChanged(QPdfPageNavigation* self, intptr_t slot); +struct miqt_string QPdfPageNavigation_tr2(const char* s, const char* c); +struct miqt_string QPdfPageNavigation_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfPageNavigation_trUtf82(const char* s, const char* c); +struct miqt_string QPdfPageNavigation_trUtf83(const char* s, const char* c, int n); +bool QPdfPageNavigation_override_virtual_event(void* self, intptr_t slot); +bool QPdfPageNavigation_virtualbase_event(void* self, QEvent* event); +bool QPdfPageNavigation_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfPageNavigation_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfPageNavigation_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfPageNavigation_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfPageNavigation_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfPageNavigation_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfPageNavigation_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfPageNavigation_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfPageNavigation_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfPageNavigation_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfPageNavigation_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfPageNavigation_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QObject* QPdfPageNavigation_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfPageNavigation_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfPageNavigation_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfPageNavigation_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfPageNavigation_delete(QPdfPageNavigation* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfpagerenderer.cpp b/qt/pdf/gen_qpdfpagerenderer.cpp new file mode 100644 index 00000000..52db6310 --- /dev/null +++ b/qt/pdf/gen_qpdfpagerenderer.cpp @@ -0,0 +1,508 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfpagerenderer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfPageRenderer_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfPageRenderer_renderModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfPageRenderer_pageRendered(intptr_t, int, QSize*, QImage*, QPdfDocumentRenderOptions*, unsigned long long); +bool miqt_exec_callback_QPdfPageRenderer_event(QPdfPageRenderer*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfPageRenderer_eventFilter(QPdfPageRenderer*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfPageRenderer_timerEvent(QPdfPageRenderer*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfPageRenderer_childEvent(QPdfPageRenderer*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfPageRenderer_customEvent(QPdfPageRenderer*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfPageRenderer_connectNotify(QPdfPageRenderer*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfPageRenderer_disconnectNotify(QPdfPageRenderer*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfPageRenderer final : public QPdfPageRenderer { +public: + + MiqtVirtualQPdfPageRenderer(): QPdfPageRenderer() {}; + MiqtVirtualQPdfPageRenderer(QObject* parent): QPdfPageRenderer(parent) {}; + + virtual ~MiqtVirtualQPdfPageRenderer() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfPageRenderer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageRenderer_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfPageRenderer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageRenderer_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfPageRenderer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfPageRenderer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfPageRenderer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfPageRenderer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageRenderer_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfPageRenderer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageRenderer_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfPageRenderer* QPdfPageRenderer_new() { + return new MiqtVirtualQPdfPageRenderer(); +} + +QPdfPageRenderer* QPdfPageRenderer_new2(QObject* parent) { + return new MiqtVirtualQPdfPageRenderer(parent); +} + +void QPdfPageRenderer_virtbase(QPdfPageRenderer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfPageRenderer_metaObject(const QPdfPageRenderer* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfPageRenderer_metacast(QPdfPageRenderer* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfPageRenderer_tr(const char* s) { + QString _ret = QPdfPageRenderer::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageRenderer_trUtf8(const char* s) { + QString _ret = QPdfPageRenderer::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QPdfPageRenderer_renderMode(const QPdfPageRenderer* self) { + QPdfPageRenderer::RenderMode _ret = self->renderMode(); + return static_cast(_ret); +} + +void QPdfPageRenderer_setRenderMode(QPdfPageRenderer* self, int mode) { + self->setRenderMode(static_cast(mode)); +} + +QPdfDocument* QPdfPageRenderer_document(const QPdfPageRenderer* self) { + return self->document(); +} + +void QPdfPageRenderer_setDocument(QPdfPageRenderer* self, QPdfDocument* document) { + self->setDocument(document); +} + +unsigned long long QPdfPageRenderer_requestPage(QPdfPageRenderer* self, int pageNumber, QSize* imageSize) { + quint64 _ret = self->requestPage(static_cast(pageNumber), *imageSize); + return static_cast(_ret); +} + +void QPdfPageRenderer_documentChanged(QPdfPageRenderer* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfPageRenderer_connect_documentChanged(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfPageRenderer_documentChanged(slot, sigval1); + }); +} + +void QPdfPageRenderer_renderModeChanged(QPdfPageRenderer* self, int renderMode) { + self->renderModeChanged(static_cast(renderMode)); +} + +void QPdfPageRenderer_connect_renderModeChanged(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::renderModeChanged), self, [=](QPdfPageRenderer::RenderMode renderMode) { + QPdfPageRenderer::RenderMode renderMode_ret = renderMode; + int sigval1 = static_cast(renderMode_ret); + miqt_exec_callback_QPdfPageRenderer_renderModeChanged(slot, sigval1); + }); +} + +void QPdfPageRenderer_pageRendered(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QImage* image, QPdfDocumentRenderOptions* options, unsigned long long requestId) { + self->pageRendered(static_cast(pageNumber), *imageSize, *image, *options, static_cast(requestId)); +} + +void QPdfPageRenderer_connect_pageRendered(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::pageRendered), self, [=](int pageNumber, QSize imageSize, const QImage& image, QPdfDocumentRenderOptions options, quint64 requestId) { + int sigval1 = pageNumber; + QSize* sigval2 = new QSize(imageSize); + const QImage& image_ret = image; + // Cast returned reference into pointer + QImage* sigval3 = const_cast(&image_ret); + QPdfDocumentRenderOptions* sigval4 = new QPdfDocumentRenderOptions(options); + quint64 requestId_ret = requestId; + unsigned long long sigval5 = static_cast(requestId_ret); + miqt_exec_callback_QPdfPageRenderer_pageRendered(slot, sigval1, sigval2, sigval3, sigval4, sigval5); + }); +} + +struct miqt_string QPdfPageRenderer_tr2(const char* s, const char* c) { + QString _ret = QPdfPageRenderer::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageRenderer_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfPageRenderer::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageRenderer_trUtf82(const char* s, const char* c) { + QString _ret = QPdfPageRenderer::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageRenderer_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfPageRenderer::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned long long QPdfPageRenderer_requestPage2(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QPdfDocumentRenderOptions* options) { + quint64 _ret = self->requestPage(static_cast(pageNumber), *imageSize, *options); + return static_cast(_ret); +} + +bool QPdfPageRenderer_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::event(event); + +} + +bool QPdfPageRenderer_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::eventFilter(watched, event); + +} + +bool QPdfPageRenderer_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::timerEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::childEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::customEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::connectNotify(*signal); + +} + +bool QPdfPageRenderer_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::disconnectNotify(*signal); + +} + +QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfPageRenderer_delete(QPdfPageRenderer* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfpagerenderer.go b/qt/pdf/gen_qpdfpagerenderer.go new file mode 100644 index 00000000..b67cb490 --- /dev/null +++ b/qt/pdf/gen_qpdfpagerenderer.go @@ -0,0 +1,499 @@ +package pdf + +/* + +#include "gen_qpdfpagerenderer.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfPageRenderer__RenderMode int + +const ( + QPdfPageRenderer__MultiThreaded QPdfPageRenderer__RenderMode = 0 + QPdfPageRenderer__SingleThreaded QPdfPageRenderer__RenderMode = 1 +) + +type QPdfPageRenderer struct { + h *C.QPdfPageRenderer + *qt.QObject +} + +func (this *QPdfPageRenderer) cPointer() *C.QPdfPageRenderer { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfPageRenderer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfPageRenderer constructs the type using only CGO pointers. +func newQPdfPageRenderer(h *C.QPdfPageRenderer) *QPdfPageRenderer { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfPageRenderer_virtbase(h, &outptr_QObject) + + return &QPdfPageRenderer{h: h, + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfPageRenderer constructs the type using only unsafe pointers. +func UnsafeNewQPdfPageRenderer(h unsafe.Pointer) *QPdfPageRenderer { + return newQPdfPageRenderer((*C.QPdfPageRenderer)(h)) +} + +// NewQPdfPageRenderer constructs a new QPdfPageRenderer object. +func NewQPdfPageRenderer() *QPdfPageRenderer { + + return newQPdfPageRenderer(C.QPdfPageRenderer_new()) +} + +// NewQPdfPageRenderer2 constructs a new QPdfPageRenderer object. +func NewQPdfPageRenderer2(parent *qt.QObject) *QPdfPageRenderer { + + return newQPdfPageRenderer(C.QPdfPageRenderer_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfPageRenderer) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfPageRenderer_metaObject(this.h))) +} + +func (this *QPdfPageRenderer) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfPageRenderer_metacast(this.h, param1_Cstring)) +} + +func QPdfPageRenderer_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageRenderer_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageRenderer) RenderMode() QPdfPageRenderer__RenderMode { + return (QPdfPageRenderer__RenderMode)(C.QPdfPageRenderer_renderMode(this.h)) +} + +func (this *QPdfPageRenderer) SetRenderMode(mode QPdfPageRenderer__RenderMode) { + C.QPdfPageRenderer_setRenderMode(this.h, (C.int)(mode)) +} + +func (this *QPdfPageRenderer) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfPageRenderer_document(this.h)) +} + +func (this *QPdfPageRenderer) SetDocument(document *QPdfDocument) { + C.QPdfPageRenderer_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfPageRenderer) RequestPage(pageNumber int, imageSize qt.QSize) uint64 { + return (uint64)(C.QPdfPageRenderer_requestPage(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()))) +} + +func (this *QPdfPageRenderer) DocumentChanged(document *QPdfDocument) { + C.QPdfPageRenderer_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfPageRenderer) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfPageRenderer_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_documentChanged +func miqt_exec_callback_QPdfPageRenderer_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfPageRenderer) RenderModeChanged(renderMode QPdfPageRenderer__RenderMode) { + C.QPdfPageRenderer_renderModeChanged(this.h, (C.int)(renderMode)) +} +func (this *QPdfPageRenderer) OnRenderModeChanged(slot func(renderMode QPdfPageRenderer__RenderMode)) { + C.QPdfPageRenderer_connect_renderModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_renderModeChanged +func miqt_exec_callback_QPdfPageRenderer_renderModeChanged(cb C.intptr_t, renderMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(renderMode QPdfPageRenderer__RenderMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfPageRenderer__RenderMode)(renderMode) + + gofunc(slotval1) +} + +func (this *QPdfPageRenderer) PageRendered(pageNumber int, imageSize qt.QSize, image *qt.QImage, options QPdfDocumentRenderOptions, requestId uint64) { + C.QPdfPageRenderer_pageRendered(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()), (*C.QImage)(image.UnsafePointer()), options.cPointer(), (C.ulonglong)(requestId)) +} +func (this *QPdfPageRenderer) OnPageRendered(slot func(pageNumber int, imageSize qt.QSize, image *qt.QImage, options QPdfDocumentRenderOptions, requestId uint64)) { + C.QPdfPageRenderer_connect_pageRendered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_pageRendered +func miqt_exec_callback_QPdfPageRenderer_pageRendered(cb C.intptr_t, pageNumber C.int, imageSize *C.QSize, image *C.QImage, options *C.QPdfDocumentRenderOptions, requestId C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageNumber int, imageSize qt.QSize, image *qt.QImage, options QPdfDocumentRenderOptions, requestId uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageNumber) + + imageSize_goptr := qt.UnsafeNewQSize(unsafe.Pointer(imageSize)) + imageSize_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *imageSize_goptr + + slotval3 := qt.UnsafeNewQImage(unsafe.Pointer(image)) + + options_goptr := newQPdfDocumentRenderOptions(options) + options_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval4 := *options_goptr + + slotval5 := (uint64)(requestId) + + gofunc(slotval1, slotval2, slotval3, slotval4, slotval5) +} + +func QPdfPageRenderer_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageRenderer_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageRenderer_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageRenderer_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageRenderer) RequestPage2(pageNumber int, imageSize qt.QSize, options QPdfDocumentRenderOptions) uint64 { + return (uint64)(C.QPdfPageRenderer_requestPage2(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()), options.cPointer())) +} + +// Sender can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfPageRenderer_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageRenderer_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageRenderer_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfPageRenderer_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfPageRenderer) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPdfPageRenderer_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageRenderer) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + ok := C.QPdfPageRenderer_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_event +func miqt_exec_callback_QPdfPageRenderer_event(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageRenderer) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QPdfPageRenderer_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageRenderer) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + ok := C.QPdfPageRenderer_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_eventFilter +func miqt_exec_callback_QPdfPageRenderer_eventFilter(self *C.QPdfPageRenderer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageRenderer) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfPageRenderer_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfPageRenderer_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_timerEvent +func miqt_exec_callback_QPdfPageRenderer_timerEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfPageRenderer_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfPageRenderer_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_childEvent +func miqt_exec_callback_QPdfPageRenderer_childEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfPageRenderer_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfPageRenderer_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_customEvent +func miqt_exec_callback_QPdfPageRenderer_customEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfPageRenderer_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfPageRenderer_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_connectNotify +func miqt_exec_callback_QPdfPageRenderer_connectNotify(self *C.QPdfPageRenderer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfPageRenderer_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfPageRenderer_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_disconnectNotify +func miqt_exec_callback_QPdfPageRenderer_disconnectNotify(self *C.QPdfPageRenderer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfPageRenderer) Delete() { + C.QPdfPageRenderer_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfPageRenderer) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfPageRenderer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfpagerenderer.h b/qt/pdf/gen_qpdfpagerenderer.h new file mode 100644 index 00000000..85b1fa0d --- /dev/null +++ b/qt/pdf/gen_qpdfpagerenderer.h @@ -0,0 +1,90 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFPAGERENDERER_H +#define MIQT_QT_PDF_GEN_QPDFPAGERENDERER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QImage; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfDocument; +class QPdfDocumentRenderOptions; +class QPdfPageRenderer; +class QSize; +class QTimerEvent; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QPdfPageRenderer QPdfPageRenderer; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +#endif + +QPdfPageRenderer* QPdfPageRenderer_new(); +QPdfPageRenderer* QPdfPageRenderer_new2(QObject* parent); +void QPdfPageRenderer_virtbase(QPdfPageRenderer* src, QObject** outptr_QObject); +QMetaObject* QPdfPageRenderer_metaObject(const QPdfPageRenderer* self); +void* QPdfPageRenderer_metacast(QPdfPageRenderer* self, const char* param1); +struct miqt_string QPdfPageRenderer_tr(const char* s); +struct miqt_string QPdfPageRenderer_trUtf8(const char* s); +int QPdfPageRenderer_renderMode(const QPdfPageRenderer* self); +void QPdfPageRenderer_setRenderMode(QPdfPageRenderer* self, int mode); +QPdfDocument* QPdfPageRenderer_document(const QPdfPageRenderer* self); +void QPdfPageRenderer_setDocument(QPdfPageRenderer* self, QPdfDocument* document); +unsigned long long QPdfPageRenderer_requestPage(QPdfPageRenderer* self, int pageNumber, QSize* imageSize); +void QPdfPageRenderer_documentChanged(QPdfPageRenderer* self, QPdfDocument* document); +void QPdfPageRenderer_connect_documentChanged(QPdfPageRenderer* self, intptr_t slot); +void QPdfPageRenderer_renderModeChanged(QPdfPageRenderer* self, int renderMode); +void QPdfPageRenderer_connect_renderModeChanged(QPdfPageRenderer* self, intptr_t slot); +void QPdfPageRenderer_pageRendered(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QImage* image, QPdfDocumentRenderOptions* options, unsigned long long requestId); +void QPdfPageRenderer_connect_pageRendered(QPdfPageRenderer* self, intptr_t slot); +struct miqt_string QPdfPageRenderer_tr2(const char* s, const char* c); +struct miqt_string QPdfPageRenderer_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfPageRenderer_trUtf82(const char* s, const char* c); +struct miqt_string QPdfPageRenderer_trUtf83(const char* s, const char* c, int n); +unsigned long long QPdfPageRenderer_requestPage2(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QPdfDocumentRenderOptions* options); +bool QPdfPageRenderer_override_virtual_event(void* self, intptr_t slot); +bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event); +bool QPdfPageRenderer_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfPageRenderer_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfPageRenderer_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfPageRenderer_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfPageRenderer_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfPageRenderer_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfPageRenderer_delete(QPdfPageRenderer* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfsearchmodel.cpp b/qt/pdf/gen_qpdfsearchmodel.cpp new file mode 100644 index 00000000..21461c0b --- /dev/null +++ b/qt/pdf/gen_qpdfsearchmodel.cpp @@ -0,0 +1,2181 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfsearchmodel.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfSearchModel_documentChanged(intptr_t); +void miqt_exec_callback_QPdfSearchModel_searchStringChanged(intptr_t); +struct miqt_map /* of int to struct miqt_string */ miqt_exec_callback_QPdfSearchModel_roleNames(const QPdfSearchModel*, intptr_t); +int miqt_exec_callback_QPdfSearchModel_rowCount(const QPdfSearchModel*, intptr_t, QModelIndex*); +QVariant* miqt_exec_callback_QPdfSearchModel_data(const QPdfSearchModel*, intptr_t, QModelIndex*, int); +void miqt_exec_callback_QPdfSearchModel_timerEvent(QPdfSearchModel*, intptr_t, QTimerEvent*); +QModelIndex* miqt_exec_callback_QPdfSearchModel_index(const QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +QModelIndex* miqt_exec_callback_QPdfSearchModel_sibling(const QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_dropMimeData(QPdfSearchModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfSearchModel_flags(const QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_setData(QPdfSearchModel*, intptr_t, QModelIndex*, QVariant*, int); +QVariant* miqt_exec_callback_QPdfSearchModel_headerData(const QPdfSearchModel*, intptr_t, int, int, int); +bool miqt_exec_callback_QPdfSearchModel_setHeaderData(QPdfSearchModel*, intptr_t, int, int, QVariant*, int); +struct miqt_map /* of int to QVariant* */ miqt_exec_callback_QPdfSearchModel_itemData(const QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_setItemData(QPdfSearchModel*, intptr_t, QModelIndex*, struct miqt_map /* of int to QVariant* */ ); +struct miqt_array /* of struct miqt_string */ miqt_exec_callback_QPdfSearchModel_mimeTypes(const QPdfSearchModel*, intptr_t); +QMimeData* miqt_exec_callback_QPdfSearchModel_mimeData(const QPdfSearchModel*, intptr_t, struct miqt_array /* of QModelIndex* */ ); +bool miqt_exec_callback_QPdfSearchModel_canDropMimeData(const QPdfSearchModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfSearchModel_supportedDropActions(const QPdfSearchModel*, intptr_t); +int miqt_exec_callback_QPdfSearchModel_supportedDragActions(const QPdfSearchModel*, intptr_t); +bool miqt_exec_callback_QPdfSearchModel_insertRows(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_insertColumns(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_removeRows(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_removeColumns(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_moveRows(QPdfSearchModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +bool miqt_exec_callback_QPdfSearchModel_moveColumns(QPdfSearchModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +void miqt_exec_callback_QPdfSearchModel_fetchMore(QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_canFetchMore(const QPdfSearchModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfSearchModel_sort(QPdfSearchModel*, intptr_t, int, int); +QModelIndex* miqt_exec_callback_QPdfSearchModel_buddy(const QPdfSearchModel*, intptr_t, QModelIndex*); +struct miqt_array /* of QModelIndex* */ miqt_exec_callback_QPdfSearchModel_match(const QPdfSearchModel*, intptr_t, QModelIndex*, int, QVariant*, int, int); +QSize* miqt_exec_callback_QPdfSearchModel_span(const QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_submit(QPdfSearchModel*, intptr_t); +void miqt_exec_callback_QPdfSearchModel_revert(QPdfSearchModel*, intptr_t); +bool miqt_exec_callback_QPdfSearchModel_event(QPdfSearchModel*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfSearchModel_eventFilter(QPdfSearchModel*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfSearchModel_childEvent(QPdfSearchModel*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfSearchModel_customEvent(QPdfSearchModel*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfSearchModel_connectNotify(QPdfSearchModel*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfSearchModel_disconnectNotify(QPdfSearchModel*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfSearchModel final : public QPdfSearchModel { +public: + + MiqtVirtualQPdfSearchModel(): QPdfSearchModel() {}; + MiqtVirtualQPdfSearchModel(QObject* parent): QPdfSearchModel(parent) {}; + + virtual ~MiqtVirtualQPdfSearchModel() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__roleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__roleNames == 0) { + return QPdfSearchModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfSearchModel_roleNames(this, handle__roleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__rowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__rowCount == 0) { + return QPdfSearchModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_rowCount(this, handle__rowCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__data == 0) { + return QPdfSearchModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfSearchModel_data(this, handle__data, sigval1, sigval2); + + return *callback_return_value; + } + + friend QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfSearchModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__index == 0) { + return QPdfSearchModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_index(this, handle__index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__sibling == 0) { + return QPdfSearchModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_sibling(this, handle__sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__dropMimeData == 0) { + return QPdfSearchModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_dropMimeData(this, handle__dropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__flags == 0) { + return QPdfSearchModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_flags(this, handle__flags, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__setData == 0) { + return QPdfSearchModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setData(this, handle__setData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__headerData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__headerData == 0) { + return QPdfSearchModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfSearchModel_headerData(this, handle__headerData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__setHeaderData == 0) { + return QPdfSearchModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setHeaderData(this, handle__setHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__itemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__itemData == 0) { + return QPdfSearchModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QPdfSearchModel_itemData(this, handle__itemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__setItemData == 0) { + return QPdfSearchModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setItemData(this, handle__setItemData, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__mimeTypes == 0) { + return QPdfSearchModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfSearchModel_mimeTypes(this, handle__mimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__mimeData == 0) { + return QPdfSearchModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QPdfSearchModel_mimeData(this, handle__mimeData, sigval1); + + return callback_return_value; + } + + friend QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__canDropMimeData == 0) { + return QPdfSearchModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_canDropMimeData(this, handle__canDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__supportedDropActions == 0) { + return QPdfSearchModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_supportedDropActions(this, handle__supportedDropActions); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_supportedDropActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__supportedDragActions == 0) { + return QPdfSearchModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_supportedDragActions(this, handle__supportedDragActions); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_supportedDragActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__insertRows == 0) { + return QPdfSearchModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_insertRows(this, handle__insertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__insertColumns == 0) { + return QPdfSearchModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_insertColumns(this, handle__insertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__removeRows == 0) { + return QPdfSearchModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_removeRows(this, handle__removeRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__removeColumns == 0) { + return QPdfSearchModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_removeColumns(this, handle__removeColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveRows == 0) { + return QPdfSearchModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_moveRows(this, handle__moveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveColumns == 0) { + return QPdfSearchModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_moveColumns(this, handle__moveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__fetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__fetchMore == 0) { + QPdfSearchModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QPdfSearchModel_fetchMore(this, handle__fetchMore, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__canFetchMore == 0) { + return QPdfSearchModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_canFetchMore(this, handle__canFetchMore, sigval1); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__sort == 0) { + QPdfSearchModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QPdfSearchModel_sort(this, handle__sort, sigval1, sigval2); + + + } + + friend void QPdfSearchModel_virtualbase_sort(void* self, int column, int order); + + // cgo.Handle value for overwritten implementation + intptr_t handle__buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__buddy == 0) { + return QPdfSearchModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_buddy(this, handle__buddy, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__match == 0) { + return QPdfSearchModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QPdfSearchModel_match(this, handle__match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); + + // cgo.Handle value for overwritten implementation + intptr_t handle__span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__span == 0) { + return QPdfSearchModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QPdfSearchModel_span(this, handle__span, sigval1); + + return *callback_return_value; + } + + friend QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__submit == 0) { + return QPdfSearchModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_submit(this, handle__submit); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_submit(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__revert == 0) { + QPdfSearchModel::revert(); + return; + } + + + miqt_exec_callback_QPdfSearchModel_revert(this, handle__revert); + + + } + + friend void QPdfSearchModel_virtualbase_revert(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfSearchModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfSearchModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfSearchModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfSearchModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfSearchModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfSearchModel_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfSearchModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfSearchModel_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page); + friend void QPdfSearchModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self); + friend QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); + friend void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); + friend bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); + friend void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); + friend bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); + friend void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); + friend bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); + friend void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); + friend void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); + friend struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); + friend QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfSearchModel* QPdfSearchModel_new() { + return new MiqtVirtualQPdfSearchModel(); +} + +QPdfSearchModel* QPdfSearchModel_new2(QObject* parent) { + return new MiqtVirtualQPdfSearchModel(parent); +} + +void QPdfSearchModel_virtbase(QPdfSearchModel* src, QAbstractListModel** outptr_QAbstractListModel) { + *outptr_QAbstractListModel = static_cast(src); +} + +QMetaObject* QPdfSearchModel_metaObject(const QPdfSearchModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfSearchModel_metacast(QPdfSearchModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfSearchModel_tr(const char* s) { + QString _ret = QPdfSearchModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchModel_trUtf8(const char* s) { + QString _ret = QPdfSearchModel::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of QPdfSearchResult* */ QPdfSearchModel_resultsOnPage(const QPdfSearchModel* self, int page) { + QVector _ret = self->resultsOnPage(static_cast(page)); + // Convert QList<> from C++ memory to manually-managed C memory + QPdfSearchResult** _arr = static_cast(malloc(sizeof(QPdfSearchResult*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QPdfSearchResult(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +QPdfSearchResult* QPdfSearchModel_resultAtIndex(const QPdfSearchModel* self, int index) { + return new QPdfSearchResult(self->resultAtIndex(static_cast(index))); +} + +QPdfDocument* QPdfSearchModel_document(const QPdfSearchModel* self) { + return self->document(); +} + +struct miqt_string QPdfSearchModel_searchString(const QPdfSearchModel* self) { + QString _ret = self->searchString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_roleNames(const QPdfSearchModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +int QPdfSearchModel_rowCount(const QPdfSearchModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +QVariant* QPdfSearchModel_data(const QPdfSearchModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +void QPdfSearchModel_setSearchString(QPdfSearchModel* self, struct miqt_string searchString) { + QString searchString_QString = QString::fromUtf8(searchString.data, searchString.len); + self->setSearchString(searchString_QString); +} + +void QPdfSearchModel_setDocument(QPdfSearchModel* self, QPdfDocument* document) { + self->setDocument(document); +} + +void QPdfSearchModel_documentChanged(QPdfSearchModel* self) { + self->documentChanged(); +} + +void QPdfSearchModel_connect_documentChanged(QPdfSearchModel* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel::connect(self, static_cast(&QPdfSearchModel::documentChanged), self, [=]() { + miqt_exec_callback_QPdfSearchModel_documentChanged(slot); + }); +} + +void QPdfSearchModel_searchStringChanged(QPdfSearchModel* self) { + self->searchStringChanged(); +} + +void QPdfSearchModel_connect_searchStringChanged(QPdfSearchModel* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel::connect(self, static_cast(&QPdfSearchModel::searchStringChanged), self, [=]() { + miqt_exec_callback_QPdfSearchModel_searchStringChanged(slot); + }); +} + +struct miqt_string QPdfSearchModel_tr2(const char* s, const char* c) { + QString _ret = QPdfSearchModel::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchModel_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfSearchModel::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchModel_trUtf82(const char* s, const char* c) { + QString _ret = QPdfSearchModel::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchModel_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfSearchModel::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfSearchModel_override_virtual_roleNames(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__roleNames = slot; + return true; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self) { + + QHash _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_rowCount(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__rowCount = slot; + return true; +} + +int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::rowCount(*parent); + +} + +bool QPdfSearchModel_override_virtual_data(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__data = slot; + return true; +} + +QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role) { + + return new QVariant(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::data(*index, static_cast(role))); + +} + +bool QPdfSearchModel_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::timerEvent(event); + +} + +bool QPdfSearchModel_override_virtual_index(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__index = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::index(static_cast(row), static_cast(column), *parent)); + +} + +bool QPdfSearchModel_override_virtual_sibling(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sibling = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::sibling(static_cast(row), static_cast(column), *idx)); + +} + +bool QPdfSearchModel_override_virtual_dropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropMimeData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfSearchModel_override_virtual_flags(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__flags = slot; + return true; +} + +int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index) { + + Qt::ItemFlags _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::flags(*index); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_setData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setData(*index, *value, static_cast(role)); + +} + +bool QPdfSearchModel_override_virtual_headerData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__headerData = slot; + return true; +} + +QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role) { + + return new QVariant(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + +} + +bool QPdfSearchModel_override_virtual_setHeaderData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setHeaderData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + +} + +bool QPdfSearchModel_override_virtual_itemData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__itemData = slot; + return true; +} + +struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index) { + + QMap _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_setItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setItemData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setItemData(*index, roles_QMap); + +} + +bool QPdfSearchModel_override_virtual_mimeTypes(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeTypes = slot; + return true; +} + +struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self) { + + QStringList _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_mimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeData = slot; + return true; +} + +QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::mimeData(indexes_QList); + +} + +bool QPdfSearchModel_override_virtual_canDropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canDropMimeData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfSearchModel_override_virtual_supportedDropActions(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDropActions = slot; + return true; +} + +int QPdfSearchModel_virtualbase_supportedDropActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::supportedDropActions(); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_supportedDragActions(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDragActions = slot; + return true; +} + +int QPdfSearchModel_virtualbase_supportedDragActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::supportedDragActions(); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_insertRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::insertRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_insertColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::insertColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_removeRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::removeRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_removeColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::removeColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_moveRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfSearchModel_override_virtual_moveColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfSearchModel_override_virtual_fetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__fetchMore = slot; + return true; +} + +void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::fetchMore(*parent); + +} + +bool QPdfSearchModel_override_virtual_canFetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canFetchMore = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::canFetchMore(*parent); + +} + +bool QPdfSearchModel_override_virtual_sort(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sort = slot; + return true; +} + +void QPdfSearchModel_virtualbase_sort(void* self, int column, int order) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::sort(static_cast(column), static_cast(order)); + +} + +bool QPdfSearchModel_override_virtual_buddy(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__buddy = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::buddy(*index)); + +} + +bool QPdfSearchModel_override_virtual_match(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__match = slot; + return true; +} + +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + + QModelIndexList _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_span(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__span = slot; + return true; +} + +QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index) { + + return new QSize(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::span(*index)); + +} + +bool QPdfSearchModel_override_virtual_submit(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__submit = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_submit(void* self) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::submit(); + +} + +bool QPdfSearchModel_override_virtual_revert(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__revert = slot; + return true; +} + +void QPdfSearchModel_virtualbase_revert(void* self) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::revert(); + +} + +bool QPdfSearchModel_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::event(event); + +} + +bool QPdfSearchModel_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::eventFilter(watched, event); + +} + +bool QPdfSearchModel_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::childEvent(event); + +} + +bool QPdfSearchModel_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::customEvent(event); + +} + +bool QPdfSearchModel_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::connectNotify(*signal); + +} + +bool QPdfSearchModel_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::disconnectNotify(*signal); + +} + +void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->updatePage(static_cast(page)); + +} + +void QPdfSearchModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->resetInternalData(); + +} + +QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QModelIndex(self_cast->createIndex(static_cast(row), static_cast(column))); + +} + +void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + self_cast->encodeData(indexes_QList, *stream); + +} + +bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->decodeData(static_cast(row), static_cast(column), *parent, *stream); + +} + +void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertRows(); + +} + +void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveRows(); + +} + +bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveRows(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationRow)); + +} + +void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveRows(); + +} + +void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertColumns(); + +} + +void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveColumns(); + +} + +bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveColumns(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationColumn)); + +} + +void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveColumns(); + +} + +void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginResetModel(); + +} + +void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endResetModel(); + +} + +void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->changePersistentIndex(*from, *to); + +} + +void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList from_QList; + from_QList.reserve(from.len); + QModelIndex** from_arr = static_cast(from.data); + for(size_t i = 0; i < from.len; ++i) { + from_QList.push_back(*(from_arr[i])); + } + QModelIndexList to_QList; + to_QList.reserve(to.len); + QModelIndex** to_arr = static_cast(to.data); + for(size_t i = 0; i < to.len; ++i) { + to_QList.push_back(*(to_arr[i])); + } + + self_cast->changePersistentIndexList(from_QList, to_QList); + +} + +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return (struct miqt_array){}; + } + + *_dynamic_cast_ok = true; + + QModelIndexList _ret = self_cast->persistentIndexList(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfSearchModel_delete(QPdfSearchModel* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfsearchmodel.go b/qt/pdf/gen_qpdfsearchmodel.go new file mode 100644 index 00000000..27194a25 --- /dev/null +++ b/qt/pdf/gen_qpdfsearchmodel.go @@ -0,0 +1,1889 @@ +package pdf + +/* + +#include "gen_qpdfsearchmodel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfSearchModel__Role int + +const ( + QPdfSearchModel__Page QPdfSearchModel__Role = 256 + QPdfSearchModel__IndexOnPage QPdfSearchModel__Role = 257 + QPdfSearchModel__Location QPdfSearchModel__Role = 258 + QPdfSearchModel__ContextBefore QPdfSearchModel__Role = 259 + QPdfSearchModel__ContextAfter QPdfSearchModel__Role = 260 + QPdfSearchModel___Count QPdfSearchModel__Role = 261 +) + +type QPdfSearchModel struct { + h *C.QPdfSearchModel + *qt.QAbstractListModel +} + +func (this *QPdfSearchModel) cPointer() *C.QPdfSearchModel { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfSearchModel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfSearchModel constructs the type using only CGO pointers. +func newQPdfSearchModel(h *C.QPdfSearchModel) *QPdfSearchModel { + if h == nil { + return nil + } + var outptr_QAbstractListModel *C.QAbstractListModel = nil + C.QPdfSearchModel_virtbase(h, &outptr_QAbstractListModel) + + return &QPdfSearchModel{h: h, + QAbstractListModel: qt.UnsafeNewQAbstractListModel(unsafe.Pointer(outptr_QAbstractListModel))} +} + +// UnsafeNewQPdfSearchModel constructs the type using only unsafe pointers. +func UnsafeNewQPdfSearchModel(h unsafe.Pointer) *QPdfSearchModel { + return newQPdfSearchModel((*C.QPdfSearchModel)(h)) +} + +// NewQPdfSearchModel constructs a new QPdfSearchModel object. +func NewQPdfSearchModel() *QPdfSearchModel { + + return newQPdfSearchModel(C.QPdfSearchModel_new()) +} + +// NewQPdfSearchModel2 constructs a new QPdfSearchModel object. +func NewQPdfSearchModel2(parent *qt.QObject) *QPdfSearchModel { + + return newQPdfSearchModel(C.QPdfSearchModel_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfSearchModel) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfSearchModel_metaObject(this.h))) +} + +func (this *QPdfSearchModel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfSearchModel_metacast(this.h, param1_Cstring)) +} + +func QPdfSearchModel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfSearchModel_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchModel) ResultsOnPage(page int) []QPdfSearchResult { + var _ma C.struct_miqt_array = C.QPdfSearchModel_resultsOnPage(this.h, (C.int)(page)) + _ret := make([]QPdfSearchResult, int(_ma.len)) + _outCast := (*[0xffff]*C.QPdfSearchResult)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _vv_goptr := newQPdfSearchResult(_outCast[i]) + _vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_vv_goptr + } + return _ret +} + +func (this *QPdfSearchModel) ResultAtIndex(index int) *QPdfSearchResult { + _goptr := newQPdfSearchResult(C.QPdfSearchModel_resultAtIndex(this.h, (C.int)(index))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSearchModel) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfSearchModel_document(this.h)) +} + +func (this *QPdfSearchModel) SearchString() string { + var _ms C.struct_miqt_string = C.QPdfSearchModel_searchString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchModel) RoleNames() map[int][]byte { + var _mm C.struct_miqt_map = C.QPdfSearchModel_roleNames(this.h) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QPdfSearchModel) RowCount(parent *qt.QModelIndex) int { + return (int)(C.QPdfSearchModel_rowCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfSearchModel) Data(index *qt.QModelIndex, role int) *qt.QVariant { + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_data(this.h, (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSearchModel) SetSearchString(searchString string) { + searchString_ms := C.struct_miqt_string{} + searchString_ms.data = C.CString(searchString) + searchString_ms.len = C.size_t(len(searchString)) + defer C.free(unsafe.Pointer(searchString_ms.data)) + C.QPdfSearchModel_setSearchString(this.h, searchString_ms) +} + +func (this *QPdfSearchModel) SetDocument(document *QPdfDocument) { + C.QPdfSearchModel_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfSearchModel) DocumentChanged() { + C.QPdfSearchModel_documentChanged(this.h) +} +func (this *QPdfSearchModel) OnDocumentChanged(slot func()) { + C.QPdfSearchModel_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfSearchModel_documentChanged +func miqt_exec_callback_QPdfSearchModel_documentChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfSearchModel) SearchStringChanged() { + C.QPdfSearchModel_searchStringChanged(this.h) +} +func (this *QPdfSearchModel) OnSearchStringChanged(slot func()) { + C.QPdfSearchModel_connect_searchStringChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfSearchModel_searchStringChanged +func miqt_exec_callback_QPdfSearchModel_searchStringChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QPdfSearchModel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfSearchModel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfSearchModel_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfSearchModel_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// UpdatePage can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) UpdatePage(page int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_updatePage(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(page)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ResetInternalData can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) ResetInternalData() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_resetInternalData(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// CreateIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) CreateIndex(row int, column int) qt.QModelIndex { + + var _dynamic_cast_ok C.bool = false + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_protectedbase_createIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EncodeData can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EncodeData(indexes []qt.QModelIndex, stream *qt.QDataStream) { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_encodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), indexes_ma, (*C.QDataStream)(stream.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// DecodeData can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) DecodeData(row int, column int, parent *qt.QModelIndex, stream *qt.QDataStream) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_decodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()), (*C.QDataStream)(stream.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// BeginInsertRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginInsertRows(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndInsertRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginRemoveRows(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndRemoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginMoveRows(sourceParent *qt.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt.QModelIndex, destinationRow int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_beginMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationRow))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndMoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginInsertColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginInsertColumns(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndInsertColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginRemoveColumns(parent *qt.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndRemoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginMoveColumns(sourceParent *qt.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt.QModelIndex, destinationColumn int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_beginMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationColumn))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndMoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginResetModel can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndResetModel can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) ChangePersistentIndex(from *qt.QModelIndex, to *qt.QModelIndex) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_changePersistentIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(from.UnsafePointer()), (*C.QModelIndex)(to.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndexList can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) ChangePersistentIndexList(from []qt.QModelIndex, to []qt.QModelIndex) { + from_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(from)))) + defer C.free(unsafe.Pointer(from_CArray)) + for i := range from { + from_CArray[i] = (*C.QModelIndex)(from[i].UnsafePointer()) + } + from_ma := C.struct_miqt_array{len: C.size_t(len(from)), data: unsafe.Pointer(from_CArray)} + to_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(to)))) + defer C.free(unsafe.Pointer(to_CArray)) + for i := range to { + to_CArray[i] = (*C.QModelIndex)(to[i].UnsafePointer()) + } + to_ma := C.struct_miqt_array{len: C.size_t(len(to)), data: unsafe.Pointer(to_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_changePersistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h), from_ma, to_ma) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// PersistentIndexList can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) PersistentIndexList() []qt.QModelIndex { + + var _dynamic_cast_ok C.bool = false + var _ma C.struct_miqt_array = C.QPdfSearchModel_protectedbase_persistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + _ret := make([]qt.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + _method_ret := _ret + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfSearchModel_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfSearchModel_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfSearchModel_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfSearchModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QPdfSearchModel_virtualbase_roleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfSearchModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + ok := C.QPdfSearchModel_override_virtual_roleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_roleNames +func miqt_exec_callback_QPdfSearchModel_roleNames(self *C.QPdfSearchModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + if len(virtualReturn_v) > 0 { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + } else { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfSearchModel) callVirtualBase_RowCount(parent *qt.QModelIndex) int { + + return (int)(C.QPdfSearchModel_virtualbase_rowCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRowCount(slot func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) { + ok := C.QPdfSearchModel_override_virtual_rowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_rowCount +func miqt_exec_callback_QPdfSearchModel_rowCount(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) int, parent *qt.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Data(index *qt.QModelIndex, role int) *qt.QVariant { + + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_virtualbase_data(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnData(slot func(super func(index *qt.QModelIndex, role int) *qt.QVariant, index *qt.QModelIndex, role int) *qt.QVariant) { + ok := C.QPdfSearchModel_override_virtual_data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_data +func miqt_exec_callback_QPdfSearchModel_data(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, role int) *qt.QVariant, index *qt.QModelIndex, role int) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfSearchModel_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfSearchModel_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_timerEvent +func miqt_exec_callback_QPdfSearchModel_timerEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_Index(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnIndex(slot func(super func(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex, row int, column int, parent *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_index +func miqt_exec_callback_QPdfSearchModel_index(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *qt.QModelIndex) *qt.QModelIndex, row int, column int, parent *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_Sibling(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(idx.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnSibling(slot func(super func(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex, row int, column int, idx *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_sibling +func miqt_exec_callback_QPdfSearchModel_sibling(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *qt.QModelIndex) *qt.QModelIndex, row int, column int, idx *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_DropMimeData(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_dropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnDropMimeData(slot func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_dropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_dropMimeData +func miqt_exec_callback_QPdfSearchModel_dropMimeData(self *C.QPdfSearchModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Flags(index *qt.QModelIndex) qt.ItemFlag { + + return (qt.ItemFlag)(C.QPdfSearchModel_virtualbase_flags(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnFlags(slot func(super func(index *qt.QModelIndex) qt.ItemFlag, index *qt.QModelIndex) qt.ItemFlag) { + ok := C.QPdfSearchModel_override_virtual_flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_flags +func miqt_exec_callback_QPdfSearchModel_flags(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) qt.ItemFlag, index *qt.QModelIndex) qt.ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SetData(index *qt.QModelIndex, value *qt.QVariant, role int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_setData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfSearchModel) OnSetData(slot func(super func(index *qt.QModelIndex, value *qt.QVariant, role int) bool, index *qt.QModelIndex, value *qt.QVariant, role int) bool) { + ok := C.QPdfSearchModel_override_virtual_setData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setData +func miqt_exec_callback_QPdfSearchModel_setData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, value *qt.QVariant, role int) bool, index *qt.QModelIndex, value *qt.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_HeaderData(section int, orientation qt.Orientation, role int) *qt.QVariant { + + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_virtualbase_headerData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnHeaderData(slot func(super func(section int, orientation qt.Orientation, role int) *qt.QVariant, section int, orientation qt.Orientation, role int) *qt.QVariant) { + ok := C.QPdfSearchModel_override_virtual_headerData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_headerData +func miqt_exec_callback_QPdfSearchModel_headerData(self *C.QPdfSearchModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt.Orientation, role int) *qt.QVariant, section int, orientation qt.Orientation, role int) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt.Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_SetHeaderData(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_setHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfSearchModel) OnSetHeaderData(slot func(super func(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool, section int, orientation qt.Orientation, value *qt.QVariant, role int) bool) { + ok := C.QPdfSearchModel_override_virtual_setHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setHeaderData +func miqt_exec_callback_QPdfSearchModel_setHeaderData(self *C.QPdfSearchModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt.Orientation, value *qt.QVariant, role int) bool, section int, orientation qt.Orientation, value *qt.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt.Orientation)(orientation) + + slotval3 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_ItemData(index *qt.QModelIndex) map[int]qt.QVariant { + + var _mm C.struct_miqt_map = C.QPdfSearchModel_virtualbase_itemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())) + _ret := make(map[int]qt.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(_Values[i])) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfSearchModel) OnItemData(slot func(super func(index *qt.QModelIndex) map[int]qt.QVariant, index *qt.QModelIndex) map[int]qt.QVariant) { + ok := C.QPdfSearchModel_override_virtual_itemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_itemData +func miqt_exec_callback_QPdfSearchModel_itemData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) map[int]qt.QVariant, index *qt.QModelIndex) map[int]qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = (*C.QVariant)(virtualReturn_v.UnsafePointer()) + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfSearchModel) callVirtualBase_SetItemData(index *qt.QModelIndex, roles map[int]qt.QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = (*C.QVariant)(roles_v.UnsafePointer()) + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QPdfSearchModel_virtualbase_setItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), roles_mm)) + +} +func (this *QPdfSearchModel) OnSetItemData(slot func(super func(index *qt.QModelIndex, roles map[int]qt.QVariant) bool, index *qt.QModelIndex, roles map[int]qt.QVariant) bool) { + ok := C.QPdfSearchModel_override_virtual_setItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setItemData +func miqt_exec_callback_QPdfSearchModel_setItemData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex, roles map[int]qt.QVariant) bool, index *qt.QModelIndex, roles map[int]qt.QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]qt.QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_goptr := qt.UnsafeNewQVariant(unsafe.Pointer(roles_Values[i])) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QPdfSearchModel_virtualbase_mimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QPdfSearchModel) OnMimeTypes(slot func(super func() []string) []string) { + ok := C.QPdfSearchModel_override_virtual_mimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_mimeTypes +func miqt_exec_callback_QPdfSearchModel_mimeTypes(self *C.QPdfSearchModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfSearchModel) callVirtualBase_MimeData(indexes []qt.QModelIndex) *qt.QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QPdfSearchModel_virtualbase_mimeData(unsafe.Pointer(this.h), indexes_ma))) + +} +func (this *QPdfSearchModel) OnMimeData(slot func(super func(indexes []qt.QModelIndex) *qt.QMimeData, indexes []qt.QModelIndex) *qt.QMimeData) { + ok := C.QPdfSearchModel_override_virtual_mimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_mimeData +func miqt_exec_callback_QPdfSearchModel_mimeData(self *C.QPdfSearchModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []qt.QModelIndex) *qt.QMimeData, indexes []qt.QModelIndex) *qt.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]qt.QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(indexes_outCast[i])) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MimeData, slotval1) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_CanDropMimeData(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_canDropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnCanDropMimeData(slot func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_canDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_canDropMimeData +func miqt_exec_callback_QPdfSearchModel_canDropMimeData(self *C.QPdfSearchModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool, data *qt.QMimeData, action qt.DropAction, row int, column int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SupportedDropActions() qt.DropAction { + + return (qt.DropAction)(C.QPdfSearchModel_virtualbase_supportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSupportedDropActions(slot func(super func() qt.DropAction) qt.DropAction) { + ok := C.QPdfSearchModel_override_virtual_supportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_supportedDropActions +func miqt_exec_callback_QPdfSearchModel_supportedDropActions(self *C.QPdfSearchModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt.DropAction) qt.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SupportedDragActions() qt.DropAction { + + return (qt.DropAction)(C.QPdfSearchModel_virtualbase_supportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSupportedDragActions(slot func(super func() qt.DropAction) qt.DropAction) { + ok := C.QPdfSearchModel_override_virtual_supportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_supportedDragActions +func miqt_exec_callback_QPdfSearchModel_supportedDragActions(self *C.QPdfSearchModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt.DropAction) qt.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_InsertRows(row int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_insertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnInsertRows(slot func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_insertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_insertRows +func miqt_exec_callback_QPdfSearchModel_insertRows(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_InsertColumns(column int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_insertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnInsertColumns(slot func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_insertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_insertColumns +func miqt_exec_callback_QPdfSearchModel_insertColumns(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_RemoveRows(row int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_removeRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRemoveRows(slot func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_removeRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_removeRows +func miqt_exec_callback_QPdfSearchModel_removeRows(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt.QModelIndex) bool, row int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_RemoveColumns(column int, count int, parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_removeColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRemoveColumns(slot func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_removeColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_removeColumns +func miqt_exec_callback_QPdfSearchModel_removeColumns(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt.QModelIndex) bool, column int, count int, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MoveRows(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_moveRows(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceRow), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfSearchModel) OnMoveRows(slot func(super func(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) { + ok := C.QPdfSearchModel_override_virtual_moveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_moveRows +func miqt_exec_callback_QPdfSearchModel_moveRows(self *C.QPdfSearchModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceRow int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := qt.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MoveColumns(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_moveColumns(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceColumn), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfSearchModel) OnMoveColumns(slot func(super func(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) { + ok := C.QPdfSearchModel_override_virtual_moveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_moveColumns +func miqt_exec_callback_QPdfSearchModel_moveColumns(self *C.QPdfSearchModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool, sourceParent *qt.QModelIndex, sourceColumn int, count int, destinationParent *qt.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := qt.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_FetchMore(parent *qt.QModelIndex) { + + C.QPdfSearchModel_virtualbase_fetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnFetchMore(slot func(super func(parent *qt.QModelIndex), parent *qt.QModelIndex)) { + ok := C.QPdfSearchModel_override_virtual_fetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_fetchMore +func miqt_exec_callback_QPdfSearchModel_fetchMore(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex), parent *qt.QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_CanFetchMore(parent *qt.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_canFetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnCanFetchMore(slot func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_canFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_canFetchMore +func miqt_exec_callback_QPdfSearchModel_canFetchMore(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt.QModelIndex) bool, parent *qt.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Sort(column int, order qt.SortOrder) { + + C.QPdfSearchModel_virtualbase_sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QPdfSearchModel) OnSort(slot func(super func(column int, order qt.SortOrder), column int, order qt.SortOrder)) { + ok := C.QPdfSearchModel_override_virtual_sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_sort +func miqt_exec_callback_QPdfSearchModel_sort(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order qt.SortOrder), column int, order qt.SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (qt.SortOrder)(order) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QPdfSearchModel) callVirtualBase_Buddy(index *qt.QModelIndex) *qt.QModelIndex { + + _goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_buddy(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnBuddy(slot func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_buddy +func miqt_exec_callback_QPdfSearchModel_buddy(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) *qt.QModelIndex, index *qt.QModelIndex) *qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Buddy, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_Match(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex { + + var _ma C.struct_miqt_array = C.QPdfSearchModel_virtualbase_match(unsafe.Pointer(this.h), (*C.QModelIndex)(start.UnsafePointer()), (C.int)(role), (*C.QVariant)(value.UnsafePointer()), (C.int)(hits), (C.int)(flags)) + _ret := make([]qt.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QPdfSearchModel) OnMatch(slot func(super func(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex, start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_match +func miqt_exec_callback_QPdfSearchModel_match(self *C.QPdfSearchModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex, start *qt.QModelIndex, role int, value *qt.QVariant, hits int, flags qt.MatchFlag) []qt.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(start)) + + slotval2 := (int)(role) + + slotval3 := qt.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(hits) + + slotval5 := (qt.MatchFlag)(flags) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (*C.QModelIndex)(virtualReturn[i].UnsafePointer()) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfSearchModel) callVirtualBase_Span(index *qt.QModelIndex) *qt.QSize { + + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfSearchModel_virtualbase_span(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnSpan(slot func(super func(index *qt.QModelIndex) *qt.QSize, index *qt.QModelIndex) *qt.QSize) { + ok := C.QPdfSearchModel_override_virtual_span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_span +func miqt_exec_callback_QPdfSearchModel_span(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt.QModelIndex) *qt.QSize, index *qt.QModelIndex) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Span, slotval1) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_Submit() bool { + + return (bool)(C.QPdfSearchModel_virtualbase_submit(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSubmit(slot func(super func() bool) bool) { + ok := C.QPdfSearchModel_override_virtual_submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_submit +func miqt_exec_callback_QPdfSearchModel_submit(self *C.QPdfSearchModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Revert() { + + C.QPdfSearchModel_virtualbase_revert(unsafe.Pointer(this.h)) + +} +func (this *QPdfSearchModel) OnRevert(slot func(super func())) { + ok := C.QPdfSearchModel_override_virtual_revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_revert +func miqt_exec_callback_QPdfSearchModel_revert(self *C.QPdfSearchModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QPdfSearchModel) callVirtualBase_Event(event *qt.QEvent) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnEvent(slot func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) { + ok := C.QPdfSearchModel_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_event +func miqt_exec_callback_QPdfSearchModel_event(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent) bool, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_EventFilter(watched *qt.QObject, event *qt.QEvent) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnEventFilter(slot func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) { + ok := C.QPdfSearchModel_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_eventFilter +func miqt_exec_callback_QPdfSearchModel_eventFilter(self *C.QPdfSearchModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt.QObject, event *qt.QEvent) bool, watched *qt.QObject, event *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfSearchModel_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfSearchModel_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_childEvent +func miqt_exec_callback_QPdfSearchModel_childEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfSearchModel_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfSearchModel_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_customEvent +func miqt_exec_callback_QPdfSearchModel_customEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfSearchModel_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfSearchModel_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_connectNotify +func miqt_exec_callback_QPdfSearchModel_connectNotify(self *C.QPdfSearchModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfSearchModel_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfSearchModel_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_disconnectNotify +func miqt_exec_callback_QPdfSearchModel_disconnectNotify(self *C.QPdfSearchModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfSearchModel) Delete() { + C.QPdfSearchModel_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfSearchModel) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfSearchModel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfsearchmodel.h b/qt/pdf/gen_qpdfsearchmodel.h new file mode 100644 index 00000000..bb160283 --- /dev/null +++ b/qt/pdf/gen_qpdfsearchmodel.h @@ -0,0 +1,186 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFSEARCHMODEL_H +#define MIQT_QT_PDF_GEN_QPDFSEARCHMODEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractItemModel; +class QAbstractListModel; +class QChildEvent; +class QDataStream; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QMimeData; +class QModelIndex; +class QObject; +class QPdfDocument; +class QPdfSearchModel; +class QPdfSearchResult; +class QSize; +class QTimerEvent; +class QVariant; +#else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractListModel QAbstractListModel; +typedef struct QChildEvent QChildEvent; +typedef struct QDataStream QDataStream; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfSearchModel QPdfSearchModel; +typedef struct QPdfSearchResult QPdfSearchResult; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfSearchModel* QPdfSearchModel_new(); +QPdfSearchModel* QPdfSearchModel_new2(QObject* parent); +void QPdfSearchModel_virtbase(QPdfSearchModel* src, QAbstractListModel** outptr_QAbstractListModel); +QMetaObject* QPdfSearchModel_metaObject(const QPdfSearchModel* self); +void* QPdfSearchModel_metacast(QPdfSearchModel* self, const char* param1); +struct miqt_string QPdfSearchModel_tr(const char* s); +struct miqt_string QPdfSearchModel_trUtf8(const char* s); +struct miqt_array /* of QPdfSearchResult* */ QPdfSearchModel_resultsOnPage(const QPdfSearchModel* self, int page); +QPdfSearchResult* QPdfSearchModel_resultAtIndex(const QPdfSearchModel* self, int index); +QPdfDocument* QPdfSearchModel_document(const QPdfSearchModel* self); +struct miqt_string QPdfSearchModel_searchString(const QPdfSearchModel* self); +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_roleNames(const QPdfSearchModel* self); +int QPdfSearchModel_rowCount(const QPdfSearchModel* self, QModelIndex* parent); +QVariant* QPdfSearchModel_data(const QPdfSearchModel* self, QModelIndex* index, int role); +void QPdfSearchModel_setSearchString(QPdfSearchModel* self, struct miqt_string searchString); +void QPdfSearchModel_setDocument(QPdfSearchModel* self, QPdfDocument* document); +void QPdfSearchModel_documentChanged(QPdfSearchModel* self); +void QPdfSearchModel_connect_documentChanged(QPdfSearchModel* self, intptr_t slot); +void QPdfSearchModel_searchStringChanged(QPdfSearchModel* self); +void QPdfSearchModel_connect_searchStringChanged(QPdfSearchModel* self, intptr_t slot); +void QPdfSearchModel_timerEvent(QPdfSearchModel* self, QTimerEvent* event); +struct miqt_string QPdfSearchModel_tr2(const char* s, const char* c); +struct miqt_string QPdfSearchModel_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfSearchModel_trUtf82(const char* s, const char* c); +struct miqt_string QPdfSearchModel_trUtf83(const char* s, const char* c, int n); +bool QPdfSearchModel_override_virtual_roleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self); +bool QPdfSearchModel_override_virtual_rowCount(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_data(void* self, intptr_t slot); +QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role); +bool QPdfSearchModel_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfSearchModel_override_virtual_index(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_sibling(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); +bool QPdfSearchModel_override_virtual_dropMimeData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_flags(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_setData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); +bool QPdfSearchModel_override_virtual_headerData(void* self, intptr_t slot); +QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role); +bool QPdfSearchModel_override_virtual_setHeaderData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); +bool QPdfSearchModel_override_virtual_itemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_setItemData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +bool QPdfSearchModel_override_virtual_mimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self); +bool QPdfSearchModel_override_virtual_mimeData(void* self, intptr_t slot); +QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +bool QPdfSearchModel_override_virtual_canDropMimeData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_supportedDropActions(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_supportedDropActions(const void* self); +bool QPdfSearchModel_override_virtual_supportedDragActions(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_supportedDragActions(const void* self); +bool QPdfSearchModel_override_virtual_insertRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_insertColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_removeRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_removeColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_moveRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfSearchModel_override_virtual_moveColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfSearchModel_override_virtual_fetchMore(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_canFetchMore(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_sort(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_sort(void* self, int column, int order); +bool QPdfSearchModel_override_virtual_buddy(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +bool QPdfSearchModel_override_virtual_span(void* self, intptr_t slot); +QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_submit(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_submit(void* self); +bool QPdfSearchModel_override_virtual_revert(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_revert(void* self); +bool QPdfSearchModel_override_virtual_event(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event); +bool QPdfSearchModel_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfSearchModel_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfSearchModel_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfSearchModel_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfSearchModel_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page); +void QPdfSearchModel_protectedbase_resetInternalData(bool* _dynamic_cast_ok, void* self); +QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); +void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); +bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); +void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); +bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); +void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); +bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); +void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); +void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); +QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfSearchModel_delete(QPdfSearchModel* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfsearchresult.cpp b/qt/pdf/gen_qpdfsearchresult.cpp new file mode 100644 index 00000000..26486add --- /dev/null +++ b/qt/pdf/gen_qpdfsearchresult.cpp @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfsearchresult.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfSearchResult* QPdfSearchResult_new() { + return new QPdfSearchResult(); +} + +QPdfSearchResult* QPdfSearchResult_new2(QPdfSearchResult* param1) { + return new QPdfSearchResult(*param1); +} + +void QPdfSearchResult_virtbase(QPdfSearchResult* src, QPdfDestination** outptr_QPdfDestination) { + *outptr_QPdfDestination = static_cast(src); +} + +struct miqt_string QPdfSearchResult_contextBefore(const QPdfSearchResult* self) { + QString _ret = self->contextBefore(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchResult_contextAfter(const QPdfSearchResult* self) { + QString _ret = self->contextAfter(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of QRectF* */ QPdfSearchResult_rectangles(const QPdfSearchResult* self) { + QVector _ret = self->rectangles(); + // Convert QList<> from C++ memory to manually-managed C memory + QRectF** _arr = static_cast(malloc(sizeof(QRectF*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QRectF(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +void QPdfSearchResult_delete(QPdfSearchResult* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfsearchresult.go b/qt/pdf/gen_qpdfsearchresult.go new file mode 100644 index 00000000..fab85e35 --- /dev/null +++ b/qt/pdf/gen_qpdfsearchresult.go @@ -0,0 +1,103 @@ +package pdf + +/* + +#include "gen_qpdfsearchresult.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QPdfSearchResult struct { + h *C.QPdfSearchResult + *QPdfDestination +} + +func (this *QPdfSearchResult) cPointer() *C.QPdfSearchResult { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfSearchResult) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfSearchResult constructs the type using only CGO pointers. +func newQPdfSearchResult(h *C.QPdfSearchResult) *QPdfSearchResult { + if h == nil { + return nil + } + var outptr_QPdfDestination *C.QPdfDestination = nil + C.QPdfSearchResult_virtbase(h, &outptr_QPdfDestination) + + return &QPdfSearchResult{h: h, + QPdfDestination: newQPdfDestination(outptr_QPdfDestination)} +} + +// UnsafeNewQPdfSearchResult constructs the type using only unsafe pointers. +func UnsafeNewQPdfSearchResult(h unsafe.Pointer) *QPdfSearchResult { + return newQPdfSearchResult((*C.QPdfSearchResult)(h)) +} + +// NewQPdfSearchResult constructs a new QPdfSearchResult object. +func NewQPdfSearchResult() *QPdfSearchResult { + + return newQPdfSearchResult(C.QPdfSearchResult_new()) +} + +// NewQPdfSearchResult2 constructs a new QPdfSearchResult object. +func NewQPdfSearchResult2(param1 *QPdfSearchResult) *QPdfSearchResult { + + return newQPdfSearchResult(C.QPdfSearchResult_new2(param1.cPointer())) +} + +func (this *QPdfSearchResult) ContextBefore() string { + var _ms C.struct_miqt_string = C.QPdfSearchResult_contextBefore(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchResult) ContextAfter() string { + var _ms C.struct_miqt_string = C.QPdfSearchResult_contextAfter(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchResult) Rectangles() []qt.QRectF { + var _ma C.struct_miqt_array = C.QPdfSearchResult_rectangles(this.h) + _ret := make([]qt.QRectF, int(_ma.len)) + _outCast := (*[0xffff]*C.QRectF)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _vv_goptr := qt.UnsafeNewQRectF(unsafe.Pointer(_outCast[i])) + _vv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_vv_goptr + } + return _ret +} + +// Delete this object from C++ memory. +func (this *QPdfSearchResult) Delete() { + C.QPdfSearchResult_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfSearchResult) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfSearchResult) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfsearchresult.h b/qt/pdf/gen_qpdfsearchresult.h new file mode 100644 index 00000000..1e7798a6 --- /dev/null +++ b/qt/pdf/gen_qpdfsearchresult.h @@ -0,0 +1,39 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFSEARCHRESULT_H +#define MIQT_QT_PDF_GEN_QPDFSEARCHRESULT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfDestination; +class QPdfSearchResult; +class QRectF; +#else +typedef struct QPdfDestination QPdfDestination; +typedef struct QPdfSearchResult QPdfSearchResult; +typedef struct QRectF QRectF; +#endif + +QPdfSearchResult* QPdfSearchResult_new(); +QPdfSearchResult* QPdfSearchResult_new2(QPdfSearchResult* param1); +void QPdfSearchResult_virtbase(QPdfSearchResult* src, QPdfDestination** outptr_QPdfDestination); +struct miqt_string QPdfSearchResult_contextBefore(const QPdfSearchResult* self); +struct miqt_string QPdfSearchResult_contextAfter(const QPdfSearchResult* self); +struct miqt_array /* of QRectF* */ QPdfSearchResult_rectangles(const QPdfSearchResult* self); +void QPdfSearchResult_delete(QPdfSearchResult* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfselection.cpp b/qt/pdf/gen_qpdfselection.cpp new file mode 100644 index 00000000..6760580f --- /dev/null +++ b/qt/pdf/gen_qpdfselection.cpp @@ -0,0 +1,67 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qpdfselection.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfSelection* QPdfSelection_new(QPdfSelection* other) { + return new QPdfSelection(*other); +} + +void QPdfSelection_operatorAssign(QPdfSelection* self, QPdfSelection* other) { + self->operator=(*other); +} + +void QPdfSelection_swap(QPdfSelection* self, QPdfSelection* other) { + self->swap(*other); +} + +bool QPdfSelection_isValid(const QPdfSelection* self) { + return self->isValid(); +} + +struct miqt_string QPdfSelection_text(const QPdfSelection* self) { + QString _ret = self->text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QRectF* QPdfSelection_boundingRectangle(const QPdfSelection* self) { + return new QRectF(self->boundingRectangle()); +} + +int QPdfSelection_startIndex(const QPdfSelection* self) { + return self->startIndex(); +} + +int QPdfSelection_endIndex(const QPdfSelection* self) { + return self->endIndex(); +} + +void QPdfSelection_copyToClipboard(const QPdfSelection* self) { + self->copyToClipboard(); +} + +void QPdfSelection_copyToClipboardWithMode(const QPdfSelection* self, int mode) { + self->copyToClipboard(static_cast(mode)); +} + +void QPdfSelection_delete(QPdfSelection* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfselection.go b/qt/pdf/gen_qpdfselection.go new file mode 100644 index 00000000..4cdbdb27 --- /dev/null +++ b/qt/pdf/gen_qpdfselection.go @@ -0,0 +1,108 @@ +package pdf + +/* + +#include "gen_qpdfselection.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "unsafe" +) + +type QPdfSelection struct { + h *C.QPdfSelection +} + +func (this *QPdfSelection) cPointer() *C.QPdfSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfSelection constructs the type using only CGO pointers. +func newQPdfSelection(h *C.QPdfSelection) *QPdfSelection { + if h == nil { + return nil + } + + return &QPdfSelection{h: h} +} + +// UnsafeNewQPdfSelection constructs the type using only unsafe pointers. +func UnsafeNewQPdfSelection(h unsafe.Pointer) *QPdfSelection { + return newQPdfSelection((*C.QPdfSelection)(h)) +} + +// NewQPdfSelection constructs a new QPdfSelection object. +func NewQPdfSelection(other *QPdfSelection) *QPdfSelection { + + return newQPdfSelection(C.QPdfSelection_new(other.cPointer())) +} + +func (this *QPdfSelection) OperatorAssign(other *QPdfSelection) { + C.QPdfSelection_operatorAssign(this.h, other.cPointer()) +} + +func (this *QPdfSelection) Swap(other *QPdfSelection) { + C.QPdfSelection_swap(this.h, other.cPointer()) +} + +func (this *QPdfSelection) IsValid() bool { + return (bool)(C.QPdfSelection_isValid(this.h)) +} + +func (this *QPdfSelection) Text() string { + var _ms C.struct_miqt_string = C.QPdfSelection_text(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSelection) BoundingRectangle() *qt.QRectF { + _goptr := qt.UnsafeNewQRectF(unsafe.Pointer(C.QPdfSelection_boundingRectangle(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSelection) StartIndex() int { + return (int)(C.QPdfSelection_startIndex(this.h)) +} + +func (this *QPdfSelection) EndIndex() int { + return (int)(C.QPdfSelection_endIndex(this.h)) +} + +func (this *QPdfSelection) CopyToClipboard() { + C.QPdfSelection_copyToClipboard(this.h) +} + +func (this *QPdfSelection) CopyToClipboardWithMode(mode qt.QClipboard__Mode) { + C.QPdfSelection_copyToClipboardWithMode(this.h, (C.int)(mode)) +} + +// Delete this object from C++ memory. +func (this *QPdfSelection) Delete() { + C.QPdfSelection_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfselection.h b/qt/pdf/gen_qpdfselection.h new file mode 100644 index 00000000..b23ca387 --- /dev/null +++ b/qt/pdf/gen_qpdfselection.h @@ -0,0 +1,41 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFSELECTION_H +#define MIQT_QT_PDF_GEN_QPDFSELECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfSelection; +class QRectF; +#else +typedef struct QPdfSelection QPdfSelection; +typedef struct QRectF QRectF; +#endif + +QPdfSelection* QPdfSelection_new(QPdfSelection* other); +void QPdfSelection_operatorAssign(QPdfSelection* self, QPdfSelection* other); +void QPdfSelection_swap(QPdfSelection* self, QPdfSelection* other); +bool QPdfSelection_isValid(const QPdfSelection* self); +struct miqt_string QPdfSelection_text(const QPdfSelection* self); +QRectF* QPdfSelection_boundingRectangle(const QPdfSelection* self); +int QPdfSelection_startIndex(const QPdfSelection* self); +int QPdfSelection_endIndex(const QPdfSelection* self); +void QPdfSelection_copyToClipboard(const QPdfSelection* self); +void QPdfSelection_copyToClipboardWithMode(const QPdfSelection* self, int mode); +void QPdfSelection_delete(QPdfSelection* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt/pdf/gen_qpdfview.cpp b/qt/pdf/gen_qpdfview.cpp new file mode 100644 index 00000000..c9395ce5 --- /dev/null +++ b/qt/pdf/gen_qpdfview.cpp @@ -0,0 +1,2295 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfview.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfView_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfView_pageModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_zoomModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_zoomFactorChanged(intptr_t, double); +void miqt_exec_callback_QPdfView_pageSpacingChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_documentMarginsChanged(intptr_t, QMargins*); +void miqt_exec_callback_QPdfView_paintEvent(QPdfView*, intptr_t, QPaintEvent*); +void miqt_exec_callback_QPdfView_resizeEvent(QPdfView*, intptr_t, QResizeEvent*); +void miqt_exec_callback_QPdfView_scrollContentsBy(QPdfView*, intptr_t, int, int); +QSize* miqt_exec_callback_QPdfView_minimumSizeHint(const QPdfView*, intptr_t); +QSize* miqt_exec_callback_QPdfView_sizeHint(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_setupViewport(QPdfView*, intptr_t, QWidget*); +bool miqt_exec_callback_QPdfView_eventFilter(QPdfView*, intptr_t, QObject*, QEvent*); +bool miqt_exec_callback_QPdfView_event(QPdfView*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfView_viewportEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_mousePressEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseReleaseEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseDoubleClickEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseMoveEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_wheelEvent(QPdfView*, intptr_t, QWheelEvent*); +void miqt_exec_callback_QPdfView_contextMenuEvent(QPdfView*, intptr_t, QContextMenuEvent*); +void miqt_exec_callback_QPdfView_dragEnterEvent(QPdfView*, intptr_t, QDragEnterEvent*); +void miqt_exec_callback_QPdfView_dragMoveEvent(QPdfView*, intptr_t, QDragMoveEvent*); +void miqt_exec_callback_QPdfView_dragLeaveEvent(QPdfView*, intptr_t, QDragLeaveEvent*); +void miqt_exec_callback_QPdfView_dropEvent(QPdfView*, intptr_t, QDropEvent*); +void miqt_exec_callback_QPdfView_keyPressEvent(QPdfView*, intptr_t, QKeyEvent*); +QSize* miqt_exec_callback_QPdfView_viewportSizeHint(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_changeEvent(QPdfView*, intptr_t, QEvent*); +int miqt_exec_callback_QPdfView_devType(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_setVisible(QPdfView*, intptr_t, bool); +int miqt_exec_callback_QPdfView_heightForWidth(const QPdfView*, intptr_t, int); +bool miqt_exec_callback_QPdfView_hasHeightForWidth(const QPdfView*, intptr_t); +QPaintEngine* miqt_exec_callback_QPdfView_paintEngine(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_keyReleaseEvent(QPdfView*, intptr_t, QKeyEvent*); +void miqt_exec_callback_QPdfView_focusInEvent(QPdfView*, intptr_t, QFocusEvent*); +void miqt_exec_callback_QPdfView_focusOutEvent(QPdfView*, intptr_t, QFocusEvent*); +void miqt_exec_callback_QPdfView_enterEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_leaveEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_moveEvent(QPdfView*, intptr_t, QMoveEvent*); +void miqt_exec_callback_QPdfView_closeEvent(QPdfView*, intptr_t, QCloseEvent*); +void miqt_exec_callback_QPdfView_tabletEvent(QPdfView*, intptr_t, QTabletEvent*); +void miqt_exec_callback_QPdfView_actionEvent(QPdfView*, intptr_t, QActionEvent*); +void miqt_exec_callback_QPdfView_showEvent(QPdfView*, intptr_t, QShowEvent*); +void miqt_exec_callback_QPdfView_hideEvent(QPdfView*, intptr_t, QHideEvent*); +bool miqt_exec_callback_QPdfView_nativeEvent(QPdfView*, intptr_t, struct miqt_string, void*, long*); +int miqt_exec_callback_QPdfView_metric(const QPdfView*, intptr_t, int); +void miqt_exec_callback_QPdfView_initPainter(const QPdfView*, intptr_t, QPainter*); +QPaintDevice* miqt_exec_callback_QPdfView_redirected(const QPdfView*, intptr_t, QPoint*); +QPainter* miqt_exec_callback_QPdfView_sharedPainter(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_inputMethodEvent(QPdfView*, intptr_t, QInputMethodEvent*); +QVariant* miqt_exec_callback_QPdfView_inputMethodQuery(const QPdfView*, intptr_t, int); +bool miqt_exec_callback_QPdfView_focusNextPrevChild(QPdfView*, intptr_t, bool); +void miqt_exec_callback_QPdfView_timerEvent(QPdfView*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfView_childEvent(QPdfView*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfView_customEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_connectNotify(QPdfView*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfView_disconnectNotify(QPdfView*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfView final : public QPdfView { +public: + + MiqtVirtualQPdfView(QWidget* parent): QPdfView(parent) {}; + MiqtVirtualQPdfView(): QPdfView() {}; + + virtual ~MiqtVirtualQPdfView() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__paintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__paintEvent == 0) { + QPdfView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_paintEvent(this, handle__paintEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__resizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__resizeEvent == 0) { + QPdfView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_resizeEvent(this, handle__resizeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__scrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__scrollContentsBy == 0) { + QPdfView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QPdfView_scrollContentsBy(this, handle__scrollContentsBy, sigval1, sigval2); + + + } + + friend void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy); + + // cgo.Handle value for overwritten implementation + intptr_t handle__minimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__minimumSizeHint == 0) { + return QPdfView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_minimumSizeHint(this, handle__minimumSizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_minimumSizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__sizeHint == 0) { + return QPdfView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_sizeHint(this, handle__sizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_sizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__setupViewport == 0) { + QPdfView::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QPdfView_setupViewport(this, handle__setupViewport, sigval1); + + + } + + friend void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__eventFilter == 0) { + return QPdfView::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPdfView_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__event == 0) { + return QPdfView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPdfView_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_event(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__viewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__viewportEvent == 0) { + return QPdfView::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPdfView_viewportEvent(this, handle__viewportEvent, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__mousePressEvent == 0) { + QPdfView::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mousePressEvent(this, handle__mousePressEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__mouseReleaseEvent == 0) { + QPdfView::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseReleaseEvent(this, handle__mouseReleaseEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__mouseDoubleClickEvent == 0) { + QPdfView::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseDoubleClickEvent(this, handle__mouseDoubleClickEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__mouseMoveEvent == 0) { + QPdfView::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseMoveEvent(this, handle__mouseMoveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__wheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__wheelEvent == 0) { + QPdfView::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_wheelEvent(this, handle__wheelEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__contextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__contextMenuEvent == 0) { + QPdfView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_contextMenuEvent(this, handle__contextMenuEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__dragEnterEvent == 0) { + QPdfView::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragEnterEvent(this, handle__dragEnterEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__dragMoveEvent == 0) { + QPdfView::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragMoveEvent(this, handle__dragMoveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__dragLeaveEvent == 0) { + QPdfView::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragLeaveEvent(this, handle__dragLeaveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__dropEvent == 0) { + QPdfView::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dropEvent(this, handle__dropEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__keyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__keyPressEvent == 0) { + QPdfView::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_keyPressEvent(this, handle__keyPressEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__viewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__viewportSizeHint == 0) { + return QPdfView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_viewportSizeHint(this, handle__viewportSizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_viewportSizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__changeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__changeEvent == 0) { + QPdfView::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_changeEvent(this, handle__changeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__devType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__devType == 0) { + return QPdfView::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPdfView_devType(this, handle__devType); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_devType(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__setVisible == 0) { + QPdfView::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPdfView_setVisible(this, handle__setVisible, sigval1); + + + } + + friend void QPdfView_virtualbase_setVisible(void* self, bool visible); + + // cgo.Handle value for overwritten implementation + intptr_t handle__heightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__heightForWidth == 0) { + return QPdfView::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QPdfView_heightForWidth(this, handle__heightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_heightForWidth(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__hasHeightForWidth == 0) { + return QPdfView::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfView_hasHeightForWidth(this, handle__hasHeightForWidth); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_hasHeightForWidth(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__paintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__paintEngine == 0) { + return QPdfView::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPdfView_paintEngine(this, handle__paintEngine); + + return callback_return_value; + } + + friend QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__keyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__keyReleaseEvent == 0) { + QPdfView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_keyReleaseEvent(this, handle__keyReleaseEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__focusInEvent == 0) { + QPdfView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_focusInEvent(this, handle__focusInEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__focusOutEvent == 0) { + QPdfView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_focusOutEvent(this, handle__focusOutEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__enterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEvent* event) override { + if (handle__enterEvent == 0) { + QPdfView::enterEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_enterEvent(this, handle__enterEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_enterEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__leaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__leaveEvent == 0) { + QPdfView::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_leaveEvent(this, handle__leaveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__moveEvent == 0) { + QPdfView::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_moveEvent(this, handle__moveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__closeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__closeEvent == 0) { + QPdfView::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_closeEvent(this, handle__closeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__tabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__tabletEvent == 0) { + QPdfView::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_tabletEvent(this, handle__tabletEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__actionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__actionEvent == 0) { + QPdfView::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_actionEvent(this, handle__actionEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__showEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__showEvent == 0) { + QPdfView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_showEvent(this, handle__showEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__hideEvent == 0) { + QPdfView::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_hideEvent(this, handle__hideEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__nativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result) override { + if (handle__nativeEvent == 0) { + return QPdfView::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + long* sigval3 = result; + + bool callback_return_value = miqt_exec_callback_QPdfView_nativeEvent(this, handle__nativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, long* result); + + // cgo.Handle value for overwritten implementation + intptr_t handle__metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__metric == 0) { + return QPdfView::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPdfView_metric(this, handle__metric, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_metric(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__initPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__initPainter == 0) { + QPdfView::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPdfView_initPainter(this, handle__initPainter, sigval1); + + + } + + friend void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter); + + // cgo.Handle value for overwritten implementation + intptr_t handle__redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__redirected == 0) { + return QPdfView::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPdfView_redirected(this, handle__redirected, sigval1); + + return callback_return_value; + } + + friend QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__sharedPainter == 0) { + return QPdfView::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPdfView_sharedPainter(this, handle__sharedPainter); + + return callback_return_value; + } + + friend QPainter* QPdfView_virtualbase_sharedPainter(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__inputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__inputMethodEvent == 0) { + QPdfView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_inputMethodEvent(this, handle__inputMethodEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__inputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__inputMethodQuery == 0) { + return QPdfView::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPdfView_inputMethodQuery(this, handle__inputMethodQuery, sigval1); + + return *callback_return_value; + } + + friend QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__focusNextPrevChild == 0) { + return QPdfView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPdfView_focusNextPrevChild(this, handle__focusNextPrevChild, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfView::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfView::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfView::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfView_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfView::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfView_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom); + friend QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self); + friend void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1); + friend void QPdfView_protectedbase_initStyleOption(bool* _dynamic_cast_ok, const void* self, QStyleOptionFrame* option); + friend void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self); + friend void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self); + friend void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self); + friend bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self); + friend bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self); + friend QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfView* QPdfView_new(QWidget* parent) { + return new MiqtVirtualQPdfView(parent); +} + +QPdfView* QPdfView_new2() { + return new MiqtVirtualQPdfView(); +} + +void QPdfView_virtbase(QPdfView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); +} + +QMetaObject* QPdfView_metaObject(const QPdfView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfView_metacast(QPdfView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfView_tr(const char* s) { + QString _ret = QPdfView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfView_trUtf8(const char* s) { + QString _ret = QPdfView::trUtf8(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QPdfView_setDocument(QPdfView* self, QPdfDocument* document) { + self->setDocument(document); +} + +QPdfDocument* QPdfView_document(const QPdfView* self) { + return self->document(); +} + +QPdfPageNavigation* QPdfView_pageNavigation(const QPdfView* self) { + return self->pageNavigation(); +} + +int QPdfView_pageMode(const QPdfView* self) { + QPdfView::PageMode _ret = self->pageMode(); + return static_cast(_ret); +} + +int QPdfView_zoomMode(const QPdfView* self) { + QPdfView::ZoomMode _ret = self->zoomMode(); + return static_cast(_ret); +} + +double QPdfView_zoomFactor(const QPdfView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +int QPdfView_pageSpacing(const QPdfView* self) { + return self->pageSpacing(); +} + +void QPdfView_setPageSpacing(QPdfView* self, int spacing) { + self->setPageSpacing(static_cast(spacing)); +} + +QMargins* QPdfView_documentMargins(const QPdfView* self) { + return new QMargins(self->documentMargins()); +} + +void QPdfView_setDocumentMargins(QPdfView* self, QMargins* margins) { + self->setDocumentMargins(*margins); +} + +void QPdfView_setPageMode(QPdfView* self, int mode) { + self->setPageMode(static_cast(mode)); +} + +void QPdfView_setZoomMode(QPdfView* self, int mode) { + self->setZoomMode(static_cast(mode)); +} + +void QPdfView_setZoomFactor(QPdfView* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +void QPdfView_documentChanged(QPdfView* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfView_connect_documentChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfView_documentChanged(slot, sigval1); + }); +} + +void QPdfView_pageModeChanged(QPdfView* self, int pageMode) { + self->pageModeChanged(static_cast(pageMode)); +} + +void QPdfView_connect_pageModeChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::pageModeChanged), self, [=](QPdfView::PageMode pageMode) { + QPdfView::PageMode pageMode_ret = pageMode; + int sigval1 = static_cast(pageMode_ret); + miqt_exec_callback_QPdfView_pageModeChanged(slot, sigval1); + }); +} + +void QPdfView_zoomModeChanged(QPdfView* self, int zoomMode) { + self->zoomModeChanged(static_cast(zoomMode)); +} + +void QPdfView_connect_zoomModeChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::zoomModeChanged), self, [=](QPdfView::ZoomMode zoomMode) { + QPdfView::ZoomMode zoomMode_ret = zoomMode; + int sigval1 = static_cast(zoomMode_ret); + miqt_exec_callback_QPdfView_zoomModeChanged(slot, sigval1); + }); +} + +void QPdfView_zoomFactorChanged(QPdfView* self, double zoomFactor) { + self->zoomFactorChanged(static_cast(zoomFactor)); +} + +void QPdfView_connect_zoomFactorChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::zoomFactorChanged), self, [=](qreal zoomFactor) { + qreal zoomFactor_ret = zoomFactor; + double sigval1 = static_cast(zoomFactor_ret); + miqt_exec_callback_QPdfView_zoomFactorChanged(slot, sigval1); + }); +} + +void QPdfView_pageSpacingChanged(QPdfView* self, int pageSpacing) { + self->pageSpacingChanged(static_cast(pageSpacing)); +} + +void QPdfView_connect_pageSpacingChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::pageSpacingChanged), self, [=](int pageSpacing) { + int sigval1 = pageSpacing; + miqt_exec_callback_QPdfView_pageSpacingChanged(slot, sigval1); + }); +} + +void QPdfView_documentMarginsChanged(QPdfView* self, QMargins* documentMargins) { + self->documentMarginsChanged(*documentMargins); +} + +void QPdfView_connect_documentMarginsChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::documentMarginsChanged), self, [=](QMargins documentMargins) { + QMargins* sigval1 = new QMargins(documentMargins); + miqt_exec_callback_QPdfView_documentMarginsChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfView_tr2(const char* s, const char* c) { + QString _ret = QPdfView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfView_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfView_trUtf82(const char* s, const char* c) { + QString _ret = QPdfView::trUtf8(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfView_trUtf83(const char* s, const char* c, int n) { + QString _ret = QPdfView::trUtf8(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfView_override_virtual_paintEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__paintEvent = slot; + return true; +} + +void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::paintEvent(event); + +} + +bool QPdfView_override_virtual_resizeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__resizeEvent = slot; + return true; +} + +void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::resizeEvent(event); + +} + +bool QPdfView_override_virtual_scrollContentsBy(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__scrollContentsBy = slot; + return true; +} + +void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::scrollContentsBy(static_cast(dx), static_cast(dy)); + +} + +bool QPdfView_override_virtual_minimumSizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__minimumSizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_minimumSizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::minimumSizeHint()); + +} + +bool QPdfView_override_virtual_sizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_sizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::sizeHint()); + +} + +bool QPdfView_override_virtual_setupViewport(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setupViewport = slot; + return true; +} + +void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::setupViewport(viewport); + +} + +bool QPdfView_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::eventFilter(param1, param2); + +} + +bool QPdfView_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfView_virtualbase_event(void* self, QEvent* param1) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::event(param1); + +} + +bool QPdfView_override_virtual_viewportEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__viewportEvent = slot; + return true; +} + +bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::viewportEvent(param1); + +} + +bool QPdfView_override_virtual_mousePressEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mousePressEvent = slot; + return true; +} + +void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mousePressEvent(param1); + +} + +bool QPdfView_override_virtual_mouseReleaseEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseReleaseEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseReleaseEvent(param1); + +} + +bool QPdfView_override_virtual_mouseDoubleClickEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseDoubleClickEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseDoubleClickEvent(param1); + +} + +bool QPdfView_override_virtual_mouseMoveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseMoveEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseMoveEvent(param1); + +} + +bool QPdfView_override_virtual_wheelEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__wheelEvent = slot; + return true; +} + +void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::wheelEvent(param1); + +} + +bool QPdfView_override_virtual_contextMenuEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__contextMenuEvent = slot; + return true; +} + +void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::contextMenuEvent(param1); + +} + +bool QPdfView_override_virtual_dragEnterEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragEnterEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragEnterEvent(param1); + +} + +bool QPdfView_override_virtual_dragMoveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragMoveEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragMoveEvent(param1); + +} + +bool QPdfView_override_virtual_dragLeaveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragLeaveEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragLeaveEvent(param1); + +} + +bool QPdfView_override_virtual_dropEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropEvent = slot; + return true; +} + +void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dropEvent(param1); + +} + +bool QPdfView_override_virtual_keyPressEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__keyPressEvent = slot; + return true; +} + +void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::keyPressEvent(param1); + +} + +bool QPdfView_override_virtual_viewportSizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__viewportSizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_viewportSizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::viewportSizeHint()); + +} + +bool QPdfView_override_virtual_changeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__changeEvent = slot; + return true; +} + +void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::changeEvent(param1); + +} + +bool QPdfView_override_virtual_devType(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__devType = slot; + return true; +} + +int QPdfView_virtualbase_devType(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::devType(); + +} + +bool QPdfView_override_virtual_setVisible(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setVisible = slot; + return true; +} + +void QPdfView_virtualbase_setVisible(void* self, bool visible) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::setVisible(visible); + +} + +bool QPdfView_override_virtual_heightForWidth(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__heightForWidth = slot; + return true; +} + +int QPdfView_virtualbase_heightForWidth(const void* self, int param1) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::heightForWidth(static_cast(param1)); + +} + +bool QPdfView_override_virtual_hasHeightForWidth(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hasHeightForWidth = slot; + return true; +} + +bool QPdfView_virtualbase_hasHeightForWidth(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::hasHeightForWidth(); + +} + +bool QPdfView_override_virtual_paintEngine(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__paintEngine = slot; + return true; +} + +QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::paintEngine(); + +} + +bool QPdfView_override_virtual_keyReleaseEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__keyReleaseEvent = slot; + return true; +} + +void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::keyReleaseEvent(event); + +} + +bool QPdfView_override_virtual_focusInEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusInEvent = slot; + return true; +} + +void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusInEvent(event); + +} + +bool QPdfView_override_virtual_focusOutEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusOutEvent = slot; + return true; +} + +void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusOutEvent(event); + +} + +bool QPdfView_override_virtual_enterEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__enterEvent = slot; + return true; +} + +void QPdfView_virtualbase_enterEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::enterEvent(event); + +} + +bool QPdfView_override_virtual_leaveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__leaveEvent = slot; + return true; +} + +void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::leaveEvent(event); + +} + +bool QPdfView_override_virtual_moveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveEvent = slot; + return true; +} + +void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::moveEvent(event); + +} + +bool QPdfView_override_virtual_closeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__closeEvent = slot; + return true; +} + +void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::closeEvent(event); + +} + +bool QPdfView_override_virtual_tabletEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__tabletEvent = slot; + return true; +} + +void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::tabletEvent(event); + +} + +bool QPdfView_override_virtual_actionEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__actionEvent = slot; + return true; +} + +void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::actionEvent(event); + +} + +bool QPdfView_override_virtual_showEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__showEvent = slot; + return true; +} + +void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::showEvent(event); + +} + +bool QPdfView_override_virtual_hideEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hideEvent = slot; + return true; +} + +void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::hideEvent(event); + +} + +bool QPdfView_override_virtual_nativeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__nativeEvent = slot; + return true; +} + +bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, long* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::nativeEvent(eventType_QByteArray, message, static_cast(result)); + +} + +bool QPdfView_override_virtual_metric(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__metric = slot; + return true; +} + +int QPdfView_virtualbase_metric(const void* self, int param1) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::metric(static_cast(param1)); + +} + +bool QPdfView_override_virtual_initPainter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__initPainter = slot; + return true; +} + +void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter) { + + ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::initPainter(painter); + +} + +bool QPdfView_override_virtual_redirected(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__redirected = slot; + return true; +} + +QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::redirected(offset); + +} + +bool QPdfView_override_virtual_sharedPainter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sharedPainter = slot; + return true; +} + +QPainter* QPdfView_virtualbase_sharedPainter(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::sharedPainter(); + +} + +bool QPdfView_override_virtual_inputMethodEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__inputMethodEvent = slot; + return true; +} + +void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::inputMethodEvent(param1); + +} + +bool QPdfView_override_virtual_inputMethodQuery(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__inputMethodQuery = slot; + return true; +} + +QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1) { + + return new QVariant(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::inputMethodQuery(static_cast(param1))); + +} + +bool QPdfView_override_virtual_focusNextPrevChild(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusNextPrevChild = slot; + return true; +} + +bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusNextPrevChild(next); + +} + +bool QPdfView_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::timerEvent(event); + +} + +bool QPdfView_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::childEvent(event); + +} + +bool QPdfView_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfView_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::customEvent(event); + +} + +bool QPdfView_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::connectNotify(*signal); + +} + +bool QPdfView_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::disconnectNotify(*signal); + +} + +void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->setViewportMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + +} + +QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QMargins(self_cast->viewportMargins()); + +} + +void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->drawFrame(param1); + +} + +void QPdfView_protectedbase_initStyleOption(bool* _dynamic_cast_ok, const void* self, QStyleOptionFrame* option) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->initStyleOption(option); + +} + +void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->updateMicroFocus(); + +} + +void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->create(); + +} + +void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->destroy(); + +} + +bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->focusNextChild(); + +} + +bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->focusPreviousChild(); + +} + +QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfView_delete(QPdfView* self) { + delete self; +} + diff --git a/qt/pdf/gen_qpdfview.go b/qt/pdf/gen_qpdfview.go new file mode 100644 index 00000000..0197ed97 --- /dev/null +++ b/qt/pdf/gen_qpdfview.go @@ -0,0 +1,1877 @@ +package pdf + +/* + +#include "gen_qpdfview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfView__PageMode int + +const ( + QPdfView__SinglePage QPdfView__PageMode = 0 + QPdfView__MultiPage QPdfView__PageMode = 1 +) + +type QPdfView__ZoomMode int + +const ( + QPdfView__CustomZoom QPdfView__ZoomMode = 0 + QPdfView__FitToWidth QPdfView__ZoomMode = 1 + QPdfView__FitInView QPdfView__ZoomMode = 2 +) + +type QPdfView struct { + h *C.QPdfView + *qt.QAbstractScrollArea +} + +func (this *QPdfView) cPointer() *C.QPdfView { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfView constructs the type using only CGO pointers. +func newQPdfView(h *C.QPdfView) *QPdfView { + if h == nil { + return nil + } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QPdfView_virtbase(h, &outptr_QAbstractScrollArea) + + return &QPdfView{h: h, + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(outptr_QAbstractScrollArea))} +} + +// UnsafeNewQPdfView constructs the type using only unsafe pointers. +func UnsafeNewQPdfView(h unsafe.Pointer) *QPdfView { + return newQPdfView((*C.QPdfView)(h)) +} + +// NewQPdfView constructs a new QPdfView object. +func NewQPdfView(parent *qt.QWidget) *QPdfView { + + return newQPdfView(C.QPdfView_new((*C.QWidget)(parent.UnsafePointer()))) +} + +// NewQPdfView2 constructs a new QPdfView object. +func NewQPdfView2() *QPdfView { + + return newQPdfView(C.QPdfView_new2()) +} + +func (this *QPdfView) MetaObject() *qt.QMetaObject { + return qt.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfView_metaObject(this.h))) +} + +func (this *QPdfView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfView_metacast(this.h, param1_Cstring)) +} + +func QPdfView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfView_TrUtf8(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_trUtf8(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfView) SetDocument(document *QPdfDocument) { + C.QPdfView_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfView) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfView_document(this.h)) +} + +func (this *QPdfView) PageNavigation() *QPdfPageNavigation { + return newQPdfPageNavigation(C.QPdfView_pageNavigation(this.h)) +} + +func (this *QPdfView) PageMode() QPdfView__PageMode { + return (QPdfView__PageMode)(C.QPdfView_pageMode(this.h)) +} + +func (this *QPdfView) ZoomMode() QPdfView__ZoomMode { + return (QPdfView__ZoomMode)(C.QPdfView_zoomMode(this.h)) +} + +func (this *QPdfView) ZoomFactor() float64 { + return (float64)(C.QPdfView_zoomFactor(this.h)) +} + +func (this *QPdfView) PageSpacing() int { + return (int)(C.QPdfView_pageSpacing(this.h)) +} + +func (this *QPdfView) SetPageSpacing(spacing int) { + C.QPdfView_setPageSpacing(this.h, (C.int)(spacing)) +} + +func (this *QPdfView) DocumentMargins() *qt.QMargins { + _goptr := qt.UnsafeNewQMargins(unsafe.Pointer(C.QPdfView_documentMargins(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfView) SetDocumentMargins(margins qt.QMargins) { + C.QPdfView_setDocumentMargins(this.h, (*C.QMargins)(margins.UnsafePointer())) +} + +func (this *QPdfView) SetPageMode(mode QPdfView__PageMode) { + C.QPdfView_setPageMode(this.h, (C.int)(mode)) +} + +func (this *QPdfView) SetZoomMode(mode QPdfView__ZoomMode) { + C.QPdfView_setZoomMode(this.h, (C.int)(mode)) +} + +func (this *QPdfView) SetZoomFactor(factor float64) { + C.QPdfView_setZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QPdfView) DocumentChanged(document *QPdfDocument) { + C.QPdfView_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfView) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfView_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_documentChanged +func miqt_exec_callback_QPdfView_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfView) PageModeChanged(pageMode QPdfView__PageMode) { + C.QPdfView_pageModeChanged(this.h, (C.int)(pageMode)) +} +func (this *QPdfView) OnPageModeChanged(slot func(pageMode QPdfView__PageMode)) { + C.QPdfView_connect_pageModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_pageModeChanged +func miqt_exec_callback_QPdfView_pageModeChanged(cb C.intptr_t, pageMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageMode QPdfView__PageMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfView__PageMode)(pageMode) + + gofunc(slotval1) +} + +func (this *QPdfView) ZoomModeChanged(zoomMode QPdfView__ZoomMode) { + C.QPdfView_zoomModeChanged(this.h, (C.int)(zoomMode)) +} +func (this *QPdfView) OnZoomModeChanged(slot func(zoomMode QPdfView__ZoomMode)) { + C.QPdfView_connect_zoomModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_zoomModeChanged +func miqt_exec_callback_QPdfView_zoomModeChanged(cb C.intptr_t, zoomMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(zoomMode QPdfView__ZoomMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfView__ZoomMode)(zoomMode) + + gofunc(slotval1) +} + +func (this *QPdfView) ZoomFactorChanged(zoomFactor float64) { + C.QPdfView_zoomFactorChanged(this.h, (C.double)(zoomFactor)) +} +func (this *QPdfView) OnZoomFactorChanged(slot func(zoomFactor float64)) { + C.QPdfView_connect_zoomFactorChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_zoomFactorChanged +func miqt_exec_callback_QPdfView_zoomFactorChanged(cb C.intptr_t, zoomFactor C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(zoomFactor float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(zoomFactor) + + gofunc(slotval1) +} + +func (this *QPdfView) PageSpacingChanged(pageSpacing int) { + C.QPdfView_pageSpacingChanged(this.h, (C.int)(pageSpacing)) +} +func (this *QPdfView) OnPageSpacingChanged(slot func(pageSpacing int)) { + C.QPdfView_connect_pageSpacingChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_pageSpacingChanged +func miqt_exec_callback_QPdfView_pageSpacingChanged(cb C.intptr_t, pageSpacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageSpacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageSpacing) + + gofunc(slotval1) +} + +func (this *QPdfView) DocumentMarginsChanged(documentMargins qt.QMargins) { + C.QPdfView_documentMarginsChanged(this.h, (*C.QMargins)(documentMargins.UnsafePointer())) +} +func (this *QPdfView) OnDocumentMarginsChanged(slot func(documentMargins qt.QMargins)) { + C.QPdfView_connect_documentMarginsChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_documentMarginsChanged +func miqt_exec_callback_QPdfView_documentMarginsChanged(cb C.intptr_t, documentMargins *C.QMargins) { + gofunc, ok := cgo.Handle(cb).Value().(func(documentMargins qt.QMargins)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + documentMargins_goptr := qt.UnsafeNewQMargins(unsafe.Pointer(documentMargins)) + documentMargins_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *documentMargins_goptr + + gofunc(slotval1) +} + +func QPdfView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfView_TrUtf82(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_trUtf82(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfView_TrUtf83(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_trUtf83(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// SetViewportMargins can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) SetViewportMargins(left int, top int, right int, bottom int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_setViewportMargins(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ViewportMargins can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) ViewportMargins() qt.QMargins { + + var _dynamic_cast_ok C.bool = false + _goptr := qt.UnsafeNewQMargins(unsafe.Pointer(C.QPdfView_protectedbase_viewportMargins(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// DrawFrame can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) DrawFrame(param1 *qt.QPainter) { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_drawFrame(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QPainter)(param1.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// InitStyleOption can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) InitStyleOption(option *qt.QStyleOptionFrame) { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_initStyleOption(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QStyleOptionFrame)(option.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// UpdateMicroFocus can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) UpdateMicroFocus() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_updateMicroFocus(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// Create can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Create() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_create(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// Destroy can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Destroy() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_destroy(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// FocusNextChild can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) FocusNextChild() bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_focusNextChild(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// FocusPreviousChild can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) FocusPreviousChild() bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_focusPreviousChild(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Sender() *qt.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt.UnsafeNewQObject(unsafe.Pointer(C.QPdfView_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfView_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfView_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) IsSignalConnected(signal *qt.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfView) callVirtualBase_PaintEvent(event *qt.QPaintEvent) { + + C.QPdfView_virtualbase_paintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnPaintEvent(slot func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) { + ok := C.QPdfView_override_virtual_paintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_paintEvent +func miqt_exec_callback_QPdfView_paintEvent(self *C.QPdfView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QPaintEvent), event *qt.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ResizeEvent(event *qt.QResizeEvent) { + + C.QPdfView_virtualbase_resizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnResizeEvent(slot func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) { + ok := C.QPdfView_override_virtual_resizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_resizeEvent +func miqt_exec_callback_QPdfView_resizeEvent(self *C.QPdfView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QResizeEvent), event *qt.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QPdfView_virtualbase_scrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QPdfView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + ok := C.QPdfView_override_virtual_scrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_scrollContentsBy +func miqt_exec_callback_QPdfView_scrollContentsBy(self *C.QPdfView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QPdfView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QPdfView) callVirtualBase_MinimumSizeHint() *qt.QSize { + + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_minimumSizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnMinimumSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + ok := C.QPdfView_override_virtual_minimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_minimumSizeHint +func miqt_exec_callback_QPdfView_minimumSizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SizeHint() *qt.QSize { + + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_sizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + ok := C.QPdfView_override_virtual_sizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_sizeHint +func miqt_exec_callback_QPdfView_sizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SetupViewport(viewport *qt.QWidget) { + + C.QPdfView_virtualbase_setupViewport(unsafe.Pointer(this.h), (*C.QWidget)(viewport.UnsafePointer())) + +} +func (this *QPdfView) OnSetupViewport(slot func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) { + ok := C.QPdfView_override_virtual_setupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_setupViewport +func miqt_exec_callback_QPdfView_setupViewport(self *C.QPdfView, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *qt.QWidget), viewport *qt.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport)) + + gofunc((&QPdfView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QPdfView) callVirtualBase_EventFilter(param1 *qt.QObject, param2 *qt.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPdfView) OnEventFilter(slot func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) { + ok := C.QPdfView_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_eventFilter +func miqt_exec_callback_QPdfView_eventFilter(self *C.QPdfView, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QObject, param2 *qt.QEvent) bool, param1 *qt.QObject, param2 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQObject(unsafe.Pointer(param1)) + + slotval2 := qt.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_Event(param1 *qt.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QPdfView) OnEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + ok := C.QPdfView_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_event +func miqt_exec_callback_QPdfView_event(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_ViewportEvent(param1 *qt.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_viewportEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QPdfView) OnViewportEvent(slot func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) { + ok := C.QPdfView_override_virtual_viewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_viewportEvent +func miqt_exec_callback_QPdfView_viewportEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent) bool, param1 *qt.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_MousePressEvent(param1 *qt.QMouseEvent) { + + C.QPdfView_virtualbase_mousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMousePressEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mousePressEvent +func miqt_exec_callback_QPdfView_mousePressEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseReleaseEvent(param1 *qt.QMouseEvent) { + + C.QPdfView_virtualbase_mouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseReleaseEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseReleaseEvent +func miqt_exec_callback_QPdfView_mouseReleaseEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseDoubleClickEvent(param1 *qt.QMouseEvent) { + + C.QPdfView_virtualbase_mouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseDoubleClickEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseDoubleClickEvent +func miqt_exec_callback_QPdfView_mouseDoubleClickEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseMoveEvent(param1 *qt.QMouseEvent) { + + C.QPdfView_virtualbase_mouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseMoveEvent(slot func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseMoveEvent +func miqt_exec_callback_QPdfView_mouseMoveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QMouseEvent), param1 *qt.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_WheelEvent(param1 *qt.QWheelEvent) { + + C.QPdfView_virtualbase_wheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnWheelEvent(slot func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) { + ok := C.QPdfView_override_virtual_wheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_wheelEvent +func miqt_exec_callback_QPdfView_wheelEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QWheelEvent), param1 *qt.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ContextMenuEvent(param1 *qt.QContextMenuEvent) { + + C.QPdfView_virtualbase_contextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnContextMenuEvent(slot func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) { + ok := C.QPdfView_override_virtual_contextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_contextMenuEvent +func miqt_exec_callback_QPdfView_contextMenuEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QContextMenuEvent), param1 *qt.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragEnterEvent(param1 *qt.QDragEnterEvent) { + + C.QPdfView_virtualbase_dragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragEnterEvent(slot func(super func(param1 *qt.QDragEnterEvent), param1 *qt.QDragEnterEvent)) { + ok := C.QPdfView_override_virtual_dragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragEnterEvent +func miqt_exec_callback_QPdfView_dragEnterEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragEnterEvent), param1 *qt.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragMoveEvent(param1 *qt.QDragMoveEvent) { + + C.QPdfView_virtualbase_dragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragMoveEvent(slot func(super func(param1 *qt.QDragMoveEvent), param1 *qt.QDragMoveEvent)) { + ok := C.QPdfView_override_virtual_dragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragMoveEvent +func miqt_exec_callback_QPdfView_dragMoveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragMoveEvent), param1 *qt.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragLeaveEvent(param1 *qt.QDragLeaveEvent) { + + C.QPdfView_virtualbase_dragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragLeaveEvent(slot func(super func(param1 *qt.QDragLeaveEvent), param1 *qt.QDragLeaveEvent)) { + ok := C.QPdfView_override_virtual_dragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragLeaveEvent +func miqt_exec_callback_QPdfView_dragLeaveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDragLeaveEvent), param1 *qt.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DropEvent(param1 *qt.QDropEvent) { + + C.QPdfView_virtualbase_dropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDropEvent(slot func(super func(param1 *qt.QDropEvent), param1 *qt.QDropEvent)) { + ok := C.QPdfView_override_virtual_dropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dropEvent +func miqt_exec_callback_QPdfView_dropEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QDropEvent), param1 *qt.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_KeyPressEvent(param1 *qt.QKeyEvent) { + + C.QPdfView_virtualbase_keyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnKeyPressEvent(slot func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) { + ok := C.QPdfView_override_virtual_keyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_keyPressEvent +func miqt_exec_callback_QPdfView_keyPressEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QKeyEvent), param1 *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ViewportSizeHint() *qt.QSize { + + _goptr := qt.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_viewportSizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnViewportSizeHint(slot func(super func() *qt.QSize) *qt.QSize) { + ok := C.QPdfView_override_virtual_viewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_viewportSizeHint +func miqt_exec_callback_QPdfView_viewportSizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QSize) *qt.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_ViewportSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_ChangeEvent(param1 *qt.QEvent) { + + C.QPdfView_virtualbase_changeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnChangeEvent(slot func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) { + ok := C.QPdfView_override_virtual_changeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_changeEvent +func miqt_exec_callback_QPdfView_changeEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QEvent), param1 *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DevType() int { + + return (int)(C.QPdfView_virtualbase_devType(unsafe.Pointer(this.h))) + +} +func (this *QPdfView) OnDevType(slot func(super func() int) int) { + ok := C.QPdfView_override_virtual_devType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_devType +func miqt_exec_callback_QPdfView_devType(self *C.QPdfView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_SetVisible(visible bool) { + + C.QPdfView_virtualbase_setVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPdfView) OnSetVisible(slot func(super func(visible bool), visible bool)) { + ok := C.QPdfView_override_virtual_setVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_setVisible +func miqt_exec_callback_QPdfView_setVisible(self *C.QPdfView, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPdfView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPdfView) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QPdfView_virtualbase_heightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPdfView) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + ok := C.QPdfView_override_virtual_heightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_heightForWidth +func miqt_exec_callback_QPdfView_heightForWidth(self *C.QPdfView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QPdfView_virtualbase_hasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QPdfView) OnHasHeightForWidth(slot func(super func() bool) bool) { + ok := C.QPdfView_override_virtual_hasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_hasHeightForWidth +func miqt_exec_callback_QPdfView_hasHeightForWidth(self *C.QPdfView, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_PaintEngine() *qt.QPaintEngine { + + return qt.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPdfView_virtualbase_paintEngine(unsafe.Pointer(this.h)))) + +} +func (this *QPdfView) OnPaintEngine(slot func(super func() *qt.QPaintEngine) *qt.QPaintEngine) { + ok := C.QPdfView_override_virtual_paintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_paintEngine +func miqt_exec_callback_QPdfView_paintEngine(self *C.QPdfView, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPaintEngine) *qt.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_KeyReleaseEvent(event *qt.QKeyEvent) { + + C.QPdfView_virtualbase_keyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnKeyReleaseEvent(slot func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) { + ok := C.QPdfView_override_virtual_keyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_keyReleaseEvent +func miqt_exec_callback_QPdfView_keyReleaseEvent(self *C.QPdfView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QKeyEvent), event *qt.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_FocusInEvent(event *qt.QFocusEvent) { + + C.QPdfView_virtualbase_focusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnFocusInEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + ok := C.QPdfView_override_virtual_focusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusInEvent +func miqt_exec_callback_QPdfView_focusInEvent(self *C.QPdfView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_FocusOutEvent(event *qt.QFocusEvent) { + + C.QPdfView_virtualbase_focusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnFocusOutEvent(slot func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) { + ok := C.QPdfView_override_virtual_focusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusOutEvent +func miqt_exec_callback_QPdfView_focusOutEvent(self *C.QPdfView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QFocusEvent), event *qt.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_EnterEvent(event *qt.QEvent) { + + C.QPdfView_virtualbase_enterEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnEnterEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfView_override_virtual_enterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_enterEvent +func miqt_exec_callback_QPdfView_enterEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_LeaveEvent(event *qt.QEvent) { + + C.QPdfView_virtualbase_leaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnLeaveEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfView_override_virtual_leaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_leaveEvent +func miqt_exec_callback_QPdfView_leaveEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MoveEvent(event *qt.QMoveEvent) { + + C.QPdfView_virtualbase_moveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnMoveEvent(slot func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) { + ok := C.QPdfView_override_virtual_moveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_moveEvent +func miqt_exec_callback_QPdfView_moveEvent(self *C.QPdfView, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QMoveEvent), event *qt.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_CloseEvent(event *qt.QCloseEvent) { + + C.QPdfView_virtualbase_closeEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnCloseEvent(slot func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) { + ok := C.QPdfView_override_virtual_closeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_closeEvent +func miqt_exec_callback_QPdfView_closeEvent(self *C.QPdfView, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QCloseEvent), event *qt.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_TabletEvent(event *qt.QTabletEvent) { + + C.QPdfView_virtualbase_tabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnTabletEvent(slot func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) { + ok := C.QPdfView_override_virtual_tabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_tabletEvent +func miqt_exec_callback_QPdfView_tabletEvent(self *C.QPdfView, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTabletEvent), event *qt.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ActionEvent(event *qt.QActionEvent) { + + C.QPdfView_virtualbase_actionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnActionEvent(slot func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) { + ok := C.QPdfView_override_virtual_actionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_actionEvent +func miqt_exec_callback_QPdfView_actionEvent(self *C.QPdfView, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QActionEvent), event *qt.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ShowEvent(event *qt.QShowEvent) { + + C.QPdfView_virtualbase_showEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnShowEvent(slot func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) { + ok := C.QPdfView_override_virtual_showEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_showEvent +func miqt_exec_callback_QPdfView_showEvent(self *C.QPdfView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QShowEvent), event *qt.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_HideEvent(event *qt.QHideEvent) { + + C.QPdfView_virtualbase_hideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnHideEvent(slot func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) { + ok := C.QPdfView_override_virtual_hideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_hideEvent +func miqt_exec_callback_QPdfView_hideEvent(self *C.QPdfView, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QHideEvent), event *qt.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *int64) bool { + eventType_alias := C.struct_miqt_string{} + if len(eventType) > 0 { + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + } else { + eventType_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QPdfView_virtualbase_nativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.long)(unsafe.Pointer(result)))) + +} +func (this *QPdfView) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) { + ok := C.QPdfView_override_virtual_nativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_nativeEvent +func miqt_exec_callback_QPdfView_nativeEvent(self *C.QPdfView, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.long) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *int64) bool, eventType []byte, message unsafe.Pointer, result *int64) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*int64)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_Metric(param1 qt.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPdfView_virtualbase_metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPdfView) OnMetric(slot func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) { + ok := C.QPdfView_override_virtual_metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_metric +func miqt_exec_callback_QPdfView_metric(self *C.QPdfView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.QPaintDevice__PaintDeviceMetric) int, param1 qt.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_InitPainter(painter *qt.QPainter) { + + C.QPdfView_virtualbase_initPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QPdfView) OnInitPainter(slot func(super func(painter *qt.QPainter), painter *qt.QPainter)) { + ok := C.QPdfView_override_virtual_initPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_initPainter +func miqt_exec_callback_QPdfView_initPainter(self *C.QPdfView, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt.QPainter), painter *qt.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPdfView{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPdfView) callVirtualBase_Redirected(offset *qt.QPoint) *qt.QPaintDevice { + + return qt.UnsafeNewQPaintDevice(unsafe.Pointer(C.QPdfView_virtualbase_redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) + +} +func (this *QPdfView) OnRedirected(slot func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) { + ok := C.QPdfView_override_virtual_redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_redirected +func miqt_exec_callback_QPdfView_redirected(self *C.QPdfView, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt.QPoint) *qt.QPaintDevice, offset *qt.QPoint) *qt.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SharedPainter() *qt.QPainter { + + return qt.UnsafeNewQPainter(unsafe.Pointer(C.QPdfView_virtualbase_sharedPainter(unsafe.Pointer(this.h)))) + +} +func (this *QPdfView) OnSharedPainter(slot func(super func() *qt.QPainter) *qt.QPainter) { + ok := C.QPdfView_override_virtual_sharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_sharedPainter +func miqt_exec_callback_QPdfView_sharedPainter(self *C.QPdfView, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt.QPainter) *qt.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_InputMethodEvent(param1 *qt.QInputMethodEvent) { + + C.QPdfView_virtualbase_inputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnInputMethodEvent(slot func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) { + ok := C.QPdfView_override_virtual_inputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_inputMethodEvent +func miqt_exec_callback_QPdfView_inputMethodEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt.QInputMethodEvent), param1 *qt.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_InputMethodQuery(param1 qt.InputMethodQuery) *qt.QVariant { + + _goptr := qt.UnsafeNewQVariant(unsafe.Pointer(C.QPdfView_virtualbase_inputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnInputMethodQuery(slot func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) { + ok := C.QPdfView_override_virtual_inputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_inputMethodQuery +func miqt_exec_callback_QPdfView_inputMethodQuery(self *C.QPdfView, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt.InputMethodQuery) *qt.QVariant, param1 qt.InputMethodQuery) *qt.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPdfView_virtualbase_focusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPdfView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + ok := C.QPdfView_override_virtual_focusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusNextPrevChild +func miqt_exec_callback_QPdfView_focusNextPrevChild(self *C.QPdfView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_TimerEvent(event *qt.QTimerEvent) { + + C.QPdfView_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnTimerEvent(slot func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) { + ok := C.QPdfView_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_timerEvent +func miqt_exec_callback_QPdfView_timerEvent(self *C.QPdfView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QTimerEvent), event *qt.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ChildEvent(event *qt.QChildEvent) { + + C.QPdfView_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnChildEvent(slot func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) { + ok := C.QPdfView_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_childEvent +func miqt_exec_callback_QPdfView_childEvent(self *C.QPdfView, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QChildEvent), event *qt.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_CustomEvent(event *qt.QEvent) { + + C.QPdfView_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnCustomEvent(slot func(super func(event *qt.QEvent), event *qt.QEvent)) { + ok := C.QPdfView_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_customEvent +func miqt_exec_callback_QPdfView_customEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt.QEvent), event *qt.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ConnectNotify(signal *qt.QMetaMethod) { + + C.QPdfView_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfView) OnConnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfView_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_connectNotify +func miqt_exec_callback_QPdfView_connectNotify(self *C.QPdfView, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DisconnectNotify(signal *qt.QMetaMethod) { + + C.QPdfView_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfView) OnDisconnectNotify(slot func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) { + ok := C.QPdfView_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_disconnectNotify +func miqt_exec_callback_QPdfView_disconnectNotify(self *C.QPdfView, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt.QMetaMethod), signal *qt.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfView) Delete() { + C.QPdfView_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfView) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/pdf/gen_qpdfview.h b/qt/pdf/gen_qpdfview.h new file mode 100644 index 00000000..cc2cd927 --- /dev/null +++ b/qt/pdf/gen_qpdfview.h @@ -0,0 +1,257 @@ +#pragma once +#ifndef MIQT_QT_PDF_GEN_QPDFVIEW_H +#define MIQT_QT_PDF_GEN_QPDFVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractScrollArea; +class QActionEvent; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMargins; +class QMetaMethod; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPdfDocument; +class QPdfPageNavigation; +class QPdfView; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QStyleOptionFrame; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; +class QWidget; +#else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QActionEvent QActionEvent; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfPageNavigation QPdfPageNavigation; +typedef struct QPdfView QPdfView; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +QPdfView* QPdfView_new(QWidget* parent); +QPdfView* QPdfView_new2(); +void QPdfView_virtbase(QPdfView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); +QMetaObject* QPdfView_metaObject(const QPdfView* self); +void* QPdfView_metacast(QPdfView* self, const char* param1); +struct miqt_string QPdfView_tr(const char* s); +struct miqt_string QPdfView_trUtf8(const char* s); +void QPdfView_setDocument(QPdfView* self, QPdfDocument* document); +QPdfDocument* QPdfView_document(const QPdfView* self); +QPdfPageNavigation* QPdfView_pageNavigation(const QPdfView* self); +int QPdfView_pageMode(const QPdfView* self); +int QPdfView_zoomMode(const QPdfView* self); +double QPdfView_zoomFactor(const QPdfView* self); +int QPdfView_pageSpacing(const QPdfView* self); +void QPdfView_setPageSpacing(QPdfView* self, int spacing); +QMargins* QPdfView_documentMargins(const QPdfView* self); +void QPdfView_setDocumentMargins(QPdfView* self, QMargins* margins); +void QPdfView_setPageMode(QPdfView* self, int mode); +void QPdfView_setZoomMode(QPdfView* self, int mode); +void QPdfView_setZoomFactor(QPdfView* self, double factor); +void QPdfView_documentChanged(QPdfView* self, QPdfDocument* document); +void QPdfView_connect_documentChanged(QPdfView* self, intptr_t slot); +void QPdfView_pageModeChanged(QPdfView* self, int pageMode); +void QPdfView_connect_pageModeChanged(QPdfView* self, intptr_t slot); +void QPdfView_zoomModeChanged(QPdfView* self, int zoomMode); +void QPdfView_connect_zoomModeChanged(QPdfView* self, intptr_t slot); +void QPdfView_zoomFactorChanged(QPdfView* self, double zoomFactor); +void QPdfView_connect_zoomFactorChanged(QPdfView* self, intptr_t slot); +void QPdfView_pageSpacingChanged(QPdfView* self, int pageSpacing); +void QPdfView_connect_pageSpacingChanged(QPdfView* self, intptr_t slot); +void QPdfView_documentMarginsChanged(QPdfView* self, QMargins* documentMargins); +void QPdfView_connect_documentMarginsChanged(QPdfView* self, intptr_t slot); +void QPdfView_paintEvent(QPdfView* self, QPaintEvent* event); +void QPdfView_resizeEvent(QPdfView* self, QResizeEvent* event); +void QPdfView_scrollContentsBy(QPdfView* self, int dx, int dy); +struct miqt_string QPdfView_tr2(const char* s, const char* c); +struct miqt_string QPdfView_tr3(const char* s, const char* c, int n); +struct miqt_string QPdfView_trUtf82(const char* s, const char* c); +struct miqt_string QPdfView_trUtf83(const char* s, const char* c, int n); +bool QPdfView_override_virtual_paintEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event); +bool QPdfView_override_virtual_resizeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event); +bool QPdfView_override_virtual_scrollContentsBy(void* self, intptr_t slot); +void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy); +bool QPdfView_override_virtual_minimumSizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_minimumSizeHint(const void* self); +bool QPdfView_override_virtual_sizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_sizeHint(const void* self); +bool QPdfView_override_virtual_setupViewport(void* self, intptr_t slot); +void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport); +bool QPdfView_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2); +bool QPdfView_override_virtual_event(void* self, intptr_t slot); +bool QPdfView_virtualbase_event(void* self, QEvent* param1); +bool QPdfView_override_virtual_viewportEvent(void* self, intptr_t slot); +bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1); +bool QPdfView_override_virtual_mousePressEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseReleaseEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseDoubleClickEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseMoveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_wheelEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1); +bool QPdfView_override_virtual_contextMenuEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1); +bool QPdfView_override_virtual_dragEnterEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1); +bool QPdfView_override_virtual_dragMoveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1); +bool QPdfView_override_virtual_dragLeaveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1); +bool QPdfView_override_virtual_dropEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1); +bool QPdfView_override_virtual_keyPressEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1); +bool QPdfView_override_virtual_viewportSizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_viewportSizeHint(const void* self); +bool QPdfView_override_virtual_changeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1); +bool QPdfView_override_virtual_devType(void* self, intptr_t slot); +int QPdfView_virtualbase_devType(const void* self); +bool QPdfView_override_virtual_setVisible(void* self, intptr_t slot); +void QPdfView_virtualbase_setVisible(void* self, bool visible); +bool QPdfView_override_virtual_heightForWidth(void* self, intptr_t slot); +int QPdfView_virtualbase_heightForWidth(const void* self, int param1); +bool QPdfView_override_virtual_hasHeightForWidth(void* self, intptr_t slot); +bool QPdfView_virtualbase_hasHeightForWidth(const void* self); +bool QPdfView_override_virtual_paintEngine(void* self, intptr_t slot); +QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self); +bool QPdfView_override_virtual_keyReleaseEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event); +bool QPdfView_override_virtual_focusInEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event); +bool QPdfView_override_virtual_focusOutEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event); +bool QPdfView_override_virtual_enterEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_enterEvent(void* self, QEvent* event); +bool QPdfView_override_virtual_leaveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event); +bool QPdfView_override_virtual_moveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event); +bool QPdfView_override_virtual_closeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event); +bool QPdfView_override_virtual_tabletEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event); +bool QPdfView_override_virtual_actionEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event); +bool QPdfView_override_virtual_showEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event); +bool QPdfView_override_virtual_hideEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event); +bool QPdfView_override_virtual_nativeEvent(void* self, intptr_t slot); +bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, long* result); +bool QPdfView_override_virtual_metric(void* self, intptr_t slot); +int QPdfView_virtualbase_metric(const void* self, int param1); +bool QPdfView_override_virtual_initPainter(void* self, intptr_t slot); +void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter); +bool QPdfView_override_virtual_redirected(void* self, intptr_t slot); +QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset); +bool QPdfView_override_virtual_sharedPainter(void* self, intptr_t slot); +QPainter* QPdfView_virtualbase_sharedPainter(const void* self); +bool QPdfView_override_virtual_inputMethodEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1); +bool QPdfView_override_virtual_inputMethodQuery(void* self, intptr_t slot); +QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1); +bool QPdfView_override_virtual_focusNextPrevChild(void* self, intptr_t slot); +bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next); +bool QPdfView_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfView_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfView_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfView_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfView_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom); +QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self); +void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1); +void QPdfView_protectedbase_initStyleOption(bool* _dynamic_cast_ok, const void* self, QStyleOptionFrame* option); +void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self); +void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self); +void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self); +bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self); +bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self); +QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfView_delete(QPdfView* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/cflags.go b/qt6/pdf/cflags.go new file mode 100644 index 00000000..c0810a5e --- /dev/null +++ b/qt6/pdf/cflags.go @@ -0,0 +1,7 @@ +package pdf + +/* +#cgo pkg-config: Qt6PdfWidgets +*/ +import "C" + diff --git a/qt6/pdf/gen_qpdfbookmarkmodel.cpp b/qt6/pdf/gen_qpdfbookmarkmodel.cpp new file mode 100644 index 00000000..01fa0c61 --- /dev/null +++ b/qt6/pdf/gen_qpdfbookmarkmodel.cpp @@ -0,0 +1,2309 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfbookmarkmodel.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfBookmarkModel_documentChanged(intptr_t, QPdfDocument*); +QVariant* miqt_exec_callback_QPdfBookmarkModel_data(const QPdfBookmarkModel*, intptr_t, QModelIndex*, int); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_index(const QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_parent(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_rowCount(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_columnCount(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +struct miqt_map /* of int to struct miqt_string */ miqt_exec_callback_QPdfBookmarkModel_roleNames(const QPdfBookmarkModel*, intptr_t); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_sibling(const QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_hasChildren(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_setData(QPdfBookmarkModel*, intptr_t, QModelIndex*, QVariant*, int); +QVariant* miqt_exec_callback_QPdfBookmarkModel_headerData(const QPdfBookmarkModel*, intptr_t, int, int, int); +bool miqt_exec_callback_QPdfBookmarkModel_setHeaderData(QPdfBookmarkModel*, intptr_t, int, int, QVariant*, int); +struct miqt_map /* of int to QVariant* */ miqt_exec_callback_QPdfBookmarkModel_itemData(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_setItemData(QPdfBookmarkModel*, intptr_t, QModelIndex*, struct miqt_map /* of int to QVariant* */ ); +bool miqt_exec_callback_QPdfBookmarkModel_clearItemData(QPdfBookmarkModel*, intptr_t, QModelIndex*); +struct miqt_array /* of struct miqt_string */ miqt_exec_callback_QPdfBookmarkModel_mimeTypes(const QPdfBookmarkModel*, intptr_t); +QMimeData* miqt_exec_callback_QPdfBookmarkModel_mimeData(const QPdfBookmarkModel*, intptr_t, struct miqt_array /* of QModelIndex* */ ); +bool miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(const QPdfBookmarkModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_dropMimeData(QPdfBookmarkModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(const QPdfBookmarkModel*, intptr_t); +int miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(const QPdfBookmarkModel*, intptr_t); +bool miqt_exec_callback_QPdfBookmarkModel_insertRows(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_insertColumns(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_removeRows(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_removeColumns(QPdfBookmarkModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_moveRows(QPdfBookmarkModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +bool miqt_exec_callback_QPdfBookmarkModel_moveColumns(QPdfBookmarkModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +void miqt_exec_callback_QPdfBookmarkModel_fetchMore(QPdfBookmarkModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfBookmarkModel_canFetchMore(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +int miqt_exec_callback_QPdfBookmarkModel_flags(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfBookmarkModel_sort(QPdfBookmarkModel*, intptr_t, int, int); +QModelIndex* miqt_exec_callback_QPdfBookmarkModel_buddy(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +struct miqt_array /* of QModelIndex* */ miqt_exec_callback_QPdfBookmarkModel_match(const QPdfBookmarkModel*, intptr_t, QModelIndex*, int, QVariant*, int, int); +QSize* miqt_exec_callback_QPdfBookmarkModel_span(const QPdfBookmarkModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfBookmarkModel_multiData(const QPdfBookmarkModel*, intptr_t, QModelIndex*, QModelRoleDataSpan*); +bool miqt_exec_callback_QPdfBookmarkModel_submit(QPdfBookmarkModel*, intptr_t); +void miqt_exec_callback_QPdfBookmarkModel_revert(QPdfBookmarkModel*, intptr_t); +void miqt_exec_callback_QPdfBookmarkModel_resetInternalData(QPdfBookmarkModel*, intptr_t); +bool miqt_exec_callback_QPdfBookmarkModel_event(QPdfBookmarkModel*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfBookmarkModel_eventFilter(QPdfBookmarkModel*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfBookmarkModel_timerEvent(QPdfBookmarkModel*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfBookmarkModel_childEvent(QPdfBookmarkModel*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfBookmarkModel_customEvent(QPdfBookmarkModel*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfBookmarkModel_connectNotify(QPdfBookmarkModel*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(QPdfBookmarkModel*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfBookmarkModel final : public QPdfBookmarkModel { +public: + + MiqtVirtualQPdfBookmarkModel(): QPdfBookmarkModel() {}; + MiqtVirtualQPdfBookmarkModel(QObject* parent): QPdfBookmarkModel(parent) {}; + + virtual ~MiqtVirtualQPdfBookmarkModel() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__data == 0) { + return QPdfBookmarkModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_data(this, handle__data, sigval1, sigval2); + + return *callback_return_value; + } + + friend QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__index == 0) { + return QPdfBookmarkModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_index(this, handle__index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__parent = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex parent(const QModelIndex& index) const override { + if (handle__parent == 0) { + return QPdfBookmarkModel::parent(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_parent(this, handle__parent, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__rowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__rowCount == 0) { + return QPdfBookmarkModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_rowCount(this, handle__rowCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__columnCount = 0; + + // Subclass to allow providing a Go implementation + virtual int columnCount(const QModelIndex& parent) const override { + if (handle__columnCount == 0) { + return QPdfBookmarkModel::columnCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_columnCount(this, handle__columnCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__roleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__roleNames == 0) { + return QPdfBookmarkModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_roleNames(this, handle__roleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__sibling == 0) { + return QPdfBookmarkModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_sibling(this, handle__sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hasChildren = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasChildren(const QModelIndex& parent) const override { + if (handle__hasChildren == 0) { + return QPdfBookmarkModel::hasChildren(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_hasChildren(this, handle__hasChildren, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__setData == 0) { + return QPdfBookmarkModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setData(this, handle__setData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__headerData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__headerData == 0) { + return QPdfBookmarkModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_headerData(this, handle__headerData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__setHeaderData == 0) { + return QPdfBookmarkModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setHeaderData(this, handle__setHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__itemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__itemData == 0) { + return QPdfBookmarkModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_itemData(this, handle__itemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__setItemData == 0) { + return QPdfBookmarkModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_setItemData(this, handle__setItemData, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); + + // cgo.Handle value for overwritten implementation + intptr_t handle__clearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__clearItemData == 0) { + return QPdfBookmarkModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_clearItemData(this, handle__clearItemData, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_clearItemData(void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__mimeTypes == 0) { + return QPdfBookmarkModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_mimeTypes(this, handle__mimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__mimeData == 0) { + return QPdfBookmarkModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_mimeData(this, handle__mimeData, sigval1); + + return callback_return_value; + } + + friend QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__canDropMimeData == 0) { + return QPdfBookmarkModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(this, handle__canDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__dropMimeData == 0) { + return QPdfBookmarkModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_dropMimeData(this, handle__dropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__supportedDropActions == 0) { + return QPdfBookmarkModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(this, handle__supportedDropActions); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__supportedDragActions == 0) { + return QPdfBookmarkModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(this, handle__supportedDragActions); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__insertRows == 0) { + return QPdfBookmarkModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_insertRows(this, handle__insertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__insertColumns == 0) { + return QPdfBookmarkModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_insertColumns(this, handle__insertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__removeRows == 0) { + return QPdfBookmarkModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_removeRows(this, handle__removeRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__removeColumns == 0) { + return QPdfBookmarkModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_removeColumns(this, handle__removeColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveRows == 0) { + return QPdfBookmarkModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_moveRows(this, handle__moveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveColumns == 0) { + return QPdfBookmarkModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_moveColumns(this, handle__moveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__fetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__fetchMore == 0) { + QPdfBookmarkModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QPdfBookmarkModel_fetchMore(this, handle__fetchMore, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__canFetchMore == 0) { + return QPdfBookmarkModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_canFetchMore(this, handle__canFetchMore, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__flags == 0) { + return QPdfBookmarkModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QPdfBookmarkModel_flags(this, handle__flags, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__sort == 0) { + QPdfBookmarkModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QPdfBookmarkModel_sort(this, handle__sort, sigval1, sigval2); + + + } + + friend void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order); + + // cgo.Handle value for overwritten implementation + intptr_t handle__buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__buddy == 0) { + return QPdfBookmarkModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_buddy(this, handle__buddy, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__match == 0) { + return QPdfBookmarkModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QPdfBookmarkModel_match(this, handle__match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); + + // cgo.Handle value for overwritten implementation + intptr_t handle__span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__span == 0) { + return QPdfBookmarkModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QPdfBookmarkModel_span(this, handle__span, sigval1); + + return *callback_return_value; + } + + friend QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__multiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__multiData == 0) { + QPdfBookmarkModel::multiData(index, roleDataSpan); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QModelRoleDataSpan* sigval2 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QPdfBookmarkModel_multiData(this, handle__multiData, sigval1, sigval2); + + + } + + friend void QPdfBookmarkModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); + + // cgo.Handle value for overwritten implementation + intptr_t handle__submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__submit == 0) { + return QPdfBookmarkModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_submit(this, handle__submit); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_submit(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__revert == 0) { + QPdfBookmarkModel::revert(); + return; + } + + + miqt_exec_callback_QPdfBookmarkModel_revert(this, handle__revert); + + + } + + friend void QPdfBookmarkModel_virtualbase_revert(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__resetInternalData = 0; + + // Subclass to allow providing a Go implementation + virtual void resetInternalData() override { + if (handle__resetInternalData == 0) { + QPdfBookmarkModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QPdfBookmarkModel_resetInternalData(this, handle__resetInternalData); + + + } + + friend void QPdfBookmarkModel_virtualbase_resetInternalData(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfBookmarkModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfBookmarkModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfBookmarkModel_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfBookmarkModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfBookmarkModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfBookmarkModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfBookmarkModel_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfBookmarkModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfBookmarkModel_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfBookmarkModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); + friend void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); + friend bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); + friend void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); + friend bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); + friend void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); + friend bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); + friend void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); + friend void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); + friend struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); + friend QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfBookmarkModel* QPdfBookmarkModel_new() { + return new MiqtVirtualQPdfBookmarkModel(); +} + +QPdfBookmarkModel* QPdfBookmarkModel_new2(QObject* parent) { + return new MiqtVirtualQPdfBookmarkModel(parent); +} + +void QPdfBookmarkModel_virtbase(QPdfBookmarkModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); +} + +QMetaObject* QPdfBookmarkModel_metaObject(const QPdfBookmarkModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfBookmarkModel_metacast(QPdfBookmarkModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfBookmarkModel_tr(const char* s) { + QString _ret = QPdfBookmarkModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QPdfDocument* QPdfBookmarkModel_document(const QPdfBookmarkModel* self) { + return self->document(); +} + +void QPdfBookmarkModel_setDocument(QPdfBookmarkModel* self, QPdfDocument* document) { + self->setDocument(document); +} + +QVariant* QPdfBookmarkModel_data(const QPdfBookmarkModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +QModelIndex* QPdfBookmarkModel_index(const QPdfBookmarkModel* self, int row, int column, QModelIndex* parent) { + return new QModelIndex(self->index(static_cast(row), static_cast(column), *parent)); +} + +QModelIndex* QPdfBookmarkModel_parent(const QPdfBookmarkModel* self, QModelIndex* index) { + return new QModelIndex(self->parent(*index)); +} + +int QPdfBookmarkModel_rowCount(const QPdfBookmarkModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +int QPdfBookmarkModel_columnCount(const QPdfBookmarkModel* self, QModelIndex* parent) { + return self->columnCount(*parent); +} + +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_roleNames(const QPdfBookmarkModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +void QPdfBookmarkModel_documentChanged(QPdfBookmarkModel* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfBookmarkModel_connect_documentChanged(QPdfBookmarkModel* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel::connect(self, static_cast(&QPdfBookmarkModel::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfBookmarkModel_documentChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfBookmarkModel_tr2(const char* s, const char* c) { + QString _ret = QPdfBookmarkModel::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfBookmarkModel_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfBookmarkModel::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfBookmarkModel_override_virtual_data(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__data = slot; + return true; +} + +QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role) { + + return new QVariant(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::data(*index, static_cast(role))); + +} + +bool QPdfBookmarkModel_override_virtual_index(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__index = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::index(static_cast(row), static_cast(column), *parent)); + +} + +bool QPdfBookmarkModel_override_virtual_parent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__parent = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::parent(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_rowCount(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__rowCount = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::rowCount(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_columnCount(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__columnCount = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::columnCount(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_roleNames(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__roleNames = slot; + return true; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self) { + + QHash _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_sibling(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sibling = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::sibling(static_cast(row), static_cast(column), *idx)); + +} + +bool QPdfBookmarkModel_override_virtual_hasChildren(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hasChildren = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::hasChildren(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_setData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setData(*index, *value, static_cast(role)); + +} + +bool QPdfBookmarkModel_override_virtual_headerData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__headerData = slot; + return true; +} + +QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role) { + + return new QVariant(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + +} + +bool QPdfBookmarkModel_override_virtual_setHeaderData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setHeaderData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + +} + +bool QPdfBookmarkModel_override_virtual_itemData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__itemData = slot; + return true; +} + +struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index) { + + QMap _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_setItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setItemData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::setItemData(*index, roles_QMap); + +} + +bool QPdfBookmarkModel_override_virtual_clearItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__clearItemData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_clearItemData(void* self, QModelIndex* index) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::clearItemData(*index); + +} + +bool QPdfBookmarkModel_override_virtual_mimeTypes(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeTypes = slot; + return true; +} + +struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self) { + + QStringList _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_mimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeData = slot; + return true; +} + +QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::mimeData(indexes_QList); + +} + +bool QPdfBookmarkModel_override_virtual_canDropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canDropMimeData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_dropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropMimeData = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_supportedDropActions(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDropActions = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::supportedDropActions(); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_supportedDragActions(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDragActions = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::supportedDragActions(); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_insertRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::insertRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_insertColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::insertColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_removeRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::removeRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_removeColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::removeColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfBookmarkModel_override_virtual_moveRows(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveRows = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfBookmarkModel_override_virtual_moveColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveColumns = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfBookmarkModel_override_virtual_fetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__fetchMore = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::fetchMore(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_canFetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canFetchMore = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::canFetchMore(*parent); + +} + +bool QPdfBookmarkModel_override_virtual_flags(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__flags = slot; + return true; +} + +int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index) { + + Qt::ItemFlags _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::flags(*index); + return static_cast(_ret); + +} + +bool QPdfBookmarkModel_override_virtual_sort(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sort = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::sort(static_cast(column), static_cast(order)); + +} + +bool QPdfBookmarkModel_override_virtual_buddy(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__buddy = slot; + return true; +} + +QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::buddy(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_match(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__match = slot; + return true; +} + +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + + QModelIndexList _ret = ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfBookmarkModel_override_virtual_span(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__span = slot; + return true; +} + +QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index) { + + return new QSize(( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::span(*index)); + +} + +bool QPdfBookmarkModel_override_virtual_multiData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__multiData = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + + ( (const MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::multiData(*index, *roleDataSpan); + +} + +bool QPdfBookmarkModel_override_virtual_submit(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__submit = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_submit(void* self) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::submit(); + +} + +bool QPdfBookmarkModel_override_virtual_revert(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__revert = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_revert(void* self) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::revert(); + +} + +bool QPdfBookmarkModel_override_virtual_resetInternalData(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__resetInternalData = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_resetInternalData(void* self) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::resetInternalData(); + +} + +bool QPdfBookmarkModel_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::event(event); + +} + +bool QPdfBookmarkModel_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::eventFilter(watched, event); + +} + +bool QPdfBookmarkModel_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::timerEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::childEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::customEvent(event); + +} + +bool QPdfBookmarkModel_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::connectNotify(*signal); + +} + +bool QPdfBookmarkModel_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfBookmarkModel*)(self) )->QPdfBookmarkModel::disconnectNotify(*signal); + +} + +QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QModelIndex(self_cast->createIndex(static_cast(row), static_cast(column))); + +} + +void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + self_cast->encodeData(indexes_QList, *stream); + +} + +bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->decodeData(static_cast(row), static_cast(column), *parent, *stream); + +} + +void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertRows(); + +} + +void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveRows(); + +} + +bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveRows(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationRow)); + +} + +void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveRows(); + +} + +void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertColumns(); + +} + +void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveColumns(); + +} + +bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveColumns(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationColumn)); + +} + +void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveColumns(); + +} + +void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginResetModel(); + +} + +void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endResetModel(); + +} + +void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->changePersistentIndex(*from, *to); + +} + +void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList from_QList; + from_QList.reserve(from.len); + QModelIndex** from_arr = static_cast(from.data); + for(size_t i = 0; i < from.len; ++i) { + from_QList.push_back(*(from_arr[i])); + } + QModelIndexList to_QList; + to_QList.reserve(to.len); + QModelIndex** to_arr = static_cast(to.data); + for(size_t i = 0; i < to.len; ++i) { + to_QList.push_back(*(to_arr[i])); + } + + self_cast->changePersistentIndexList(from_QList, to_QList); + +} + +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return (struct miqt_array){}; + } + + *_dynamic_cast_ok = true; + + QModelIndexList _ret = self_cast->persistentIndexList(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfBookmarkModel* self_cast = dynamic_cast( (QPdfBookmarkModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfBookmarkModel_delete(QPdfBookmarkModel* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfbookmarkmodel.go b/qt6/pdf/gen_qpdfbookmarkmodel.go new file mode 100644 index 00000000..6c574071 --- /dev/null +++ b/qt6/pdf/gen_qpdfbookmarkmodel.go @@ -0,0 +1,1970 @@ +package pdf + +/* + +#include "gen_qpdfbookmarkmodel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfBookmarkModel__Role int + +const ( + QPdfBookmarkModel__Title QPdfBookmarkModel__Role = 256 + QPdfBookmarkModel__Level QPdfBookmarkModel__Role = 257 + QPdfBookmarkModel__Page QPdfBookmarkModel__Role = 258 + QPdfBookmarkModel__Location QPdfBookmarkModel__Role = 259 + QPdfBookmarkModel__Zoom QPdfBookmarkModel__Role = 260 + QPdfBookmarkModel__NRoles QPdfBookmarkModel__Role = 261 +) + +type QPdfBookmarkModel struct { + h *C.QPdfBookmarkModel + *qt6.QAbstractItemModel +} + +func (this *QPdfBookmarkModel) cPointer() *C.QPdfBookmarkModel { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfBookmarkModel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfBookmarkModel constructs the type using only CGO pointers. +func newQPdfBookmarkModel(h *C.QPdfBookmarkModel) *QPdfBookmarkModel { + if h == nil { + return nil + } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QPdfBookmarkModel_virtbase(h, &outptr_QAbstractItemModel) + + return &QPdfBookmarkModel{h: h, + QAbstractItemModel: qt6.UnsafeNewQAbstractItemModel(unsafe.Pointer(outptr_QAbstractItemModel))} +} + +// UnsafeNewQPdfBookmarkModel constructs the type using only unsafe pointers. +func UnsafeNewQPdfBookmarkModel(h unsafe.Pointer) *QPdfBookmarkModel { + return newQPdfBookmarkModel((*C.QPdfBookmarkModel)(h)) +} + +// NewQPdfBookmarkModel constructs a new QPdfBookmarkModel object. +func NewQPdfBookmarkModel() *QPdfBookmarkModel { + + return newQPdfBookmarkModel(C.QPdfBookmarkModel_new()) +} + +// NewQPdfBookmarkModel2 constructs a new QPdfBookmarkModel object. +func NewQPdfBookmarkModel2(parent *qt6.QObject) *QPdfBookmarkModel { + + return newQPdfBookmarkModel(C.QPdfBookmarkModel_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfBookmarkModel_metaObject(this.h))) +} + +func (this *QPdfBookmarkModel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfBookmarkModel_metacast(this.h, param1_Cstring)) +} + +func QPdfBookmarkModel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfBookmarkModel) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfBookmarkModel_document(this.h)) +} + +func (this *QPdfBookmarkModel) SetDocument(document *QPdfDocument) { + C.QPdfBookmarkModel_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfBookmarkModel) Data(index *qt6.QModelIndex, role int) *qt6.QVariant { + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_data(this.h, (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) Index(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex { + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_index(this.h, (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) Parent(index *qt6.QModelIndex) *qt6.QModelIndex { + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_parent(this.h, (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfBookmarkModel) RowCount(parent *qt6.QModelIndex) int { + return (int)(C.QPdfBookmarkModel_rowCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) ColumnCount(parent *qt6.QModelIndex) int { + return (int)(C.QPdfBookmarkModel_columnCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfBookmarkModel) RoleNames() map[int][]byte { + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_roleNames(this.h) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QPdfBookmarkModel) DocumentChanged(document *QPdfDocument) { + C.QPdfBookmarkModel_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfBookmarkModel) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfBookmarkModel_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfBookmarkModel_documentChanged +func miqt_exec_callback_QPdfBookmarkModel_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func QPdfBookmarkModel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfBookmarkModel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfBookmarkModel_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// CreateIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) CreateIndex(row int, column int) qt6.QModelIndex { + + var _dynamic_cast_ok C.bool = false + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_protectedbase_createIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EncodeData can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EncodeData(indexes []qt6.QModelIndex, stream *qt6.QDataStream) { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_encodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), indexes_ma, (*C.QDataStream)(stream.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// DecodeData can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) DecodeData(row int, column int, parent *qt6.QModelIndex, stream *qt6.QDataStream) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_decodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()), (*C.QDataStream)(stream.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// BeginInsertRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginInsertRows(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndInsertRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginRemoveRows(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndRemoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginMoveRows(sourceParent *qt6.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt6.QModelIndex, destinationRow int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_beginMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationRow))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveRows can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndMoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginInsertColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginInsertColumns(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndInsertColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginRemoveColumns(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndRemoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginMoveColumns(sourceParent *qt6.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt6.QModelIndex, destinationColumn int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_beginMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationColumn))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveColumns can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndMoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginResetModel can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) BeginResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_beginResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndResetModel can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) EndResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_endResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) ChangePersistentIndex(from *qt6.QModelIndex, to *qt6.QModelIndex) { + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_changePersistentIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(from.UnsafePointer()), (*C.QModelIndex)(to.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndexList can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) ChangePersistentIndexList(from []qt6.QModelIndex, to []qt6.QModelIndex) { + from_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(from)))) + defer C.free(unsafe.Pointer(from_CArray)) + for i := range from { + from_CArray[i] = (*C.QModelIndex)(from[i].UnsafePointer()) + } + from_ma := C.struct_miqt_array{len: C.size_t(len(from)), data: unsafe.Pointer(from_CArray)} + to_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(to)))) + defer C.free(unsafe.Pointer(to_CArray)) + for i := range to { + to_CArray[i] = (*C.QModelIndex)(to[i].UnsafePointer()) + } + to_ma := C.struct_miqt_array{len: C.size_t(len(to)), data: unsafe.Pointer(to_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfBookmarkModel_protectedbase_changePersistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h), from_ma, to_ma) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// PersistentIndexList can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) PersistentIndexList() []qt6.QModelIndex { + + var _dynamic_cast_ok C.bool = false + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_protectedbase_persistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + _ret := make([]qt6.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + _method_ret := _ret + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfBookmarkModel_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfBookmarkModel_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfBookmarkModel_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfBookmarkModel that was directly constructed. +func (this *QPdfBookmarkModel) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfBookmarkModel_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Data(index *qt6.QModelIndex, role int) *qt6.QVariant { + + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_data(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnData(slot func(super func(index *qt6.QModelIndex, role int) *qt6.QVariant, index *qt6.QModelIndex, role int) *qt6.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_data +func miqt_exec_callback_QPdfBookmarkModel_data(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, role int) *qt6.QVariant, index *qt6.QModelIndex, role int) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Index(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnIndex(slot func(super func(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_index +func miqt_exec_callback_QPdfBookmarkModel_index(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Parent(index *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_parent(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnParent(slot func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_parent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_parent +func miqt_exec_callback_QPdfBookmarkModel_parent(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Parent, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RowCount(parent *qt6.QModelIndex) int { + + return (int)(C.QPdfBookmarkModel_virtualbase_rowCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRowCount(slot func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) { + ok := C.QPdfBookmarkModel_override_virtual_rowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_rowCount +func miqt_exec_callback_QPdfBookmarkModel_rowCount(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ColumnCount(parent *qt6.QModelIndex) int { + + return (int)(C.QPdfBookmarkModel_virtualbase_columnCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnColumnCount(slot func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) { + ok := C.QPdfBookmarkModel_override_virtual_columnCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_columnCount +func miqt_exec_callback_QPdfBookmarkModel_columnCount(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ColumnCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_virtualbase_roleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfBookmarkModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + ok := C.QPdfBookmarkModel_override_virtual_roleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_roleNames +func miqt_exec_callback_QPdfBookmarkModel_roleNames(self *C.QPdfBookmarkModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + if len(virtualReturn_v) > 0 { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + } else { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Sibling(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(idx.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnSibling(slot func(super func(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_sibling +func miqt_exec_callback_QPdfBookmarkModel_sibling(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_HasChildren(parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_hasChildren(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnHasChildren(slot func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_hasChildren(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_hasChildren +func miqt_exec_callback_QPdfBookmarkModel_hasChildren(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_HasChildren, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetData(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_setData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfBookmarkModel) OnSetData(slot func(super func(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool, index *qt6.QModelIndex, value *qt6.QVariant, role int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setData +func miqt_exec_callback_QPdfBookmarkModel_setData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool, index *qt6.QModelIndex, value *qt6.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_HeaderData(section int, orientation qt6.Orientation, role int) *qt6.QVariant { + + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_headerData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnHeaderData(slot func(super func(section int, orientation qt6.Orientation, role int) *qt6.QVariant, section int, orientation qt6.Orientation, role int) *qt6.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_headerData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_headerData +func miqt_exec_callback_QPdfBookmarkModel_headerData(self *C.QPdfBookmarkModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt6.Orientation, role int) *qt6.QVariant, section int, orientation qt6.Orientation, role int) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt6.Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetHeaderData(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_setHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfBookmarkModel) OnSetHeaderData(slot func(super func(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool, section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setHeaderData +func miqt_exec_callback_QPdfBookmarkModel_setHeaderData(self *C.QPdfBookmarkModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool, section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt6.Orientation)(orientation) + + slotval3 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(role) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ItemData(index *qt6.QModelIndex) map[int]qt6.QVariant { + + var _mm C.struct_miqt_map = C.QPdfBookmarkModel_virtualbase_itemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())) + _ret := make(map[int]qt6.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_Values[i])) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfBookmarkModel) OnItemData(slot func(super func(index *qt6.QModelIndex) map[int]qt6.QVariant, index *qt6.QModelIndex) map[int]qt6.QVariant) { + ok := C.QPdfBookmarkModel_override_virtual_itemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_itemData +func miqt_exec_callback_QPdfBookmarkModel_itemData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) map[int]qt6.QVariant, index *qt6.QModelIndex) map[int]qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = (*C.QVariant)(virtualReturn_v.UnsafePointer()) + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SetItemData(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = (*C.QVariant)(roles_v.UnsafePointer()) + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QPdfBookmarkModel_virtualbase_setItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), roles_mm)) + +} +func (this *QPdfBookmarkModel) OnSetItemData(slot func(super func(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool, index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool) { + ok := C.QPdfBookmarkModel_override_virtual_setItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_setItemData +func miqt_exec_callback_QPdfBookmarkModel_setItemData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool, index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]qt6.QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(roles_Values[i])) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ClearItemData(index *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_clearItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnClearItemData(slot func(super func(index *qt6.QModelIndex) bool, index *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_clearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_clearItemData +func miqt_exec_callback_QPdfBookmarkModel_clearItemData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) bool, index *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_virtualbase_mimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QPdfBookmarkModel) OnMimeTypes(slot func(super func() []string) []string) { + ok := C.QPdfBookmarkModel_override_virtual_mimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_mimeTypes +func miqt_exec_callback_QPdfBookmarkModel_mimeTypes(self *C.QPdfBookmarkModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MimeData(indexes []qt6.QModelIndex) *qt6.QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_mimeData(unsafe.Pointer(this.h), indexes_ma))) + +} +func (this *QPdfBookmarkModel) OnMimeData(slot func(super func(indexes []qt6.QModelIndex) *qt6.QMimeData, indexes []qt6.QModelIndex) *qt6.QMimeData) { + ok := C.QPdfBookmarkModel_override_virtual_mimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_mimeData +func miqt_exec_callback_QPdfBookmarkModel_mimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []qt6.QModelIndex) *qt6.QMimeData, indexes []qt6.QModelIndex) *qt6.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]qt6.QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(indexes_outCast[i])) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MimeData, slotval1) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CanDropMimeData(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_canDropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnCanDropMimeData(slot func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_canDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_canDropMimeData +func miqt_exec_callback_QPdfBookmarkModel_canDropMimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt6.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_DropMimeData(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_dropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnDropMimeData(slot func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_dropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_dropMimeData +func miqt_exec_callback_QPdfBookmarkModel_dropMimeData(self *C.QPdfBookmarkModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt6.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SupportedDropActions() qt6.DropAction { + + return (qt6.DropAction)(C.QPdfBookmarkModel_virtualbase_supportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSupportedDropActions(slot func(super func() qt6.DropAction) qt6.DropAction) { + ok := C.QPdfBookmarkModel_override_virtual_supportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_supportedDropActions +func miqt_exec_callback_QPdfBookmarkModel_supportedDropActions(self *C.QPdfBookmarkModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt6.DropAction) qt6.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_SupportedDragActions() qt6.DropAction { + + return (qt6.DropAction)(C.QPdfBookmarkModel_virtualbase_supportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSupportedDragActions(slot func(super func() qt6.DropAction) qt6.DropAction) { + ok := C.QPdfBookmarkModel_override_virtual_supportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_supportedDragActions +func miqt_exec_callback_QPdfBookmarkModel_supportedDragActions(self *C.QPdfBookmarkModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt6.DropAction) qt6.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_InsertRows(row int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_insertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnInsertRows(slot func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_insertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_insertRows +func miqt_exec_callback_QPdfBookmarkModel_insertRows(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_InsertColumns(column int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_insertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnInsertColumns(slot func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_insertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_insertColumns +func miqt_exec_callback_QPdfBookmarkModel_insertColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RemoveRows(row int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_removeRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRemoveRows(slot func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_removeRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_removeRows +func miqt_exec_callback_QPdfBookmarkModel_removeRows(self *C.QPdfBookmarkModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_RemoveColumns(column int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_removeColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnRemoveColumns(slot func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_removeColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_removeColumns +func miqt_exec_callback_QPdfBookmarkModel_removeColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MoveRows(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_moveRows(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceRow), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfBookmarkModel) OnMoveRows(slot func(super func(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_moveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_moveRows +func miqt_exec_callback_QPdfBookmarkModel_moveRows(self *C.QPdfBookmarkModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MoveColumns(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_moveColumns(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceColumn), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfBookmarkModel) OnMoveColumns(slot func(super func(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) { + ok := C.QPdfBookmarkModel_override_virtual_moveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_moveColumns +func miqt_exec_callback_QPdfBookmarkModel_moveColumns(self *C.QPdfBookmarkModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_FetchMore(parent *qt6.QModelIndex) { + + C.QPdfBookmarkModel_virtualbase_fetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnFetchMore(slot func(super func(parent *qt6.QModelIndex), parent *qt6.QModelIndex)) { + ok := C.QPdfBookmarkModel_override_virtual_fetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_fetchMore +func miqt_exec_callback_QPdfBookmarkModel_fetchMore(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex), parent *qt6.QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CanFetchMore(parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_canFetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnCanFetchMore(slot func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) { + ok := C.QPdfBookmarkModel_override_virtual_canFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_canFetchMore +func miqt_exec_callback_QPdfBookmarkModel_canFetchMore(self *C.QPdfBookmarkModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Flags(index *qt6.QModelIndex) qt6.ItemFlag { + + return (qt6.ItemFlag)(C.QPdfBookmarkModel_virtualbase_flags(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnFlags(slot func(super func(index *qt6.QModelIndex) qt6.ItemFlag, index *qt6.QModelIndex) qt6.ItemFlag) { + ok := C.QPdfBookmarkModel_override_virtual_flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_flags +func miqt_exec_callback_QPdfBookmarkModel_flags(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) qt6.ItemFlag, index *qt6.QModelIndex) qt6.ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Sort(column int, order qt6.SortOrder) { + + C.QPdfBookmarkModel_virtualbase_sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QPdfBookmarkModel) OnSort(slot func(super func(column int, order qt6.SortOrder), column int, order qt6.SortOrder)) { + ok := C.QPdfBookmarkModel_override_virtual_sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_sort +func miqt_exec_callback_QPdfBookmarkModel_sort(self *C.QPdfBookmarkModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order qt6.SortOrder), column int, order qt6.SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (qt6.SortOrder)(order) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Buddy(index *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_buddy(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnBuddy(slot func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_buddy +func miqt_exec_callback_QPdfBookmarkModel_buddy(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Buddy, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Match(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex { + + var _ma C.struct_miqt_array = C.QPdfBookmarkModel_virtualbase_match(unsafe.Pointer(this.h), (*C.QModelIndex)(start.UnsafePointer()), (C.int)(role), (*C.QVariant)(value.UnsafePointer()), (C.int)(hits), (C.int)(flags)) + _ret := make([]qt6.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QPdfBookmarkModel) OnMatch(slot func(super func(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex, start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex) { + ok := C.QPdfBookmarkModel_override_virtual_match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_match +func miqt_exec_callback_QPdfBookmarkModel_match(self *C.QPdfBookmarkModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex, start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(start)) + + slotval2 := (int)(role) + + slotval3 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(hits) + + slotval5 := (qt6.MatchFlag)(flags) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (*C.QModelIndex)(virtualReturn[i].UnsafePointer()) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Span(index *qt6.QModelIndex) *qt6.QSize { + + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfBookmarkModel_virtualbase_span(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfBookmarkModel) OnSpan(slot func(super func(index *qt6.QModelIndex) *qt6.QSize, index *qt6.QModelIndex) *qt6.QSize) { + ok := C.QPdfBookmarkModel_override_virtual_span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_span +func miqt_exec_callback_QPdfBookmarkModel_span(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) *qt6.QSize, index *qt6.QModelIndex) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Span, slotval1) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_MultiData(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan) { + + C.QPdfBookmarkModel_virtualbase_multiData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QModelRoleDataSpan)(roleDataSpan.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnMultiData(slot func(super func(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan), index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan)) { + ok := C.QPdfBookmarkModel_override_virtual_multiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_multiData +func miqt_exec_callback_QPdfBookmarkModel_multiData(self *C.QPdfBookmarkModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan), index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + roleDataSpan_goptr := qt6.UnsafeNewQModelRoleDataSpan(unsafe.Pointer(roleDataSpan)) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *roleDataSpan_goptr + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Submit() bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_submit(unsafe.Pointer(this.h))) + +} +func (this *QPdfBookmarkModel) OnSubmit(slot func(super func() bool) bool) { + ok := C.QPdfBookmarkModel_override_virtual_submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_submit +func miqt_exec_callback_QPdfBookmarkModel_submit(self *C.QPdfBookmarkModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Revert() { + + C.QPdfBookmarkModel_virtualbase_revert(unsafe.Pointer(this.h)) + +} +func (this *QPdfBookmarkModel) OnRevert(slot func(super func())) { + ok := C.QPdfBookmarkModel_override_virtual_revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_revert +func miqt_exec_callback_QPdfBookmarkModel_revert(self *C.QPdfBookmarkModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ResetInternalData() { + + C.QPdfBookmarkModel_virtualbase_resetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QPdfBookmarkModel) OnResetInternalData(slot func(super func())) { + ok := C.QPdfBookmarkModel_override_virtual_resetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_resetInternalData +func miqt_exec_callback_QPdfBookmarkModel_resetInternalData(self *C.QPdfBookmarkModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ResetInternalData) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + ok := C.QPdfBookmarkModel_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_event +func miqt_exec_callback_QPdfBookmarkModel_event(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QPdfBookmarkModel_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfBookmarkModel) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + ok := C.QPdfBookmarkModel_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_eventFilter +func miqt_exec_callback_QPdfBookmarkModel_eventFilter(self *C.QPdfBookmarkModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfBookmarkModel_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_timerEvent +func miqt_exec_callback_QPdfBookmarkModel_timerEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfBookmarkModel_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_childEvent +func miqt_exec_callback_QPdfBookmarkModel_childEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfBookmarkModel_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfBookmarkModel_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_customEvent +func miqt_exec_callback_QPdfBookmarkModel_customEvent(self *C.QPdfBookmarkModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfBookmarkModel_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfBookmarkModel_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_connectNotify +func miqt_exec_callback_QPdfBookmarkModel_connectNotify(self *C.QPdfBookmarkModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfBookmarkModel) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfBookmarkModel_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfBookmarkModel) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfBookmarkModel_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfBookmarkModel_disconnectNotify +func miqt_exec_callback_QPdfBookmarkModel_disconnectNotify(self *C.QPdfBookmarkModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfBookmarkModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfBookmarkModel) Delete() { + C.QPdfBookmarkModel_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfBookmarkModel) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfBookmarkModel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfbookmarkmodel.h b/qt6/pdf/gen_qpdfbookmarkmodel.h new file mode 100644 index 00000000..e23351d6 --- /dev/null +++ b/qt6/pdf/gen_qpdfbookmarkmodel.h @@ -0,0 +1,187 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFBOOKMARKMODEL_H +#define MIQT_QT6_PDF_GEN_QPDFBOOKMARKMODEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractItemModel; +class QChildEvent; +class QDataStream; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QMimeData; +class QModelIndex; +class QModelRoleDataSpan; +class QObject; +class QPdfBookmarkModel; +class QPdfDocument; +class QSize; +class QTimerEvent; +class QVariant; +#else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QChildEvent QChildEvent; +typedef struct QDataStream QDataStream; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QModelRoleDataSpan QModelRoleDataSpan; +typedef struct QObject QObject; +typedef struct QPdfBookmarkModel QPdfBookmarkModel; +typedef struct QPdfDocument QPdfDocument; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfBookmarkModel* QPdfBookmarkModel_new(); +QPdfBookmarkModel* QPdfBookmarkModel_new2(QObject* parent); +void QPdfBookmarkModel_virtbase(QPdfBookmarkModel* src, QAbstractItemModel** outptr_QAbstractItemModel); +QMetaObject* QPdfBookmarkModel_metaObject(const QPdfBookmarkModel* self); +void* QPdfBookmarkModel_metacast(QPdfBookmarkModel* self, const char* param1); +struct miqt_string QPdfBookmarkModel_tr(const char* s); +QPdfDocument* QPdfBookmarkModel_document(const QPdfBookmarkModel* self); +void QPdfBookmarkModel_setDocument(QPdfBookmarkModel* self, QPdfDocument* document); +QVariant* QPdfBookmarkModel_data(const QPdfBookmarkModel* self, QModelIndex* index, int role); +QModelIndex* QPdfBookmarkModel_index(const QPdfBookmarkModel* self, int row, int column, QModelIndex* parent); +QModelIndex* QPdfBookmarkModel_parent(const QPdfBookmarkModel* self, QModelIndex* index); +int QPdfBookmarkModel_rowCount(const QPdfBookmarkModel* self, QModelIndex* parent); +int QPdfBookmarkModel_columnCount(const QPdfBookmarkModel* self, QModelIndex* parent); +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_roleNames(const QPdfBookmarkModel* self); +void QPdfBookmarkModel_documentChanged(QPdfBookmarkModel* self, QPdfDocument* document); +void QPdfBookmarkModel_connect_documentChanged(QPdfBookmarkModel* self, intptr_t slot); +struct miqt_string QPdfBookmarkModel_tr2(const char* s, const char* c); +struct miqt_string QPdfBookmarkModel_tr3(const char* s, const char* c, int n); +bool QPdfBookmarkModel_override_virtual_data(void* self, intptr_t slot); +QVariant* QPdfBookmarkModel_virtualbase_data(const void* self, QModelIndex* index, int role); +bool QPdfBookmarkModel_override_virtual_index(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_parent(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_parent(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_rowCount(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_rowCount(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_columnCount(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_columnCount(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_roleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QPdfBookmarkModel_virtualbase_roleNames(const void* self); +bool QPdfBookmarkModel_override_virtual_sibling(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); +bool QPdfBookmarkModel_override_virtual_hasChildren(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_hasChildren(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_setData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); +bool QPdfBookmarkModel_override_virtual_headerData(void* self, intptr_t slot); +QVariant* QPdfBookmarkModel_virtualbase_headerData(const void* self, int section, int orientation, int role); +bool QPdfBookmarkModel_override_virtual_setHeaderData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); +bool QPdfBookmarkModel_override_virtual_itemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QPdfBookmarkModel_virtualbase_itemData(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_setItemData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +bool QPdfBookmarkModel_override_virtual_clearItemData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_clearItemData(void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_mimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QPdfBookmarkModel_virtualbase_mimeTypes(const void* self); +bool QPdfBookmarkModel_override_virtual_mimeData(void* self, intptr_t slot); +QMimeData* QPdfBookmarkModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +bool QPdfBookmarkModel_override_virtual_canDropMimeData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_dropMimeData(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_supportedDropActions(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_supportedDropActions(const void* self); +bool QPdfBookmarkModel_override_virtual_supportedDragActions(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_supportedDragActions(const void* self); +bool QPdfBookmarkModel_override_virtual_insertRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_insertColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_removeRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_removeColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_moveRows(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfBookmarkModel_override_virtual_moveColumns(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfBookmarkModel_override_virtual_fetchMore(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_fetchMore(void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_canFetchMore(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); +bool QPdfBookmarkModel_override_virtual_flags(void* self, intptr_t slot); +int QPdfBookmarkModel_virtualbase_flags(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_sort(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_sort(void* self, int column, int order); +bool QPdfBookmarkModel_override_virtual_buddy(void* self, intptr_t slot); +QModelIndex* QPdfBookmarkModel_virtualbase_buddy(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +bool QPdfBookmarkModel_override_virtual_span(void* self, intptr_t slot); +QSize* QPdfBookmarkModel_virtualbase_span(const void* self, QModelIndex* index); +bool QPdfBookmarkModel_override_virtual_multiData(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +bool QPdfBookmarkModel_override_virtual_submit(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_submit(void* self); +bool QPdfBookmarkModel_override_virtual_revert(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_revert(void* self); +bool QPdfBookmarkModel_override_virtual_resetInternalData(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_resetInternalData(void* self); +bool QPdfBookmarkModel_override_virtual_event(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_event(void* self, QEvent* event); +bool QPdfBookmarkModel_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfBookmarkModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfBookmarkModel_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfBookmarkModel_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfBookmarkModel_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfBookmarkModel_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfBookmarkModel_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfBookmarkModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QModelIndex* QPdfBookmarkModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); +void QPdfBookmarkModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); +bool QPdfBookmarkModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); +void QPdfBookmarkModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); +bool QPdfBookmarkModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); +void QPdfBookmarkModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfBookmarkModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); +bool QPdfBookmarkModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); +void QPdfBookmarkModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfBookmarkModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); +void QPdfBookmarkModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); +struct miqt_array /* of QModelIndex* */ QPdfBookmarkModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); +QObject* QPdfBookmarkModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfBookmarkModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfBookmarkModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfBookmarkModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfBookmarkModel_delete(QPdfBookmarkModel* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfdocument.cpp b/qt6/pdf/gen_qpdfdocument.cpp new file mode 100644 index 00000000..d06eb453 --- /dev/null +++ b/qt6/pdf/gen_qpdfdocument.cpp @@ -0,0 +1,554 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfdocument.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfDocument_passwordChanged(intptr_t); +void miqt_exec_callback_QPdfDocument_passwordRequired(intptr_t); +void miqt_exec_callback_QPdfDocument_statusChanged(intptr_t, int); +void miqt_exec_callback_QPdfDocument_pageCountChanged(intptr_t, int); +void miqt_exec_callback_QPdfDocument_pageModelChanged(intptr_t); +bool miqt_exec_callback_QPdfDocument_event(QPdfDocument*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfDocument_eventFilter(QPdfDocument*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfDocument_timerEvent(QPdfDocument*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfDocument_childEvent(QPdfDocument*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfDocument_customEvent(QPdfDocument*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfDocument_connectNotify(QPdfDocument*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfDocument_disconnectNotify(QPdfDocument*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfDocument final : public QPdfDocument { +public: + + MiqtVirtualQPdfDocument(): QPdfDocument() {}; + MiqtVirtualQPdfDocument(QObject* parent): QPdfDocument(parent) {}; + + virtual ~MiqtVirtualQPdfDocument() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfDocument::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfDocument_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfDocument_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfDocument::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfDocument_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfDocument::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfDocument::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfDocument::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfDocument_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfDocument::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfDocument_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfDocument::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfDocument_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfDocument* QPdfDocument_new() { + return new MiqtVirtualQPdfDocument(); +} + +QPdfDocument* QPdfDocument_new2(QObject* parent) { + return new MiqtVirtualQPdfDocument(parent); +} + +void QPdfDocument_virtbase(QPdfDocument* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfDocument_metaObject(const QPdfDocument* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfDocument_metacast(QPdfDocument* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfDocument_tr(const char* s) { + QString _ret = QPdfDocument::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QPdfDocument_load(QPdfDocument* self, struct miqt_string fileName) { + QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); + QPdfDocument::Error _ret = self->load(fileName_QString); + return static_cast(_ret); +} + +int QPdfDocument_status(const QPdfDocument* self) { + QPdfDocument::Status _ret = self->status(); + return static_cast(_ret); +} + +void QPdfDocument_loadWithDevice(QPdfDocument* self, QIODevice* device) { + self->load(device); +} + +void QPdfDocument_setPassword(QPdfDocument* self, struct miqt_string password) { + QString password_QString = QString::fromUtf8(password.data, password.len); + self->setPassword(password_QString); +} + +struct miqt_string QPdfDocument_password(const QPdfDocument* self) { + QString _ret = self->password(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QVariant* QPdfDocument_metaData(const QPdfDocument* self, int field) { + return new QVariant(self->metaData(static_cast(field))); +} + +int QPdfDocument_error(const QPdfDocument* self) { + QPdfDocument::Error _ret = self->error(); + return static_cast(_ret); +} + +void QPdfDocument_close(QPdfDocument* self) { + self->close(); +} + +int QPdfDocument_pageCount(const QPdfDocument* self) { + return self->pageCount(); +} + +QSizeF* QPdfDocument_pagePointSize(const QPdfDocument* self, int page) { + return new QSizeF(self->pagePointSize(static_cast(page))); +} + +struct miqt_string QPdfDocument_pageLabel(QPdfDocument* self, int page) { + QString _ret = self->pageLabel(static_cast(page)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QAbstractListModel* QPdfDocument_pageModel(QPdfDocument* self) { + return self->pageModel(); +} + +QImage* QPdfDocument_render(QPdfDocument* self, int page, QSize* imageSize) { + return new QImage(self->render(static_cast(page), *imageSize)); +} + +QPdfSelection* QPdfDocument_getSelection(QPdfDocument* self, int page, QPointF* start, QPointF* end) { + return new QPdfSelection(self->getSelection(static_cast(page), *start, *end)); +} + +QPdfSelection* QPdfDocument_getSelectionAtIndex(QPdfDocument* self, int page, int startIndex, int maxLength) { + return new QPdfSelection(self->getSelectionAtIndex(static_cast(page), static_cast(startIndex), static_cast(maxLength))); +} + +QPdfSelection* QPdfDocument_getAllText(QPdfDocument* self, int page) { + return new QPdfSelection(self->getAllText(static_cast(page))); +} + +void QPdfDocument_passwordChanged(QPdfDocument* self) { + self->passwordChanged(); +} + +void QPdfDocument_connect_passwordChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::passwordChanged), self, [=]() { + miqt_exec_callback_QPdfDocument_passwordChanged(slot); + }); +} + +void QPdfDocument_passwordRequired(QPdfDocument* self) { + self->passwordRequired(); +} + +void QPdfDocument_connect_passwordRequired(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::passwordRequired), self, [=]() { + miqt_exec_callback_QPdfDocument_passwordRequired(slot); + }); +} + +void QPdfDocument_statusChanged(QPdfDocument* self, int status) { + self->statusChanged(static_cast(status)); +} + +void QPdfDocument_connect_statusChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::statusChanged), self, [=](QPdfDocument::Status status) { + QPdfDocument::Status status_ret = status; + int sigval1 = static_cast(status_ret); + miqt_exec_callback_QPdfDocument_statusChanged(slot, sigval1); + }); +} + +void QPdfDocument_pageCountChanged(QPdfDocument* self, int pageCount) { + self->pageCountChanged(static_cast(pageCount)); +} + +void QPdfDocument_connect_pageCountChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::pageCountChanged), self, [=](int pageCount) { + int sigval1 = pageCount; + miqt_exec_callback_QPdfDocument_pageCountChanged(slot, sigval1); + }); +} + +void QPdfDocument_pageModelChanged(QPdfDocument* self) { + self->pageModelChanged(); +} + +void QPdfDocument_connect_pageModelChanged(QPdfDocument* self, intptr_t slot) { + MiqtVirtualQPdfDocument::connect(self, static_cast(&QPdfDocument::pageModelChanged), self, [=]() { + miqt_exec_callback_QPdfDocument_pageModelChanged(slot); + }); +} + +struct miqt_string QPdfDocument_tr2(const char* s, const char* c) { + QString _ret = QPdfDocument::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfDocument_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfDocument::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QImage* QPdfDocument_render2(QPdfDocument* self, int page, QSize* imageSize, QPdfDocumentRenderOptions* options) { + return new QImage(self->render(static_cast(page), *imageSize, *options)); +} + +bool QPdfDocument_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfDocument_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::event(event); + +} + +bool QPdfDocument_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::eventFilter(watched, event); + +} + +bool QPdfDocument_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::timerEvent(event); + +} + +bool QPdfDocument_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::childEvent(event); + +} + +bool QPdfDocument_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::customEvent(event); + +} + +bool QPdfDocument_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::connectNotify(*signal); + +} + +bool QPdfDocument_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfDocument*)(self) )->QPdfDocument::disconnectNotify(*signal); + +} + +QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfDocument* self_cast = dynamic_cast( (QPdfDocument*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfDocument_delete(QPdfDocument* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfdocument.go b/qt6/pdf/gen_qpdfdocument.go new file mode 100644 index 00000000..67c556ad --- /dev/null +++ b/qt6/pdf/gen_qpdfdocument.go @@ -0,0 +1,595 @@ +package pdf + +/* + +#include "gen_qpdfdocument.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfDocument__Status int + +const ( + QPdfDocument__Status__Null QPdfDocument__Status = 0 + QPdfDocument__Status__Loading QPdfDocument__Status = 1 + QPdfDocument__Status__Ready QPdfDocument__Status = 2 + QPdfDocument__Status__Unloading QPdfDocument__Status = 3 + QPdfDocument__Status__Error QPdfDocument__Status = 4 +) + +type QPdfDocument__Error int + +const ( + QPdfDocument__None QPdfDocument__Error = 0 + QPdfDocument__Unknown QPdfDocument__Error = 1 + QPdfDocument__DataNotYetAvailable QPdfDocument__Error = 2 + QPdfDocument__FileNotFound QPdfDocument__Error = 3 + QPdfDocument__InvalidFileFormat QPdfDocument__Error = 4 + QPdfDocument__IncorrectPassword QPdfDocument__Error = 5 + QPdfDocument__UnsupportedSecurityScheme QPdfDocument__Error = 6 +) + +type QPdfDocument__MetaDataField int + +const ( + QPdfDocument__Title QPdfDocument__MetaDataField = 0 + QPdfDocument__Subject QPdfDocument__MetaDataField = 1 + QPdfDocument__Author QPdfDocument__MetaDataField = 2 + QPdfDocument__Keywords QPdfDocument__MetaDataField = 3 + QPdfDocument__Producer QPdfDocument__MetaDataField = 4 + QPdfDocument__Creator QPdfDocument__MetaDataField = 5 + QPdfDocument__CreationDate QPdfDocument__MetaDataField = 6 + QPdfDocument__ModificationDate QPdfDocument__MetaDataField = 7 +) + +type QPdfDocument__PageModelRole int + +const ( + QPdfDocument__Label QPdfDocument__PageModelRole = 256 + QPdfDocument__PointSize QPdfDocument__PageModelRole = 257 + QPdfDocument__NRoles QPdfDocument__PageModelRole = 258 +) + +type QPdfDocument struct { + h *C.QPdfDocument + *qt6.QObject +} + +func (this *QPdfDocument) cPointer() *C.QPdfDocument { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfDocument) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfDocument constructs the type using only CGO pointers. +func newQPdfDocument(h *C.QPdfDocument) *QPdfDocument { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfDocument_virtbase(h, &outptr_QObject) + + return &QPdfDocument{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfDocument constructs the type using only unsafe pointers. +func UnsafeNewQPdfDocument(h unsafe.Pointer) *QPdfDocument { + return newQPdfDocument((*C.QPdfDocument)(h)) +} + +// NewQPdfDocument constructs a new QPdfDocument object. +func NewQPdfDocument() *QPdfDocument { + + return newQPdfDocument(C.QPdfDocument_new()) +} + +// NewQPdfDocument2 constructs a new QPdfDocument object. +func NewQPdfDocument2(parent *qt6.QObject) *QPdfDocument { + + return newQPdfDocument(C.QPdfDocument_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfDocument) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfDocument_metaObject(this.h))) +} + +func (this *QPdfDocument) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfDocument_metacast(this.h, param1_Cstring)) +} + +func QPdfDocument_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) Load(fileName string) QPdfDocument__Error { + fileName_ms := C.struct_miqt_string{} + fileName_ms.data = C.CString(fileName) + fileName_ms.len = C.size_t(len(fileName)) + defer C.free(unsafe.Pointer(fileName_ms.data)) + return (QPdfDocument__Error)(C.QPdfDocument_load(this.h, fileName_ms)) +} + +func (this *QPdfDocument) Status() QPdfDocument__Status { + return (QPdfDocument__Status)(C.QPdfDocument_status(this.h)) +} + +func (this *QPdfDocument) LoadWithDevice(device *qt6.QIODevice) { + C.QPdfDocument_loadWithDevice(this.h, (*C.QIODevice)(device.UnsafePointer())) +} + +func (this *QPdfDocument) SetPassword(password string) { + password_ms := C.struct_miqt_string{} + password_ms.data = C.CString(password) + password_ms.len = C.size_t(len(password)) + defer C.free(unsafe.Pointer(password_ms.data)) + C.QPdfDocument_setPassword(this.h, password_ms) +} + +func (this *QPdfDocument) Password() string { + var _ms C.struct_miqt_string = C.QPdfDocument_password(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) MetaData(field QPdfDocument__MetaDataField) *qt6.QVariant { + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfDocument_metaData(this.h, (C.int)(field)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) Error() QPdfDocument__Error { + return (QPdfDocument__Error)(C.QPdfDocument_error(this.h)) +} + +func (this *QPdfDocument) Close() { + C.QPdfDocument_close(this.h) +} + +func (this *QPdfDocument) PageCount() int { + return (int)(C.QPdfDocument_pageCount(this.h)) +} + +func (this *QPdfDocument) PagePointSize(page int) *qt6.QSizeF { + _goptr := qt6.UnsafeNewQSizeF(unsafe.Pointer(C.QPdfDocument_pagePointSize(this.h, (C.int)(page)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) PageLabel(page int) string { + var _ms C.struct_miqt_string = C.QPdfDocument_pageLabel(this.h, (C.int)(page)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) PageModel() *qt6.QAbstractListModel { + return qt6.UnsafeNewQAbstractListModel(unsafe.Pointer(C.QPdfDocument_pageModel(this.h))) +} + +func (this *QPdfDocument) Render(page int, imageSize qt6.QSize) *qt6.QImage { + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QPdfDocument_render(this.h, (C.int)(page), (*C.QSize)(imageSize.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetSelection(page int, start qt6.QPointF, end qt6.QPointF) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getSelection(this.h, (C.int)(page), (*C.QPointF)(start.UnsafePointer()), (*C.QPointF)(end.UnsafePointer()))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetSelectionAtIndex(page int, startIndex int, maxLength int) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getSelectionAtIndex(this.h, (C.int)(page), (C.int)(startIndex), (C.int)(maxLength))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) GetAllText(page int) *QPdfSelection { + _goptr := newQPdfSelection(C.QPdfDocument_getAllText(this.h, (C.int)(page))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocument) PasswordChanged() { + C.QPdfDocument_passwordChanged(this.h) +} +func (this *QPdfDocument) OnPasswordChanged(slot func()) { + C.QPdfDocument_connect_passwordChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_passwordChanged +func miqt_exec_callback_QPdfDocument_passwordChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfDocument) PasswordRequired() { + C.QPdfDocument_passwordRequired(this.h) +} +func (this *QPdfDocument) OnPasswordRequired(slot func()) { + C.QPdfDocument_connect_passwordRequired(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_passwordRequired +func miqt_exec_callback_QPdfDocument_passwordRequired(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfDocument) StatusChanged(status QPdfDocument__Status) { + C.QPdfDocument_statusChanged(this.h, (C.int)(status)) +} +func (this *QPdfDocument) OnStatusChanged(slot func(status QPdfDocument__Status)) { + C.QPdfDocument_connect_statusChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_statusChanged +func miqt_exec_callback_QPdfDocument_statusChanged(cb C.intptr_t, status C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(status QPdfDocument__Status)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfDocument__Status)(status) + + gofunc(slotval1) +} + +func (this *QPdfDocument) PageCountChanged(pageCount int) { + C.QPdfDocument_pageCountChanged(this.h, (C.int)(pageCount)) +} +func (this *QPdfDocument) OnPageCountChanged(slot func(pageCount int)) { + C.QPdfDocument_connect_pageCountChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_pageCountChanged +func miqt_exec_callback_QPdfDocument_pageCountChanged(cb C.intptr_t, pageCount C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageCount int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageCount) + + gofunc(slotval1) +} + +func (this *QPdfDocument) PageModelChanged() { + C.QPdfDocument_pageModelChanged(this.h) +} +func (this *QPdfDocument) OnPageModelChanged(slot func()) { + C.QPdfDocument_connect_pageModelChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfDocument_pageModelChanged +func miqt_exec_callback_QPdfDocument_pageModelChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QPdfDocument_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfDocument_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfDocument_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfDocument) Render2(page int, imageSize qt6.QSize, options QPdfDocumentRenderOptions) *qt6.QImage { + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QPdfDocument_render2(this.h, (C.int)(page), (*C.QSize)(imageSize.UnsafePointer()), options.cPointer()))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Sender can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfDocument_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfDocument_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfDocument_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfDocument that was directly constructed. +func (this *QPdfDocument) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfDocument_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfDocument) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPdfDocument_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfDocument) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + ok := C.QPdfDocument_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_event +func miqt_exec_callback_QPdfDocument_event(self *C.QPdfDocument, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfDocument{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfDocument) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QPdfDocument_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfDocument) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + ok := C.QPdfDocument_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_eventFilter +func miqt_exec_callback_QPdfDocument_eventFilter(self *C.QPdfDocument, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfDocument{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfDocument) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfDocument_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfDocument_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_timerEvent +func miqt_exec_callback_QPdfDocument_timerEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfDocument_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfDocument_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_childEvent +func miqt_exec_callback_QPdfDocument_childEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfDocument_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfDocument) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfDocument_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_customEvent +func miqt_exec_callback_QPdfDocument_customEvent(self *C.QPdfDocument, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfDocument_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfDocument) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfDocument_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_connectNotify +func miqt_exec_callback_QPdfDocument_connectNotify(self *C.QPdfDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfDocument) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfDocument_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfDocument) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfDocument_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfDocument_disconnectNotify +func miqt_exec_callback_QPdfDocument_disconnectNotify(self *C.QPdfDocument, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfDocument{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfDocument) Delete() { + C.QPdfDocument_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfDocument) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfDocument) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfdocument.h b/qt6/pdf/gen_qpdfdocument.h new file mode 100644 index 00000000..d268d373 --- /dev/null +++ b/qt6/pdf/gen_qpdfdocument.h @@ -0,0 +1,112 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFDOCUMENT_H +#define MIQT_QT6_PDF_GEN_QPDFDOCUMENT_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractListModel; +class QChildEvent; +class QEvent; +class QIODevice; +class QImage; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfDocument; +class QPdfDocumentRenderOptions; +class QPdfSelection; +class QPointF; +class QSize; +class QSizeF; +class QTimerEvent; +class QVariant; +#else +typedef struct QAbstractListModel QAbstractListModel; +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QIODevice QIODevice; +typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QPdfSelection QPdfSelection; +typedef struct QPointF QPointF; +typedef struct QSize QSize; +typedef struct QSizeF QSizeF; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfDocument* QPdfDocument_new(); +QPdfDocument* QPdfDocument_new2(QObject* parent); +void QPdfDocument_virtbase(QPdfDocument* src, QObject** outptr_QObject); +QMetaObject* QPdfDocument_metaObject(const QPdfDocument* self); +void* QPdfDocument_metacast(QPdfDocument* self, const char* param1); +struct miqt_string QPdfDocument_tr(const char* s); +int QPdfDocument_load(QPdfDocument* self, struct miqt_string fileName); +int QPdfDocument_status(const QPdfDocument* self); +void QPdfDocument_loadWithDevice(QPdfDocument* self, QIODevice* device); +void QPdfDocument_setPassword(QPdfDocument* self, struct miqt_string password); +struct miqt_string QPdfDocument_password(const QPdfDocument* self); +QVariant* QPdfDocument_metaData(const QPdfDocument* self, int field); +int QPdfDocument_error(const QPdfDocument* self); +void QPdfDocument_close(QPdfDocument* self); +int QPdfDocument_pageCount(const QPdfDocument* self); +QSizeF* QPdfDocument_pagePointSize(const QPdfDocument* self, int page); +struct miqt_string QPdfDocument_pageLabel(QPdfDocument* self, int page); +QAbstractListModel* QPdfDocument_pageModel(QPdfDocument* self); +QImage* QPdfDocument_render(QPdfDocument* self, int page, QSize* imageSize); +QPdfSelection* QPdfDocument_getSelection(QPdfDocument* self, int page, QPointF* start, QPointF* end); +QPdfSelection* QPdfDocument_getSelectionAtIndex(QPdfDocument* self, int page, int startIndex, int maxLength); +QPdfSelection* QPdfDocument_getAllText(QPdfDocument* self, int page); +void QPdfDocument_passwordChanged(QPdfDocument* self); +void QPdfDocument_connect_passwordChanged(QPdfDocument* self, intptr_t slot); +void QPdfDocument_passwordRequired(QPdfDocument* self); +void QPdfDocument_connect_passwordRequired(QPdfDocument* self, intptr_t slot); +void QPdfDocument_statusChanged(QPdfDocument* self, int status); +void QPdfDocument_connect_statusChanged(QPdfDocument* self, intptr_t slot); +void QPdfDocument_pageCountChanged(QPdfDocument* self, int pageCount); +void QPdfDocument_connect_pageCountChanged(QPdfDocument* self, intptr_t slot); +void QPdfDocument_pageModelChanged(QPdfDocument* self); +void QPdfDocument_connect_pageModelChanged(QPdfDocument* self, intptr_t slot); +struct miqt_string QPdfDocument_tr2(const char* s, const char* c); +struct miqt_string QPdfDocument_tr3(const char* s, const char* c, int n); +QImage* QPdfDocument_render2(QPdfDocument* self, int page, QSize* imageSize, QPdfDocumentRenderOptions* options); +bool QPdfDocument_override_virtual_event(void* self, intptr_t slot); +bool QPdfDocument_virtualbase_event(void* self, QEvent* event); +bool QPdfDocument_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfDocument_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfDocument_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfDocument_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfDocument_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfDocument_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfDocument_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfDocument_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfDocument_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfDocument_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QObject* QPdfDocument_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfDocument_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfDocument_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfDocument_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfDocument_delete(QPdfDocument* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfdocumentrenderoptions.cpp b/qt6/pdf/gen_qpdfdocumentrenderoptions.cpp new file mode 100644 index 00000000..248b7ba7 --- /dev/null +++ b/qt6/pdf/gen_qpdfdocumentrenderoptions.cpp @@ -0,0 +1,60 @@ +#include +#include +#include +#include +#include "gen_qpdfdocumentrenderoptions.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new() { + return new QPdfDocumentRenderOptions(); +} + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new2(QPdfDocumentRenderOptions* param1) { + return new QPdfDocumentRenderOptions(*param1); +} + +int QPdfDocumentRenderOptions_rotation(const QPdfDocumentRenderOptions* self) { + QPdfDocumentRenderOptions::Rotation _ret = self->rotation(); + return static_cast(_ret); +} + +void QPdfDocumentRenderOptions_setRotation(QPdfDocumentRenderOptions* self, int r) { + self->setRotation(static_cast(r)); +} + +int QPdfDocumentRenderOptions_renderFlags(const QPdfDocumentRenderOptions* self) { + QPdfDocumentRenderOptions::RenderFlags _ret = self->renderFlags(); + return static_cast(_ret); +} + +void QPdfDocumentRenderOptions_setRenderFlags(QPdfDocumentRenderOptions* self, int r) { + self->setRenderFlags(static_cast(r)); +} + +QRect* QPdfDocumentRenderOptions_scaledClipRect(const QPdfDocumentRenderOptions* self) { + return new QRect(self->scaledClipRect()); +} + +void QPdfDocumentRenderOptions_setScaledClipRect(QPdfDocumentRenderOptions* self, QRect* r) { + self->setScaledClipRect(*r); +} + +QSize* QPdfDocumentRenderOptions_scaledSize(const QPdfDocumentRenderOptions* self) { + return new QSize(self->scaledSize()); +} + +void QPdfDocumentRenderOptions_setScaledSize(QPdfDocumentRenderOptions* self, QSize* s) { + self->setScaledSize(*s); +} + +void QPdfDocumentRenderOptions_delete(QPdfDocumentRenderOptions* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfdocumentrenderoptions.go b/qt6/pdf/gen_qpdfdocumentrenderoptions.go new file mode 100644 index 00000000..166ef9bc --- /dev/null +++ b/qt6/pdf/gen_qpdfdocumentrenderoptions.go @@ -0,0 +1,131 @@ +package pdf + +/* + +#include "gen_qpdfdocumentrenderoptions.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QPdfDocumentRenderOptions__Rotation int + +const ( + QPdfDocumentRenderOptions__Rotation__None QPdfDocumentRenderOptions__Rotation = 0 + QPdfDocumentRenderOptions__Rotation__Clockwise90 QPdfDocumentRenderOptions__Rotation = 1 + QPdfDocumentRenderOptions__Rotation__Clockwise180 QPdfDocumentRenderOptions__Rotation = 2 + QPdfDocumentRenderOptions__Rotation__Clockwise270 QPdfDocumentRenderOptions__Rotation = 3 +) + +type QPdfDocumentRenderOptions__RenderFlag int + +const ( + QPdfDocumentRenderOptions__RenderFlag__None QPdfDocumentRenderOptions__RenderFlag = 0 + QPdfDocumentRenderOptions__RenderFlag__Annotations QPdfDocumentRenderOptions__RenderFlag = 1 + QPdfDocumentRenderOptions__RenderFlag__OptimizedForLcd QPdfDocumentRenderOptions__RenderFlag = 2 + QPdfDocumentRenderOptions__RenderFlag__Grayscale QPdfDocumentRenderOptions__RenderFlag = 4 + QPdfDocumentRenderOptions__RenderFlag__ForceHalftone QPdfDocumentRenderOptions__RenderFlag = 8 + QPdfDocumentRenderOptions__RenderFlag__TextAliased QPdfDocumentRenderOptions__RenderFlag = 16 + QPdfDocumentRenderOptions__RenderFlag__ImageAliased QPdfDocumentRenderOptions__RenderFlag = 32 + QPdfDocumentRenderOptions__RenderFlag__PathAliased QPdfDocumentRenderOptions__RenderFlag = 64 +) + +type QPdfDocumentRenderOptions struct { + h *C.QPdfDocumentRenderOptions +} + +func (this *QPdfDocumentRenderOptions) cPointer() *C.QPdfDocumentRenderOptions { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfDocumentRenderOptions) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfDocumentRenderOptions constructs the type using only CGO pointers. +func newQPdfDocumentRenderOptions(h *C.QPdfDocumentRenderOptions) *QPdfDocumentRenderOptions { + if h == nil { + return nil + } + + return &QPdfDocumentRenderOptions{h: h} +} + +// UnsafeNewQPdfDocumentRenderOptions constructs the type using only unsafe pointers. +func UnsafeNewQPdfDocumentRenderOptions(h unsafe.Pointer) *QPdfDocumentRenderOptions { + return newQPdfDocumentRenderOptions((*C.QPdfDocumentRenderOptions)(h)) +} + +// NewQPdfDocumentRenderOptions constructs a new QPdfDocumentRenderOptions object. +func NewQPdfDocumentRenderOptions() *QPdfDocumentRenderOptions { + + return newQPdfDocumentRenderOptions(C.QPdfDocumentRenderOptions_new()) +} + +// NewQPdfDocumentRenderOptions2 constructs a new QPdfDocumentRenderOptions object. +func NewQPdfDocumentRenderOptions2(param1 *QPdfDocumentRenderOptions) *QPdfDocumentRenderOptions { + + return newQPdfDocumentRenderOptions(C.QPdfDocumentRenderOptions_new2(param1.cPointer())) +} + +func (this *QPdfDocumentRenderOptions) Rotation() QPdfDocumentRenderOptions__Rotation { + return (QPdfDocumentRenderOptions__Rotation)(C.QPdfDocumentRenderOptions_rotation(this.h)) +} + +func (this *QPdfDocumentRenderOptions) SetRotation(r QPdfDocumentRenderOptions__Rotation) { + C.QPdfDocumentRenderOptions_setRotation(this.h, (C.int)(r)) +} + +func (this *QPdfDocumentRenderOptions) RenderFlags() QPdfDocumentRenderOptions__RenderFlag { + return (QPdfDocumentRenderOptions__RenderFlag)(C.QPdfDocumentRenderOptions_renderFlags(this.h)) +} + +func (this *QPdfDocumentRenderOptions) SetRenderFlags(r QPdfDocumentRenderOptions__RenderFlag) { + C.QPdfDocumentRenderOptions_setRenderFlags(this.h, (C.int)(r)) +} + +func (this *QPdfDocumentRenderOptions) ScaledClipRect() *qt6.QRect { + _goptr := qt6.UnsafeNewQRect(unsafe.Pointer(C.QPdfDocumentRenderOptions_scaledClipRect(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocumentRenderOptions) SetScaledClipRect(r *qt6.QRect) { + C.QPdfDocumentRenderOptions_setScaledClipRect(this.h, (*C.QRect)(r.UnsafePointer())) +} + +func (this *QPdfDocumentRenderOptions) ScaledSize() *qt6.QSize { + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfDocumentRenderOptions_scaledSize(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfDocumentRenderOptions) SetScaledSize(s *qt6.QSize) { + C.QPdfDocumentRenderOptions_setScaledSize(this.h, (*C.QSize)(s.UnsafePointer())) +} + +// Delete this object from C++ memory. +func (this *QPdfDocumentRenderOptions) Delete() { + C.QPdfDocumentRenderOptions_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfDocumentRenderOptions) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfDocumentRenderOptions) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfdocumentrenderoptions.h b/qt6/pdf/gen_qpdfdocumentrenderoptions.h new file mode 100644 index 00000000..e38a3f39 --- /dev/null +++ b/qt6/pdf/gen_qpdfdocumentrenderoptions.h @@ -0,0 +1,43 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFDOCUMENTRENDEROPTIONS_H +#define MIQT_QT6_PDF_GEN_QPDFDOCUMENTRENDEROPTIONS_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfDocumentRenderOptions; +class QRect; +class QSize; +#else +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QRect QRect; +typedef struct QSize QSize; +#endif + +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new(); +QPdfDocumentRenderOptions* QPdfDocumentRenderOptions_new2(QPdfDocumentRenderOptions* param1); +int QPdfDocumentRenderOptions_rotation(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setRotation(QPdfDocumentRenderOptions* self, int r); +int QPdfDocumentRenderOptions_renderFlags(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setRenderFlags(QPdfDocumentRenderOptions* self, int r); +QRect* QPdfDocumentRenderOptions_scaledClipRect(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setScaledClipRect(QPdfDocumentRenderOptions* self, QRect* r); +QSize* QPdfDocumentRenderOptions_scaledSize(const QPdfDocumentRenderOptions* self); +void QPdfDocumentRenderOptions_setScaledSize(QPdfDocumentRenderOptions* self, QSize* s); +void QPdfDocumentRenderOptions_delete(QPdfDocumentRenderOptions* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdflink.cpp b/qt6/pdf/gen_qpdflink.cpp new file mode 100644 index 00000000..0462f671 --- /dev/null +++ b/qt6/pdf/gen_qpdflink.cpp @@ -0,0 +1,114 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdflink.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfLink* QPdfLink_new() { + return new QPdfLink(); +} + +QPdfLink* QPdfLink_new2(QPdfLink* other) { + return new QPdfLink(*other); +} + +void QPdfLink_operatorAssign(QPdfLink* self, QPdfLink* other) { + self->operator=(*other); +} + +void QPdfLink_swap(QPdfLink* self, QPdfLink* other) { + self->swap(*other); +} + +bool QPdfLink_isValid(const QPdfLink* self) { + return self->isValid(); +} + +int QPdfLink_page(const QPdfLink* self) { + return self->page(); +} + +QPointF* QPdfLink_location(const QPdfLink* self) { + return new QPointF(self->location()); +} + +double QPdfLink_zoom(const QPdfLink* self) { + qreal _ret = self->zoom(); + return static_cast(_ret); +} + +QUrl* QPdfLink_url(const QPdfLink* self) { + return new QUrl(self->url()); +} + +struct miqt_string QPdfLink_contextBefore(const QPdfLink* self) { + QString _ret = self->contextBefore(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfLink_contextAfter(const QPdfLink* self) { + QString _ret = self->contextAfter(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of QRectF* */ QPdfLink_rectangles(const QPdfLink* self) { + QList _ret = self->rectangles(); + // Convert QList<> from C++ memory to manually-managed C memory + QRectF** _arr = static_cast(malloc(sizeof(QRectF*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QRectF(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +struct miqt_string QPdfLink_toString(const QPdfLink* self) { + QString _ret = self->toString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QPdfLink_copyToClipboard(const QPdfLink* self) { + self->copyToClipboard(); +} + +void QPdfLink_copyToClipboardWithMode(const QPdfLink* self, int mode) { + self->copyToClipboard(static_cast(mode)); +} + +void QPdfLink_delete(QPdfLink* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdflink.go b/qt6/pdf/gen_qpdflink.go new file mode 100644 index 00000000..81638c8f --- /dev/null +++ b/qt6/pdf/gen_qpdflink.go @@ -0,0 +1,146 @@ +package pdf + +/* + +#include "gen_qpdflink.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QPdfLink struct { + h *C.QPdfLink +} + +func (this *QPdfLink) cPointer() *C.QPdfLink { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfLink) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfLink constructs the type using only CGO pointers. +func newQPdfLink(h *C.QPdfLink) *QPdfLink { + if h == nil { + return nil + } + + return &QPdfLink{h: h} +} + +// UnsafeNewQPdfLink constructs the type using only unsafe pointers. +func UnsafeNewQPdfLink(h unsafe.Pointer) *QPdfLink { + return newQPdfLink((*C.QPdfLink)(h)) +} + +// NewQPdfLink constructs a new QPdfLink object. +func NewQPdfLink() *QPdfLink { + + return newQPdfLink(C.QPdfLink_new()) +} + +// NewQPdfLink2 constructs a new QPdfLink object. +func NewQPdfLink2(other *QPdfLink) *QPdfLink { + + return newQPdfLink(C.QPdfLink_new2(other.cPointer())) +} + +func (this *QPdfLink) OperatorAssign(other *QPdfLink) { + C.QPdfLink_operatorAssign(this.h, other.cPointer()) +} + +func (this *QPdfLink) Swap(other *QPdfLink) { + C.QPdfLink_swap(this.h, other.cPointer()) +} + +func (this *QPdfLink) IsValid() bool { + return (bool)(C.QPdfLink_isValid(this.h)) +} + +func (this *QPdfLink) Page() int { + return (int)(C.QPdfLink_page(this.h)) +} + +func (this *QPdfLink) Location() *qt6.QPointF { + _goptr := qt6.UnsafeNewQPointF(unsafe.Pointer(C.QPdfLink_location(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfLink) Zoom() float64 { + return (float64)(C.QPdfLink_zoom(this.h)) +} + +func (this *QPdfLink) Url() *qt6.QUrl { + _goptr := qt6.UnsafeNewQUrl(unsafe.Pointer(C.QPdfLink_url(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfLink) ContextBefore() string { + var _ms C.struct_miqt_string = C.QPdfLink_contextBefore(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfLink) ContextAfter() string { + var _ms C.struct_miqt_string = C.QPdfLink_contextAfter(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfLink) Rectangles() []qt6.QRectF { + var _ma C.struct_miqt_array = C.QPdfLink_rectangles(this.h) + _ret := make([]qt6.QRectF, int(_ma.len)) + _outCast := (*[0xffff]*C.QRectF)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QPdfLink) ToString() string { + var _ms C.struct_miqt_string = C.QPdfLink_toString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfLink) CopyToClipboard() { + C.QPdfLink_copyToClipboard(this.h) +} + +func (this *QPdfLink) CopyToClipboardWithMode(mode qt6.QClipboard__Mode) { + C.QPdfLink_copyToClipboardWithMode(this.h, (C.int)(mode)) +} + +// Delete this object from C++ memory. +func (this *QPdfLink) Delete() { + C.QPdfLink_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfLink) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfLink) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdflink.h b/qt6/pdf/gen_qpdflink.h new file mode 100644 index 00000000..87c09d4a --- /dev/null +++ b/qt6/pdf/gen_qpdflink.h @@ -0,0 +1,50 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFLINK_H +#define MIQT_QT6_PDF_GEN_QPDFLINK_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfLink; +class QPointF; +class QRectF; +class QUrl; +#else +typedef struct QPdfLink QPdfLink; +typedef struct QPointF QPointF; +typedef struct QRectF QRectF; +typedef struct QUrl QUrl; +#endif + +QPdfLink* QPdfLink_new(); +QPdfLink* QPdfLink_new2(QPdfLink* other); +void QPdfLink_operatorAssign(QPdfLink* self, QPdfLink* other); +void QPdfLink_swap(QPdfLink* self, QPdfLink* other); +bool QPdfLink_isValid(const QPdfLink* self); +int QPdfLink_page(const QPdfLink* self); +QPointF* QPdfLink_location(const QPdfLink* self); +double QPdfLink_zoom(const QPdfLink* self); +QUrl* QPdfLink_url(const QPdfLink* self); +struct miqt_string QPdfLink_contextBefore(const QPdfLink* self); +struct miqt_string QPdfLink_contextAfter(const QPdfLink* self); +struct miqt_array /* of QRectF* */ QPdfLink_rectangles(const QPdfLink* self); +struct miqt_string QPdfLink_toString(const QPdfLink* self); +void QPdfLink_copyToClipboard(const QPdfLink* self); +void QPdfLink_copyToClipboardWithMode(const QPdfLink* self, int mode); +void QPdfLink_delete(QPdfLink* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfpagenavigator.cpp b/qt6/pdf/gen_qpdfpagenavigator.cpp new file mode 100644 index 00000000..6371c56b --- /dev/null +++ b/qt6/pdf/gen_qpdfpagenavigator.cpp @@ -0,0 +1,538 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfpagenavigator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfPageNavigator_currentPageChanged(intptr_t, int); +void miqt_exec_callback_QPdfPageNavigator_currentLocationChanged(intptr_t, QPointF*); +void miqt_exec_callback_QPdfPageNavigator_currentZoomChanged(intptr_t, double); +void miqt_exec_callback_QPdfPageNavigator_backAvailableChanged(intptr_t, bool); +void miqt_exec_callback_QPdfPageNavigator_forwardAvailableChanged(intptr_t, bool); +void miqt_exec_callback_QPdfPageNavigator_jumped(intptr_t, QPdfLink*); +bool miqt_exec_callback_QPdfPageNavigator_event(QPdfPageNavigator*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfPageNavigator_eventFilter(QPdfPageNavigator*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfPageNavigator_timerEvent(QPdfPageNavigator*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfPageNavigator_childEvent(QPdfPageNavigator*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfPageNavigator_customEvent(QPdfPageNavigator*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfPageNavigator_connectNotify(QPdfPageNavigator*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfPageNavigator_disconnectNotify(QPdfPageNavigator*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfPageNavigator final : public QPdfPageNavigator { +public: + + MiqtVirtualQPdfPageNavigator(): QPdfPageNavigator() {}; + MiqtVirtualQPdfPageNavigator(QObject* parent): QPdfPageNavigator(parent) {}; + + virtual ~MiqtVirtualQPdfPageNavigator() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfPageNavigator::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageNavigator_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfPageNavigator_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfPageNavigator::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageNavigator_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfPageNavigator_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfPageNavigator::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigator_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfPageNavigator_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfPageNavigator::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigator_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfPageNavigator_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfPageNavigator::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageNavigator_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfPageNavigator_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfPageNavigator::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageNavigator_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfPageNavigator_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfPageNavigator::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageNavigator_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfPageNavigator_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QPdfLink* QPdfPageNavigator_protectedbase_currentLink(bool* _dynamic_cast_ok, const void* self); + friend QObject* QPdfPageNavigator_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageNavigator_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageNavigator_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfPageNavigator_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfPageNavigator* QPdfPageNavigator_new() { + return new MiqtVirtualQPdfPageNavigator(); +} + +QPdfPageNavigator* QPdfPageNavigator_new2(QObject* parent) { + return new MiqtVirtualQPdfPageNavigator(parent); +} + +void QPdfPageNavigator_virtbase(QPdfPageNavigator* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfPageNavigator_metaObject(const QPdfPageNavigator* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfPageNavigator_metacast(QPdfPageNavigator* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfPageNavigator_tr(const char* s) { + QString _ret = QPdfPageNavigator::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QPdfPageNavigator_currentPage(const QPdfPageNavigator* self) { + return self->currentPage(); +} + +QPointF* QPdfPageNavigator_currentLocation(const QPdfPageNavigator* self) { + return new QPointF(self->currentLocation()); +} + +double QPdfPageNavigator_currentZoom(const QPdfPageNavigator* self) { + qreal _ret = self->currentZoom(); + return static_cast(_ret); +} + +bool QPdfPageNavigator_backAvailable(const QPdfPageNavigator* self) { + return self->backAvailable(); +} + +bool QPdfPageNavigator_forwardAvailable(const QPdfPageNavigator* self) { + return self->forwardAvailable(); +} + +void QPdfPageNavigator_clear(QPdfPageNavigator* self) { + self->clear(); +} + +void QPdfPageNavigator_jump(QPdfPageNavigator* self, QPdfLink* destination) { + self->jump(*destination); +} + +void QPdfPageNavigator_jump2(QPdfPageNavigator* self, int page, QPointF* location) { + self->jump(static_cast(page), *location); +} + +void QPdfPageNavigator_update(QPdfPageNavigator* self, int page, QPointF* location, double zoom) { + self->update(static_cast(page), *location, static_cast(zoom)); +} + +void QPdfPageNavigator_forward(QPdfPageNavigator* self) { + self->forward(); +} + +void QPdfPageNavigator_back(QPdfPageNavigator* self) { + self->back(); +} + +void QPdfPageNavigator_currentPageChanged(QPdfPageNavigator* self, int page) { + self->currentPageChanged(static_cast(page)); +} + +void QPdfPageNavigator_connect_currentPageChanged(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::currentPageChanged), self, [=](int page) { + int sigval1 = page; + miqt_exec_callback_QPdfPageNavigator_currentPageChanged(slot, sigval1); + }); +} + +void QPdfPageNavigator_currentLocationChanged(QPdfPageNavigator* self, QPointF* location) { + self->currentLocationChanged(*location); +} + +void QPdfPageNavigator_connect_currentLocationChanged(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::currentLocationChanged), self, [=](QPointF location) { + QPointF* sigval1 = new QPointF(location); + miqt_exec_callback_QPdfPageNavigator_currentLocationChanged(slot, sigval1); + }); +} + +void QPdfPageNavigator_currentZoomChanged(QPdfPageNavigator* self, double zoom) { + self->currentZoomChanged(static_cast(zoom)); +} + +void QPdfPageNavigator_connect_currentZoomChanged(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::currentZoomChanged), self, [=](qreal zoom) { + qreal zoom_ret = zoom; + double sigval1 = static_cast(zoom_ret); + miqt_exec_callback_QPdfPageNavigator_currentZoomChanged(slot, sigval1); + }); +} + +void QPdfPageNavigator_backAvailableChanged(QPdfPageNavigator* self, bool available) { + self->backAvailableChanged(available); +} + +void QPdfPageNavigator_connect_backAvailableChanged(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::backAvailableChanged), self, [=](bool available) { + bool sigval1 = available; + miqt_exec_callback_QPdfPageNavigator_backAvailableChanged(slot, sigval1); + }); +} + +void QPdfPageNavigator_forwardAvailableChanged(QPdfPageNavigator* self, bool available) { + self->forwardAvailableChanged(available); +} + +void QPdfPageNavigator_connect_forwardAvailableChanged(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::forwardAvailableChanged), self, [=](bool available) { + bool sigval1 = available; + miqt_exec_callback_QPdfPageNavigator_forwardAvailableChanged(slot, sigval1); + }); +} + +void QPdfPageNavigator_jumped(QPdfPageNavigator* self, QPdfLink* current) { + self->jumped(*current); +} + +void QPdfPageNavigator_connect_jumped(QPdfPageNavigator* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator::connect(self, static_cast(&QPdfPageNavigator::jumped), self, [=](QPdfLink current) { + QPdfLink* sigval1 = new QPdfLink(current); + miqt_exec_callback_QPdfPageNavigator_jumped(slot, sigval1); + }); +} + +struct miqt_string QPdfPageNavigator_tr2(const char* s, const char* c) { + QString _ret = QPdfPageNavigator::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageNavigator_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfPageNavigator::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QPdfPageNavigator_jump3(QPdfPageNavigator* self, int page, QPointF* location, double zoom) { + self->jump(static_cast(page), *location, static_cast(zoom)); +} + +bool QPdfPageNavigator_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfPageNavigator_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::event(event); + +} + +bool QPdfPageNavigator_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfPageNavigator_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::eventFilter(watched, event); + +} + +bool QPdfPageNavigator_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfPageNavigator_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::timerEvent(event); + +} + +bool QPdfPageNavigator_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfPageNavigator_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::childEvent(event); + +} + +bool QPdfPageNavigator_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfPageNavigator_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::customEvent(event); + +} + +bool QPdfPageNavigator_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfPageNavigator_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::connectNotify(*signal); + +} + +bool QPdfPageNavigator_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfPageNavigator_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageNavigator*)(self) )->QPdfPageNavigator::disconnectNotify(*signal); + +} + +QPdfLink* QPdfPageNavigator_protectedbase_currentLink(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QPdfLink(self_cast->currentLink()); + +} + +QObject* QPdfPageNavigator_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfPageNavigator_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfPageNavigator_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfPageNavigator_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfPageNavigator* self_cast = dynamic_cast( (QPdfPageNavigator*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfPageNavigator_delete(QPdfPageNavigator* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfpagenavigator.go b/qt6/pdf/gen_qpdfpagenavigator.go new file mode 100644 index 00000000..ea0f6cfc --- /dev/null +++ b/qt6/pdf/gen_qpdfpagenavigator.go @@ -0,0 +1,555 @@ +package pdf + +/* + +#include "gen_qpdfpagenavigator.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfPageNavigator struct { + h *C.QPdfPageNavigator + *qt6.QObject +} + +func (this *QPdfPageNavigator) cPointer() *C.QPdfPageNavigator { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfPageNavigator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfPageNavigator constructs the type using only CGO pointers. +func newQPdfPageNavigator(h *C.QPdfPageNavigator) *QPdfPageNavigator { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfPageNavigator_virtbase(h, &outptr_QObject) + + return &QPdfPageNavigator{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfPageNavigator constructs the type using only unsafe pointers. +func UnsafeNewQPdfPageNavigator(h unsafe.Pointer) *QPdfPageNavigator { + return newQPdfPageNavigator((*C.QPdfPageNavigator)(h)) +} + +// NewQPdfPageNavigator constructs a new QPdfPageNavigator object. +func NewQPdfPageNavigator() *QPdfPageNavigator { + + return newQPdfPageNavigator(C.QPdfPageNavigator_new()) +} + +// NewQPdfPageNavigator2 constructs a new QPdfPageNavigator object. +func NewQPdfPageNavigator2(parent *qt6.QObject) *QPdfPageNavigator { + + return newQPdfPageNavigator(C.QPdfPageNavigator_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfPageNavigator) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfPageNavigator_metaObject(this.h))) +} + +func (this *QPdfPageNavigator) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfPageNavigator_metacast(this.h, param1_Cstring)) +} + +func QPdfPageNavigator_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigator_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageNavigator) CurrentPage() int { + return (int)(C.QPdfPageNavigator_currentPage(this.h)) +} + +func (this *QPdfPageNavigator) CurrentLocation() *qt6.QPointF { + _goptr := qt6.UnsafeNewQPointF(unsafe.Pointer(C.QPdfPageNavigator_currentLocation(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfPageNavigator) CurrentZoom() float64 { + return (float64)(C.QPdfPageNavigator_currentZoom(this.h)) +} + +func (this *QPdfPageNavigator) BackAvailable() bool { + return (bool)(C.QPdfPageNavigator_backAvailable(this.h)) +} + +func (this *QPdfPageNavigator) ForwardAvailable() bool { + return (bool)(C.QPdfPageNavigator_forwardAvailable(this.h)) +} + +func (this *QPdfPageNavigator) Clear() { + C.QPdfPageNavigator_clear(this.h) +} + +func (this *QPdfPageNavigator) Jump(destination QPdfLink) { + C.QPdfPageNavigator_jump(this.h, destination.cPointer()) +} + +func (this *QPdfPageNavigator) Jump2(page int, location *qt6.QPointF) { + C.QPdfPageNavigator_jump2(this.h, (C.int)(page), (*C.QPointF)(location.UnsafePointer())) +} + +func (this *QPdfPageNavigator) Update(page int, location *qt6.QPointF, zoom float64) { + C.QPdfPageNavigator_update(this.h, (C.int)(page), (*C.QPointF)(location.UnsafePointer()), (C.double)(zoom)) +} + +func (this *QPdfPageNavigator) Forward() { + C.QPdfPageNavigator_forward(this.h) +} + +func (this *QPdfPageNavigator) Back() { + C.QPdfPageNavigator_back(this.h) +} + +func (this *QPdfPageNavigator) CurrentPageChanged(page int) { + C.QPdfPageNavigator_currentPageChanged(this.h, (C.int)(page)) +} +func (this *QPdfPageNavigator) OnCurrentPageChanged(slot func(page int)) { + C.QPdfPageNavigator_connect_currentPageChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_currentPageChanged +func miqt_exec_callback_QPdfPageNavigator_currentPageChanged(cb C.intptr_t, page C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(page int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(page) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigator) CurrentLocationChanged(location qt6.QPointF) { + C.QPdfPageNavigator_currentLocationChanged(this.h, (*C.QPointF)(location.UnsafePointer())) +} +func (this *QPdfPageNavigator) OnCurrentLocationChanged(slot func(location qt6.QPointF)) { + C.QPdfPageNavigator_connect_currentLocationChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_currentLocationChanged +func miqt_exec_callback_QPdfPageNavigator_currentLocationChanged(cb C.intptr_t, location *C.QPointF) { + gofunc, ok := cgo.Handle(cb).Value().(func(location qt6.QPointF)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + location_goptr := qt6.UnsafeNewQPointF(unsafe.Pointer(location)) + location_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *location_goptr + + gofunc(slotval1) +} + +func (this *QPdfPageNavigator) CurrentZoomChanged(zoom float64) { + C.QPdfPageNavigator_currentZoomChanged(this.h, (C.double)(zoom)) +} +func (this *QPdfPageNavigator) OnCurrentZoomChanged(slot func(zoom float64)) { + C.QPdfPageNavigator_connect_currentZoomChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_currentZoomChanged +func miqt_exec_callback_QPdfPageNavigator_currentZoomChanged(cb C.intptr_t, zoom C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(zoom float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(zoom) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigator) BackAvailableChanged(available bool) { + C.QPdfPageNavigator_backAvailableChanged(this.h, (C.bool)(available)) +} +func (this *QPdfPageNavigator) OnBackAvailableChanged(slot func(available bool)) { + C.QPdfPageNavigator_connect_backAvailableChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_backAvailableChanged +func miqt_exec_callback_QPdfPageNavigator_backAvailableChanged(cb C.intptr_t, available C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(available bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(available) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigator) ForwardAvailableChanged(available bool) { + C.QPdfPageNavigator_forwardAvailableChanged(this.h, (C.bool)(available)) +} +func (this *QPdfPageNavigator) OnForwardAvailableChanged(slot func(available bool)) { + C.QPdfPageNavigator_connect_forwardAvailableChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_forwardAvailableChanged +func miqt_exec_callback_QPdfPageNavigator_forwardAvailableChanged(cb C.intptr_t, available C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(available bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(available) + + gofunc(slotval1) +} + +func (this *QPdfPageNavigator) Jumped(current QPdfLink) { + C.QPdfPageNavigator_jumped(this.h, current.cPointer()) +} +func (this *QPdfPageNavigator) OnJumped(slot func(current QPdfLink)) { + C.QPdfPageNavigator_connect_jumped(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageNavigator_jumped +func miqt_exec_callback_QPdfPageNavigator_jumped(cb C.intptr_t, current *C.QPdfLink) { + gofunc, ok := cgo.Handle(cb).Value().(func(current QPdfLink)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + current_goptr := newQPdfLink(current) + current_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *current_goptr + + gofunc(slotval1) +} + +func QPdfPageNavigator_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigator_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageNavigator_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageNavigator_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageNavigator) Jump3(page int, location *qt6.QPointF, zoom float64) { + C.QPdfPageNavigator_jump3(this.h, (C.int)(page), (*C.QPointF)(location.UnsafePointer()), (C.double)(zoom)) +} + +// CurrentLink can only be called from a QPdfPageNavigator that was directly constructed. +func (this *QPdfPageNavigator) CurrentLink() QPdfLink { + + var _dynamic_cast_ok C.bool = false + _goptr := newQPdfLink(C.QPdfPageNavigator_protectedbase_currentLink(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfPageNavigator that was directly constructed. +func (this *QPdfPageNavigator) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfPageNavigator_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfPageNavigator that was directly constructed. +func (this *QPdfPageNavigator) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageNavigator_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfPageNavigator that was directly constructed. +func (this *QPdfPageNavigator) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageNavigator_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfPageNavigator that was directly constructed. +func (this *QPdfPageNavigator) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfPageNavigator_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfPageNavigator) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPdfPageNavigator_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageNavigator) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + ok := C.QPdfPageNavigator_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_event +func miqt_exec_callback_QPdfPageNavigator_event(self *C.QPdfPageNavigator, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageNavigator) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QPdfPageNavigator_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageNavigator) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + ok := C.QPdfPageNavigator_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_eventFilter +func miqt_exec_callback_QPdfPageNavigator_eventFilter(self *C.QPdfPageNavigator, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageNavigator) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfPageNavigator_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigator) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfPageNavigator_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_timerEvent +func miqt_exec_callback_QPdfPageNavigator_timerEvent(self *C.QPdfPageNavigator, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfPageNavigator) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfPageNavigator_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigator) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfPageNavigator_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_childEvent +func miqt_exec_callback_QPdfPageNavigator_childEvent(self *C.QPdfPageNavigator, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfPageNavigator) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfPageNavigator_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageNavigator) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfPageNavigator_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_customEvent +func miqt_exec_callback_QPdfPageNavigator_customEvent(self *C.QPdfPageNavigator, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfPageNavigator) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfPageNavigator_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageNavigator) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfPageNavigator_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_connectNotify +func miqt_exec_callback_QPdfPageNavigator_connectNotify(self *C.QPdfPageNavigator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfPageNavigator) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfPageNavigator_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageNavigator) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfPageNavigator_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageNavigator_disconnectNotify +func miqt_exec_callback_QPdfPageNavigator_disconnectNotify(self *C.QPdfPageNavigator, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageNavigator{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfPageNavigator) Delete() { + C.QPdfPageNavigator_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfPageNavigator) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfPageNavigator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfpagenavigator.h b/qt6/pdf/gen_qpdfpagenavigator.h new file mode 100644 index 00000000..bd6a1242 --- /dev/null +++ b/qt6/pdf/gen_qpdfpagenavigator.h @@ -0,0 +1,96 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFPAGENAVIGATOR_H +#define MIQT_QT6_PDF_GEN_QPDFPAGENAVIGATOR_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfLink; +class QPdfPageNavigator; +class QPointF; +class QTimerEvent; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfLink QPdfLink; +typedef struct QPdfPageNavigator QPdfPageNavigator; +typedef struct QPointF QPointF; +typedef struct QTimerEvent QTimerEvent; +#endif + +QPdfPageNavigator* QPdfPageNavigator_new(); +QPdfPageNavigator* QPdfPageNavigator_new2(QObject* parent); +void QPdfPageNavigator_virtbase(QPdfPageNavigator* src, QObject** outptr_QObject); +QMetaObject* QPdfPageNavigator_metaObject(const QPdfPageNavigator* self); +void* QPdfPageNavigator_metacast(QPdfPageNavigator* self, const char* param1); +struct miqt_string QPdfPageNavigator_tr(const char* s); +int QPdfPageNavigator_currentPage(const QPdfPageNavigator* self); +QPointF* QPdfPageNavigator_currentLocation(const QPdfPageNavigator* self); +double QPdfPageNavigator_currentZoom(const QPdfPageNavigator* self); +bool QPdfPageNavigator_backAvailable(const QPdfPageNavigator* self); +bool QPdfPageNavigator_forwardAvailable(const QPdfPageNavigator* self); +void QPdfPageNavigator_clear(QPdfPageNavigator* self); +void QPdfPageNavigator_jump(QPdfPageNavigator* self, QPdfLink* destination); +void QPdfPageNavigator_jump2(QPdfPageNavigator* self, int page, QPointF* location); +void QPdfPageNavigator_update(QPdfPageNavigator* self, int page, QPointF* location, double zoom); +void QPdfPageNavigator_forward(QPdfPageNavigator* self); +void QPdfPageNavigator_back(QPdfPageNavigator* self); +void QPdfPageNavigator_currentPageChanged(QPdfPageNavigator* self, int page); +void QPdfPageNavigator_connect_currentPageChanged(QPdfPageNavigator* self, intptr_t slot); +void QPdfPageNavigator_currentLocationChanged(QPdfPageNavigator* self, QPointF* location); +void QPdfPageNavigator_connect_currentLocationChanged(QPdfPageNavigator* self, intptr_t slot); +void QPdfPageNavigator_currentZoomChanged(QPdfPageNavigator* self, double zoom); +void QPdfPageNavigator_connect_currentZoomChanged(QPdfPageNavigator* self, intptr_t slot); +void QPdfPageNavigator_backAvailableChanged(QPdfPageNavigator* self, bool available); +void QPdfPageNavigator_connect_backAvailableChanged(QPdfPageNavigator* self, intptr_t slot); +void QPdfPageNavigator_forwardAvailableChanged(QPdfPageNavigator* self, bool available); +void QPdfPageNavigator_connect_forwardAvailableChanged(QPdfPageNavigator* self, intptr_t slot); +void QPdfPageNavigator_jumped(QPdfPageNavigator* self, QPdfLink* current); +void QPdfPageNavigator_connect_jumped(QPdfPageNavigator* self, intptr_t slot); +struct miqt_string QPdfPageNavigator_tr2(const char* s, const char* c); +struct miqt_string QPdfPageNavigator_tr3(const char* s, const char* c, int n); +void QPdfPageNavigator_jump3(QPdfPageNavigator* self, int page, QPointF* location, double zoom); +bool QPdfPageNavigator_override_virtual_event(void* self, intptr_t slot); +bool QPdfPageNavigator_virtualbase_event(void* self, QEvent* event); +bool QPdfPageNavigator_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfPageNavigator_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfPageNavigator_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfPageNavigator_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfPageNavigator_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfPageNavigator_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfPageNavigator_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfPageNavigator_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfPageNavigator_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfPageNavigator_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfPageNavigator_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfPageNavigator_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QPdfLink* QPdfPageNavigator_protectedbase_currentLink(bool* _dynamic_cast_ok, const void* self); +QObject* QPdfPageNavigator_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfPageNavigator_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfPageNavigator_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfPageNavigator_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfPageNavigator_delete(QPdfPageNavigator* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfpagerenderer.cpp b/qt6/pdf/gen_qpdfpagerenderer.cpp new file mode 100644 index 00000000..300a0ba2 --- /dev/null +++ b/qt6/pdf/gen_qpdfpagerenderer.cpp @@ -0,0 +1,475 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfpagerenderer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfPageRenderer_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfPageRenderer_renderModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfPageRenderer_pageRendered(intptr_t, int, QSize*, QImage*, QPdfDocumentRenderOptions*, unsigned long long); +bool miqt_exec_callback_QPdfPageRenderer_event(QPdfPageRenderer*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfPageRenderer_eventFilter(QPdfPageRenderer*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfPageRenderer_timerEvent(QPdfPageRenderer*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfPageRenderer_childEvent(QPdfPageRenderer*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfPageRenderer_customEvent(QPdfPageRenderer*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfPageRenderer_connectNotify(QPdfPageRenderer*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfPageRenderer_disconnectNotify(QPdfPageRenderer*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfPageRenderer final : public QPdfPageRenderer { +public: + + MiqtVirtualQPdfPageRenderer(): QPdfPageRenderer() {}; + MiqtVirtualQPdfPageRenderer(QObject* parent): QPdfPageRenderer(parent) {}; + + virtual ~MiqtVirtualQPdfPageRenderer() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfPageRenderer::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageRenderer_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfPageRenderer::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfPageRenderer_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfPageRenderer::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfPageRenderer::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfPageRenderer::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfPageRenderer_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfPageRenderer::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageRenderer_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfPageRenderer::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfPageRenderer_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfPageRenderer* QPdfPageRenderer_new() { + return new MiqtVirtualQPdfPageRenderer(); +} + +QPdfPageRenderer* QPdfPageRenderer_new2(QObject* parent) { + return new MiqtVirtualQPdfPageRenderer(parent); +} + +void QPdfPageRenderer_virtbase(QPdfPageRenderer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + +QMetaObject* QPdfPageRenderer_metaObject(const QPdfPageRenderer* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfPageRenderer_metacast(QPdfPageRenderer* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfPageRenderer_tr(const char* s) { + QString _ret = QPdfPageRenderer::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +int QPdfPageRenderer_renderMode(const QPdfPageRenderer* self) { + QPdfPageRenderer::RenderMode _ret = self->renderMode(); + return static_cast(_ret); +} + +void QPdfPageRenderer_setRenderMode(QPdfPageRenderer* self, int mode) { + self->setRenderMode(static_cast(mode)); +} + +QPdfDocument* QPdfPageRenderer_document(const QPdfPageRenderer* self) { + return self->document(); +} + +void QPdfPageRenderer_setDocument(QPdfPageRenderer* self, QPdfDocument* document) { + self->setDocument(document); +} + +unsigned long long QPdfPageRenderer_requestPage(QPdfPageRenderer* self, int pageNumber, QSize* imageSize) { + quint64 _ret = self->requestPage(static_cast(pageNumber), *imageSize); + return static_cast(_ret); +} + +void QPdfPageRenderer_documentChanged(QPdfPageRenderer* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfPageRenderer_connect_documentChanged(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfPageRenderer_documentChanged(slot, sigval1); + }); +} + +void QPdfPageRenderer_renderModeChanged(QPdfPageRenderer* self, int renderMode) { + self->renderModeChanged(static_cast(renderMode)); +} + +void QPdfPageRenderer_connect_renderModeChanged(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::renderModeChanged), self, [=](QPdfPageRenderer::RenderMode renderMode) { + QPdfPageRenderer::RenderMode renderMode_ret = renderMode; + int sigval1 = static_cast(renderMode_ret); + miqt_exec_callback_QPdfPageRenderer_renderModeChanged(slot, sigval1); + }); +} + +void QPdfPageRenderer_pageRendered(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QImage* image, QPdfDocumentRenderOptions* options, unsigned long long requestId) { + self->pageRendered(static_cast(pageNumber), *imageSize, *image, *options, static_cast(requestId)); +} + +void QPdfPageRenderer_connect_pageRendered(QPdfPageRenderer* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer::connect(self, static_cast(&QPdfPageRenderer::pageRendered), self, [=](int pageNumber, QSize imageSize, const QImage& image, QPdfDocumentRenderOptions options, quint64 requestId) { + int sigval1 = pageNumber; + QSize* sigval2 = new QSize(imageSize); + const QImage& image_ret = image; + // Cast returned reference into pointer + QImage* sigval3 = const_cast(&image_ret); + QPdfDocumentRenderOptions* sigval4 = new QPdfDocumentRenderOptions(options); + quint64 requestId_ret = requestId; + unsigned long long sigval5 = static_cast(requestId_ret); + miqt_exec_callback_QPdfPageRenderer_pageRendered(slot, sigval1, sigval2, sigval3, sigval4, sigval5); + }); +} + +struct miqt_string QPdfPageRenderer_tr2(const char* s, const char* c) { + QString _ret = QPdfPageRenderer::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfPageRenderer_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfPageRenderer::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +unsigned long long QPdfPageRenderer_requestPage2(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QPdfDocumentRenderOptions* options) { + quint64 _ret = self->requestPage(static_cast(pageNumber), *imageSize, *options); + return static_cast(_ret); +} + +bool QPdfPageRenderer_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::event(event); + +} + +bool QPdfPageRenderer_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::eventFilter(watched, event); + +} + +bool QPdfPageRenderer_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::timerEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::childEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::customEvent(event); + +} + +bool QPdfPageRenderer_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::connectNotify(*signal); + +} + +bool QPdfPageRenderer_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfPageRenderer*)(self) )->QPdfPageRenderer::disconnectNotify(*signal); + +} + +QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfPageRenderer* self_cast = dynamic_cast( (QPdfPageRenderer*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfPageRenderer_delete(QPdfPageRenderer* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfpagerenderer.go b/qt6/pdf/gen_qpdfpagerenderer.go new file mode 100644 index 00000000..52ccbee2 --- /dev/null +++ b/qt6/pdf/gen_qpdfpagerenderer.go @@ -0,0 +1,468 @@ +package pdf + +/* + +#include "gen_qpdfpagerenderer.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfPageRenderer__RenderMode int + +const ( + QPdfPageRenderer__MultiThreaded QPdfPageRenderer__RenderMode = 0 + QPdfPageRenderer__SingleThreaded QPdfPageRenderer__RenderMode = 1 +) + +type QPdfPageRenderer struct { + h *C.QPdfPageRenderer + *qt6.QObject +} + +func (this *QPdfPageRenderer) cPointer() *C.QPdfPageRenderer { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfPageRenderer) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfPageRenderer constructs the type using only CGO pointers. +func newQPdfPageRenderer(h *C.QPdfPageRenderer) *QPdfPageRenderer { + if h == nil { + return nil + } + var outptr_QObject *C.QObject = nil + C.QPdfPageRenderer_virtbase(h, &outptr_QObject) + + return &QPdfPageRenderer{h: h, + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} +} + +// UnsafeNewQPdfPageRenderer constructs the type using only unsafe pointers. +func UnsafeNewQPdfPageRenderer(h unsafe.Pointer) *QPdfPageRenderer { + return newQPdfPageRenderer((*C.QPdfPageRenderer)(h)) +} + +// NewQPdfPageRenderer constructs a new QPdfPageRenderer object. +func NewQPdfPageRenderer() *QPdfPageRenderer { + + return newQPdfPageRenderer(C.QPdfPageRenderer_new()) +} + +// NewQPdfPageRenderer2 constructs a new QPdfPageRenderer object. +func NewQPdfPageRenderer2(parent *qt6.QObject) *QPdfPageRenderer { + + return newQPdfPageRenderer(C.QPdfPageRenderer_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfPageRenderer) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfPageRenderer_metaObject(this.h))) +} + +func (this *QPdfPageRenderer) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfPageRenderer_metacast(this.h, param1_Cstring)) +} + +func QPdfPageRenderer_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageRenderer) RenderMode() QPdfPageRenderer__RenderMode { + return (QPdfPageRenderer__RenderMode)(C.QPdfPageRenderer_renderMode(this.h)) +} + +func (this *QPdfPageRenderer) SetRenderMode(mode QPdfPageRenderer__RenderMode) { + C.QPdfPageRenderer_setRenderMode(this.h, (C.int)(mode)) +} + +func (this *QPdfPageRenderer) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfPageRenderer_document(this.h)) +} + +func (this *QPdfPageRenderer) SetDocument(document *QPdfDocument) { + C.QPdfPageRenderer_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfPageRenderer) RequestPage(pageNumber int, imageSize qt6.QSize) uint64 { + return (uint64)(C.QPdfPageRenderer_requestPage(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()))) +} + +func (this *QPdfPageRenderer) DocumentChanged(document *QPdfDocument) { + C.QPdfPageRenderer_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfPageRenderer) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfPageRenderer_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_documentChanged +func miqt_exec_callback_QPdfPageRenderer_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfPageRenderer) RenderModeChanged(renderMode QPdfPageRenderer__RenderMode) { + C.QPdfPageRenderer_renderModeChanged(this.h, (C.int)(renderMode)) +} +func (this *QPdfPageRenderer) OnRenderModeChanged(slot func(renderMode QPdfPageRenderer__RenderMode)) { + C.QPdfPageRenderer_connect_renderModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_renderModeChanged +func miqt_exec_callback_QPdfPageRenderer_renderModeChanged(cb C.intptr_t, renderMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(renderMode QPdfPageRenderer__RenderMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfPageRenderer__RenderMode)(renderMode) + + gofunc(slotval1) +} + +func (this *QPdfPageRenderer) PageRendered(pageNumber int, imageSize qt6.QSize, image *qt6.QImage, options QPdfDocumentRenderOptions, requestId uint64) { + C.QPdfPageRenderer_pageRendered(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()), (*C.QImage)(image.UnsafePointer()), options.cPointer(), (C.ulonglong)(requestId)) +} +func (this *QPdfPageRenderer) OnPageRendered(slot func(pageNumber int, imageSize qt6.QSize, image *qt6.QImage, options QPdfDocumentRenderOptions, requestId uint64)) { + C.QPdfPageRenderer_connect_pageRendered(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfPageRenderer_pageRendered +func miqt_exec_callback_QPdfPageRenderer_pageRendered(cb C.intptr_t, pageNumber C.int, imageSize *C.QSize, image *C.QImage, options *C.QPdfDocumentRenderOptions, requestId C.ulonglong) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageNumber int, imageSize qt6.QSize, image *qt6.QImage, options QPdfDocumentRenderOptions, requestId uint64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageNumber) + + imageSize_goptr := qt6.UnsafeNewQSize(unsafe.Pointer(imageSize)) + imageSize_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *imageSize_goptr + + slotval3 := qt6.UnsafeNewQImage(unsafe.Pointer(image)) + + options_goptr := newQPdfDocumentRenderOptions(options) + options_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval4 := *options_goptr + + slotval5 := (uint64)(requestId) + + gofunc(slotval1, slotval2, slotval3, slotval4, slotval5) +} + +func QPdfPageRenderer_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfPageRenderer_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfPageRenderer_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfPageRenderer) RequestPage2(pageNumber int, imageSize qt6.QSize, options QPdfDocumentRenderOptions) uint64 { + return (uint64)(C.QPdfPageRenderer_requestPage2(this.h, (C.int)(pageNumber), (*C.QSize)(imageSize.UnsafePointer()), options.cPointer())) +} + +// Sender can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfPageRenderer_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageRenderer_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfPageRenderer_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfPageRenderer that was directly constructed. +func (this *QPdfPageRenderer) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfPageRenderer_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfPageRenderer) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPdfPageRenderer_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageRenderer) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + ok := C.QPdfPageRenderer_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_event +func miqt_exec_callback_QPdfPageRenderer_event(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageRenderer) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QPdfPageRenderer_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfPageRenderer) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + ok := C.QPdfPageRenderer_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_eventFilter +func miqt_exec_callback_QPdfPageRenderer_eventFilter(self *C.QPdfPageRenderer, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfPageRenderer) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfPageRenderer_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfPageRenderer_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_timerEvent +func miqt_exec_callback_QPdfPageRenderer_timerEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfPageRenderer_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfPageRenderer_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_childEvent +func miqt_exec_callback_QPdfPageRenderer_childEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfPageRenderer_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfPageRenderer_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_customEvent +func miqt_exec_callback_QPdfPageRenderer_customEvent(self *C.QPdfPageRenderer, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfPageRenderer_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfPageRenderer_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_connectNotify +func miqt_exec_callback_QPdfPageRenderer_connectNotify(self *C.QPdfPageRenderer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfPageRenderer) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfPageRenderer_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfPageRenderer) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfPageRenderer_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfPageRenderer_disconnectNotify +func miqt_exec_callback_QPdfPageRenderer_disconnectNotify(self *C.QPdfPageRenderer, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfPageRenderer{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfPageRenderer) Delete() { + C.QPdfPageRenderer_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfPageRenderer) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfPageRenderer) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfpagerenderer.h b/qt6/pdf/gen_qpdfpagerenderer.h new file mode 100644 index 00000000..682b49ad --- /dev/null +++ b/qt6/pdf/gen_qpdfpagerenderer.h @@ -0,0 +1,87 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFPAGERENDERER_H +#define MIQT_QT6_PDF_GEN_QPDFPAGERENDERER_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QChildEvent; +class QEvent; +class QImage; +class QMetaMethod; +class QMetaObject; +class QObject; +class QPdfDocument; +class QPdfDocumentRenderOptions; +class QPdfPageRenderer; +class QSize; +class QTimerEvent; +#else +typedef struct QChildEvent QChildEvent; +typedef struct QEvent QEvent; +typedef struct QImage QImage; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfDocumentRenderOptions QPdfDocumentRenderOptions; +typedef struct QPdfPageRenderer QPdfPageRenderer; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +#endif + +QPdfPageRenderer* QPdfPageRenderer_new(); +QPdfPageRenderer* QPdfPageRenderer_new2(QObject* parent); +void QPdfPageRenderer_virtbase(QPdfPageRenderer* src, QObject** outptr_QObject); +QMetaObject* QPdfPageRenderer_metaObject(const QPdfPageRenderer* self); +void* QPdfPageRenderer_metacast(QPdfPageRenderer* self, const char* param1); +struct miqt_string QPdfPageRenderer_tr(const char* s); +int QPdfPageRenderer_renderMode(const QPdfPageRenderer* self); +void QPdfPageRenderer_setRenderMode(QPdfPageRenderer* self, int mode); +QPdfDocument* QPdfPageRenderer_document(const QPdfPageRenderer* self); +void QPdfPageRenderer_setDocument(QPdfPageRenderer* self, QPdfDocument* document); +unsigned long long QPdfPageRenderer_requestPage(QPdfPageRenderer* self, int pageNumber, QSize* imageSize); +void QPdfPageRenderer_documentChanged(QPdfPageRenderer* self, QPdfDocument* document); +void QPdfPageRenderer_connect_documentChanged(QPdfPageRenderer* self, intptr_t slot); +void QPdfPageRenderer_renderModeChanged(QPdfPageRenderer* self, int renderMode); +void QPdfPageRenderer_connect_renderModeChanged(QPdfPageRenderer* self, intptr_t slot); +void QPdfPageRenderer_pageRendered(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QImage* image, QPdfDocumentRenderOptions* options, unsigned long long requestId); +void QPdfPageRenderer_connect_pageRendered(QPdfPageRenderer* self, intptr_t slot); +struct miqt_string QPdfPageRenderer_tr2(const char* s, const char* c); +struct miqt_string QPdfPageRenderer_tr3(const char* s, const char* c, int n); +unsigned long long QPdfPageRenderer_requestPage2(QPdfPageRenderer* self, int pageNumber, QSize* imageSize, QPdfDocumentRenderOptions* options); +bool QPdfPageRenderer_override_virtual_event(void* self, intptr_t slot); +bool QPdfPageRenderer_virtualbase_event(void* self, QEvent* event); +bool QPdfPageRenderer_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfPageRenderer_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfPageRenderer_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfPageRenderer_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfPageRenderer_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfPageRenderer_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfPageRenderer_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfPageRenderer_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +QObject* QPdfPageRenderer_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfPageRenderer_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfPageRenderer_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfPageRenderer_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfPageRenderer_delete(QPdfPageRenderer* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfsearchmodel.cpp b/qt6/pdf/gen_qpdfsearchmodel.cpp new file mode 100644 index 00000000..937376ac --- /dev/null +++ b/qt6/pdf/gen_qpdfsearchmodel.cpp @@ -0,0 +1,2245 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfsearchmodel.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfSearchModel_documentChanged(intptr_t); +void miqt_exec_callback_QPdfSearchModel_searchStringChanged(intptr_t); +struct miqt_map /* of int to struct miqt_string */ miqt_exec_callback_QPdfSearchModel_roleNames(const QPdfSearchModel*, intptr_t); +int miqt_exec_callback_QPdfSearchModel_rowCount(const QPdfSearchModel*, intptr_t, QModelIndex*); +QVariant* miqt_exec_callback_QPdfSearchModel_data(const QPdfSearchModel*, intptr_t, QModelIndex*, int); +void miqt_exec_callback_QPdfSearchModel_timerEvent(QPdfSearchModel*, intptr_t, QTimerEvent*); +QModelIndex* miqt_exec_callback_QPdfSearchModel_index(const QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +QModelIndex* miqt_exec_callback_QPdfSearchModel_sibling(const QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_dropMimeData(QPdfSearchModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfSearchModel_flags(const QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_setData(QPdfSearchModel*, intptr_t, QModelIndex*, QVariant*, int); +QVariant* miqt_exec_callback_QPdfSearchModel_headerData(const QPdfSearchModel*, intptr_t, int, int, int); +bool miqt_exec_callback_QPdfSearchModel_setHeaderData(QPdfSearchModel*, intptr_t, int, int, QVariant*, int); +struct miqt_map /* of int to QVariant* */ miqt_exec_callback_QPdfSearchModel_itemData(const QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_setItemData(QPdfSearchModel*, intptr_t, QModelIndex*, struct miqt_map /* of int to QVariant* */ ); +bool miqt_exec_callback_QPdfSearchModel_clearItemData(QPdfSearchModel*, intptr_t, QModelIndex*); +struct miqt_array /* of struct miqt_string */ miqt_exec_callback_QPdfSearchModel_mimeTypes(const QPdfSearchModel*, intptr_t); +QMimeData* miqt_exec_callback_QPdfSearchModel_mimeData(const QPdfSearchModel*, intptr_t, struct miqt_array /* of QModelIndex* */ ); +bool miqt_exec_callback_QPdfSearchModel_canDropMimeData(const QPdfSearchModel*, intptr_t, QMimeData*, int, int, int, QModelIndex*); +int miqt_exec_callback_QPdfSearchModel_supportedDropActions(const QPdfSearchModel*, intptr_t); +int miqt_exec_callback_QPdfSearchModel_supportedDragActions(const QPdfSearchModel*, intptr_t); +bool miqt_exec_callback_QPdfSearchModel_insertRows(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_insertColumns(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_removeRows(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_removeColumns(QPdfSearchModel*, intptr_t, int, int, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_moveRows(QPdfSearchModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +bool miqt_exec_callback_QPdfSearchModel_moveColumns(QPdfSearchModel*, intptr_t, QModelIndex*, int, int, QModelIndex*, int); +void miqt_exec_callback_QPdfSearchModel_fetchMore(QPdfSearchModel*, intptr_t, QModelIndex*); +bool miqt_exec_callback_QPdfSearchModel_canFetchMore(const QPdfSearchModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfSearchModel_sort(QPdfSearchModel*, intptr_t, int, int); +QModelIndex* miqt_exec_callback_QPdfSearchModel_buddy(const QPdfSearchModel*, intptr_t, QModelIndex*); +struct miqt_array /* of QModelIndex* */ miqt_exec_callback_QPdfSearchModel_match(const QPdfSearchModel*, intptr_t, QModelIndex*, int, QVariant*, int, int); +QSize* miqt_exec_callback_QPdfSearchModel_span(const QPdfSearchModel*, intptr_t, QModelIndex*); +void miqt_exec_callback_QPdfSearchModel_multiData(const QPdfSearchModel*, intptr_t, QModelIndex*, QModelRoleDataSpan*); +bool miqt_exec_callback_QPdfSearchModel_submit(QPdfSearchModel*, intptr_t); +void miqt_exec_callback_QPdfSearchModel_revert(QPdfSearchModel*, intptr_t); +void miqt_exec_callback_QPdfSearchModel_resetInternalData(QPdfSearchModel*, intptr_t); +bool miqt_exec_callback_QPdfSearchModel_event(QPdfSearchModel*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfSearchModel_eventFilter(QPdfSearchModel*, intptr_t, QObject*, QEvent*); +void miqt_exec_callback_QPdfSearchModel_childEvent(QPdfSearchModel*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfSearchModel_customEvent(QPdfSearchModel*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfSearchModel_connectNotify(QPdfSearchModel*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfSearchModel_disconnectNotify(QPdfSearchModel*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfSearchModel final : public QPdfSearchModel { +public: + + MiqtVirtualQPdfSearchModel(): QPdfSearchModel() {}; + MiqtVirtualQPdfSearchModel(QObject* parent): QPdfSearchModel(parent) {}; + + virtual ~MiqtVirtualQPdfSearchModel() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__roleNames = 0; + + // Subclass to allow providing a Go implementation + virtual QHash roleNames() const override { + if (handle__roleNames == 0) { + return QPdfSearchModel::roleNames(); + } + + + struct miqt_map /* of int to struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfSearchModel_roleNames(this, handle__roleNames); + QHash callback_return_value_QMap; + callback_return_value_QMap.reserve(callback_return_value.len); + int* callback_return_value_karr = static_cast(callback_return_value.keys); + struct miqt_string* callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QByteArray callback_return_value_varr_i_QByteArray(callback_return_value_varr[i].data, callback_return_value_varr[i].len); + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = callback_return_value_varr_i_QByteArray; + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__rowCount = 0; + + // Subclass to allow providing a Go implementation + virtual int rowCount(const QModelIndex& parent) const override { + if (handle__rowCount == 0) { + return QPdfSearchModel::rowCount(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_rowCount(this, handle__rowCount, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__data = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant data(const QModelIndex& index, int role) const override { + if (handle__data == 0) { + return QPdfSearchModel::data(index, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + int sigval2 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfSearchModel_data(this, handle__data, sigval1, sigval2); + + return *callback_return_value; + } + + friend QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfSearchModel::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__index = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex index(int row, int column, const QModelIndex& parent) const override { + if (handle__index == 0) { + return QPdfSearchModel::index(row, column, parent); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_index(this, handle__index, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sibling = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex sibling(int row, int column, const QModelIndex& idx) const override { + if (handle__sibling == 0) { + return QPdfSearchModel::sibling(row, column, idx); + } + + int sigval1 = row; + int sigval2 = column; + const QModelIndex& idx_ret = idx; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&idx_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_sibling(this, handle__sibling, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override { + if (handle__dropMimeData == 0) { + return QPdfSearchModel::dropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_dropMimeData(this, handle__dropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__flags = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::ItemFlags flags(const QModelIndex& index) const override { + if (handle__flags == 0) { + return QPdfSearchModel::flags(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_flags(this, handle__flags, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setData(const QModelIndex& index, const QVariant& value, int role) override { + if (handle__setData == 0) { + return QPdfSearchModel::setData(index, value, role); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval2 = const_cast(&value_ret); + int sigval3 = role; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setData(this, handle__setData, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__headerData = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override { + if (handle__headerData == 0) { + return QPdfSearchModel::headerData(section, orientation, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + int sigval3 = role; + + QVariant* callback_return_value = miqt_exec_callback_QPdfSearchModel_headerData(this, handle__headerData, sigval1, sigval2, sigval3); + + return *callback_return_value; + } + + friend QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setHeaderData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) override { + if (handle__setHeaderData == 0) { + return QPdfSearchModel::setHeaderData(section, orientation, value, role); + } + + int sigval1 = section; + Qt::Orientation orientation_ret = orientation; + int sigval2 = static_cast(orientation_ret); + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = role; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setHeaderData(this, handle__setHeaderData, sigval1, sigval2, sigval3, sigval4); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); + + // cgo.Handle value for overwritten implementation + intptr_t handle__itemData = 0; + + // Subclass to allow providing a Go implementation + virtual QMap itemData(const QModelIndex& index) const override { + if (handle__itemData == 0) { + return QPdfSearchModel::itemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + struct miqt_map /* of int to QVariant* */ callback_return_value = miqt_exec_callback_QPdfSearchModel_itemData(this, handle__itemData, sigval1); + QMap callback_return_value_QMap; + int* callback_return_value_karr = static_cast(callback_return_value.keys); + QVariant** callback_return_value_varr = static_cast(callback_return_value.values); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QMap[static_cast(callback_return_value_karr[i])] = *(callback_return_value_varr[i]); + } + + return callback_return_value_QMap; + } + + friend struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool setItemData(const QModelIndex& index, const QMap& roles) override { + if (handle__setItemData == 0) { + return QPdfSearchModel::setItemData(index, roles); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + const QMap& roles_ret = roles; + // Convert QMap<> from C++ memory to manually-managed C memory + int* roles_karr = static_cast(malloc(sizeof(int) * roles_ret.size())); + QVariant** roles_varr = static_cast(malloc(sizeof(QVariant*) * roles_ret.size())); + int roles_ctr = 0; + for (auto roles_itr = roles_ret.keyValueBegin(); roles_itr != roles_ret.keyValueEnd(); ++roles_itr) { + roles_karr[roles_ctr] = roles_itr->first; + roles_varr[roles_ctr] = new QVariant(roles_itr->second); + roles_ctr++; + } + struct miqt_map roles_out; + roles_out.len = roles_ret.size(); + roles_out.keys = static_cast(roles_karr); + roles_out.values = static_cast(roles_varr); + struct miqt_map /* of int to QVariant* */ sigval2 = roles_out; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_setItemData(this, handle__setItemData, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); + + // cgo.Handle value for overwritten implementation + intptr_t handle__clearItemData = 0; + + // Subclass to allow providing a Go implementation + virtual bool clearItemData(const QModelIndex& index) override { + if (handle__clearItemData == 0) { + return QPdfSearchModel::clearItemData(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_clearItemData(this, handle__clearItemData, sigval1); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_clearItemData(void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeTypes = 0; + + // Subclass to allow providing a Go implementation + virtual QStringList mimeTypes() const override { + if (handle__mimeTypes == 0) { + return QPdfSearchModel::mimeTypes(); + } + + + struct miqt_array /* of struct miqt_string */ callback_return_value = miqt_exec_callback_QPdfSearchModel_mimeTypes(this, handle__mimeTypes); + QStringList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + struct miqt_string* callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + QString callback_return_value_arr_i_QString = QString::fromUtf8(callback_return_value_arr[i].data, callback_return_value_arr[i].len); + callback_return_value_QList.push_back(callback_return_value_arr_i_QString); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mimeData = 0; + + // Subclass to allow providing a Go implementation + virtual QMimeData* mimeData(const QModelIndexList& indexes) const override { + if (handle__mimeData == 0) { + return QPdfSearchModel::mimeData(indexes); + } + + const QModelIndexList& indexes_ret = indexes; + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** indexes_arr = static_cast(malloc(sizeof(QModelIndex*) * indexes_ret.length())); + for (size_t i = 0, e = indexes_ret.length(); i < e; ++i) { + indexes_arr[i] = new QModelIndex(indexes_ret[i]); + } + struct miqt_array indexes_out; + indexes_out.len = indexes_ret.length(); + indexes_out.data = static_cast(indexes_arr); + struct miqt_array /* of QModelIndex* */ sigval1 = indexes_out; + + QMimeData* callback_return_value = miqt_exec_callback_QPdfSearchModel_mimeData(this, handle__mimeData, sigval1); + + return callback_return_value; + } + + friend QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canDropMimeData = 0; + + // Subclass to allow providing a Go implementation + virtual bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const override { + if (handle__canDropMimeData == 0) { + return QPdfSearchModel::canDropMimeData(data, action, row, column, parent); + } + + QMimeData* sigval1 = (QMimeData*) data; + Qt::DropAction action_ret = action; + int sigval2 = static_cast(action_ret); + int sigval3 = row; + int sigval4 = column; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval5 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_canDropMimeData(this, handle__canDropMimeData, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDropActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDropActions() const override { + if (handle__supportedDropActions == 0) { + return QPdfSearchModel::supportedDropActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_supportedDropActions(this, handle__supportedDropActions); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_supportedDropActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__supportedDragActions = 0; + + // Subclass to allow providing a Go implementation + virtual Qt::DropActions supportedDragActions() const override { + if (handle__supportedDragActions == 0) { + return QPdfSearchModel::supportedDragActions(); + } + + + int callback_return_value = miqt_exec_callback_QPdfSearchModel_supportedDragActions(this, handle__supportedDragActions); + + return static_cast(callback_return_value); + } + + friend int QPdfSearchModel_virtualbase_supportedDragActions(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertRows(int row, int count, const QModelIndex& parent) override { + if (handle__insertRows == 0) { + return QPdfSearchModel::insertRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_insertRows(this, handle__insertRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__insertColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool insertColumns(int column, int count, const QModelIndex& parent) override { + if (handle__insertColumns == 0) { + return QPdfSearchModel::insertColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_insertColumns(this, handle__insertColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeRows(int row, int count, const QModelIndex& parent) override { + if (handle__removeRows == 0) { + return QPdfSearchModel::removeRows(row, count, parent); + } + + int sigval1 = row; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_removeRows(this, handle__removeRows, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__removeColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool removeColumns(int column, int count, const QModelIndex& parent) override { + if (handle__removeColumns == 0) { + return QPdfSearchModel::removeColumns(column, count, parent); + } + + int sigval1 = column; + int sigval2 = count; + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval3 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_removeColumns(this, handle__removeColumns, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveRows = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveRows == 0) { + return QPdfSearchModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceRow; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_moveRows(this, handle__moveRows, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveColumns = 0; + + // Subclass to allow providing a Go implementation + virtual bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) override { + if (handle__moveColumns == 0) { + return QPdfSearchModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } + + const QModelIndex& sourceParent_ret = sourceParent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&sourceParent_ret); + int sigval2 = sourceColumn; + int sigval3 = count; + const QModelIndex& destinationParent_ret = destinationParent; + // Cast returned reference into pointer + QModelIndex* sigval4 = const_cast(&destinationParent_ret); + int sigval5 = destinationChild; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_moveColumns(this, handle__moveColumns, sigval1, sigval2, sigval3, sigval4, sigval5); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); + + // cgo.Handle value for overwritten implementation + intptr_t handle__fetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual void fetchMore(const QModelIndex& parent) override { + if (handle__fetchMore == 0) { + QPdfSearchModel::fetchMore(parent); + return; + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + miqt_exec_callback_QPdfSearchModel_fetchMore(this, handle__fetchMore, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__canFetchMore = 0; + + // Subclass to allow providing a Go implementation + virtual bool canFetchMore(const QModelIndex& parent) const override { + if (handle__canFetchMore == 0) { + return QPdfSearchModel::canFetchMore(parent); + } + + const QModelIndex& parent_ret = parent; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&parent_ret); + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_canFetchMore(this, handle__canFetchMore, sigval1); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sort = 0; + + // Subclass to allow providing a Go implementation + virtual void sort(int column, Qt::SortOrder order) override { + if (handle__sort == 0) { + QPdfSearchModel::sort(column, order); + return; + } + + int sigval1 = column; + Qt::SortOrder order_ret = order; + int sigval2 = static_cast(order_ret); + + miqt_exec_callback_QPdfSearchModel_sort(this, handle__sort, sigval1, sigval2); + + + } + + friend void QPdfSearchModel_virtualbase_sort(void* self, int column, int order); + + // cgo.Handle value for overwritten implementation + intptr_t handle__buddy = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndex buddy(const QModelIndex& index) const override { + if (handle__buddy == 0) { + return QPdfSearchModel::buddy(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QModelIndex* callback_return_value = miqt_exec_callback_QPdfSearchModel_buddy(this, handle__buddy, sigval1); + + return *callback_return_value; + } + + friend QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__match = 0; + + // Subclass to allow providing a Go implementation + virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const override { + if (handle__match == 0) { + return QPdfSearchModel::match(start, role, value, hits, flags); + } + + const QModelIndex& start_ret = start; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&start_ret); + int sigval2 = role; + const QVariant& value_ret = value; + // Cast returned reference into pointer + QVariant* sigval3 = const_cast(&value_ret); + int sigval4 = hits; + Qt::MatchFlags flags_ret = flags; + int sigval5 = static_cast(flags_ret); + + struct miqt_array /* of QModelIndex* */ callback_return_value = miqt_exec_callback_QPdfSearchModel_match(this, handle__match, sigval1, sigval2, sigval3, sigval4, sigval5); + QModelIndexList callback_return_value_QList; + callback_return_value_QList.reserve(callback_return_value.len); + QModelIndex** callback_return_value_arr = static_cast(callback_return_value.data); + for(size_t i = 0; i < callback_return_value.len; ++i) { + callback_return_value_QList.push_back(*(callback_return_value_arr[i])); + } + + return callback_return_value_QList; + } + + friend struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); + + // cgo.Handle value for overwritten implementation + intptr_t handle__span = 0; + + // Subclass to allow providing a Go implementation + virtual QSize span(const QModelIndex& index) const override { + if (handle__span == 0) { + return QPdfSearchModel::span(index); + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + + QSize* callback_return_value = miqt_exec_callback_QPdfSearchModel_span(this, handle__span, sigval1); + + return *callback_return_value; + } + + friend QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index); + + // cgo.Handle value for overwritten implementation + intptr_t handle__multiData = 0; + + // Subclass to allow providing a Go implementation + virtual void multiData(const QModelIndex& index, QModelRoleDataSpan roleDataSpan) const override { + if (handle__multiData == 0) { + QPdfSearchModel::multiData(index, roleDataSpan); + return; + } + + const QModelIndex& index_ret = index; + // Cast returned reference into pointer + QModelIndex* sigval1 = const_cast(&index_ret); + QModelRoleDataSpan* sigval2 = new QModelRoleDataSpan(roleDataSpan); + + miqt_exec_callback_QPdfSearchModel_multiData(this, handle__multiData, sigval1, sigval2); + + + } + + friend void QPdfSearchModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); + + // cgo.Handle value for overwritten implementation + intptr_t handle__submit = 0; + + // Subclass to allow providing a Go implementation + virtual bool submit() override { + if (handle__submit == 0) { + return QPdfSearchModel::submit(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_submit(this, handle__submit); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_submit(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__revert = 0; + + // Subclass to allow providing a Go implementation + virtual void revert() override { + if (handle__revert == 0) { + QPdfSearchModel::revert(); + return; + } + + + miqt_exec_callback_QPdfSearchModel_revert(this, handle__revert); + + + } + + friend void QPdfSearchModel_virtualbase_revert(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__resetInternalData = 0; + + // Subclass to allow providing a Go implementation + virtual void resetInternalData() override { + if (handle__resetInternalData == 0) { + QPdfSearchModel::resetInternalData(); + return; + } + + + miqt_exec_callback_QPdfSearchModel_resetInternalData(this, handle__resetInternalData); + + + } + + friend void QPdfSearchModel_virtualbase_resetInternalData(void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* event) override { + if (handle__event == 0) { + return QPdfSearchModel::event(event); + } + + QEvent* sigval1 = event; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* watched, QEvent* event) override { + if (handle__eventFilter == 0) { + return QPdfSearchModel::eventFilter(watched, event); + } + + QObject* sigval1 = watched; + QEvent* sigval2 = event; + + bool callback_return_value = miqt_exec_callback_QPdfSearchModel_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfSearchModel::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfSearchModel::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfSearchModel_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfSearchModel::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfSearchModel_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfSearchModel::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfSearchModel_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page); + friend QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); + friend void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); + friend bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); + friend void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); + friend bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); + friend void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); + friend void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); + friend bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); + friend void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); + friend void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); + friend void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); + friend struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); + friend QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfSearchModel* QPdfSearchModel_new() { + return new MiqtVirtualQPdfSearchModel(); +} + +QPdfSearchModel* QPdfSearchModel_new2(QObject* parent) { + return new MiqtVirtualQPdfSearchModel(parent); +} + +void QPdfSearchModel_virtbase(QPdfSearchModel* src, QAbstractListModel** outptr_QAbstractListModel) { + *outptr_QAbstractListModel = static_cast(src); +} + +QMetaObject* QPdfSearchModel_metaObject(const QPdfSearchModel* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfSearchModel_metacast(QPdfSearchModel* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfSearchModel_tr(const char* s) { + QString _ret = QPdfSearchModel::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_array /* of QPdfLink* */ QPdfSearchModel_resultsOnPage(const QPdfSearchModel* self, int page) { + QList _ret = self->resultsOnPage(static_cast(page)); + // Convert QList<> from C++ memory to manually-managed C memory + QPdfLink** _arr = static_cast(malloc(sizeof(QPdfLink*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QPdfLink(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; +} + +QPdfLink* QPdfSearchModel_resultAtIndex(const QPdfSearchModel* self, int index) { + return new QPdfLink(self->resultAtIndex(static_cast(index))); +} + +QPdfDocument* QPdfSearchModel_document(const QPdfSearchModel* self) { + return self->document(); +} + +struct miqt_string QPdfSearchModel_searchString(const QPdfSearchModel* self) { + QString _ret = self->searchString(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_roleNames(const QPdfSearchModel* self) { + QHash _ret = self->roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; +} + +int QPdfSearchModel_rowCount(const QPdfSearchModel* self, QModelIndex* parent) { + return self->rowCount(*parent); +} + +QVariant* QPdfSearchModel_data(const QPdfSearchModel* self, QModelIndex* index, int role) { + return new QVariant(self->data(*index, static_cast(role))); +} + +void QPdfSearchModel_setSearchString(QPdfSearchModel* self, struct miqt_string searchString) { + QString searchString_QString = QString::fromUtf8(searchString.data, searchString.len); + self->setSearchString(searchString_QString); +} + +void QPdfSearchModel_setDocument(QPdfSearchModel* self, QPdfDocument* document) { + self->setDocument(document); +} + +void QPdfSearchModel_documentChanged(QPdfSearchModel* self) { + self->documentChanged(); +} + +void QPdfSearchModel_connect_documentChanged(QPdfSearchModel* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel::connect(self, static_cast(&QPdfSearchModel::documentChanged), self, [=]() { + miqt_exec_callback_QPdfSearchModel_documentChanged(slot); + }); +} + +void QPdfSearchModel_searchStringChanged(QPdfSearchModel* self) { + self->searchStringChanged(); +} + +void QPdfSearchModel_connect_searchStringChanged(QPdfSearchModel* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel::connect(self, static_cast(&QPdfSearchModel::searchStringChanged), self, [=]() { + miqt_exec_callback_QPdfSearchModel_searchStringChanged(slot); + }); +} + +struct miqt_string QPdfSearchModel_tr2(const char* s, const char* c) { + QString _ret = QPdfSearchModel::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfSearchModel_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfSearchModel::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfSearchModel_override_virtual_roleNames(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__roleNames = slot; + return true; +} + +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self) { + + QHash _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::roleNames(); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + struct miqt_string* _varr = static_cast(malloc(sizeof(struct miqt_string) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + QByteArray _hashval_qb = _itr->second; + struct miqt_string _hashval_ms; + _hashval_ms.len = _hashval_qb.length(); + _hashval_ms.data = static_cast(malloc(_hashval_ms.len)); + memcpy(_hashval_ms.data, _hashval_qb.data(), _hashval_ms.len); + _varr[_ctr] = _hashval_ms; + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_rowCount(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__rowCount = slot; + return true; +} + +int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::rowCount(*parent); + +} + +bool QPdfSearchModel_override_virtual_data(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__data = slot; + return true; +} + +QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role) { + + return new QVariant(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::data(*index, static_cast(role))); + +} + +bool QPdfSearchModel_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::timerEvent(event); + +} + +bool QPdfSearchModel_override_virtual_index(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__index = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::index(static_cast(row), static_cast(column), *parent)); + +} + +bool QPdfSearchModel_override_virtual_sibling(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sibling = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::sibling(static_cast(row), static_cast(column), *idx)); + +} + +bool QPdfSearchModel_override_virtual_dropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropMimeData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::dropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfSearchModel_override_virtual_flags(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__flags = slot; + return true; +} + +int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index) { + + Qt::ItemFlags _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::flags(*index); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_setData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setData(*index, *value, static_cast(role)); + +} + +bool QPdfSearchModel_override_virtual_headerData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__headerData = slot; + return true; +} + +QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role) { + + return new QVariant(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::headerData(static_cast(section), static_cast(orientation), static_cast(role))); + +} + +bool QPdfSearchModel_override_virtual_setHeaderData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setHeaderData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setHeaderData(static_cast(section), static_cast(orientation), *value, static_cast(role)); + +} + +bool QPdfSearchModel_override_virtual_itemData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__itemData = slot; + return true; +} + +struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index) { + + QMap _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::itemData(*index); + // Convert QMap<> from C++ memory to manually-managed C memory + int* _karr = static_cast(malloc(sizeof(int) * _ret.size())); + QVariant** _varr = static_cast(malloc(sizeof(QVariant*) * _ret.size())); + int _ctr = 0; + for (auto _itr = _ret.keyValueBegin(); _itr != _ret.keyValueEnd(); ++_itr) { + _karr[_ctr] = _itr->first; + _varr[_ctr] = new QVariant(_itr->second); + _ctr++; + } + struct miqt_map _out; + _out.len = _ret.size(); + _out.keys = static_cast(_karr); + _out.values = static_cast(_varr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_setItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setItemData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles) { + QMap roles_QMap; + int* roles_karr = static_cast(roles.keys); + QVariant** roles_varr = static_cast(roles.values); + for(size_t i = 0; i < roles.len; ++i) { + roles_QMap[static_cast(roles_karr[i])] = *(roles_varr[i]); + } + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::setItemData(*index, roles_QMap); + +} + +bool QPdfSearchModel_override_virtual_clearItemData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__clearItemData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_clearItemData(void* self, QModelIndex* index) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::clearItemData(*index); + +} + +bool QPdfSearchModel_override_virtual_mimeTypes(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeTypes = slot; + return true; +} + +struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self) { + + QStringList _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::mimeTypes(); + // Convert QList<> from C++ memory to manually-managed C memory + struct miqt_string* _arr = static_cast(malloc(sizeof(struct miqt_string) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + QString _lv_ret = _ret[i]; + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _lv_b = _lv_ret.toUtf8(); + struct miqt_string _lv_ms; + _lv_ms.len = _lv_b.length(); + _lv_ms.data = static_cast(malloc(_lv_ms.len)); + memcpy(_lv_ms.data, _lv_b.data(), _lv_ms.len); + _arr[i] = _lv_ms; + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_mimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mimeData = slot; + return true; +} + +QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes) { + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::mimeData(indexes_QList); + +} + +bool QPdfSearchModel_override_virtual_canDropMimeData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canDropMimeData = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::canDropMimeData(data, static_cast(action), static_cast(row), static_cast(column), *parent); + +} + +bool QPdfSearchModel_override_virtual_supportedDropActions(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDropActions = slot; + return true; +} + +int QPdfSearchModel_virtualbase_supportedDropActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::supportedDropActions(); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_supportedDragActions(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__supportedDragActions = slot; + return true; +} + +int QPdfSearchModel_virtualbase_supportedDragActions(const void* self) { + + Qt::DropActions _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::supportedDragActions(); + return static_cast(_ret); + +} + +bool QPdfSearchModel_override_virtual_insertRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::insertRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_insertColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__insertColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::insertColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_removeRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::removeRows(static_cast(row), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_removeColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__removeColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::removeColumns(static_cast(column), static_cast(count), *parent); + +} + +bool QPdfSearchModel_override_virtual_moveRows(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveRows = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::moveRows(*sourceParent, static_cast(sourceRow), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfSearchModel_override_virtual_moveColumns(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveColumns = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::moveColumns(*sourceParent, static_cast(sourceColumn), static_cast(count), *destinationParent, static_cast(destinationChild)); + +} + +bool QPdfSearchModel_override_virtual_fetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__fetchMore = slot; + return true; +} + +void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::fetchMore(*parent); + +} + +bool QPdfSearchModel_override_virtual_canFetchMore(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__canFetchMore = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent) { + + return ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::canFetchMore(*parent); + +} + +bool QPdfSearchModel_override_virtual_sort(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sort = slot; + return true; +} + +void QPdfSearchModel_virtualbase_sort(void* self, int column, int order) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::sort(static_cast(column), static_cast(order)); + +} + +bool QPdfSearchModel_override_virtual_buddy(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__buddy = slot; + return true; +} + +QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index) { + + return new QModelIndex(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::buddy(*index)); + +} + +bool QPdfSearchModel_override_virtual_match(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__match = slot; + return true; +} + +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags) { + + QModelIndexList _ret = ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::match(*start, static_cast(role), *value, static_cast(hits), static_cast(flags)); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +bool QPdfSearchModel_override_virtual_span(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__span = slot; + return true; +} + +QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index) { + + return new QSize(( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::span(*index)); + +} + +bool QPdfSearchModel_override_virtual_multiData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__multiData = slot; + return true; +} + +void QPdfSearchModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan) { + + ( (const MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::multiData(*index, *roleDataSpan); + +} + +bool QPdfSearchModel_override_virtual_submit(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__submit = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_submit(void* self) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::submit(); + +} + +bool QPdfSearchModel_override_virtual_revert(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__revert = slot; + return true; +} + +void QPdfSearchModel_virtualbase_revert(void* self) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::revert(); + +} + +bool QPdfSearchModel_override_virtual_resetInternalData(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__resetInternalData = slot; + return true; +} + +void QPdfSearchModel_virtualbase_resetInternalData(void* self) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::resetInternalData(); + +} + +bool QPdfSearchModel_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::event(event); + +} + +bool QPdfSearchModel_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event) { + + return ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::eventFilter(watched, event); + +} + +bool QPdfSearchModel_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::childEvent(event); + +} + +bool QPdfSearchModel_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::customEvent(event); + +} + +bool QPdfSearchModel_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::connectNotify(*signal); + +} + +bool QPdfSearchModel_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfSearchModel*)(self) )->QPdfSearchModel::disconnectNotify(*signal); + +} + +void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->updatePage(static_cast(page)); + +} + +QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QModelIndex(self_cast->createIndex(static_cast(row), static_cast(column))); + +} + +void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList indexes_QList; + indexes_QList.reserve(indexes.len); + QModelIndex** indexes_arr = static_cast(indexes.data); + for(size_t i = 0; i < indexes.len; ++i) { + indexes_QList.push_back(*(indexes_arr[i])); + } + + self_cast->encodeData(indexes_QList, *stream); + +} + +bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->decodeData(static_cast(row), static_cast(column), *parent, *stream); + +} + +void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertRows(); + +} + +void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveRows(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveRows(); + +} + +bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveRows(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationRow)); + +} + +void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveRows(); + +} + +void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginInsertColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endInsertColumns(); + +} + +void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginRemoveColumns(*parent, static_cast(first), static_cast(last)); + +} + +void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endRemoveColumns(); + +} + +bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->beginMoveColumns(*sourceParent, static_cast(sourceFirst), static_cast(sourceLast), *destinationParent, static_cast(destinationColumn)); + +} + +void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endMoveColumns(); + +} + +void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->beginResetModel(); + +} + +void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->endResetModel(); + +} + +void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->changePersistentIndex(*from, *to); + +} + +void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + QModelIndexList from_QList; + from_QList.reserve(from.len); + QModelIndex** from_arr = static_cast(from.data); + for(size_t i = 0; i < from.len; ++i) { + from_QList.push_back(*(from_arr[i])); + } + QModelIndexList to_QList; + to_QList.reserve(to.len); + QModelIndex** to_arr = static_cast(to.data); + for(size_t i = 0; i < to.len; ++i) { + to_QList.push_back(*(to_arr[i])); + } + + self_cast->changePersistentIndexList(from_QList, to_QList); + +} + +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return (struct miqt_array){}; + } + + *_dynamic_cast_ok = true; + + QModelIndexList _ret = self_cast->persistentIndexList(); + // Convert QList<> from C++ memory to manually-managed C memory + QModelIndex** _arr = static_cast(malloc(sizeof(QModelIndex*) * _ret.length())); + for (size_t i = 0, e = _ret.length(); i < e; ++i) { + _arr[i] = new QModelIndex(_ret[i]); + } + struct miqt_array _out; + _out.len = _ret.length(); + _out.data = static_cast(_arr); + return _out; + +} + +QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfSearchModel* self_cast = dynamic_cast( (QPdfSearchModel*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfSearchModel_delete(QPdfSearchModel* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfsearchmodel.go b/qt6/pdf/gen_qpdfsearchmodel.go new file mode 100644 index 00000000..3331e961 --- /dev/null +++ b/qt6/pdf/gen_qpdfsearchmodel.go @@ -0,0 +1,1927 @@ +package pdf + +/* + +#include "gen_qpdfsearchmodel.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfSearchModel__Role int + +const ( + QPdfSearchModel__Page QPdfSearchModel__Role = 256 + QPdfSearchModel__IndexOnPage QPdfSearchModel__Role = 257 + QPdfSearchModel__Location QPdfSearchModel__Role = 258 + QPdfSearchModel__ContextBefore QPdfSearchModel__Role = 259 + QPdfSearchModel__ContextAfter QPdfSearchModel__Role = 260 + QPdfSearchModel__NRoles QPdfSearchModel__Role = 261 +) + +type QPdfSearchModel struct { + h *C.QPdfSearchModel + *qt6.QAbstractListModel +} + +func (this *QPdfSearchModel) cPointer() *C.QPdfSearchModel { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfSearchModel) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfSearchModel constructs the type using only CGO pointers. +func newQPdfSearchModel(h *C.QPdfSearchModel) *QPdfSearchModel { + if h == nil { + return nil + } + var outptr_QAbstractListModel *C.QAbstractListModel = nil + C.QPdfSearchModel_virtbase(h, &outptr_QAbstractListModel) + + return &QPdfSearchModel{h: h, + QAbstractListModel: qt6.UnsafeNewQAbstractListModel(unsafe.Pointer(outptr_QAbstractListModel))} +} + +// UnsafeNewQPdfSearchModel constructs the type using only unsafe pointers. +func UnsafeNewQPdfSearchModel(h unsafe.Pointer) *QPdfSearchModel { + return newQPdfSearchModel((*C.QPdfSearchModel)(h)) +} + +// NewQPdfSearchModel constructs a new QPdfSearchModel object. +func NewQPdfSearchModel() *QPdfSearchModel { + + return newQPdfSearchModel(C.QPdfSearchModel_new()) +} + +// NewQPdfSearchModel2 constructs a new QPdfSearchModel object. +func NewQPdfSearchModel2(parent *qt6.QObject) *QPdfSearchModel { + + return newQPdfSearchModel(C.QPdfSearchModel_new2((*C.QObject)(parent.UnsafePointer()))) +} + +func (this *QPdfSearchModel) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfSearchModel_metaObject(this.h))) +} + +func (this *QPdfSearchModel) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfSearchModel_metacast(this.h, param1_Cstring)) +} + +func QPdfSearchModel_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchModel) ResultsOnPage(page int) []QPdfLink { + var _ma C.struct_miqt_array = C.QPdfSearchModel_resultsOnPage(this.h, (C.int)(page)) + _ret := make([]QPdfLink, int(_ma.len)) + _outCast := (*[0xffff]*C.QPdfLink)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := newQPdfLink(_outCast[i]) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret +} + +func (this *QPdfSearchModel) ResultAtIndex(index int) *QPdfLink { + _goptr := newQPdfLink(C.QPdfSearchModel_resultAtIndex(this.h, (C.int)(index))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSearchModel) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfSearchModel_document(this.h)) +} + +func (this *QPdfSearchModel) SearchString() string { + var _ms C.struct_miqt_string = C.QPdfSearchModel_searchString(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSearchModel) RoleNames() map[int][]byte { + var _mm C.struct_miqt_map = C.QPdfSearchModel_roleNames(this.h) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret +} + +func (this *QPdfSearchModel) RowCount(parent *qt6.QModelIndex) int { + return (int)(C.QPdfSearchModel_rowCount(this.h, (*C.QModelIndex)(parent.UnsafePointer()))) +} + +func (this *QPdfSearchModel) Data(index *qt6.QModelIndex, role int) *qt6.QVariant { + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_data(this.h, (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSearchModel) SetSearchString(searchString string) { + searchString_ms := C.struct_miqt_string{} + searchString_ms.data = C.CString(searchString) + searchString_ms.len = C.size_t(len(searchString)) + defer C.free(unsafe.Pointer(searchString_ms.data)) + C.QPdfSearchModel_setSearchString(this.h, searchString_ms) +} + +func (this *QPdfSearchModel) SetDocument(document *QPdfDocument) { + C.QPdfSearchModel_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfSearchModel) DocumentChanged() { + C.QPdfSearchModel_documentChanged(this.h) +} +func (this *QPdfSearchModel) OnDocumentChanged(slot func()) { + C.QPdfSearchModel_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfSearchModel_documentChanged +func miqt_exec_callback_QPdfSearchModel_documentChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func (this *QPdfSearchModel) SearchStringChanged() { + C.QPdfSearchModel_searchStringChanged(this.h) +} +func (this *QPdfSearchModel) OnSearchStringChanged(slot func()) { + C.QPdfSearchModel_connect_searchStringChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfSearchModel_searchStringChanged +func miqt_exec_callback_QPdfSearchModel_searchStringChanged(cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func()) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc() +} + +func QPdfSearchModel_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfSearchModel_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfSearchModel_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// UpdatePage can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) UpdatePage(page int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_updatePage(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(page)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// CreateIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) CreateIndex(row int, column int) qt6.QModelIndex { + + var _dynamic_cast_ok C.bool = false + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_protectedbase_createIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EncodeData can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EncodeData(indexes []qt6.QModelIndex, stream *qt6.QDataStream) { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_encodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), indexes_ma, (*C.QDataStream)(stream.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// DecodeData can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) DecodeData(row int, column int, parent *qt6.QModelIndex, stream *qt6.QDataStream) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_decodeData(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()), (*C.QDataStream)(stream.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// BeginInsertRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginInsertRows(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndInsertRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endInsertRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginRemoveRows(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndRemoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endRemoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginMoveRows(sourceParent *qt6.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt6.QModelIndex, destinationRow int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_beginMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationRow))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveRows can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndMoveRows() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endMoveRows(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginInsertColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginInsertColumns(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndInsertColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndInsertColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endInsertColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginRemoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginRemoveColumns(parent *qt6.QModelIndex, first int, last int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()), (C.int)(first), (C.int)(last)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndRemoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndRemoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endRemoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginMoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginMoveColumns(sourceParent *qt6.QModelIndex, sourceFirst int, sourceLast int, destinationParent *qt6.QModelIndex, destinationColumn int) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_beginMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceFirst), (C.int)(sourceLast), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationColumn))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// EndMoveColumns can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndMoveColumns() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endMoveColumns(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// BeginResetModel can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) BeginResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_beginResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// EndResetModel can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) EndResetModel() { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_endResetModel(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) ChangePersistentIndex(from *qt6.QModelIndex, to *qt6.QModelIndex) { + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_changePersistentIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QModelIndex)(from.UnsafePointer()), (*C.QModelIndex)(to.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ChangePersistentIndexList can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) ChangePersistentIndexList(from []qt6.QModelIndex, to []qt6.QModelIndex) { + from_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(from)))) + defer C.free(unsafe.Pointer(from_CArray)) + for i := range from { + from_CArray[i] = (*C.QModelIndex)(from[i].UnsafePointer()) + } + from_ma := C.struct_miqt_array{len: C.size_t(len(from)), data: unsafe.Pointer(from_CArray)} + to_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(to)))) + defer C.free(unsafe.Pointer(to_CArray)) + for i := range to { + to_CArray[i] = (*C.QModelIndex)(to[i].UnsafePointer()) + } + to_ma := C.struct_miqt_array{len: C.size_t(len(to)), data: unsafe.Pointer(to_CArray)} + + var _dynamic_cast_ok C.bool = false + C.QPdfSearchModel_protectedbase_changePersistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h), from_ma, to_ma) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// PersistentIndexList can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) PersistentIndexList() []qt6.QModelIndex { + + var _dynamic_cast_ok C.bool = false + var _ma C.struct_miqt_array = C.QPdfSearchModel_protectedbase_persistentIndexList(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + _ret := make([]qt6.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + _method_ret := _ret + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfSearchModel_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfSearchModel_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfSearchModel_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfSearchModel that was directly constructed. +func (this *QPdfSearchModel) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfSearchModel_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfSearchModel) callVirtualBase_RoleNames() map[int][]byte { + + var _mm C.struct_miqt_map = C.QPdfSearchModel_virtualbase_roleNames(unsafe.Pointer(this.h)) + _ret := make(map[int][]byte, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + var _hashval_bytearray C.struct_miqt_string = _Values[i] + _hashval_ret := C.GoBytes(unsafe.Pointer(_hashval_bytearray.data), C.int(int64(_hashval_bytearray.len))) + C.free(unsafe.Pointer(_hashval_bytearray.data)) + _entry_Value := _hashval_ret + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfSearchModel) OnRoleNames(slot func(super func() map[int][]byte) map[int][]byte) { + ok := C.QPdfSearchModel_override_virtual_roleNames(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_roleNames +func miqt_exec_callback_QPdfSearchModel_roleNames(self *C.QPdfSearchModel, cb C.intptr_t) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() map[int][]byte) map[int][]byte) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RoleNames) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_v_alias := C.struct_miqt_string{} + if len(virtualReturn_v) > 0 { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(&virtualReturn_v[0])) + } else { + virtualReturn_v_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + virtualReturn_v_alias.len = C.size_t(len(virtualReturn_v)) + virtualReturn_Values_CArray[virtualReturn_ctr] = virtualReturn_v_alias + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfSearchModel) callVirtualBase_RowCount(parent *qt6.QModelIndex) int { + + return (int)(C.QPdfSearchModel_virtualbase_rowCount(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRowCount(slot func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) { + ok := C.QPdfSearchModel_override_virtual_rowCount(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_rowCount +func miqt_exec_callback_QPdfSearchModel_rowCount(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) int, parent *qt6.QModelIndex) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RowCount, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Data(index *qt6.QModelIndex, role int) *qt6.QVariant { + + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_virtualbase_data(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnData(slot func(super func(index *qt6.QModelIndex, role int) *qt6.QVariant, index *qt6.QModelIndex, role int) *qt6.QVariant) { + ok := C.QPdfSearchModel_override_virtual_data(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_data +func miqt_exec_callback_QPdfSearchModel_data(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, role int) *qt6.QVariant, index *qt6.QModelIndex, role int) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Data, slotval1, slotval2) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfSearchModel_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfSearchModel_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_timerEvent +func miqt_exec_callback_QPdfSearchModel_timerEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_Index(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_index(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnIndex(slot func(super func(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_index(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_index +func miqt_exec_callback_QPdfSearchModel_index(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, column C.int, parent *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, parent *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Index, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_Sibling(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_sibling(unsafe.Pointer(this.h), (C.int)(row), (C.int)(column), (*C.QModelIndex)(idx.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnSibling(slot func(super func(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_sibling(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_sibling +func miqt_exec_callback_QPdfSearchModel_sibling(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, column C.int, idx *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex, row int, column int, idx *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(column) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(idx)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Sibling, slotval1, slotval2, slotval3) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_DropMimeData(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_dropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnDropMimeData(slot func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_dropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_dropMimeData +func miqt_exec_callback_QPdfSearchModel_dropMimeData(self *C.QPdfSearchModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt6.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_DropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Flags(index *qt6.QModelIndex) qt6.ItemFlag { + + return (qt6.ItemFlag)(C.QPdfSearchModel_virtualbase_flags(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnFlags(slot func(super func(index *qt6.QModelIndex) qt6.ItemFlag, index *qt6.QModelIndex) qt6.ItemFlag) { + ok := C.QPdfSearchModel_override_virtual_flags(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_flags +func miqt_exec_callback_QPdfSearchModel_flags(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) qt6.ItemFlag, index *qt6.QModelIndex) qt6.ItemFlag) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Flags, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SetData(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_setData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfSearchModel) OnSetData(slot func(super func(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool, index *qt6.QModelIndex, value *qt6.QVariant, role int) bool) { + ok := C.QPdfSearchModel_override_virtual_setData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setData +func miqt_exec_callback_QPdfSearchModel_setData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, value *qt6.QVariant, role int) bool, index *qt6.QModelIndex, value *qt6.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + slotval2 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetData, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_HeaderData(section int, orientation qt6.Orientation, role int) *qt6.QVariant { + + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfSearchModel_virtualbase_headerData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (C.int)(role)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnHeaderData(slot func(super func(section int, orientation qt6.Orientation, role int) *qt6.QVariant, section int, orientation qt6.Orientation, role int) *qt6.QVariant) { + ok := C.QPdfSearchModel_override_virtual_headerData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_headerData +func miqt_exec_callback_QPdfSearchModel_headerData(self *C.QPdfSearchModel, cb C.intptr_t, section C.int, orientation C.int, role C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt6.Orientation, role int) *qt6.QVariant, section int, orientation qt6.Orientation, role int) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt6.Orientation)(orientation) + + slotval3 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_HeaderData, slotval1, slotval2, slotval3) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_SetHeaderData(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_setHeaderData(unsafe.Pointer(this.h), (C.int)(section), (C.int)(orientation), (*C.QVariant)(value.UnsafePointer()), (C.int)(role))) + +} +func (this *QPdfSearchModel) OnSetHeaderData(slot func(super func(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool, section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool) { + ok := C.QPdfSearchModel_override_virtual_setHeaderData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setHeaderData +func miqt_exec_callback_QPdfSearchModel_setHeaderData(self *C.QPdfSearchModel, cb C.intptr_t, section C.int, orientation C.int, value *C.QVariant, role C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool, section int, orientation qt6.Orientation, value *qt6.QVariant, role int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(section) + + slotval2 := (qt6.Orientation)(orientation) + + slotval3 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(role) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetHeaderData, slotval1, slotval2, slotval3, slotval4) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_ItemData(index *qt6.QModelIndex) map[int]qt6.QVariant { + + var _mm C.struct_miqt_map = C.QPdfSearchModel_virtualbase_itemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())) + _ret := make(map[int]qt6.QVariant, int(_mm.len)) + _Keys := (*[0xffff]C.int)(unsafe.Pointer(_mm.keys)) + _Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(_mm.values)) + for i := 0; i < int(_mm.len); i++ { + _entry_Key := (int)(_Keys[i]) + + _mapval_goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(_Values[i])) + _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _entry_Value := *_mapval_goptr + + _ret[_entry_Key] = _entry_Value + } + return _ret + +} +func (this *QPdfSearchModel) OnItemData(slot func(super func(index *qt6.QModelIndex) map[int]qt6.QVariant, index *qt6.QModelIndex) map[int]qt6.QVariant) { + ok := C.QPdfSearchModel_override_virtual_itemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_itemData +func miqt_exec_callback_QPdfSearchModel_itemData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) C.struct_miqt_map { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) map[int]qt6.QVariant, index *qt6.QModelIndex) map[int]qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ItemData, slotval1) + virtualReturn_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Keys_CArray)) + virtualReturn_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_Values_CArray)) + virtualReturn_ctr := 0 + for virtualReturn_k, virtualReturn_v := range virtualReturn { + virtualReturn_Keys_CArray[virtualReturn_ctr] = (C.int)(virtualReturn_k) + virtualReturn_Values_CArray[virtualReturn_ctr] = (*C.QVariant)(virtualReturn_v.UnsafePointer()) + virtualReturn_ctr++ + } + virtualReturn_mm := C.struct_miqt_map{ + len: C.size_t(len(virtualReturn)), + keys: unsafe.Pointer(virtualReturn_Keys_CArray), + values: unsafe.Pointer(virtualReturn_Values_CArray), + } + + return virtualReturn_mm + +} + +func (this *QPdfSearchModel) callVirtualBase_SetItemData(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool { + roles_Keys_CArray := (*[0xffff]C.int)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Keys_CArray)) + roles_Values_CArray := (*[0xffff]*C.QVariant)(C.malloc(C.size_t(8 * len(roles)))) + defer C.free(unsafe.Pointer(roles_Values_CArray)) + roles_ctr := 0 + for roles_k, roles_v := range roles { + roles_Keys_CArray[roles_ctr] = (C.int)(roles_k) + roles_Values_CArray[roles_ctr] = (*C.QVariant)(roles_v.UnsafePointer()) + roles_ctr++ + } + roles_mm := C.struct_miqt_map{ + len: C.size_t(len(roles)), + keys: unsafe.Pointer(roles_Keys_CArray), + values: unsafe.Pointer(roles_Values_CArray), + } + + return (bool)(C.QPdfSearchModel_virtualbase_setItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), roles_mm)) + +} +func (this *QPdfSearchModel) OnSetItemData(slot func(super func(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool, index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool) { + ok := C.QPdfSearchModel_override_virtual_setItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_setItemData +func miqt_exec_callback_QPdfSearchModel_setItemData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, roles C.struct_miqt_map) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool, index *qt6.QModelIndex, roles map[int]qt6.QVariant) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + var roles_mm C.struct_miqt_map = roles + roles_ret := make(map[int]qt6.QVariant, int(roles_mm.len)) + roles_Keys := (*[0xffff]C.int)(unsafe.Pointer(roles_mm.keys)) + roles_Values := (*[0xffff]*C.QVariant)(unsafe.Pointer(roles_mm.values)) + for i := 0; i < int(roles_mm.len); i++ { + roles_entry_Key := (int)(roles_Keys[i]) + + roles_mapval_goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(roles_Values[i])) + roles_mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + roles_entry_Value := *roles_mapval_goptr + + roles_ret[roles_entry_Key] = roles_entry_Value + } + slotval2 := roles_ret + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SetItemData, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_ClearItemData(index *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_clearItemData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnClearItemData(slot func(super func(index *qt6.QModelIndex) bool, index *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_clearItemData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_clearItemData +func miqt_exec_callback_QPdfSearchModel_clearItemData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) bool, index *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ClearItemData, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MimeTypes() []string { + + var _ma C.struct_miqt_array = C.QPdfSearchModel_virtualbase_mimeTypes(unsafe.Pointer(this.h)) + _ret := make([]string, int(_ma.len)) + _outCast := (*[0xffff]C.struct_miqt_string)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + var _lv_ms C.struct_miqt_string = _outCast[i] + _lv_ret := C.GoStringN(_lv_ms.data, C.int(int64(_lv_ms.len))) + C.free(unsafe.Pointer(_lv_ms.data)) + _ret[i] = _lv_ret + } + return _ret + +} +func (this *QPdfSearchModel) OnMimeTypes(slot func(super func() []string) []string) { + ok := C.QPdfSearchModel_override_virtual_mimeTypes(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_mimeTypes +func miqt_exec_callback_QPdfSearchModel_mimeTypes(self *C.QPdfSearchModel, cb C.intptr_t) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() []string) []string) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MimeTypes) + virtualReturn_CArray := (*[0xffff]C.struct_miqt_string)(C.malloc(C.size_t(int(unsafe.Sizeof(C.struct_miqt_string{})) * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_i_ms := C.struct_miqt_string{} + virtualReturn_i_ms.data = C.CString(virtualReturn[i]) + virtualReturn_i_ms.len = C.size_t(len(virtualReturn[i])) + defer C.free(unsafe.Pointer(virtualReturn_i_ms.data)) + virtualReturn_CArray[i] = virtualReturn_i_ms + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfSearchModel) callVirtualBase_MimeData(indexes []qt6.QModelIndex) *qt6.QMimeData { + indexes_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(indexes)))) + defer C.free(unsafe.Pointer(indexes_CArray)) + for i := range indexes { + indexes_CArray[i] = (*C.QModelIndex)(indexes[i].UnsafePointer()) + } + indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} + + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QPdfSearchModel_virtualbase_mimeData(unsafe.Pointer(this.h), indexes_ma))) + +} +func (this *QPdfSearchModel) OnMimeData(slot func(super func(indexes []qt6.QModelIndex) *qt6.QMimeData, indexes []qt6.QModelIndex) *qt6.QMimeData) { + ok := C.QPdfSearchModel_override_virtual_mimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_mimeData +func miqt_exec_callback_QPdfSearchModel_mimeData(self *C.QPdfSearchModel, cb C.intptr_t, indexes C.struct_miqt_array) *C.QMimeData { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(indexes []qt6.QModelIndex) *qt6.QMimeData, indexes []qt6.QModelIndex) *qt6.QMimeData) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var indexes_ma C.struct_miqt_array = indexes + indexes_ret := make([]qt6.QModelIndex, int(indexes_ma.len)) + indexes_outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(indexes_ma.data)) // hey ya + for i := 0; i < int(indexes_ma.len); i++ { + indexes_lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(indexes_outCast[i])) + indexes_lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + indexes_ret[i] = *indexes_lv_goptr + } + slotval1 := indexes_ret + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MimeData, slotval1) + + return (*C.QMimeData)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_CanDropMimeData(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_canDropMimeData(unsafe.Pointer(this.h), (*C.QMimeData)(data.UnsafePointer()), (C.int)(action), (C.int)(row), (C.int)(column), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnCanDropMimeData(slot func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_canDropMimeData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_canDropMimeData +func miqt_exec_callback_QPdfSearchModel_canDropMimeData(self *C.QPdfSearchModel, cb C.intptr_t, data *C.QMimeData, action C.int, row C.int, column C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool, data *qt6.QMimeData, action qt6.DropAction, row int, column int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(data)) + + slotval2 := (qt6.DropAction)(action) + + slotval3 := (int)(row) + + slotval4 := (int)(column) + + slotval5 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CanDropMimeData, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SupportedDropActions() qt6.DropAction { + + return (qt6.DropAction)(C.QPdfSearchModel_virtualbase_supportedDropActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSupportedDropActions(slot func(super func() qt6.DropAction) qt6.DropAction) { + ok := C.QPdfSearchModel_override_virtual_supportedDropActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_supportedDropActions +func miqt_exec_callback_QPdfSearchModel_supportedDropActions(self *C.QPdfSearchModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt6.DropAction) qt6.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SupportedDropActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_SupportedDragActions() qt6.DropAction { + + return (qt6.DropAction)(C.QPdfSearchModel_virtualbase_supportedDragActions(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSupportedDragActions(slot func(super func() qt6.DropAction) qt6.DropAction) { + ok := C.QPdfSearchModel_override_virtual_supportedDragActions(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_supportedDragActions +func miqt_exec_callback_QPdfSearchModel_supportedDragActions(self *C.QPdfSearchModel, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() qt6.DropAction) qt6.DropAction) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_SupportedDragActions) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_InsertRows(row int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_insertRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnInsertRows(slot func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_insertRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_insertRows +func miqt_exec_callback_QPdfSearchModel_insertRows(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_InsertRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_InsertColumns(column int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_insertColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnInsertColumns(slot func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_insertColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_insertColumns +func miqt_exec_callback_QPdfSearchModel_insertColumns(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_InsertColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_RemoveRows(row int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_removeRows(unsafe.Pointer(this.h), (C.int)(row), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRemoveRows(slot func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_removeRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_removeRows +func miqt_exec_callback_QPdfSearchModel_removeRows(self *C.QPdfSearchModel, cb C.intptr_t, row C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(row int, count int, parent *qt6.QModelIndex) bool, row int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(row) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RemoveRows, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_RemoveColumns(column int, count int, parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_removeColumns(unsafe.Pointer(this.h), (C.int)(column), (C.int)(count), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnRemoveColumns(slot func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_removeColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_removeColumns +func miqt_exec_callback_QPdfSearchModel_removeColumns(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, count C.int, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, count int, parent *qt6.QModelIndex) bool, column int, count int, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (int)(count) + + slotval3 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_RemoveColumns, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MoveRows(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_moveRows(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceRow), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfSearchModel) OnMoveRows(slot func(super func(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) { + ok := C.QPdfSearchModel_override_virtual_moveRows(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_moveRows +func miqt_exec_callback_QPdfSearchModel_moveRows(self *C.QPdfSearchModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceRow C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceRow int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceRow) + + slotval3 := (int)(count) + + slotval4 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MoveRows, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_MoveColumns(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_moveColumns(unsafe.Pointer(this.h), (*C.QModelIndex)(sourceParent.UnsafePointer()), (C.int)(sourceColumn), (C.int)(count), (*C.QModelIndex)(destinationParent.UnsafePointer()), (C.int)(destinationChild))) + +} +func (this *QPdfSearchModel) OnMoveColumns(slot func(super func(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) { + ok := C.QPdfSearchModel_override_virtual_moveColumns(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_moveColumns +func miqt_exec_callback_QPdfSearchModel_moveColumns(self *C.QPdfSearchModel, cb C.intptr_t, sourceParent *C.QModelIndex, sourceColumn C.int, count C.int, destinationParent *C.QModelIndex, destinationChild C.int) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool, sourceParent *qt6.QModelIndex, sourceColumn int, count int, destinationParent *qt6.QModelIndex, destinationChild int) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(sourceParent)) + + slotval2 := (int)(sourceColumn) + + slotval3 := (int)(count) + + slotval4 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(destinationParent)) + + slotval5 := (int)(destinationChild) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MoveColumns, slotval1, slotval2, slotval3, slotval4, slotval5) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_FetchMore(parent *qt6.QModelIndex) { + + C.QPdfSearchModel_virtualbase_fetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnFetchMore(slot func(super func(parent *qt6.QModelIndex), parent *qt6.QModelIndex)) { + ok := C.QPdfSearchModel_override_virtual_fetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_fetchMore +func miqt_exec_callback_QPdfSearchModel_fetchMore(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex), parent *qt6.QModelIndex)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_FetchMore, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_CanFetchMore(parent *qt6.QModelIndex) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_canFetchMore(unsafe.Pointer(this.h), (*C.QModelIndex)(parent.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnCanFetchMore(slot func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) { + ok := C.QPdfSearchModel_override_virtual_canFetchMore(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_canFetchMore +func miqt_exec_callback_QPdfSearchModel_canFetchMore(self *C.QPdfSearchModel, cb C.intptr_t, parent *C.QModelIndex) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(parent *qt6.QModelIndex) bool, parent *qt6.QModelIndex) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(parent)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CanFetchMore, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Sort(column int, order qt6.SortOrder) { + + C.QPdfSearchModel_virtualbase_sort(unsafe.Pointer(this.h), (C.int)(column), (C.int)(order)) + +} +func (this *QPdfSearchModel) OnSort(slot func(super func(column int, order qt6.SortOrder), column int, order qt6.SortOrder)) { + ok := C.QPdfSearchModel_override_virtual_sort(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_sort +func miqt_exec_callback_QPdfSearchModel_sort(self *C.QPdfSearchModel, cb C.intptr_t, column C.int, order C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(column int, order qt6.SortOrder), column int, order qt6.SortOrder)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(column) + + slotval2 := (qt6.SortOrder)(order) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Sort, slotval1, slotval2) + +} + +func (this *QPdfSearchModel) callVirtualBase_Buddy(index *qt6.QModelIndex) *qt6.QModelIndex { + + _goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(C.QPdfSearchModel_virtualbase_buddy(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnBuddy(slot func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_buddy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_buddy +func miqt_exec_callback_QPdfSearchModel_buddy(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) *C.QModelIndex { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) *qt6.QModelIndex, index *qt6.QModelIndex) *qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Buddy, slotval1) + + return (*C.QModelIndex)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_Match(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex { + + var _ma C.struct_miqt_array = C.QPdfSearchModel_virtualbase_match(unsafe.Pointer(this.h), (*C.QModelIndex)(start.UnsafePointer()), (C.int)(role), (*C.QVariant)(value.UnsafePointer()), (C.int)(hits), (C.int)(flags)) + _ret := make([]qt6.QModelIndex, int(_ma.len)) + _outCast := (*[0xffff]*C.QModelIndex)(unsafe.Pointer(_ma.data)) // hey ya + for i := 0; i < int(_ma.len); i++ { + _lv_goptr := qt6.UnsafeNewQModelIndex(unsafe.Pointer(_outCast[i])) + _lv_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _ret[i] = *_lv_goptr + } + return _ret + +} +func (this *QPdfSearchModel) OnMatch(slot func(super func(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex, start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex) { + ok := C.QPdfSearchModel_override_virtual_match(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_match +func miqt_exec_callback_QPdfSearchModel_match(self *C.QPdfSearchModel, cb C.intptr_t, start *C.QModelIndex, role C.int, value *C.QVariant, hits C.int, flags C.int) C.struct_miqt_array { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex, start *qt6.QModelIndex, role int, value *qt6.QVariant, hits int, flags qt6.MatchFlag) []qt6.QModelIndex) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(start)) + + slotval2 := (int)(role) + + slotval3 := qt6.UnsafeNewQVariant(unsafe.Pointer(value)) + + slotval4 := (int)(hits) + + slotval5 := (qt6.MatchFlag)(flags) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Match, slotval1, slotval2, slotval3, slotval4, slotval5) + virtualReturn_CArray := (*[0xffff]*C.QModelIndex)(C.malloc(C.size_t(8 * len(virtualReturn)))) + defer C.free(unsafe.Pointer(virtualReturn_CArray)) + for i := range virtualReturn { + virtualReturn_CArray[i] = (*C.QModelIndex)(virtualReturn[i].UnsafePointer()) + } + virtualReturn_ma := C.struct_miqt_array{len: C.size_t(len(virtualReturn)), data: unsafe.Pointer(virtualReturn_CArray)} + + return virtualReturn_ma + +} + +func (this *QPdfSearchModel) callVirtualBase_Span(index *qt6.QModelIndex) *qt6.QSize { + + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfSearchModel_virtualbase_span(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer())))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfSearchModel) OnSpan(slot func(super func(index *qt6.QModelIndex) *qt6.QSize, index *qt6.QModelIndex) *qt6.QSize) { + ok := C.QPdfSearchModel_override_virtual_span(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_span +func miqt_exec_callback_QPdfSearchModel_span(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex) *qt6.QSize, index *qt6.QModelIndex) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Span, slotval1) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfSearchModel) callVirtualBase_MultiData(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan) { + + C.QPdfSearchModel_virtualbase_multiData(unsafe.Pointer(this.h), (*C.QModelIndex)(index.UnsafePointer()), (*C.QModelRoleDataSpan)(roleDataSpan.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnMultiData(slot func(super func(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan), index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan)) { + ok := C.QPdfSearchModel_override_virtual_multiData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_multiData +func miqt_exec_callback_QPdfSearchModel_multiData(self *C.QPdfSearchModel, cb C.intptr_t, index *C.QModelIndex, roleDataSpan *C.QModelRoleDataSpan) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan), index *qt6.QModelIndex, roleDataSpan qt6.QModelRoleDataSpan)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQModelIndex(unsafe.Pointer(index)) + + roleDataSpan_goptr := qt6.UnsafeNewQModelRoleDataSpan(unsafe.Pointer(roleDataSpan)) + roleDataSpan_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval2 := *roleDataSpan_goptr + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_MultiData, slotval1, slotval2) + +} + +func (this *QPdfSearchModel) callVirtualBase_Submit() bool { + + return (bool)(C.QPdfSearchModel_virtualbase_submit(unsafe.Pointer(this.h))) + +} +func (this *QPdfSearchModel) OnSubmit(slot func(super func() bool) bool) { + ok := C.QPdfSearchModel_override_virtual_submit(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_submit +func miqt_exec_callback_QPdfSearchModel_submit(self *C.QPdfSearchModel, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Submit) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_Revert() { + + C.QPdfSearchModel_virtualbase_revert(unsafe.Pointer(this.h)) + +} +func (this *QPdfSearchModel) OnRevert(slot func(super func())) { + ok := C.QPdfSearchModel_override_virtual_revert(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_revert +func miqt_exec_callback_QPdfSearchModel_revert(self *C.QPdfSearchModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Revert) + +} + +func (this *QPdfSearchModel) callVirtualBase_ResetInternalData() { + + C.QPdfSearchModel_virtualbase_resetInternalData(unsafe.Pointer(this.h)) + +} +func (this *QPdfSearchModel) OnResetInternalData(slot func(super func())) { + ok := C.QPdfSearchModel_override_virtual_resetInternalData(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_resetInternalData +func miqt_exec_callback_QPdfSearchModel_resetInternalData(self *C.QPdfSearchModel, cb C.intptr_t) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func())) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ResetInternalData) + +} + +func (this *QPdfSearchModel) callVirtualBase_Event(event *qt6.QEvent) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnEvent(slot func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) { + ok := C.QPdfSearchModel_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_event +func miqt_exec_callback_QPdfSearchModel_event(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent) bool, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_EventFilter(watched *qt6.QObject, event *qt6.QEvent) bool { + + return (bool)(C.QPdfSearchModel_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(watched.UnsafePointer()), (*C.QEvent)(event.UnsafePointer()))) + +} +func (this *QPdfSearchModel) OnEventFilter(slot func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) { + ok := C.QPdfSearchModel_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_eventFilter +func miqt_exec_callback_QPdfSearchModel_eventFilter(self *C.QPdfSearchModel, cb C.intptr_t, watched *C.QObject, event *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(watched *qt6.QObject, event *qt6.QEvent) bool, watched *qt6.QObject, event *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(watched)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + virtualReturn := gofunc((&QPdfSearchModel{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfSearchModel) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfSearchModel_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfSearchModel_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_childEvent +func miqt_exec_callback_QPdfSearchModel_childEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfSearchModel_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfSearchModel_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_customEvent +func miqt_exec_callback_QPdfSearchModel_customEvent(self *C.QPdfSearchModel, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfSearchModel_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfSearchModel_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_connectNotify +func miqt_exec_callback_QPdfSearchModel_connectNotify(self *C.QPdfSearchModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfSearchModel) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfSearchModel_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfSearchModel) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfSearchModel_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfSearchModel_disconnectNotify +func miqt_exec_callback_QPdfSearchModel_disconnectNotify(self *C.QPdfSearchModel, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfSearchModel{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfSearchModel) Delete() { + C.QPdfSearchModel_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfSearchModel) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfSearchModel) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfsearchmodel.h b/qt6/pdf/gen_qpdfsearchmodel.h new file mode 100644 index 00000000..8a968471 --- /dev/null +++ b/qt6/pdf/gen_qpdfsearchmodel.h @@ -0,0 +1,190 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFSEARCHMODEL_H +#define MIQT_QT6_PDF_GEN_QPDFSEARCHMODEL_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractItemModel; +class QAbstractListModel; +class QChildEvent; +class QDataStream; +class QEvent; +class QMetaMethod; +class QMetaObject; +class QMimeData; +class QModelIndex; +class QModelRoleDataSpan; +class QObject; +class QPdfDocument; +class QPdfLink; +class QPdfSearchModel; +class QSize; +class QTimerEvent; +class QVariant; +#else +typedef struct QAbstractItemModel QAbstractItemModel; +typedef struct QAbstractListModel QAbstractListModel; +typedef struct QChildEvent QChildEvent; +typedef struct QDataStream QDataStream; +typedef struct QEvent QEvent; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMimeData QMimeData; +typedef struct QModelIndex QModelIndex; +typedef struct QModelRoleDataSpan QModelRoleDataSpan; +typedef struct QObject QObject; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfLink QPdfLink; +typedef struct QPdfSearchModel QPdfSearchModel; +typedef struct QSize QSize; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +#endif + +QPdfSearchModel* QPdfSearchModel_new(); +QPdfSearchModel* QPdfSearchModel_new2(QObject* parent); +void QPdfSearchModel_virtbase(QPdfSearchModel* src, QAbstractListModel** outptr_QAbstractListModel); +QMetaObject* QPdfSearchModel_metaObject(const QPdfSearchModel* self); +void* QPdfSearchModel_metacast(QPdfSearchModel* self, const char* param1); +struct miqt_string QPdfSearchModel_tr(const char* s); +struct miqt_array /* of QPdfLink* */ QPdfSearchModel_resultsOnPage(const QPdfSearchModel* self, int page); +QPdfLink* QPdfSearchModel_resultAtIndex(const QPdfSearchModel* self, int index); +QPdfDocument* QPdfSearchModel_document(const QPdfSearchModel* self); +struct miqt_string QPdfSearchModel_searchString(const QPdfSearchModel* self); +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_roleNames(const QPdfSearchModel* self); +int QPdfSearchModel_rowCount(const QPdfSearchModel* self, QModelIndex* parent); +QVariant* QPdfSearchModel_data(const QPdfSearchModel* self, QModelIndex* index, int role); +void QPdfSearchModel_setSearchString(QPdfSearchModel* self, struct miqt_string searchString); +void QPdfSearchModel_setDocument(QPdfSearchModel* self, QPdfDocument* document); +void QPdfSearchModel_documentChanged(QPdfSearchModel* self); +void QPdfSearchModel_connect_documentChanged(QPdfSearchModel* self, intptr_t slot); +void QPdfSearchModel_searchStringChanged(QPdfSearchModel* self); +void QPdfSearchModel_connect_searchStringChanged(QPdfSearchModel* self, intptr_t slot); +void QPdfSearchModel_timerEvent(QPdfSearchModel* self, QTimerEvent* event); +struct miqt_string QPdfSearchModel_tr2(const char* s, const char* c); +struct miqt_string QPdfSearchModel_tr3(const char* s, const char* c, int n); +bool QPdfSearchModel_override_virtual_roleNames(void* self, intptr_t slot); +struct miqt_map /* of int to struct miqt_string */ QPdfSearchModel_virtualbase_roleNames(const void* self); +bool QPdfSearchModel_override_virtual_rowCount(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_rowCount(const void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_data(void* self, intptr_t slot); +QVariant* QPdfSearchModel_virtualbase_data(const void* self, QModelIndex* index, int role); +bool QPdfSearchModel_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfSearchModel_override_virtual_index(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_index(const void* self, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_sibling(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_sibling(const void* self, int row, int column, QModelIndex* idx); +bool QPdfSearchModel_override_virtual_dropMimeData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_dropMimeData(void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_flags(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_flags(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_setData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setData(void* self, QModelIndex* index, QVariant* value, int role); +bool QPdfSearchModel_override_virtual_headerData(void* self, intptr_t slot); +QVariant* QPdfSearchModel_virtualbase_headerData(const void* self, int section, int orientation, int role); +bool QPdfSearchModel_override_virtual_setHeaderData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setHeaderData(void* self, int section, int orientation, QVariant* value, int role); +bool QPdfSearchModel_override_virtual_itemData(void* self, intptr_t slot); +struct miqt_map /* of int to QVariant* */ QPdfSearchModel_virtualbase_itemData(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_setItemData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_setItemData(void* self, QModelIndex* index, struct miqt_map /* of int to QVariant* */ roles); +bool QPdfSearchModel_override_virtual_clearItemData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_clearItemData(void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_mimeTypes(void* self, intptr_t slot); +struct miqt_array /* of struct miqt_string */ QPdfSearchModel_virtualbase_mimeTypes(const void* self); +bool QPdfSearchModel_override_virtual_mimeData(void* self, intptr_t slot); +QMimeData* QPdfSearchModel_virtualbase_mimeData(const void* self, struct miqt_array /* of QModelIndex* */ indexes); +bool QPdfSearchModel_override_virtual_canDropMimeData(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_canDropMimeData(const void* self, QMimeData* data, int action, int row, int column, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_supportedDropActions(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_supportedDropActions(const void* self); +bool QPdfSearchModel_override_virtual_supportedDragActions(void* self, intptr_t slot); +int QPdfSearchModel_virtualbase_supportedDragActions(const void* self); +bool QPdfSearchModel_override_virtual_insertRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_insertRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_insertColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_insertColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_removeRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_removeRows(void* self, int row, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_removeColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_removeColumns(void* self, int column, int count, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_moveRows(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_moveRows(void* self, QModelIndex* sourceParent, int sourceRow, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfSearchModel_override_virtual_moveColumns(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_moveColumns(void* self, QModelIndex* sourceParent, int sourceColumn, int count, QModelIndex* destinationParent, int destinationChild); +bool QPdfSearchModel_override_virtual_fetchMore(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_fetchMore(void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_canFetchMore(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_canFetchMore(const void* self, QModelIndex* parent); +bool QPdfSearchModel_override_virtual_sort(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_sort(void* self, int column, int order); +bool QPdfSearchModel_override_virtual_buddy(void* self, intptr_t slot); +QModelIndex* QPdfSearchModel_virtualbase_buddy(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_match(void* self, intptr_t slot); +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_virtualbase_match(const void* self, QModelIndex* start, int role, QVariant* value, int hits, int flags); +bool QPdfSearchModel_override_virtual_span(void* self, intptr_t slot); +QSize* QPdfSearchModel_virtualbase_span(const void* self, QModelIndex* index); +bool QPdfSearchModel_override_virtual_multiData(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_multiData(const void* self, QModelIndex* index, QModelRoleDataSpan* roleDataSpan); +bool QPdfSearchModel_override_virtual_submit(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_submit(void* self); +bool QPdfSearchModel_override_virtual_revert(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_revert(void* self); +bool QPdfSearchModel_override_virtual_resetInternalData(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_resetInternalData(void* self); +bool QPdfSearchModel_override_virtual_event(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_event(void* self, QEvent* event); +bool QPdfSearchModel_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfSearchModel_virtualbase_eventFilter(void* self, QObject* watched, QEvent* event); +bool QPdfSearchModel_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfSearchModel_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfSearchModel_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfSearchModel_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfSearchModel_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +void QPdfSearchModel_protectedbase_updatePage(bool* _dynamic_cast_ok, void* self, int page); +QModelIndex* QPdfSearchModel_protectedbase_createIndex(bool* _dynamic_cast_ok, const void* self, int row, int column); +void QPdfSearchModel_protectedbase_encodeData(bool* _dynamic_cast_ok, const void* self, struct miqt_array /* of QModelIndex* */ indexes, QDataStream* stream); +bool QPdfSearchModel_protectedbase_decodeData(bool* _dynamic_cast_ok, void* self, int row, int column, QModelIndex* parent, QDataStream* stream); +void QPdfSearchModel_protectedbase_beginInsertRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endInsertRows(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginRemoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endRemoveRows(bool* _dynamic_cast_ok, void* self); +bool QPdfSearchModel_protectedbase_beginMoveRows(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationRow); +void QPdfSearchModel_protectedbase_endMoveRows(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginInsertColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endInsertColumns(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginRemoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* parent, int first, int last); +void QPdfSearchModel_protectedbase_endRemoveColumns(bool* _dynamic_cast_ok, void* self); +bool QPdfSearchModel_protectedbase_beginMoveColumns(bool* _dynamic_cast_ok, void* self, QModelIndex* sourceParent, int sourceFirst, int sourceLast, QModelIndex* destinationParent, int destinationColumn); +void QPdfSearchModel_protectedbase_endMoveColumns(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_beginResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_endResetModel(bool* _dynamic_cast_ok, void* self); +void QPdfSearchModel_protectedbase_changePersistentIndex(bool* _dynamic_cast_ok, void* self, QModelIndex* from, QModelIndex* to); +void QPdfSearchModel_protectedbase_changePersistentIndexList(bool* _dynamic_cast_ok, void* self, struct miqt_array /* of QModelIndex* */ from, struct miqt_array /* of QModelIndex* */ to); +struct miqt_array /* of QModelIndex* */ QPdfSearchModel_protectedbase_persistentIndexList(bool* _dynamic_cast_ok, const void* self); +QObject* QPdfSearchModel_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfSearchModel_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfSearchModel_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfSearchModel_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfSearchModel_delete(QPdfSearchModel* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfselection.cpp b/qt6/pdf/gen_qpdfselection.cpp new file mode 100644 index 00000000..6760580f --- /dev/null +++ b/qt6/pdf/gen_qpdfselection.cpp @@ -0,0 +1,67 @@ +#include +#include +#include +#include +#include +#include +#include "gen_qpdfselection.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +QPdfSelection* QPdfSelection_new(QPdfSelection* other) { + return new QPdfSelection(*other); +} + +void QPdfSelection_operatorAssign(QPdfSelection* self, QPdfSelection* other) { + self->operator=(*other); +} + +void QPdfSelection_swap(QPdfSelection* self, QPdfSelection* other) { + self->swap(*other); +} + +bool QPdfSelection_isValid(const QPdfSelection* self) { + return self->isValid(); +} + +struct miqt_string QPdfSelection_text(const QPdfSelection* self) { + QString _ret = self->text(); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +QRectF* QPdfSelection_boundingRectangle(const QPdfSelection* self) { + return new QRectF(self->boundingRectangle()); +} + +int QPdfSelection_startIndex(const QPdfSelection* self) { + return self->startIndex(); +} + +int QPdfSelection_endIndex(const QPdfSelection* self) { + return self->endIndex(); +} + +void QPdfSelection_copyToClipboard(const QPdfSelection* self) { + self->copyToClipboard(); +} + +void QPdfSelection_copyToClipboardWithMode(const QPdfSelection* self, int mode) { + self->copyToClipboard(static_cast(mode)); +} + +void QPdfSelection_delete(QPdfSelection* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfselection.go b/qt6/pdf/gen_qpdfselection.go new file mode 100644 index 00000000..c27684c2 --- /dev/null +++ b/qt6/pdf/gen_qpdfselection.go @@ -0,0 +1,108 @@ +package pdf + +/* + +#include "gen_qpdfselection.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "unsafe" +) + +type QPdfSelection struct { + h *C.QPdfSelection +} + +func (this *QPdfSelection) cPointer() *C.QPdfSelection { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfSelection) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfSelection constructs the type using only CGO pointers. +func newQPdfSelection(h *C.QPdfSelection) *QPdfSelection { + if h == nil { + return nil + } + + return &QPdfSelection{h: h} +} + +// UnsafeNewQPdfSelection constructs the type using only unsafe pointers. +func UnsafeNewQPdfSelection(h unsafe.Pointer) *QPdfSelection { + return newQPdfSelection((*C.QPdfSelection)(h)) +} + +// NewQPdfSelection constructs a new QPdfSelection object. +func NewQPdfSelection(other *QPdfSelection) *QPdfSelection { + + return newQPdfSelection(C.QPdfSelection_new(other.cPointer())) +} + +func (this *QPdfSelection) OperatorAssign(other *QPdfSelection) { + C.QPdfSelection_operatorAssign(this.h, other.cPointer()) +} + +func (this *QPdfSelection) Swap(other *QPdfSelection) { + C.QPdfSelection_swap(this.h, other.cPointer()) +} + +func (this *QPdfSelection) IsValid() bool { + return (bool)(C.QPdfSelection_isValid(this.h)) +} + +func (this *QPdfSelection) Text() string { + var _ms C.struct_miqt_string = C.QPdfSelection_text(this.h) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfSelection) BoundingRectangle() *qt6.QRectF { + _goptr := qt6.UnsafeNewQRectF(unsafe.Pointer(C.QPdfSelection_boundingRectangle(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfSelection) StartIndex() int { + return (int)(C.QPdfSelection_startIndex(this.h)) +} + +func (this *QPdfSelection) EndIndex() int { + return (int)(C.QPdfSelection_endIndex(this.h)) +} + +func (this *QPdfSelection) CopyToClipboard() { + C.QPdfSelection_copyToClipboard(this.h) +} + +func (this *QPdfSelection) CopyToClipboardWithMode(mode qt6.QClipboard__Mode) { + C.QPdfSelection_copyToClipboardWithMode(this.h, (C.int)(mode)) +} + +// Delete this object from C++ memory. +func (this *QPdfSelection) Delete() { + C.QPdfSelection_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfSelection) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfSelection) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfselection.h b/qt6/pdf/gen_qpdfselection.h new file mode 100644 index 00000000..3f6b31d0 --- /dev/null +++ b/qt6/pdf/gen_qpdfselection.h @@ -0,0 +1,41 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFSELECTION_H +#define MIQT_QT6_PDF_GEN_QPDFSELECTION_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QPdfSelection; +class QRectF; +#else +typedef struct QPdfSelection QPdfSelection; +typedef struct QRectF QRectF; +#endif + +QPdfSelection* QPdfSelection_new(QPdfSelection* other); +void QPdfSelection_operatorAssign(QPdfSelection* self, QPdfSelection* other); +void QPdfSelection_swap(QPdfSelection* self, QPdfSelection* other); +bool QPdfSelection_isValid(const QPdfSelection* self); +struct miqt_string QPdfSelection_text(const QPdfSelection* self); +QRectF* QPdfSelection_boundingRectangle(const QPdfSelection* self); +int QPdfSelection_startIndex(const QPdfSelection* self); +int QPdfSelection_endIndex(const QPdfSelection* self); +void QPdfSelection_copyToClipboard(const QPdfSelection* self); +void QPdfSelection_copyToClipboardWithMode(const QPdfSelection* self, int mode); +void QPdfSelection_delete(QPdfSelection* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/pdf/gen_qpdfview.cpp b/qt6/pdf/gen_qpdfview.cpp new file mode 100644 index 00000000..76bf1293 --- /dev/null +++ b/qt6/pdf/gen_qpdfview.cpp @@ -0,0 +1,2286 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "gen_qpdfview.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void miqt_exec_callback_QPdfView_documentChanged(intptr_t, QPdfDocument*); +void miqt_exec_callback_QPdfView_pageModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_zoomModeChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_zoomFactorChanged(intptr_t, double); +void miqt_exec_callback_QPdfView_pageSpacingChanged(intptr_t, int); +void miqt_exec_callback_QPdfView_documentMarginsChanged(intptr_t, QMargins*); +void miqt_exec_callback_QPdfView_paintEvent(QPdfView*, intptr_t, QPaintEvent*); +void miqt_exec_callback_QPdfView_resizeEvent(QPdfView*, intptr_t, QResizeEvent*); +void miqt_exec_callback_QPdfView_scrollContentsBy(QPdfView*, intptr_t, int, int); +QSize* miqt_exec_callback_QPdfView_minimumSizeHint(const QPdfView*, intptr_t); +QSize* miqt_exec_callback_QPdfView_sizeHint(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_setupViewport(QPdfView*, intptr_t, QWidget*); +bool miqt_exec_callback_QPdfView_eventFilter(QPdfView*, intptr_t, QObject*, QEvent*); +bool miqt_exec_callback_QPdfView_event(QPdfView*, intptr_t, QEvent*); +bool miqt_exec_callback_QPdfView_viewportEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_mousePressEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseReleaseEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseDoubleClickEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_mouseMoveEvent(QPdfView*, intptr_t, QMouseEvent*); +void miqt_exec_callback_QPdfView_wheelEvent(QPdfView*, intptr_t, QWheelEvent*); +void miqt_exec_callback_QPdfView_contextMenuEvent(QPdfView*, intptr_t, QContextMenuEvent*); +void miqt_exec_callback_QPdfView_dragEnterEvent(QPdfView*, intptr_t, QDragEnterEvent*); +void miqt_exec_callback_QPdfView_dragMoveEvent(QPdfView*, intptr_t, QDragMoveEvent*); +void miqt_exec_callback_QPdfView_dragLeaveEvent(QPdfView*, intptr_t, QDragLeaveEvent*); +void miqt_exec_callback_QPdfView_dropEvent(QPdfView*, intptr_t, QDropEvent*); +void miqt_exec_callback_QPdfView_keyPressEvent(QPdfView*, intptr_t, QKeyEvent*); +QSize* miqt_exec_callback_QPdfView_viewportSizeHint(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_changeEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_initStyleOption(const QPdfView*, intptr_t, QStyleOptionFrame*); +int miqt_exec_callback_QPdfView_devType(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_setVisible(QPdfView*, intptr_t, bool); +int miqt_exec_callback_QPdfView_heightForWidth(const QPdfView*, intptr_t, int); +bool miqt_exec_callback_QPdfView_hasHeightForWidth(const QPdfView*, intptr_t); +QPaintEngine* miqt_exec_callback_QPdfView_paintEngine(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_keyReleaseEvent(QPdfView*, intptr_t, QKeyEvent*); +void miqt_exec_callback_QPdfView_focusInEvent(QPdfView*, intptr_t, QFocusEvent*); +void miqt_exec_callback_QPdfView_focusOutEvent(QPdfView*, intptr_t, QFocusEvent*); +void miqt_exec_callback_QPdfView_enterEvent(QPdfView*, intptr_t, QEnterEvent*); +void miqt_exec_callback_QPdfView_leaveEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_moveEvent(QPdfView*, intptr_t, QMoveEvent*); +void miqt_exec_callback_QPdfView_closeEvent(QPdfView*, intptr_t, QCloseEvent*); +void miqt_exec_callback_QPdfView_tabletEvent(QPdfView*, intptr_t, QTabletEvent*); +void miqt_exec_callback_QPdfView_actionEvent(QPdfView*, intptr_t, QActionEvent*); +void miqt_exec_callback_QPdfView_showEvent(QPdfView*, intptr_t, QShowEvent*); +void miqt_exec_callback_QPdfView_hideEvent(QPdfView*, intptr_t, QHideEvent*); +bool miqt_exec_callback_QPdfView_nativeEvent(QPdfView*, intptr_t, struct miqt_string, void*, intptr_t*); +int miqt_exec_callback_QPdfView_metric(const QPdfView*, intptr_t, int); +void miqt_exec_callback_QPdfView_initPainter(const QPdfView*, intptr_t, QPainter*); +QPaintDevice* miqt_exec_callback_QPdfView_redirected(const QPdfView*, intptr_t, QPoint*); +QPainter* miqt_exec_callback_QPdfView_sharedPainter(const QPdfView*, intptr_t); +void miqt_exec_callback_QPdfView_inputMethodEvent(QPdfView*, intptr_t, QInputMethodEvent*); +QVariant* miqt_exec_callback_QPdfView_inputMethodQuery(const QPdfView*, intptr_t, int); +bool miqt_exec_callback_QPdfView_focusNextPrevChild(QPdfView*, intptr_t, bool); +void miqt_exec_callback_QPdfView_timerEvent(QPdfView*, intptr_t, QTimerEvent*); +void miqt_exec_callback_QPdfView_childEvent(QPdfView*, intptr_t, QChildEvent*); +void miqt_exec_callback_QPdfView_customEvent(QPdfView*, intptr_t, QEvent*); +void miqt_exec_callback_QPdfView_connectNotify(QPdfView*, intptr_t, QMetaMethod*); +void miqt_exec_callback_QPdfView_disconnectNotify(QPdfView*, intptr_t, QMetaMethod*); +#ifdef __cplusplus +} /* extern C */ +#endif + +class MiqtVirtualQPdfView final : public QPdfView { +public: + + MiqtVirtualQPdfView(QWidget* parent): QPdfView(parent) {}; + MiqtVirtualQPdfView(): QPdfView() {}; + + virtual ~MiqtVirtualQPdfView() override = default; + + // cgo.Handle value for overwritten implementation + intptr_t handle__paintEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void paintEvent(QPaintEvent* event) override { + if (handle__paintEvent == 0) { + QPdfView::paintEvent(event); + return; + } + + QPaintEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_paintEvent(this, handle__paintEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__resizeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void resizeEvent(QResizeEvent* event) override { + if (handle__resizeEvent == 0) { + QPdfView::resizeEvent(event); + return; + } + + QResizeEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_resizeEvent(this, handle__resizeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__scrollContentsBy = 0; + + // Subclass to allow providing a Go implementation + virtual void scrollContentsBy(int dx, int dy) override { + if (handle__scrollContentsBy == 0) { + QPdfView::scrollContentsBy(dx, dy); + return; + } + + int sigval1 = dx; + int sigval2 = dy; + + miqt_exec_callback_QPdfView_scrollContentsBy(this, handle__scrollContentsBy, sigval1, sigval2); + + + } + + friend void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy); + + // cgo.Handle value for overwritten implementation + intptr_t handle__minimumSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize minimumSizeHint() const override { + if (handle__minimumSizeHint == 0) { + return QPdfView::minimumSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_minimumSizeHint(this, handle__minimumSizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_minimumSizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize sizeHint() const override { + if (handle__sizeHint == 0) { + return QPdfView::sizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_sizeHint(this, handle__sizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_sizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setupViewport = 0; + + // Subclass to allow providing a Go implementation + virtual void setupViewport(QWidget* viewport) override { + if (handle__setupViewport == 0) { + QPdfView::setupViewport(viewport); + return; + } + + QWidget* sigval1 = viewport; + + miqt_exec_callback_QPdfView_setupViewport(this, handle__setupViewport, sigval1); + + + } + + friend void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport); + + // cgo.Handle value for overwritten implementation + intptr_t handle__eventFilter = 0; + + // Subclass to allow providing a Go implementation + virtual bool eventFilter(QObject* param1, QEvent* param2) override { + if (handle__eventFilter == 0) { + return QPdfView::eventFilter(param1, param2); + } + + QObject* sigval1 = param1; + QEvent* sigval2 = param2; + + bool callback_return_value = miqt_exec_callback_QPdfView_eventFilter(this, handle__eventFilter, sigval1, sigval2); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2); + + // cgo.Handle value for overwritten implementation + intptr_t handle__event = 0; + + // Subclass to allow providing a Go implementation + virtual bool event(QEvent* param1) override { + if (handle__event == 0) { + return QPdfView::event(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPdfView_event(this, handle__event, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_event(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__viewportEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool viewportEvent(QEvent* param1) override { + if (handle__viewportEvent == 0) { + return QPdfView::viewportEvent(param1); + } + + QEvent* sigval1 = param1; + + bool callback_return_value = miqt_exec_callback_QPdfView_viewportEvent(this, handle__viewportEvent, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mousePressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mousePressEvent(QMouseEvent* param1) override { + if (handle__mousePressEvent == 0) { + QPdfView::mousePressEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mousePressEvent(this, handle__mousePressEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseReleaseEvent(QMouseEvent* param1) override { + if (handle__mouseReleaseEvent == 0) { + QPdfView::mouseReleaseEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseReleaseEvent(this, handle__mouseReleaseEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseDoubleClickEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseDoubleClickEvent(QMouseEvent* param1) override { + if (handle__mouseDoubleClickEvent == 0) { + QPdfView::mouseDoubleClickEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseDoubleClickEvent(this, handle__mouseDoubleClickEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__mouseMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void mouseMoveEvent(QMouseEvent* param1) override { + if (handle__mouseMoveEvent == 0) { + QPdfView::mouseMoveEvent(param1); + return; + } + + QMouseEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_mouseMoveEvent(this, handle__mouseMoveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__wheelEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void wheelEvent(QWheelEvent* param1) override { + if (handle__wheelEvent == 0) { + QPdfView::wheelEvent(param1); + return; + } + + QWheelEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_wheelEvent(this, handle__wheelEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__contextMenuEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void contextMenuEvent(QContextMenuEvent* param1) override { + if (handle__contextMenuEvent == 0) { + QPdfView::contextMenuEvent(param1); + return; + } + + QContextMenuEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_contextMenuEvent(this, handle__contextMenuEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragEnterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragEnterEvent(QDragEnterEvent* param1) override { + if (handle__dragEnterEvent == 0) { + QPdfView::dragEnterEvent(param1); + return; + } + + QDragEnterEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragEnterEvent(this, handle__dragEnterEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragMoveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragMoveEvent(QDragMoveEvent* param1) override { + if (handle__dragMoveEvent == 0) { + QPdfView::dragMoveEvent(param1); + return; + } + + QDragMoveEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragMoveEvent(this, handle__dragMoveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dragLeaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dragLeaveEvent(QDragLeaveEvent* param1) override { + if (handle__dragLeaveEvent == 0) { + QPdfView::dragLeaveEvent(param1); + return; + } + + QDragLeaveEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dragLeaveEvent(this, handle__dragLeaveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__dropEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void dropEvent(QDropEvent* param1) override { + if (handle__dropEvent == 0) { + QPdfView::dropEvent(param1); + return; + } + + QDropEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_dropEvent(this, handle__dropEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__keyPressEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyPressEvent(QKeyEvent* param1) override { + if (handle__keyPressEvent == 0) { + QPdfView::keyPressEvent(param1); + return; + } + + QKeyEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_keyPressEvent(this, handle__keyPressEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__viewportSizeHint = 0; + + // Subclass to allow providing a Go implementation + virtual QSize viewportSizeHint() const override { + if (handle__viewportSizeHint == 0) { + return QPdfView::viewportSizeHint(); + } + + + QSize* callback_return_value = miqt_exec_callback_QPdfView_viewportSizeHint(this, handle__viewportSizeHint); + + return *callback_return_value; + } + + friend QSize* QPdfView_virtualbase_viewportSizeHint(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__changeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void changeEvent(QEvent* param1) override { + if (handle__changeEvent == 0) { + QPdfView::changeEvent(param1); + return; + } + + QEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_changeEvent(this, handle__changeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__initStyleOption = 0; + + // Subclass to allow providing a Go implementation + virtual void initStyleOption(QStyleOptionFrame* option) const override { + if (handle__initStyleOption == 0) { + QPdfView::initStyleOption(option); + return; + } + + QStyleOptionFrame* sigval1 = option; + + miqt_exec_callback_QPdfView_initStyleOption(this, handle__initStyleOption, sigval1); + + + } + + friend void QPdfView_virtualbase_initStyleOption(const void* self, QStyleOptionFrame* option); + + // cgo.Handle value for overwritten implementation + intptr_t handle__devType = 0; + + // Subclass to allow providing a Go implementation + virtual int devType() const override { + if (handle__devType == 0) { + return QPdfView::devType(); + } + + + int callback_return_value = miqt_exec_callback_QPdfView_devType(this, handle__devType); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_devType(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__setVisible = 0; + + // Subclass to allow providing a Go implementation + virtual void setVisible(bool visible) override { + if (handle__setVisible == 0) { + QPdfView::setVisible(visible); + return; + } + + bool sigval1 = visible; + + miqt_exec_callback_QPdfView_setVisible(this, handle__setVisible, sigval1); + + + } + + friend void QPdfView_virtualbase_setVisible(void* self, bool visible); + + // cgo.Handle value for overwritten implementation + intptr_t handle__heightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual int heightForWidth(int param1) const override { + if (handle__heightForWidth == 0) { + return QPdfView::heightForWidth(param1); + } + + int sigval1 = param1; + + int callback_return_value = miqt_exec_callback_QPdfView_heightForWidth(this, handle__heightForWidth, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_heightForWidth(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hasHeightForWidth = 0; + + // Subclass to allow providing a Go implementation + virtual bool hasHeightForWidth() const override { + if (handle__hasHeightForWidth == 0) { + return QPdfView::hasHeightForWidth(); + } + + + bool callback_return_value = miqt_exec_callback_QPdfView_hasHeightForWidth(this, handle__hasHeightForWidth); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_hasHeightForWidth(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__paintEngine = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintEngine* paintEngine() const override { + if (handle__paintEngine == 0) { + return QPdfView::paintEngine(); + } + + + QPaintEngine* callback_return_value = miqt_exec_callback_QPdfView_paintEngine(this, handle__paintEngine); + + return callback_return_value; + } + + friend QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__keyReleaseEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void keyReleaseEvent(QKeyEvent* event) override { + if (handle__keyReleaseEvent == 0) { + QPdfView::keyReleaseEvent(event); + return; + } + + QKeyEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_keyReleaseEvent(this, handle__keyReleaseEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusInEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusInEvent(QFocusEvent* event) override { + if (handle__focusInEvent == 0) { + QPdfView::focusInEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_focusInEvent(this, handle__focusInEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusOutEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void focusOutEvent(QFocusEvent* event) override { + if (handle__focusOutEvent == 0) { + QPdfView::focusOutEvent(event); + return; + } + + QFocusEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_focusOutEvent(this, handle__focusOutEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__enterEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void enterEvent(QEnterEvent* event) override { + if (handle__enterEvent == 0) { + QPdfView::enterEvent(event); + return; + } + + QEnterEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_enterEvent(this, handle__enterEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_enterEvent(void* self, QEnterEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__leaveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void leaveEvent(QEvent* event) override { + if (handle__leaveEvent == 0) { + QPdfView::leaveEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_leaveEvent(this, handle__leaveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__moveEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void moveEvent(QMoveEvent* event) override { + if (handle__moveEvent == 0) { + QPdfView::moveEvent(event); + return; + } + + QMoveEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_moveEvent(this, handle__moveEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__closeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void closeEvent(QCloseEvent* event) override { + if (handle__closeEvent == 0) { + QPdfView::closeEvent(event); + return; + } + + QCloseEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_closeEvent(this, handle__closeEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__tabletEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void tabletEvent(QTabletEvent* event) override { + if (handle__tabletEvent == 0) { + QPdfView::tabletEvent(event); + return; + } + + QTabletEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_tabletEvent(this, handle__tabletEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__actionEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void actionEvent(QActionEvent* event) override { + if (handle__actionEvent == 0) { + QPdfView::actionEvent(event); + return; + } + + QActionEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_actionEvent(this, handle__actionEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__showEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void showEvent(QShowEvent* event) override { + if (handle__showEvent == 0) { + QPdfView::showEvent(event); + return; + } + + QShowEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_showEvent(this, handle__showEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__hideEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void hideEvent(QHideEvent* event) override { + if (handle__hideEvent == 0) { + QPdfView::hideEvent(event); + return; + } + + QHideEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_hideEvent(this, handle__hideEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__nativeEvent = 0; + + // Subclass to allow providing a Go implementation + virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result) override { + if (handle__nativeEvent == 0) { + return QPdfView::nativeEvent(eventType, message, result); + } + + const QByteArray eventType_qb = eventType; + struct miqt_string eventType_ms; + eventType_ms.len = eventType_qb.length(); + eventType_ms.data = static_cast(malloc(eventType_ms.len)); + memcpy(eventType_ms.data, eventType_qb.data(), eventType_ms.len); + struct miqt_string sigval1 = eventType_ms; + void* sigval2 = message; + qintptr* result_ret = result; + intptr_t* sigval3 = (intptr_t*)(result_ret); + + bool callback_return_value = miqt_exec_callback_QPdfView_nativeEvent(this, handle__nativeEvent, sigval1, sigval2, sigval3); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); + + // cgo.Handle value for overwritten implementation + intptr_t handle__metric = 0; + + // Subclass to allow providing a Go implementation + virtual int metric(QPaintDevice::PaintDeviceMetric param1) const override { + if (handle__metric == 0) { + return QPdfView::metric(param1); + } + + QPaintDevice::PaintDeviceMetric param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + int callback_return_value = miqt_exec_callback_QPdfView_metric(this, handle__metric, sigval1); + + return static_cast(callback_return_value); + } + + friend int QPdfView_virtualbase_metric(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__initPainter = 0; + + // Subclass to allow providing a Go implementation + virtual void initPainter(QPainter* painter) const override { + if (handle__initPainter == 0) { + QPdfView::initPainter(painter); + return; + } + + QPainter* sigval1 = painter; + + miqt_exec_callback_QPdfView_initPainter(this, handle__initPainter, sigval1); + + + } + + friend void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter); + + // cgo.Handle value for overwritten implementation + intptr_t handle__redirected = 0; + + // Subclass to allow providing a Go implementation + virtual QPaintDevice* redirected(QPoint* offset) const override { + if (handle__redirected == 0) { + return QPdfView::redirected(offset); + } + + QPoint* sigval1 = offset; + + QPaintDevice* callback_return_value = miqt_exec_callback_QPdfView_redirected(this, handle__redirected, sigval1); + + return callback_return_value; + } + + friend QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset); + + // cgo.Handle value for overwritten implementation + intptr_t handle__sharedPainter = 0; + + // Subclass to allow providing a Go implementation + virtual QPainter* sharedPainter() const override { + if (handle__sharedPainter == 0) { + return QPdfView::sharedPainter(); + } + + + QPainter* callback_return_value = miqt_exec_callback_QPdfView_sharedPainter(this, handle__sharedPainter); + + return callback_return_value; + } + + friend QPainter* QPdfView_virtualbase_sharedPainter(const void* self); + + // cgo.Handle value for overwritten implementation + intptr_t handle__inputMethodEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void inputMethodEvent(QInputMethodEvent* param1) override { + if (handle__inputMethodEvent == 0) { + QPdfView::inputMethodEvent(param1); + return; + } + + QInputMethodEvent* sigval1 = param1; + + miqt_exec_callback_QPdfView_inputMethodEvent(this, handle__inputMethodEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__inputMethodQuery = 0; + + // Subclass to allow providing a Go implementation + virtual QVariant inputMethodQuery(Qt::InputMethodQuery param1) const override { + if (handle__inputMethodQuery == 0) { + return QPdfView::inputMethodQuery(param1); + } + + Qt::InputMethodQuery param1_ret = param1; + int sigval1 = static_cast(param1_ret); + + QVariant* callback_return_value = miqt_exec_callback_QPdfView_inputMethodQuery(this, handle__inputMethodQuery, sigval1); + + return *callback_return_value; + } + + friend QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1); + + // cgo.Handle value for overwritten implementation + intptr_t handle__focusNextPrevChild = 0; + + // Subclass to allow providing a Go implementation + virtual bool focusNextPrevChild(bool next) override { + if (handle__focusNextPrevChild == 0) { + return QPdfView::focusNextPrevChild(next); + } + + bool sigval1 = next; + + bool callback_return_value = miqt_exec_callback_QPdfView_focusNextPrevChild(this, handle__focusNextPrevChild, sigval1); + + return callback_return_value; + } + + friend bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next); + + // cgo.Handle value for overwritten implementation + intptr_t handle__timerEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void timerEvent(QTimerEvent* event) override { + if (handle__timerEvent == 0) { + QPdfView::timerEvent(event); + return; + } + + QTimerEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_timerEvent(this, handle__timerEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__childEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void childEvent(QChildEvent* event) override { + if (handle__childEvent == 0) { + QPdfView::childEvent(event); + return; + } + + QChildEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_childEvent(this, handle__childEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__customEvent = 0; + + // Subclass to allow providing a Go implementation + virtual void customEvent(QEvent* event) override { + if (handle__customEvent == 0) { + QPdfView::customEvent(event); + return; + } + + QEvent* sigval1 = event; + + miqt_exec_callback_QPdfView_customEvent(this, handle__customEvent, sigval1); + + + } + + friend void QPdfView_virtualbase_customEvent(void* self, QEvent* event); + + // cgo.Handle value for overwritten implementation + intptr_t handle__connectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void connectNotify(const QMetaMethod& signal) override { + if (handle__connectNotify == 0) { + QPdfView::connectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfView_connectNotify(this, handle__connectNotify, sigval1); + + + } + + friend void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal); + + // cgo.Handle value for overwritten implementation + intptr_t handle__disconnectNotify = 0; + + // Subclass to allow providing a Go implementation + virtual void disconnectNotify(const QMetaMethod& signal) override { + if (handle__disconnectNotify == 0) { + QPdfView::disconnectNotify(signal); + return; + } + + const QMetaMethod& signal_ret = signal; + // Cast returned reference into pointer + QMetaMethod* sigval1 = const_cast(&signal_ret); + + miqt_exec_callback_QPdfView_disconnectNotify(this, handle__disconnectNotify, sigval1); + + + } + + friend void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); + + // Wrappers to allow calling protected methods: + friend void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom); + friend QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self); + friend void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1); + friend void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self); + friend void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self); + friend void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self); + friend bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self); + friend bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self); + friend QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); + friend int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); + friend int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); + friend bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +}; + +QPdfView* QPdfView_new(QWidget* parent) { + return new MiqtVirtualQPdfView(parent); +} + +QPdfView* QPdfView_new2() { + return new MiqtVirtualQPdfView(); +} + +void QPdfView_virtbase(QPdfView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); +} + +QMetaObject* QPdfView_metaObject(const QPdfView* self) { + return (QMetaObject*) self->metaObject(); +} + +void* QPdfView_metacast(QPdfView* self, const char* param1) { + return self->qt_metacast(param1); +} + +struct miqt_string QPdfView_tr(const char* s) { + QString _ret = QPdfView::tr(s); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +void QPdfView_setDocument(QPdfView* self, QPdfDocument* document) { + self->setDocument(document); +} + +QPdfDocument* QPdfView_document(const QPdfView* self) { + return self->document(); +} + +QPdfPageNavigator* QPdfView_pageNavigator(const QPdfView* self) { + return self->pageNavigator(); +} + +int QPdfView_pageMode(const QPdfView* self) { + QPdfView::PageMode _ret = self->pageMode(); + return static_cast(_ret); +} + +int QPdfView_zoomMode(const QPdfView* self) { + QPdfView::ZoomMode _ret = self->zoomMode(); + return static_cast(_ret); +} + +double QPdfView_zoomFactor(const QPdfView* self) { + qreal _ret = self->zoomFactor(); + return static_cast(_ret); +} + +int QPdfView_pageSpacing(const QPdfView* self) { + return self->pageSpacing(); +} + +void QPdfView_setPageSpacing(QPdfView* self, int spacing) { + self->setPageSpacing(static_cast(spacing)); +} + +QMargins* QPdfView_documentMargins(const QPdfView* self) { + return new QMargins(self->documentMargins()); +} + +void QPdfView_setDocumentMargins(QPdfView* self, QMargins* margins) { + self->setDocumentMargins(*margins); +} + +void QPdfView_setPageMode(QPdfView* self, int mode) { + self->setPageMode(static_cast(mode)); +} + +void QPdfView_setZoomMode(QPdfView* self, int mode) { + self->setZoomMode(static_cast(mode)); +} + +void QPdfView_setZoomFactor(QPdfView* self, double factor) { + self->setZoomFactor(static_cast(factor)); +} + +void QPdfView_documentChanged(QPdfView* self, QPdfDocument* document) { + self->documentChanged(document); +} + +void QPdfView_connect_documentChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::documentChanged), self, [=](QPdfDocument* document) { + QPdfDocument* sigval1 = document; + miqt_exec_callback_QPdfView_documentChanged(slot, sigval1); + }); +} + +void QPdfView_pageModeChanged(QPdfView* self, int pageMode) { + self->pageModeChanged(static_cast(pageMode)); +} + +void QPdfView_connect_pageModeChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::pageModeChanged), self, [=](QPdfView::PageMode pageMode) { + QPdfView::PageMode pageMode_ret = pageMode; + int sigval1 = static_cast(pageMode_ret); + miqt_exec_callback_QPdfView_pageModeChanged(slot, sigval1); + }); +} + +void QPdfView_zoomModeChanged(QPdfView* self, int zoomMode) { + self->zoomModeChanged(static_cast(zoomMode)); +} + +void QPdfView_connect_zoomModeChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::zoomModeChanged), self, [=](QPdfView::ZoomMode zoomMode) { + QPdfView::ZoomMode zoomMode_ret = zoomMode; + int sigval1 = static_cast(zoomMode_ret); + miqt_exec_callback_QPdfView_zoomModeChanged(slot, sigval1); + }); +} + +void QPdfView_zoomFactorChanged(QPdfView* self, double zoomFactor) { + self->zoomFactorChanged(static_cast(zoomFactor)); +} + +void QPdfView_connect_zoomFactorChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::zoomFactorChanged), self, [=](qreal zoomFactor) { + qreal zoomFactor_ret = zoomFactor; + double sigval1 = static_cast(zoomFactor_ret); + miqt_exec_callback_QPdfView_zoomFactorChanged(slot, sigval1); + }); +} + +void QPdfView_pageSpacingChanged(QPdfView* self, int pageSpacing) { + self->pageSpacingChanged(static_cast(pageSpacing)); +} + +void QPdfView_connect_pageSpacingChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::pageSpacingChanged), self, [=](int pageSpacing) { + int sigval1 = pageSpacing; + miqt_exec_callback_QPdfView_pageSpacingChanged(slot, sigval1); + }); +} + +void QPdfView_documentMarginsChanged(QPdfView* self, QMargins* documentMargins) { + self->documentMarginsChanged(*documentMargins); +} + +void QPdfView_connect_documentMarginsChanged(QPdfView* self, intptr_t slot) { + MiqtVirtualQPdfView::connect(self, static_cast(&QPdfView::documentMarginsChanged), self, [=](QMargins documentMargins) { + QMargins* sigval1 = new QMargins(documentMargins); + miqt_exec_callback_QPdfView_documentMarginsChanged(slot, sigval1); + }); +} + +struct miqt_string QPdfView_tr2(const char* s, const char* c) { + QString _ret = QPdfView::tr(s, c); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +struct miqt_string QPdfView_tr3(const char* s, const char* c, int n) { + QString _ret = QPdfView::tr(s, c, static_cast(n)); + // Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory + QByteArray _b = _ret.toUtf8(); + struct miqt_string _ms; + _ms.len = _b.length(); + _ms.data = static_cast(malloc(_ms.len)); + memcpy(_ms.data, _b.data(), _ms.len); + return _ms; +} + +bool QPdfView_override_virtual_paintEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__paintEvent = slot; + return true; +} + +void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::paintEvent(event); + +} + +bool QPdfView_override_virtual_resizeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__resizeEvent = slot; + return true; +} + +void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::resizeEvent(event); + +} + +bool QPdfView_override_virtual_scrollContentsBy(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__scrollContentsBy = slot; + return true; +} + +void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::scrollContentsBy(static_cast(dx), static_cast(dy)); + +} + +bool QPdfView_override_virtual_minimumSizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__minimumSizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_minimumSizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::minimumSizeHint()); + +} + +bool QPdfView_override_virtual_sizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_sizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::sizeHint()); + +} + +bool QPdfView_override_virtual_setupViewport(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setupViewport = slot; + return true; +} + +void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::setupViewport(viewport); + +} + +bool QPdfView_override_virtual_eventFilter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__eventFilter = slot; + return true; +} + +bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::eventFilter(param1, param2); + +} + +bool QPdfView_override_virtual_event(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__event = slot; + return true; +} + +bool QPdfView_virtualbase_event(void* self, QEvent* param1) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::event(param1); + +} + +bool QPdfView_override_virtual_viewportEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__viewportEvent = slot; + return true; +} + +bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::viewportEvent(param1); + +} + +bool QPdfView_override_virtual_mousePressEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mousePressEvent = slot; + return true; +} + +void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mousePressEvent(param1); + +} + +bool QPdfView_override_virtual_mouseReleaseEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseReleaseEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseReleaseEvent(param1); + +} + +bool QPdfView_override_virtual_mouseDoubleClickEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseDoubleClickEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseDoubleClickEvent(param1); + +} + +bool QPdfView_override_virtual_mouseMoveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__mouseMoveEvent = slot; + return true; +} + +void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::mouseMoveEvent(param1); + +} + +bool QPdfView_override_virtual_wheelEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__wheelEvent = slot; + return true; +} + +void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::wheelEvent(param1); + +} + +bool QPdfView_override_virtual_contextMenuEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__contextMenuEvent = slot; + return true; +} + +void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::contextMenuEvent(param1); + +} + +bool QPdfView_override_virtual_dragEnterEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragEnterEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragEnterEvent(param1); + +} + +bool QPdfView_override_virtual_dragMoveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragMoveEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragMoveEvent(param1); + +} + +bool QPdfView_override_virtual_dragLeaveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dragLeaveEvent = slot; + return true; +} + +void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dragLeaveEvent(param1); + +} + +bool QPdfView_override_virtual_dropEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__dropEvent = slot; + return true; +} + +void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::dropEvent(param1); + +} + +bool QPdfView_override_virtual_keyPressEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__keyPressEvent = slot; + return true; +} + +void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::keyPressEvent(param1); + +} + +bool QPdfView_override_virtual_viewportSizeHint(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__viewportSizeHint = slot; + return true; +} + +QSize* QPdfView_virtualbase_viewportSizeHint(const void* self) { + + return new QSize(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::viewportSizeHint()); + +} + +bool QPdfView_override_virtual_changeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__changeEvent = slot; + return true; +} + +void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::changeEvent(param1); + +} + +bool QPdfView_override_virtual_initStyleOption(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__initStyleOption = slot; + return true; +} + +void QPdfView_virtualbase_initStyleOption(const void* self, QStyleOptionFrame* option) { + + ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::initStyleOption(option); + +} + +bool QPdfView_override_virtual_devType(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__devType = slot; + return true; +} + +int QPdfView_virtualbase_devType(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::devType(); + +} + +bool QPdfView_override_virtual_setVisible(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__setVisible = slot; + return true; +} + +void QPdfView_virtualbase_setVisible(void* self, bool visible) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::setVisible(visible); + +} + +bool QPdfView_override_virtual_heightForWidth(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__heightForWidth = slot; + return true; +} + +int QPdfView_virtualbase_heightForWidth(const void* self, int param1) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::heightForWidth(static_cast(param1)); + +} + +bool QPdfView_override_virtual_hasHeightForWidth(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hasHeightForWidth = slot; + return true; +} + +bool QPdfView_virtualbase_hasHeightForWidth(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::hasHeightForWidth(); + +} + +bool QPdfView_override_virtual_paintEngine(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__paintEngine = slot; + return true; +} + +QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::paintEngine(); + +} + +bool QPdfView_override_virtual_keyReleaseEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__keyReleaseEvent = slot; + return true; +} + +void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::keyReleaseEvent(event); + +} + +bool QPdfView_override_virtual_focusInEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusInEvent = slot; + return true; +} + +void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusInEvent(event); + +} + +bool QPdfView_override_virtual_focusOutEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusOutEvent = slot; + return true; +} + +void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusOutEvent(event); + +} + +bool QPdfView_override_virtual_enterEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__enterEvent = slot; + return true; +} + +void QPdfView_virtualbase_enterEvent(void* self, QEnterEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::enterEvent(event); + +} + +bool QPdfView_override_virtual_leaveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__leaveEvent = slot; + return true; +} + +void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::leaveEvent(event); + +} + +bool QPdfView_override_virtual_moveEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__moveEvent = slot; + return true; +} + +void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::moveEvent(event); + +} + +bool QPdfView_override_virtual_closeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__closeEvent = slot; + return true; +} + +void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::closeEvent(event); + +} + +bool QPdfView_override_virtual_tabletEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__tabletEvent = slot; + return true; +} + +void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::tabletEvent(event); + +} + +bool QPdfView_override_virtual_actionEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__actionEvent = slot; + return true; +} + +void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::actionEvent(event); + +} + +bool QPdfView_override_virtual_showEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__showEvent = slot; + return true; +} + +void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::showEvent(event); + +} + +bool QPdfView_override_virtual_hideEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__hideEvent = slot; + return true; +} + +void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::hideEvent(event); + +} + +bool QPdfView_override_virtual_nativeEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__nativeEvent = slot; + return true; +} + +bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result) { + QByteArray eventType_QByteArray(eventType.data, eventType.len); + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::nativeEvent(eventType_QByteArray, message, (qintptr*)(result)); + +} + +bool QPdfView_override_virtual_metric(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__metric = slot; + return true; +} + +int QPdfView_virtualbase_metric(const void* self, int param1) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::metric(static_cast(param1)); + +} + +bool QPdfView_override_virtual_initPainter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__initPainter = slot; + return true; +} + +void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter) { + + ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::initPainter(painter); + +} + +bool QPdfView_override_virtual_redirected(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__redirected = slot; + return true; +} + +QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::redirected(offset); + +} + +bool QPdfView_override_virtual_sharedPainter(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__sharedPainter = slot; + return true; +} + +QPainter* QPdfView_virtualbase_sharedPainter(const void* self) { + + return ( (const MiqtVirtualQPdfView*)(self) )->QPdfView::sharedPainter(); + +} + +bool QPdfView_override_virtual_inputMethodEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__inputMethodEvent = slot; + return true; +} + +void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::inputMethodEvent(param1); + +} + +bool QPdfView_override_virtual_inputMethodQuery(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__inputMethodQuery = slot; + return true; +} + +QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1) { + + return new QVariant(( (const MiqtVirtualQPdfView*)(self) )->QPdfView::inputMethodQuery(static_cast(param1))); + +} + +bool QPdfView_override_virtual_focusNextPrevChild(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__focusNextPrevChild = slot; + return true; +} + +bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next) { + + return ( (MiqtVirtualQPdfView*)(self) )->QPdfView::focusNextPrevChild(next); + +} + +bool QPdfView_override_virtual_timerEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__timerEvent = slot; + return true; +} + +void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::timerEvent(event); + +} + +bool QPdfView_override_virtual_childEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__childEvent = slot; + return true; +} + +void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::childEvent(event); + +} + +bool QPdfView_override_virtual_customEvent(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__customEvent = slot; + return true; +} + +void QPdfView_virtualbase_customEvent(void* self, QEvent* event) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::customEvent(event); + +} + +bool QPdfView_override_virtual_connectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__connectNotify = slot; + return true; +} + +void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::connectNotify(*signal); + +} + +bool QPdfView_override_virtual_disconnectNotify(void* self, intptr_t slot) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + return false; + } + + self_cast->handle__disconnectNotify = slot; + return true; +} + +void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal) { + + ( (MiqtVirtualQPdfView*)(self) )->QPdfView::disconnectNotify(*signal); + +} + +void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->setViewportMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); + +} + +QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return new QMargins(self_cast->viewportMargins()); + +} + +void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->drawFrame(param1); + +} + +void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->updateMicroFocus(); + +} + +void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->create(); + +} + +void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return ; + } + + *_dynamic_cast_ok = true; + + self_cast->destroy(); + +} + +bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->focusNextChild(); + +} + +bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->focusPreviousChild(); + +} + +QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return nullptr; + } + + *_dynamic_cast_ok = true; + + return self_cast->sender(); + +} + +int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->senderSignalIndex(); + +} + +int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return 0; + } + + *_dynamic_cast_ok = true; + + return self_cast->receivers(signal); + +} + +bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal) { + MiqtVirtualQPdfView* self_cast = dynamic_cast( (QPdfView*)(self) ); + if (self_cast == nullptr) { + *_dynamic_cast_ok = false; + return false; + } + + *_dynamic_cast_ok = true; + + return self_cast->isSignalConnected(*signal); + +} + +void QPdfView_delete(QPdfView* self) { + delete self; +} + diff --git a/qt6/pdf/gen_qpdfview.go b/qt6/pdf/gen_qpdfview.go new file mode 100644 index 00000000..88fb377d --- /dev/null +++ b/qt6/pdf/gen_qpdfview.go @@ -0,0 +1,1860 @@ +package pdf + +/* + +#include "gen_qpdfview.h" +#include + +*/ +import "C" + +import ( + "github.com/mappu/miqt/qt6" + "runtime" + "runtime/cgo" + "unsafe" +) + +type QPdfView__PageMode int + +const ( + QPdfView__SinglePage QPdfView__PageMode = 0 + QPdfView__MultiPage QPdfView__PageMode = 1 +) + +type QPdfView__ZoomMode int + +const ( + QPdfView__Custom QPdfView__ZoomMode = 0 + QPdfView__FitToWidth QPdfView__ZoomMode = 1 + QPdfView__FitInView QPdfView__ZoomMode = 2 +) + +type QPdfView struct { + h *C.QPdfView + *qt6.QAbstractScrollArea +} + +func (this *QPdfView) cPointer() *C.QPdfView { + if this == nil { + return nil + } + return this.h +} + +func (this *QPdfView) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +// newQPdfView constructs the type using only CGO pointers. +func newQPdfView(h *C.QPdfView) *QPdfView { + if h == nil { + return nil + } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QPdfView_virtbase(h, &outptr_QAbstractScrollArea) + + return &QPdfView{h: h, + QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(unsafe.Pointer(outptr_QAbstractScrollArea))} +} + +// UnsafeNewQPdfView constructs the type using only unsafe pointers. +func UnsafeNewQPdfView(h unsafe.Pointer) *QPdfView { + return newQPdfView((*C.QPdfView)(h)) +} + +// NewQPdfView constructs a new QPdfView object. +func NewQPdfView(parent *qt6.QWidget) *QPdfView { + + return newQPdfView(C.QPdfView_new((*C.QWidget)(parent.UnsafePointer()))) +} + +// NewQPdfView2 constructs a new QPdfView object. +func NewQPdfView2() *QPdfView { + + return newQPdfView(C.QPdfView_new2()) +} + +func (this *QPdfView) MetaObject() *qt6.QMetaObject { + return qt6.UnsafeNewQMetaObject(unsafe.Pointer(C.QPdfView_metaObject(this.h))) +} + +func (this *QPdfView) Metacast(param1 string) unsafe.Pointer { + param1_Cstring := C.CString(param1) + defer C.free(unsafe.Pointer(param1_Cstring)) + return (unsafe.Pointer)(C.QPdfView_metacast(this.h, param1_Cstring)) +} + +func QPdfView_Tr(s string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr(s_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func (this *QPdfView) SetDocument(document *QPdfDocument) { + C.QPdfView_setDocument(this.h, document.cPointer()) +} + +func (this *QPdfView) Document() *QPdfDocument { + return newQPdfDocument(C.QPdfView_document(this.h)) +} + +func (this *QPdfView) PageNavigator() *QPdfPageNavigator { + return newQPdfPageNavigator(C.QPdfView_pageNavigator(this.h)) +} + +func (this *QPdfView) PageMode() QPdfView__PageMode { + return (QPdfView__PageMode)(C.QPdfView_pageMode(this.h)) +} + +func (this *QPdfView) ZoomMode() QPdfView__ZoomMode { + return (QPdfView__ZoomMode)(C.QPdfView_zoomMode(this.h)) +} + +func (this *QPdfView) ZoomFactor() float64 { + return (float64)(C.QPdfView_zoomFactor(this.h)) +} + +func (this *QPdfView) PageSpacing() int { + return (int)(C.QPdfView_pageSpacing(this.h)) +} + +func (this *QPdfView) SetPageSpacing(spacing int) { + C.QPdfView_setPageSpacing(this.h, (C.int)(spacing)) +} + +func (this *QPdfView) DocumentMargins() *qt6.QMargins { + _goptr := qt6.UnsafeNewQMargins(unsafe.Pointer(C.QPdfView_documentMargins(this.h))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QPdfView) SetDocumentMargins(margins qt6.QMargins) { + C.QPdfView_setDocumentMargins(this.h, (*C.QMargins)(margins.UnsafePointer())) +} + +func (this *QPdfView) SetPageMode(mode QPdfView__PageMode) { + C.QPdfView_setPageMode(this.h, (C.int)(mode)) +} + +func (this *QPdfView) SetZoomMode(mode QPdfView__ZoomMode) { + C.QPdfView_setZoomMode(this.h, (C.int)(mode)) +} + +func (this *QPdfView) SetZoomFactor(factor float64) { + C.QPdfView_setZoomFactor(this.h, (C.double)(factor)) +} + +func (this *QPdfView) DocumentChanged(document *QPdfDocument) { + C.QPdfView_documentChanged(this.h, document.cPointer()) +} +func (this *QPdfView) OnDocumentChanged(slot func(document *QPdfDocument)) { + C.QPdfView_connect_documentChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_documentChanged +func miqt_exec_callback_QPdfView_documentChanged(cb C.intptr_t, document *C.QPdfDocument) { + gofunc, ok := cgo.Handle(cb).Value().(func(document *QPdfDocument)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := newQPdfDocument(document) + + gofunc(slotval1) +} + +func (this *QPdfView) PageModeChanged(pageMode QPdfView__PageMode) { + C.QPdfView_pageModeChanged(this.h, (C.int)(pageMode)) +} +func (this *QPdfView) OnPageModeChanged(slot func(pageMode QPdfView__PageMode)) { + C.QPdfView_connect_pageModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_pageModeChanged +func miqt_exec_callback_QPdfView_pageModeChanged(cb C.intptr_t, pageMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageMode QPdfView__PageMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfView__PageMode)(pageMode) + + gofunc(slotval1) +} + +func (this *QPdfView) ZoomModeChanged(zoomMode QPdfView__ZoomMode) { + C.QPdfView_zoomModeChanged(this.h, (C.int)(zoomMode)) +} +func (this *QPdfView) OnZoomModeChanged(slot func(zoomMode QPdfView__ZoomMode)) { + C.QPdfView_connect_zoomModeChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_zoomModeChanged +func miqt_exec_callback_QPdfView_zoomModeChanged(cb C.intptr_t, zoomMode C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(zoomMode QPdfView__ZoomMode)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (QPdfView__ZoomMode)(zoomMode) + + gofunc(slotval1) +} + +func (this *QPdfView) ZoomFactorChanged(zoomFactor float64) { + C.QPdfView_zoomFactorChanged(this.h, (C.double)(zoomFactor)) +} +func (this *QPdfView) OnZoomFactorChanged(slot func(zoomFactor float64)) { + C.QPdfView_connect_zoomFactorChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_zoomFactorChanged +func miqt_exec_callback_QPdfView_zoomFactorChanged(cb C.intptr_t, zoomFactor C.double) { + gofunc, ok := cgo.Handle(cb).Value().(func(zoomFactor float64)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (float64)(zoomFactor) + + gofunc(slotval1) +} + +func (this *QPdfView) PageSpacingChanged(pageSpacing int) { + C.QPdfView_pageSpacingChanged(this.h, (C.int)(pageSpacing)) +} +func (this *QPdfView) OnPageSpacingChanged(slot func(pageSpacing int)) { + C.QPdfView_connect_pageSpacingChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_pageSpacingChanged +func miqt_exec_callback_QPdfView_pageSpacingChanged(cb C.intptr_t, pageSpacing C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(pageSpacing int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(pageSpacing) + + gofunc(slotval1) +} + +func (this *QPdfView) DocumentMarginsChanged(documentMargins qt6.QMargins) { + C.QPdfView_documentMarginsChanged(this.h, (*C.QMargins)(documentMargins.UnsafePointer())) +} +func (this *QPdfView) OnDocumentMarginsChanged(slot func(documentMargins qt6.QMargins)) { + C.QPdfView_connect_documentMarginsChanged(this.h, C.intptr_t(cgo.NewHandle(slot))) +} + +//export miqt_exec_callback_QPdfView_documentMarginsChanged +func miqt_exec_callback_QPdfView_documentMarginsChanged(cb C.intptr_t, documentMargins *C.QMargins) { + gofunc, ok := cgo.Handle(cb).Value().(func(documentMargins qt6.QMargins)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + documentMargins_goptr := qt6.UnsafeNewQMargins(unsafe.Pointer(documentMargins)) + documentMargins_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + slotval1 := *documentMargins_goptr + + gofunc(slotval1) +} + +func QPdfView_Tr2(s string, c string) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr2(s_Cstring, c_Cstring) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +func QPdfView_Tr3(s string, c string, n int) string { + s_Cstring := C.CString(s) + defer C.free(unsafe.Pointer(s_Cstring)) + c_Cstring := C.CString(c) + defer C.free(unsafe.Pointer(c_Cstring)) + var _ms C.struct_miqt_string = C.QPdfView_tr3(s_Cstring, c_Cstring, (C.int)(n)) + _ret := C.GoStringN(_ms.data, C.int(int64(_ms.len))) + C.free(unsafe.Pointer(_ms.data)) + return _ret +} + +// SetViewportMargins can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) SetViewportMargins(left int, top int, right int, bottom int) { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_setViewportMargins(&_dynamic_cast_ok, unsafe.Pointer(this.h), (C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// ViewportMargins can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) ViewportMargins() qt6.QMargins { + + var _dynamic_cast_ok C.bool = false + _goptr := qt6.UnsafeNewQMargins(unsafe.Pointer(C.QPdfView_protectedbase_viewportMargins(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + _method_ret := *_goptr + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// DrawFrame can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) DrawFrame(param1 *qt6.QPainter) { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_drawFrame(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QPainter)(param1.UnsafePointer())) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// UpdateMicroFocus can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) UpdateMicroFocus() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_updateMicroFocus(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// Create can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Create() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_create(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// Destroy can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Destroy() { + + var _dynamic_cast_ok C.bool = false + C.QPdfView_protectedbase_destroy(&_dynamic_cast_ok, unsafe.Pointer(this.h)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + +} + +// FocusNextChild can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) FocusNextChild() bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_focusNextChild(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// FocusPreviousChild can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) FocusPreviousChild() bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_focusPreviousChild(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Sender can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Sender() *qt6.QObject { + + var _dynamic_cast_ok C.bool = false + _method_ret := qt6.UnsafeNewQObject(unsafe.Pointer(C.QPdfView_protectedbase_sender(&_dynamic_cast_ok, unsafe.Pointer(this.h)))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// SenderSignalIndex can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) SenderSignalIndex() int { + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfView_protectedbase_senderSignalIndex(&_dynamic_cast_ok, unsafe.Pointer(this.h))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// Receivers can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) Receivers(signal string) int { + signal_Cstring := C.CString(signal) + defer C.free(unsafe.Pointer(signal_Cstring)) + + var _dynamic_cast_ok C.bool = false + _method_ret := (int)(C.QPdfView_protectedbase_receivers(&_dynamic_cast_ok, unsafe.Pointer(this.h), signal_Cstring)) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +// IsSignalConnected can only be called from a QPdfView that was directly constructed. +func (this *QPdfView) IsSignalConnected(signal *qt6.QMetaMethod) bool { + + var _dynamic_cast_ok C.bool = false + _method_ret := (bool)(C.QPdfView_protectedbase_isSignalConnected(&_dynamic_cast_ok, unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer()))) + + if !_dynamic_cast_ok { + panic("miqt: can only call protected methods for directly constructed types") + } + + return _method_ret + +} + +func (this *QPdfView) callVirtualBase_PaintEvent(event *qt6.QPaintEvent) { + + C.QPdfView_virtualbase_paintEvent(unsafe.Pointer(this.h), (*C.QPaintEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnPaintEvent(slot func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) { + ok := C.QPdfView_override_virtual_paintEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_paintEvent +func miqt_exec_callback_QPdfView_paintEvent(self *C.QPdfView, cb C.intptr_t, event *C.QPaintEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QPaintEvent), event *qt6.QPaintEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_PaintEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ResizeEvent(event *qt6.QResizeEvent) { + + C.QPdfView_virtualbase_resizeEvent(unsafe.Pointer(this.h), (*C.QResizeEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnResizeEvent(slot func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) { + ok := C.QPdfView_override_virtual_resizeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_resizeEvent +func miqt_exec_callback_QPdfView_resizeEvent(self *C.QPdfView, cb C.intptr_t, event *C.QResizeEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QResizeEvent), event *qt6.QResizeEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ResizeEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ScrollContentsBy(dx int, dy int) { + + C.QPdfView_virtualbase_scrollContentsBy(unsafe.Pointer(this.h), (C.int)(dx), (C.int)(dy)) + +} +func (this *QPdfView) OnScrollContentsBy(slot func(super func(dx int, dy int), dx int, dy int)) { + ok := C.QPdfView_override_virtual_scrollContentsBy(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_scrollContentsBy +func miqt_exec_callback_QPdfView_scrollContentsBy(self *C.QPdfView, cb C.intptr_t, dx C.int, dy C.int) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(dx int, dy int), dx int, dy int)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(dx) + + slotval2 := (int)(dy) + + gofunc((&QPdfView{h: self}).callVirtualBase_ScrollContentsBy, slotval1, slotval2) + +} + +func (this *QPdfView) callVirtualBase_MinimumSizeHint() *qt6.QSize { + + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_minimumSizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnMinimumSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + ok := C.QPdfView_override_virtual_minimumSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_minimumSizeHint +func miqt_exec_callback_QPdfView_minimumSizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_MinimumSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SizeHint() *qt6.QSize { + + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_sizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + ok := C.QPdfView_override_virtual_sizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_sizeHint +func miqt_exec_callback_QPdfView_sizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_SizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SetupViewport(viewport *qt6.QWidget) { + + C.QPdfView_virtualbase_setupViewport(unsafe.Pointer(this.h), (*C.QWidget)(viewport.UnsafePointer())) + +} +func (this *QPdfView) OnSetupViewport(slot func(super func(viewport *qt6.QWidget), viewport *qt6.QWidget)) { + ok := C.QPdfView_override_virtual_setupViewport(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_setupViewport +func miqt_exec_callback_QPdfView_setupViewport(self *C.QPdfView, cb C.intptr_t, viewport *C.QWidget) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(viewport *qt6.QWidget), viewport *qt6.QWidget)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWidget(unsafe.Pointer(viewport)) + + gofunc((&QPdfView{h: self}).callVirtualBase_SetupViewport, slotval1) + +} + +func (this *QPdfView) callVirtualBase_EventFilter(param1 *qt6.QObject, param2 *qt6.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_eventFilter(unsafe.Pointer(this.h), (*C.QObject)(param1.UnsafePointer()), (*C.QEvent)(param2.UnsafePointer()))) + +} +func (this *QPdfView) OnEventFilter(slot func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) { + ok := C.QPdfView_override_virtual_eventFilter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_eventFilter +func miqt_exec_callback_QPdfView_eventFilter(self *C.QPdfView, cb C.intptr_t, param1 *C.QObject, param2 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QObject, param2 *qt6.QEvent) bool, param1 *qt6.QObject, param2 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQObject(unsafe.Pointer(param1)) + + slotval2 := qt6.UnsafeNewQEvent(unsafe.Pointer(param2)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_EventFilter, slotval1, slotval2) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_Event(param1 *qt6.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_event(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QPdfView) OnEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + ok := C.QPdfView_override_virtual_event(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_event +func miqt_exec_callback_QPdfView_event(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Event, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_ViewportEvent(param1 *qt6.QEvent) bool { + + return (bool)(C.QPdfView_virtualbase_viewportEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer()))) + +} +func (this *QPdfView) OnViewportEvent(slot func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) { + ok := C.QPdfView_override_virtual_viewportEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_viewportEvent +func miqt_exec_callback_QPdfView_viewportEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent) bool, param1 *qt6.QEvent) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_ViewportEvent, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_MousePressEvent(param1 *qt6.QMouseEvent) { + + C.QPdfView_virtualbase_mousePressEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMousePressEvent(slot func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mousePressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mousePressEvent +func miqt_exec_callback_QPdfView_mousePressEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MousePressEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseReleaseEvent(param1 *qt6.QMouseEvent) { + + C.QPdfView_virtualbase_mouseReleaseEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseReleaseEvent(slot func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseReleaseEvent +func miqt_exec_callback_QPdfView_mouseReleaseEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseDoubleClickEvent(param1 *qt6.QMouseEvent) { + + C.QPdfView_virtualbase_mouseDoubleClickEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseDoubleClickEvent(slot func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseDoubleClickEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseDoubleClickEvent +func miqt_exec_callback_QPdfView_mouseDoubleClickEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MouseMoveEvent(param1 *qt6.QMouseEvent) { + + C.QPdfView_virtualbase_mouseMoveEvent(unsafe.Pointer(this.h), (*C.QMouseEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnMouseMoveEvent(slot func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) { + ok := C.QPdfView_override_virtual_mouseMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_mouseMoveEvent +func miqt_exec_callback_QPdfView_mouseMoveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QMouseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QMouseEvent), param1 *qt6.QMouseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_WheelEvent(param1 *qt6.QWheelEvent) { + + C.QPdfView_virtualbase_wheelEvent(unsafe.Pointer(this.h), (*C.QWheelEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnWheelEvent(slot func(super func(param1 *qt6.QWheelEvent), param1 *qt6.QWheelEvent)) { + ok := C.QPdfView_override_virtual_wheelEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_wheelEvent +func miqt_exec_callback_QPdfView_wheelEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QWheelEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QWheelEvent), param1 *qt6.QWheelEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_WheelEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ContextMenuEvent(param1 *qt6.QContextMenuEvent) { + + C.QPdfView_virtualbase_contextMenuEvent(unsafe.Pointer(this.h), (*C.QContextMenuEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnContextMenuEvent(slot func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) { + ok := C.QPdfView_override_virtual_contextMenuEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_contextMenuEvent +func miqt_exec_callback_QPdfView_contextMenuEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QContextMenuEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QContextMenuEvent), param1 *qt6.QContextMenuEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragEnterEvent(param1 *qt6.QDragEnterEvent) { + + C.QPdfView_virtualbase_dragEnterEvent(unsafe.Pointer(this.h), (*C.QDragEnterEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragEnterEvent(slot func(super func(param1 *qt6.QDragEnterEvent), param1 *qt6.QDragEnterEvent)) { + ok := C.QPdfView_override_virtual_dragEnterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragEnterEvent +func miqt_exec_callback_QPdfView_dragEnterEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QDragEnterEvent), param1 *qt6.QDragEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragEnterEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragMoveEvent(param1 *qt6.QDragMoveEvent) { + + C.QPdfView_virtualbase_dragMoveEvent(unsafe.Pointer(this.h), (*C.QDragMoveEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragMoveEvent(slot func(super func(param1 *qt6.QDragMoveEvent), param1 *qt6.QDragMoveEvent)) { + ok := C.QPdfView_override_virtual_dragMoveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragMoveEvent +func miqt_exec_callback_QPdfView_dragMoveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QDragMoveEvent), param1 *qt6.QDragMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragMoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DragLeaveEvent(param1 *qt6.QDragLeaveEvent) { + + C.QPdfView_virtualbase_dragLeaveEvent(unsafe.Pointer(this.h), (*C.QDragLeaveEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDragLeaveEvent(slot func(super func(param1 *qt6.QDragLeaveEvent), param1 *qt6.QDragLeaveEvent)) { + ok := C.QPdfView_override_virtual_dragLeaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dragLeaveEvent +func miqt_exec_callback_QPdfView_dragLeaveEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDragLeaveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QDragLeaveEvent), param1 *qt6.QDragLeaveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DropEvent(param1 *qt6.QDropEvent) { + + C.QPdfView_virtualbase_dropEvent(unsafe.Pointer(this.h), (*C.QDropEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnDropEvent(slot func(super func(param1 *qt6.QDropEvent), param1 *qt6.QDropEvent)) { + ok := C.QPdfView_override_virtual_dropEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_dropEvent +func miqt_exec_callback_QPdfView_dropEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QDropEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QDropEvent), param1 *qt6.QDropEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DropEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_KeyPressEvent(param1 *qt6.QKeyEvent) { + + C.QPdfView_virtualbase_keyPressEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnKeyPressEvent(slot func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) { + ok := C.QPdfView_override_virtual_keyPressEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_keyPressEvent +func miqt_exec_callback_QPdfView_keyPressEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QKeyEvent), param1 *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_KeyPressEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ViewportSizeHint() *qt6.QSize { + + _goptr := qt6.UnsafeNewQSize(unsafe.Pointer(C.QPdfView_virtualbase_viewportSizeHint(unsafe.Pointer(this.h)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnViewportSizeHint(slot func(super func() *qt6.QSize) *qt6.QSize) { + ok := C.QPdfView_override_virtual_viewportSizeHint(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_viewportSizeHint +func miqt_exec_callback_QPdfView_viewportSizeHint(self *C.QPdfView, cb C.intptr_t) *C.QSize { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QSize) *qt6.QSize) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_ViewportSizeHint) + + return (*C.QSize)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_ChangeEvent(param1 *qt6.QEvent) { + + C.QPdfView_virtualbase_changeEvent(unsafe.Pointer(this.h), (*C.QEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnChangeEvent(slot func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) { + ok := C.QPdfView_override_virtual_changeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_changeEvent +func miqt_exec_callback_QPdfView_changeEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QEvent), param1 *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ChangeEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_InitStyleOption(option *qt6.QStyleOptionFrame) { + + C.QPdfView_virtualbase_initStyleOption(unsafe.Pointer(this.h), (*C.QStyleOptionFrame)(option.UnsafePointer())) + +} +func (this *QPdfView) OnInitStyleOption(slot func(super func(option *qt6.QStyleOptionFrame), option *qt6.QStyleOptionFrame)) { + ok := C.QPdfView_override_virtual_initStyleOption(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_initStyleOption +func miqt_exec_callback_QPdfView_initStyleOption(self *C.QPdfView, cb C.intptr_t, option *C.QStyleOptionFrame) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(option *qt6.QStyleOptionFrame), option *qt6.QStyleOptionFrame)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQStyleOptionFrame(unsafe.Pointer(option)) + + gofunc((&QPdfView{h: self}).callVirtualBase_InitStyleOption, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DevType() int { + + return (int)(C.QPdfView_virtualbase_devType(unsafe.Pointer(this.h))) + +} +func (this *QPdfView) OnDevType(slot func(super func() int) int) { + ok := C.QPdfView_override_virtual_devType(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_devType +func miqt_exec_callback_QPdfView_devType(self *C.QPdfView, cb C.intptr_t) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_DevType) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_SetVisible(visible bool) { + + C.QPdfView_virtualbase_setVisible(unsafe.Pointer(this.h), (C.bool)(visible)) + +} +func (this *QPdfView) OnSetVisible(slot func(super func(visible bool), visible bool)) { + ok := C.QPdfView_override_virtual_setVisible(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_setVisible +func miqt_exec_callback_QPdfView_setVisible(self *C.QPdfView, cb C.intptr_t, visible C.bool) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(visible bool), visible bool)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(visible) + + gofunc((&QPdfView{h: self}).callVirtualBase_SetVisible, slotval1) + +} + +func (this *QPdfView) callVirtualBase_HeightForWidth(param1 int) int { + + return (int)(C.QPdfView_virtualbase_heightForWidth(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPdfView) OnHeightForWidth(slot func(super func(param1 int) int, param1 int) int) { + ok := C.QPdfView_override_virtual_heightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_heightForWidth +func miqt_exec_callback_QPdfView_heightForWidth(self *C.QPdfView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 int) int, param1 int) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (int)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_HeightForWidth, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_HasHeightForWidth() bool { + + return (bool)(C.QPdfView_virtualbase_hasHeightForWidth(unsafe.Pointer(this.h))) + +} +func (this *QPdfView) OnHasHeightForWidth(slot func(super func() bool) bool) { + ok := C.QPdfView_override_virtual_hasHeightForWidth(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_hasHeightForWidth +func miqt_exec_callback_QPdfView_hasHeightForWidth(self *C.QPdfView, cb C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_HasHeightForWidth) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_PaintEngine() *qt6.QPaintEngine { + + return qt6.UnsafeNewQPaintEngine(unsafe.Pointer(C.QPdfView_virtualbase_paintEngine(unsafe.Pointer(this.h)))) + +} +func (this *QPdfView) OnPaintEngine(slot func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) { + ok := C.QPdfView_override_virtual_paintEngine(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_paintEngine +func miqt_exec_callback_QPdfView_paintEngine(self *C.QPdfView, cb C.intptr_t) *C.QPaintEngine { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPaintEngine) *qt6.QPaintEngine) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_PaintEngine) + + return (*C.QPaintEngine)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_KeyReleaseEvent(event *qt6.QKeyEvent) { + + C.QPdfView_virtualbase_keyReleaseEvent(unsafe.Pointer(this.h), (*C.QKeyEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnKeyReleaseEvent(slot func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) { + ok := C.QPdfView_override_virtual_keyReleaseEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_keyReleaseEvent +func miqt_exec_callback_QPdfView_keyReleaseEvent(self *C.QPdfView, cb C.intptr_t, event *C.QKeyEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QKeyEvent), event *qt6.QKeyEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_FocusInEvent(event *qt6.QFocusEvent) { + + C.QPdfView_virtualbase_focusInEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnFocusInEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + ok := C.QPdfView_override_virtual_focusInEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusInEvent +func miqt_exec_callback_QPdfView_focusInEvent(self *C.QPdfView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_FocusInEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_FocusOutEvent(event *qt6.QFocusEvent) { + + C.QPdfView_virtualbase_focusOutEvent(unsafe.Pointer(this.h), (*C.QFocusEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnFocusOutEvent(slot func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) { + ok := C.QPdfView_override_virtual_focusOutEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusOutEvent +func miqt_exec_callback_QPdfView_focusOutEvent(self *C.QPdfView, cb C.intptr_t, event *C.QFocusEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QFocusEvent), event *qt6.QFocusEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_FocusOutEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_EnterEvent(event *qt6.QEnterEvent) { + + C.QPdfView_virtualbase_enterEvent(unsafe.Pointer(this.h), (*C.QEnterEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnEnterEvent(slot func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) { + ok := C.QPdfView_override_virtual_enterEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_enterEvent +func miqt_exec_callback_QPdfView_enterEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEnterEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEnterEvent), event *qt6.QEnterEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_EnterEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_LeaveEvent(event *qt6.QEvent) { + + C.QPdfView_virtualbase_leaveEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnLeaveEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfView_override_virtual_leaveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_leaveEvent +func miqt_exec_callback_QPdfView_leaveEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_LeaveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_MoveEvent(event *qt6.QMoveEvent) { + + C.QPdfView_virtualbase_moveEvent(unsafe.Pointer(this.h), (*C.QMoveEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnMoveEvent(slot func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) { + ok := C.QPdfView_override_virtual_moveEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_moveEvent +func miqt_exec_callback_QPdfView_moveEvent(self *C.QPdfView, cb C.intptr_t, event *C.QMoveEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QMoveEvent), event *qt6.QMoveEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_MoveEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_CloseEvent(event *qt6.QCloseEvent) { + + C.QPdfView_virtualbase_closeEvent(unsafe.Pointer(this.h), (*C.QCloseEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnCloseEvent(slot func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) { + ok := C.QPdfView_override_virtual_closeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_closeEvent +func miqt_exec_callback_QPdfView_closeEvent(self *C.QPdfView, cb C.intptr_t, event *C.QCloseEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QCloseEvent), event *qt6.QCloseEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_CloseEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_TabletEvent(event *qt6.QTabletEvent) { + + C.QPdfView_virtualbase_tabletEvent(unsafe.Pointer(this.h), (*C.QTabletEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnTabletEvent(slot func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) { + ok := C.QPdfView_override_virtual_tabletEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_tabletEvent +func miqt_exec_callback_QPdfView_tabletEvent(self *C.QPdfView, cb C.intptr_t, event *C.QTabletEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTabletEvent), event *qt6.QTabletEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_TabletEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ActionEvent(event *qt6.QActionEvent) { + + C.QPdfView_virtualbase_actionEvent(unsafe.Pointer(this.h), (*C.QActionEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnActionEvent(slot func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) { + ok := C.QPdfView_override_virtual_actionEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_actionEvent +func miqt_exec_callback_QPdfView_actionEvent(self *C.QPdfView, cb C.intptr_t, event *C.QActionEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QActionEvent), event *qt6.QActionEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ActionEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ShowEvent(event *qt6.QShowEvent) { + + C.QPdfView_virtualbase_showEvent(unsafe.Pointer(this.h), (*C.QShowEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnShowEvent(slot func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) { + ok := C.QPdfView_override_virtual_showEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_showEvent +func miqt_exec_callback_QPdfView_showEvent(self *C.QPdfView, cb C.intptr_t, event *C.QShowEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QShowEvent), event *qt6.QShowEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ShowEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_HideEvent(event *qt6.QHideEvent) { + + C.QPdfView_virtualbase_hideEvent(unsafe.Pointer(this.h), (*C.QHideEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnHideEvent(slot func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) { + ok := C.QPdfView_override_virtual_hideEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_hideEvent +func miqt_exec_callback_QPdfView_hideEvent(self *C.QPdfView, cb C.intptr_t, event *C.QHideEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QHideEvent), event *qt6.QHideEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_HideEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_NativeEvent(eventType []byte, message unsafe.Pointer, result *uintptr) bool { + eventType_alias := C.struct_miqt_string{} + if len(eventType) > 0 { + eventType_alias.data = (*C.char)(unsafe.Pointer(&eventType[0])) + } else { + eventType_alias.data = (*C.char)(unsafe.Pointer(nil)) + } + eventType_alias.len = C.size_t(len(eventType)) + + return (bool)(C.QPdfView_virtualbase_nativeEvent(unsafe.Pointer(this.h), eventType_alias, message, (*C.intptr_t)(unsafe.Pointer(result)))) + +} +func (this *QPdfView) OnNativeEvent(slot func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) { + ok := C.QPdfView_override_virtual_nativeEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_nativeEvent +func miqt_exec_callback_QPdfView_nativeEvent(self *C.QPdfView, cb C.intptr_t, eventType C.struct_miqt_string, message unsafe.Pointer, result *C.intptr_t) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(eventType []byte, message unsafe.Pointer, result *uintptr) bool, eventType []byte, message unsafe.Pointer, result *uintptr) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + var eventType_bytearray C.struct_miqt_string = eventType + eventType_ret := C.GoBytes(unsafe.Pointer(eventType_bytearray.data), C.int(int64(eventType_bytearray.len))) + C.free(unsafe.Pointer(eventType_bytearray.data)) + slotval1 := eventType_ret + slotval2 := (unsafe.Pointer)(message) + + slotval3 := (*uintptr)(unsafe.Pointer(result)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_NativeEvent, slotval1, slotval2, slotval3) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_Metric(param1 qt6.QPaintDevice__PaintDeviceMetric) int { + + return (int)(C.QPdfView_virtualbase_metric(unsafe.Pointer(this.h), (C.int)(param1))) + +} +func (this *QPdfView) OnMetric(slot func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) { + ok := C.QPdfView_override_virtual_metric(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_metric +func miqt_exec_callback_QPdfView_metric(self *C.QPdfView, cb C.intptr_t, param1 C.int) C.int { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.QPaintDevice__PaintDeviceMetric) int, param1 qt6.QPaintDevice__PaintDeviceMetric) int) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.QPaintDevice__PaintDeviceMetric)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Metric, slotval1) + + return (C.int)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_InitPainter(painter *qt6.QPainter) { + + C.QPdfView_virtualbase_initPainter(unsafe.Pointer(this.h), (*C.QPainter)(painter.UnsafePointer())) + +} +func (this *QPdfView) OnInitPainter(slot func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) { + ok := C.QPdfView_override_virtual_initPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_initPainter +func miqt_exec_callback_QPdfView_initPainter(self *C.QPdfView, cb C.intptr_t, painter *C.QPainter) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(painter *qt6.QPainter), painter *qt6.QPainter)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) + + gofunc((&QPdfView{h: self}).callVirtualBase_InitPainter, slotval1) + +} + +func (this *QPdfView) callVirtualBase_Redirected(offset *qt6.QPoint) *qt6.QPaintDevice { + + return qt6.UnsafeNewQPaintDevice(unsafe.Pointer(C.QPdfView_virtualbase_redirected(unsafe.Pointer(this.h), (*C.QPoint)(offset.UnsafePointer())))) + +} +func (this *QPdfView) OnRedirected(slot func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) { + ok := C.QPdfView_override_virtual_redirected(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_redirected +func miqt_exec_callback_QPdfView_redirected(self *C.QPdfView, cb C.intptr_t, offset *C.QPoint) *C.QPaintDevice { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(offset *qt6.QPoint) *qt6.QPaintDevice, offset *qt6.QPoint) *qt6.QPaintDevice) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQPoint(unsafe.Pointer(offset)) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_Redirected, slotval1) + + return (*C.QPaintDevice)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_SharedPainter() *qt6.QPainter { + + return qt6.UnsafeNewQPainter(unsafe.Pointer(C.QPdfView_virtualbase_sharedPainter(unsafe.Pointer(this.h)))) + +} +func (this *QPdfView) OnSharedPainter(slot func(super func() *qt6.QPainter) *qt6.QPainter) { + ok := C.QPdfView_override_virtual_sharedPainter(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_sharedPainter +func miqt_exec_callback_QPdfView_sharedPainter(self *C.QPdfView, cb C.intptr_t) *C.QPainter { + gofunc, ok := cgo.Handle(cb).Value().(func(super func() *qt6.QPainter) *qt6.QPainter) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_SharedPainter) + + return (*C.QPainter)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_InputMethodEvent(param1 *qt6.QInputMethodEvent) { + + C.QPdfView_virtualbase_inputMethodEvent(unsafe.Pointer(this.h), (*C.QInputMethodEvent)(param1.UnsafePointer())) + +} +func (this *QPdfView) OnInputMethodEvent(slot func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) { + ok := C.QPdfView_override_virtual_inputMethodEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_inputMethodEvent +func miqt_exec_callback_QPdfView_inputMethodEvent(self *C.QPdfView, cb C.intptr_t, param1 *C.QInputMethodEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 *qt6.QInputMethodEvent), param1 *qt6.QInputMethodEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) + + gofunc((&QPdfView{h: self}).callVirtualBase_InputMethodEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_InputMethodQuery(param1 qt6.InputMethodQuery) *qt6.QVariant { + + _goptr := qt6.UnsafeNewQVariant(unsafe.Pointer(C.QPdfView_virtualbase_inputMethodQuery(unsafe.Pointer(this.h), (C.int)(param1)))) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr + +} +func (this *QPdfView) OnInputMethodQuery(slot func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) { + ok := C.QPdfView_override_virtual_inputMethodQuery(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_inputMethodQuery +func miqt_exec_callback_QPdfView_inputMethodQuery(self *C.QPdfView, cb C.intptr_t, param1 C.int) *C.QVariant { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(param1 qt6.InputMethodQuery) *qt6.QVariant, param1 qt6.InputMethodQuery) *qt6.QVariant) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (qt6.InputMethodQuery)(param1) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_InputMethodQuery, slotval1) + + return (*C.QVariant)(virtualReturn.UnsafePointer()) + +} + +func (this *QPdfView) callVirtualBase_FocusNextPrevChild(next bool) bool { + + return (bool)(C.QPdfView_virtualbase_focusNextPrevChild(unsafe.Pointer(this.h), (C.bool)(next))) + +} +func (this *QPdfView) OnFocusNextPrevChild(slot func(super func(next bool) bool, next bool) bool) { + ok := C.QPdfView_override_virtual_focusNextPrevChild(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_focusNextPrevChild +func miqt_exec_callback_QPdfView_focusNextPrevChild(self *C.QPdfView, cb C.intptr_t, next C.bool) C.bool { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(next bool) bool, next bool) bool) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := (bool)(next) + + virtualReturn := gofunc((&QPdfView{h: self}).callVirtualBase_FocusNextPrevChild, slotval1) + + return (C.bool)(virtualReturn) + +} + +func (this *QPdfView) callVirtualBase_TimerEvent(event *qt6.QTimerEvent) { + + C.QPdfView_virtualbase_timerEvent(unsafe.Pointer(this.h), (*C.QTimerEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnTimerEvent(slot func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) { + ok := C.QPdfView_override_virtual_timerEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_timerEvent +func miqt_exec_callback_QPdfView_timerEvent(self *C.QPdfView, cb C.intptr_t, event *C.QTimerEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QTimerEvent), event *qt6.QTimerEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_TimerEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ChildEvent(event *qt6.QChildEvent) { + + C.QPdfView_virtualbase_childEvent(unsafe.Pointer(this.h), (*C.QChildEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnChildEvent(slot func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) { + ok := C.QPdfView_override_virtual_childEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_childEvent +func miqt_exec_callback_QPdfView_childEvent(self *C.QPdfView, cb C.intptr_t, event *C.QChildEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QChildEvent), event *qt6.QChildEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ChildEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_CustomEvent(event *qt6.QEvent) { + + C.QPdfView_virtualbase_customEvent(unsafe.Pointer(this.h), (*C.QEvent)(event.UnsafePointer())) + +} +func (this *QPdfView) OnCustomEvent(slot func(super func(event *qt6.QEvent), event *qt6.QEvent)) { + ok := C.QPdfView_override_virtual_customEvent(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_customEvent +func miqt_exec_callback_QPdfView_customEvent(self *C.QPdfView, cb C.intptr_t, event *C.QEvent) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(event *qt6.QEvent), event *qt6.QEvent)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQEvent(unsafe.Pointer(event)) + + gofunc((&QPdfView{h: self}).callVirtualBase_CustomEvent, slotval1) + +} + +func (this *QPdfView) callVirtualBase_ConnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfView_virtualbase_connectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfView) OnConnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfView_override_virtual_connectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_connectNotify +func miqt_exec_callback_QPdfView_connectNotify(self *C.QPdfView, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfView{h: self}).callVirtualBase_ConnectNotify, slotval1) + +} + +func (this *QPdfView) callVirtualBase_DisconnectNotify(signal *qt6.QMetaMethod) { + + C.QPdfView_virtualbase_disconnectNotify(unsafe.Pointer(this.h), (*C.QMetaMethod)(signal.UnsafePointer())) + +} +func (this *QPdfView) OnDisconnectNotify(slot func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) { + ok := C.QPdfView_override_virtual_disconnectNotify(unsafe.Pointer(this.h), C.intptr_t(cgo.NewHandle(slot))) + if !ok { + panic("miqt: can only override virtual methods for directly constructed types") + } +} + +//export miqt_exec_callback_QPdfView_disconnectNotify +func miqt_exec_callback_QPdfView_disconnectNotify(self *C.QPdfView, cb C.intptr_t, signal *C.QMetaMethod) { + gofunc, ok := cgo.Handle(cb).Value().(func(super func(signal *qt6.QMetaMethod), signal *qt6.QMetaMethod)) + if !ok { + panic("miqt: callback of non-callback type (heap corruption?)") + } + + // Convert all CABI parameters to Go parameters + slotval1 := qt6.UnsafeNewQMetaMethod(unsafe.Pointer(signal)) + + gofunc((&QPdfView{h: self}).callVirtualBase_DisconnectNotify, slotval1) + +} + +// Delete this object from C++ memory. +func (this *QPdfView) Delete() { + C.QPdfView_delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QPdfView) GoGC() { + runtime.SetFinalizer(this, func(this *QPdfView) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt6/pdf/gen_qpdfview.h b/qt6/pdf/gen_qpdfview.h new file mode 100644 index 00000000..de90f87e --- /dev/null +++ b/qt6/pdf/gen_qpdfview.h @@ -0,0 +1,257 @@ +#pragma once +#ifndef MIQT_QT6_PDF_GEN_QPDFVIEW_H +#define MIQT_QT6_PDF_GEN_QPDFVIEW_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class QAbstractScrollArea; +class QActionEvent; +class QChildEvent; +class QCloseEvent; +class QContextMenuEvent; +class QDragEnterEvent; +class QDragLeaveEvent; +class QDragMoveEvent; +class QDropEvent; +class QEnterEvent; +class QEvent; +class QFocusEvent; +class QFrame; +class QHideEvent; +class QInputMethodEvent; +class QKeyEvent; +class QMargins; +class QMetaMethod; +class QMetaObject; +class QMouseEvent; +class QMoveEvent; +class QObject; +class QPaintDevice; +class QPaintEngine; +class QPaintEvent; +class QPainter; +class QPdfDocument; +class QPdfPageNavigator; +class QPdfView; +class QPoint; +class QResizeEvent; +class QShowEvent; +class QSize; +class QStyleOptionFrame; +class QTabletEvent; +class QTimerEvent; +class QVariant; +class QWheelEvent; +class QWidget; +#else +typedef struct QAbstractScrollArea QAbstractScrollArea; +typedef struct QActionEvent QActionEvent; +typedef struct QChildEvent QChildEvent; +typedef struct QCloseEvent QCloseEvent; +typedef struct QContextMenuEvent QContextMenuEvent; +typedef struct QDragEnterEvent QDragEnterEvent; +typedef struct QDragLeaveEvent QDragLeaveEvent; +typedef struct QDragMoveEvent QDragMoveEvent; +typedef struct QDropEvent QDropEvent; +typedef struct QEnterEvent QEnterEvent; +typedef struct QEvent QEvent; +typedef struct QFocusEvent QFocusEvent; +typedef struct QFrame QFrame; +typedef struct QHideEvent QHideEvent; +typedef struct QInputMethodEvent QInputMethodEvent; +typedef struct QKeyEvent QKeyEvent; +typedef struct QMargins QMargins; +typedef struct QMetaMethod QMetaMethod; +typedef struct QMetaObject QMetaObject; +typedef struct QMouseEvent QMouseEvent; +typedef struct QMoveEvent QMoveEvent; +typedef struct QObject QObject; +typedef struct QPaintDevice QPaintDevice; +typedef struct QPaintEngine QPaintEngine; +typedef struct QPaintEvent QPaintEvent; +typedef struct QPainter QPainter; +typedef struct QPdfDocument QPdfDocument; +typedef struct QPdfPageNavigator QPdfPageNavigator; +typedef struct QPdfView QPdfView; +typedef struct QPoint QPoint; +typedef struct QResizeEvent QResizeEvent; +typedef struct QShowEvent QShowEvent; +typedef struct QSize QSize; +typedef struct QStyleOptionFrame QStyleOptionFrame; +typedef struct QTabletEvent QTabletEvent; +typedef struct QTimerEvent QTimerEvent; +typedef struct QVariant QVariant; +typedef struct QWheelEvent QWheelEvent; +typedef struct QWidget QWidget; +#endif + +QPdfView* QPdfView_new(QWidget* parent); +QPdfView* QPdfView_new2(); +void QPdfView_virtbase(QPdfView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); +QMetaObject* QPdfView_metaObject(const QPdfView* self); +void* QPdfView_metacast(QPdfView* self, const char* param1); +struct miqt_string QPdfView_tr(const char* s); +void QPdfView_setDocument(QPdfView* self, QPdfDocument* document); +QPdfDocument* QPdfView_document(const QPdfView* self); +QPdfPageNavigator* QPdfView_pageNavigator(const QPdfView* self); +int QPdfView_pageMode(const QPdfView* self); +int QPdfView_zoomMode(const QPdfView* self); +double QPdfView_zoomFactor(const QPdfView* self); +int QPdfView_pageSpacing(const QPdfView* self); +void QPdfView_setPageSpacing(QPdfView* self, int spacing); +QMargins* QPdfView_documentMargins(const QPdfView* self); +void QPdfView_setDocumentMargins(QPdfView* self, QMargins* margins); +void QPdfView_setPageMode(QPdfView* self, int mode); +void QPdfView_setZoomMode(QPdfView* self, int mode); +void QPdfView_setZoomFactor(QPdfView* self, double factor); +void QPdfView_documentChanged(QPdfView* self, QPdfDocument* document); +void QPdfView_connect_documentChanged(QPdfView* self, intptr_t slot); +void QPdfView_pageModeChanged(QPdfView* self, int pageMode); +void QPdfView_connect_pageModeChanged(QPdfView* self, intptr_t slot); +void QPdfView_zoomModeChanged(QPdfView* self, int zoomMode); +void QPdfView_connect_zoomModeChanged(QPdfView* self, intptr_t slot); +void QPdfView_zoomFactorChanged(QPdfView* self, double zoomFactor); +void QPdfView_connect_zoomFactorChanged(QPdfView* self, intptr_t slot); +void QPdfView_pageSpacingChanged(QPdfView* self, int pageSpacing); +void QPdfView_connect_pageSpacingChanged(QPdfView* self, intptr_t slot); +void QPdfView_documentMarginsChanged(QPdfView* self, QMargins* documentMargins); +void QPdfView_connect_documentMarginsChanged(QPdfView* self, intptr_t slot); +void QPdfView_paintEvent(QPdfView* self, QPaintEvent* event); +void QPdfView_resizeEvent(QPdfView* self, QResizeEvent* event); +void QPdfView_scrollContentsBy(QPdfView* self, int dx, int dy); +struct miqt_string QPdfView_tr2(const char* s, const char* c); +struct miqt_string QPdfView_tr3(const char* s, const char* c, int n); +bool QPdfView_override_virtual_paintEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_paintEvent(void* self, QPaintEvent* event); +bool QPdfView_override_virtual_resizeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_resizeEvent(void* self, QResizeEvent* event); +bool QPdfView_override_virtual_scrollContentsBy(void* self, intptr_t slot); +void QPdfView_virtualbase_scrollContentsBy(void* self, int dx, int dy); +bool QPdfView_override_virtual_minimumSizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_minimumSizeHint(const void* self); +bool QPdfView_override_virtual_sizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_sizeHint(const void* self); +bool QPdfView_override_virtual_setupViewport(void* self, intptr_t slot); +void QPdfView_virtualbase_setupViewport(void* self, QWidget* viewport); +bool QPdfView_override_virtual_eventFilter(void* self, intptr_t slot); +bool QPdfView_virtualbase_eventFilter(void* self, QObject* param1, QEvent* param2); +bool QPdfView_override_virtual_event(void* self, intptr_t slot); +bool QPdfView_virtualbase_event(void* self, QEvent* param1); +bool QPdfView_override_virtual_viewportEvent(void* self, intptr_t slot); +bool QPdfView_virtualbase_viewportEvent(void* self, QEvent* param1); +bool QPdfView_override_virtual_mousePressEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mousePressEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseReleaseEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseReleaseEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseDoubleClickEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseDoubleClickEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_mouseMoveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_mouseMoveEvent(void* self, QMouseEvent* param1); +bool QPdfView_override_virtual_wheelEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_wheelEvent(void* self, QWheelEvent* param1); +bool QPdfView_override_virtual_contextMenuEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_contextMenuEvent(void* self, QContextMenuEvent* param1); +bool QPdfView_override_virtual_dragEnterEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragEnterEvent(void* self, QDragEnterEvent* param1); +bool QPdfView_override_virtual_dragMoveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragMoveEvent(void* self, QDragMoveEvent* param1); +bool QPdfView_override_virtual_dragLeaveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dragLeaveEvent(void* self, QDragLeaveEvent* param1); +bool QPdfView_override_virtual_dropEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_dropEvent(void* self, QDropEvent* param1); +bool QPdfView_override_virtual_keyPressEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_keyPressEvent(void* self, QKeyEvent* param1); +bool QPdfView_override_virtual_viewportSizeHint(void* self, intptr_t slot); +QSize* QPdfView_virtualbase_viewportSizeHint(const void* self); +bool QPdfView_override_virtual_changeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_changeEvent(void* self, QEvent* param1); +bool QPdfView_override_virtual_initStyleOption(void* self, intptr_t slot); +void QPdfView_virtualbase_initStyleOption(const void* self, QStyleOptionFrame* option); +bool QPdfView_override_virtual_devType(void* self, intptr_t slot); +int QPdfView_virtualbase_devType(const void* self); +bool QPdfView_override_virtual_setVisible(void* self, intptr_t slot); +void QPdfView_virtualbase_setVisible(void* self, bool visible); +bool QPdfView_override_virtual_heightForWidth(void* self, intptr_t slot); +int QPdfView_virtualbase_heightForWidth(const void* self, int param1); +bool QPdfView_override_virtual_hasHeightForWidth(void* self, intptr_t slot); +bool QPdfView_virtualbase_hasHeightForWidth(const void* self); +bool QPdfView_override_virtual_paintEngine(void* self, intptr_t slot); +QPaintEngine* QPdfView_virtualbase_paintEngine(const void* self); +bool QPdfView_override_virtual_keyReleaseEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_keyReleaseEvent(void* self, QKeyEvent* event); +bool QPdfView_override_virtual_focusInEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_focusInEvent(void* self, QFocusEvent* event); +bool QPdfView_override_virtual_focusOutEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_focusOutEvent(void* self, QFocusEvent* event); +bool QPdfView_override_virtual_enterEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_enterEvent(void* self, QEnterEvent* event); +bool QPdfView_override_virtual_leaveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_leaveEvent(void* self, QEvent* event); +bool QPdfView_override_virtual_moveEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_moveEvent(void* self, QMoveEvent* event); +bool QPdfView_override_virtual_closeEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_closeEvent(void* self, QCloseEvent* event); +bool QPdfView_override_virtual_tabletEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_tabletEvent(void* self, QTabletEvent* event); +bool QPdfView_override_virtual_actionEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_actionEvent(void* self, QActionEvent* event); +bool QPdfView_override_virtual_showEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_showEvent(void* self, QShowEvent* event); +bool QPdfView_override_virtual_hideEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_hideEvent(void* self, QHideEvent* event); +bool QPdfView_override_virtual_nativeEvent(void* self, intptr_t slot); +bool QPdfView_virtualbase_nativeEvent(void* self, struct miqt_string eventType, void* message, intptr_t* result); +bool QPdfView_override_virtual_metric(void* self, intptr_t slot); +int QPdfView_virtualbase_metric(const void* self, int param1); +bool QPdfView_override_virtual_initPainter(void* self, intptr_t slot); +void QPdfView_virtualbase_initPainter(const void* self, QPainter* painter); +bool QPdfView_override_virtual_redirected(void* self, intptr_t slot); +QPaintDevice* QPdfView_virtualbase_redirected(const void* self, QPoint* offset); +bool QPdfView_override_virtual_sharedPainter(void* self, intptr_t slot); +QPainter* QPdfView_virtualbase_sharedPainter(const void* self); +bool QPdfView_override_virtual_inputMethodEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_inputMethodEvent(void* self, QInputMethodEvent* param1); +bool QPdfView_override_virtual_inputMethodQuery(void* self, intptr_t slot); +QVariant* QPdfView_virtualbase_inputMethodQuery(const void* self, int param1); +bool QPdfView_override_virtual_focusNextPrevChild(void* self, intptr_t slot); +bool QPdfView_virtualbase_focusNextPrevChild(void* self, bool next); +bool QPdfView_override_virtual_timerEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_timerEvent(void* self, QTimerEvent* event); +bool QPdfView_override_virtual_childEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_childEvent(void* self, QChildEvent* event); +bool QPdfView_override_virtual_customEvent(void* self, intptr_t slot); +void QPdfView_virtualbase_customEvent(void* self, QEvent* event); +bool QPdfView_override_virtual_connectNotify(void* self, intptr_t slot); +void QPdfView_virtualbase_connectNotify(void* self, QMetaMethod* signal); +bool QPdfView_override_virtual_disconnectNotify(void* self, intptr_t slot); +void QPdfView_virtualbase_disconnectNotify(void* self, QMetaMethod* signal); +void QPdfView_protectedbase_setViewportMargins(bool* _dynamic_cast_ok, void* self, int left, int top, int right, int bottom); +QMargins* QPdfView_protectedbase_viewportMargins(bool* _dynamic_cast_ok, const void* self); +void QPdfView_protectedbase_drawFrame(bool* _dynamic_cast_ok, void* self, QPainter* param1); +void QPdfView_protectedbase_updateMicroFocus(bool* _dynamic_cast_ok, void* self); +void QPdfView_protectedbase_create(bool* _dynamic_cast_ok, void* self); +void QPdfView_protectedbase_destroy(bool* _dynamic_cast_ok, void* self); +bool QPdfView_protectedbase_focusNextChild(bool* _dynamic_cast_ok, void* self); +bool QPdfView_protectedbase_focusPreviousChild(bool* _dynamic_cast_ok, void* self); +QObject* QPdfView_protectedbase_sender(bool* _dynamic_cast_ok, const void* self); +int QPdfView_protectedbase_senderSignalIndex(bool* _dynamic_cast_ok, const void* self); +int QPdfView_protectedbase_receivers(bool* _dynamic_cast_ok, const void* self, const char* signal); +bool QPdfView_protectedbase_isSignalConnected(bool* _dynamic_cast_ok, const void* self, QMetaMethod* signal); +void QPdfView_delete(QPdfView* self); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif