2024-10-20 05:21:03 +00:00
|
|
|
#include <QByteArray>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QChildEvent>
|
|
|
|
#include <QEvent>
|
2024-10-20 05:21:03 +00:00
|
|
|
#include <QIODevice>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QMarginsF>
|
|
|
|
#include <QMetaMethod>
|
2024-10-20 05:21:03 +00:00
|
|
|
#include <QMetaObject>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QObject>
|
|
|
|
#include <QPageLayout>
|
|
|
|
#include <QPageRanges>
|
|
|
|
#include <QPageSize>
|
|
|
|
#include <QPagedPaintDevice>
|
|
|
|
#include <QPaintDevice>
|
|
|
|
#include <QPaintEngine>
|
2024-10-20 05:21:03 +00:00
|
|
|
#include <QPdfWriter>
|
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-11-19 06:29:06 +00:00
|
|
|
#include <QTimerEvent>
|
2024-10-20 05:21:03 +00:00
|
|
|
#include <qpdfwriter.h>
|
|
|
|
#include "gen_qpdfwriter.h"
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
class MiqtVirtualQPdfWriter : public virtual QPdfWriter {
|
|
|
|
public:
|
|
|
|
|
|
|
|
MiqtVirtualQPdfWriter(const QString& filename): QPdfWriter(filename) {};
|
|
|
|
MiqtVirtualQPdfWriter(QIODevice* device): QPdfWriter(device) {};
|
|
|
|
|
|
|
|
virtual ~MiqtVirtualQPdfWriter() = default;
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__NewPage = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool newPage() override {
|
|
|
|
if (handle__NewPage == 0) {
|
|
|
|
return QPdfWriter::newPage();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_NewPage(this, handle__NewPage);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_NewPage() {
|
|
|
|
|
|
|
|
return QPdfWriter::newPage();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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 QPdfWriter::paintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QPaintEngine* callback_return_value = miqt_exec_callback_QPdfWriter_PaintEngine(const_cast<MiqtVirtualQPdfWriter*>(this), handle__PaintEngine);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
QPaintEngine* virtualbase_PaintEngine() const {
|
|
|
|
|
|
|
|
return QPdfWriter::paintEngine();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__Metric = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual int metric(QPaintDevice::PaintDeviceMetric id) const override {
|
|
|
|
if (handle__Metric == 0) {
|
|
|
|
return QPdfWriter::metric(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintDevice::PaintDeviceMetric id_ret = id;
|
|
|
|
int sigval1 = static_cast<int>(id_ret);
|
|
|
|
|
|
|
|
int callback_return_value = miqt_exec_callback_QPdfWriter_Metric(const_cast<MiqtVirtualQPdfWriter*>(this), handle__Metric, sigval1);
|
|
|
|
|
|
|
|
return static_cast<int>(callback_return_value);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
int virtualbase_Metric(int id) const {
|
|
|
|
|
|
|
|
return QPdfWriter::metric(static_cast<QPaintDevice::PaintDeviceMetric>(id));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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 QPdfWriter::event(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
QEvent* sigval1 = event;
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_Event(this, handle__Event, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_Event(QEvent* event) {
|
|
|
|
|
|
|
|
return QPdfWriter::event(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 QPdfWriter::eventFilter(watched, event);
|
|
|
|
}
|
|
|
|
|
|
|
|
QObject* sigval1 = watched;
|
|
|
|
QEvent* sigval2 = event;
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_EventFilter(this, handle__EventFilter, sigval1, sigval2);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_EventFilter(QObject* watched, QEvent* event) {
|
|
|
|
|
|
|
|
return QPdfWriter::eventFilter(watched, 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) {
|
|
|
|
QPdfWriter::timerEvent(event);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTimerEvent* sigval1 = event;
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_TimerEvent(this, handle__TimerEvent, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_TimerEvent(QTimerEvent* event) {
|
|
|
|
|
|
|
|
QPdfWriter::timerEvent(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) {
|
|
|
|
QPdfWriter::childEvent(event);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QChildEvent* sigval1 = event;
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_ChildEvent(this, handle__ChildEvent, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_ChildEvent(QChildEvent* event) {
|
|
|
|
|
|
|
|
QPdfWriter::childEvent(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) {
|
|
|
|
QPdfWriter::customEvent(event);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
QEvent* sigval1 = event;
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_CustomEvent(this, handle__CustomEvent, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_CustomEvent(QEvent* event) {
|
|
|
|
|
|
|
|
QPdfWriter::customEvent(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) {
|
|
|
|
QPdfWriter::connectNotify(signal);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QMetaMethod& signal_ret = signal;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_ConnectNotify(this, handle__ConnectNotify, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_ConnectNotify(QMetaMethod* signal) {
|
|
|
|
|
|
|
|
QPdfWriter::connectNotify(*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) {
|
|
|
|
QPdfWriter::disconnectNotify(signal);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QMetaMethod& signal_ret = signal;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QMetaMethod* sigval1 = const_cast<QMetaMethod*>(&signal_ret);
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_DisconnectNotify(this, handle__DisconnectNotify, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_DisconnectNotify(QMetaMethod* signal) {
|
|
|
|
|
|
|
|
QPdfWriter::disconnectNotify(*signal);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetPageLayout = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool setPageLayout(const QPageLayout& pageLayout) override {
|
|
|
|
if (handle__SetPageLayout == 0) {
|
|
|
|
return QPdfWriter::setPageLayout(pageLayout);
|
|
|
|
}
|
|
|
|
|
|
|
|
const QPageLayout& pageLayout_ret = pageLayout;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QPageLayout* sigval1 = const_cast<QPageLayout*>(&pageLayout_ret);
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageLayout(this, handle__SetPageLayout, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_SetPageLayout(QPageLayout* pageLayout) {
|
|
|
|
|
|
|
|
return QPdfWriter::setPageLayout(*pageLayout);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetPageSize = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool setPageSize(const QPageSize& pageSize) override {
|
|
|
|
if (handle__SetPageSize == 0) {
|
|
|
|
return QPdfWriter::setPageSize(pageSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
const QPageSize& pageSize_ret = pageSize;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QPageSize* sigval1 = const_cast<QPageSize*>(&pageSize_ret);
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageSize(this, handle__SetPageSize, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_SetPageSize(QPageSize* pageSize) {
|
|
|
|
|
|
|
|
return QPdfWriter::setPageSize(*pageSize);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetPageOrientation = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool setPageOrientation(QPageLayout::Orientation orientation) override {
|
|
|
|
if (handle__SetPageOrientation == 0) {
|
|
|
|
return QPdfWriter::setPageOrientation(orientation);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPageLayout::Orientation orientation_ret = orientation;
|
|
|
|
int sigval1 = static_cast<int>(orientation_ret);
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageOrientation(this, handle__SetPageOrientation, sigval1);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_SetPageOrientation(int orientation) {
|
|
|
|
|
|
|
|
return QPdfWriter::setPageOrientation(static_cast<QPageLayout::Orientation>(orientation));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetPageMargins = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual bool setPageMargins(const QMarginsF& margins, QPageLayout::Unit units) override {
|
|
|
|
if (handle__SetPageMargins == 0) {
|
|
|
|
return QPdfWriter::setPageMargins(margins, units);
|
|
|
|
}
|
|
|
|
|
|
|
|
const QMarginsF& margins_ret = margins;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QMarginsF* sigval1 = const_cast<QMarginsF*>(&margins_ret);
|
|
|
|
QPageLayout::Unit units_ret = units;
|
|
|
|
int sigval2 = static_cast<int>(units_ret);
|
|
|
|
|
|
|
|
bool callback_return_value = miqt_exec_callback_QPdfWriter_SetPageMargins(this, handle__SetPageMargins, sigval1, sigval2);
|
|
|
|
|
|
|
|
return callback_return_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
bool virtualbase_SetPageMargins(QMarginsF* margins, int units) {
|
|
|
|
|
|
|
|
return QPdfWriter::setPageMargins(*margins, static_cast<QPageLayout::Unit>(units));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// cgo.Handle value for overwritten implementation
|
|
|
|
intptr_t handle__SetPageRanges = 0;
|
|
|
|
|
|
|
|
// Subclass to allow providing a Go implementation
|
|
|
|
virtual void setPageRanges(const QPageRanges& ranges) override {
|
|
|
|
if (handle__SetPageRanges == 0) {
|
|
|
|
QPdfWriter::setPageRanges(ranges);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const QPageRanges& ranges_ret = ranges;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QPageRanges* sigval1 = const_cast<QPageRanges*>(&ranges_ret);
|
|
|
|
|
|
|
|
miqt_exec_callback_QPdfWriter_SetPageRanges(this, handle__SetPageRanges, sigval1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wrapper to allow calling protected method
|
|
|
|
void virtualbase_SetPageRanges(QPageRanges* ranges) {
|
|
|
|
|
|
|
|
QPdfWriter::setPageRanges(*ranges);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPdfWriter* QPdfWriter_new(struct miqt_string filename) {
|
2024-10-20 05:21:03 +00:00
|
|
|
QString filename_QString = QString::fromUtf8(filename.data, filename.len);
|
2024-12-07 04:15:57 +00:00
|
|
|
return new MiqtVirtualQPdfWriter(filename_QString);
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
2024-12-07 04:15:57 +00:00
|
|
|
QPdfWriter* QPdfWriter_new2(QIODevice* device) {
|
|
|
|
return new MiqtVirtualQPdfWriter(device);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtbase(QPdfWriter* src, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice) {
|
|
|
|
*outptr_QObject = static_cast<QObject*>(src);
|
|
|
|
*outptr_QPagedPaintDevice = static_cast<QPagedPaintDevice*>(src);
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
|
|
|
}
|
|
|
|
|
|
|
|
void* QPdfWriter_Metacast(QPdfWriter* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_Tr(const char* s) {
|
|
|
|
QString _ret = QPdfWriter::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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_SetPdfVersion(QPdfWriter* self, int version) {
|
|
|
|
self->setPdfVersion(static_cast<QPagedPaintDevice::PdfVersion>(version));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPdfWriter_PdfVersion(const QPdfWriter* self) {
|
|
|
|
QPagedPaintDevice::PdfVersion _ret = self->pdfVersion();
|
|
|
|
return static_cast<int>(_ret);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_Title(const QPdfWriter* self) {
|
|
|
|
QString _ret = self->title();
|
|
|
|
// 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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_SetTitle(QPdfWriter* self, struct miqt_string title) {
|
|
|
|
QString title_QString = QString::fromUtf8(title.data, title.len);
|
|
|
|
self->setTitle(title_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_Creator(const QPdfWriter* self) {
|
|
|
|
QString _ret = self->creator();
|
|
|
|
// 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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_SetCreator(QPdfWriter* self, struct miqt_string creator) {
|
|
|
|
QString creator_QString = QString::fromUtf8(creator.data, creator.len);
|
|
|
|
self->setCreator(creator_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_NewPage(QPdfWriter* self) {
|
|
|
|
return self->newPage();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_SetResolution(QPdfWriter* self, int resolution) {
|
|
|
|
self->setResolution(static_cast<int>(resolution));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPdfWriter_Resolution(const QPdfWriter* self) {
|
|
|
|
return self->resolution();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_SetDocumentXmpMetadata(QPdfWriter* self, struct miqt_string xmpMetadata) {
|
|
|
|
QByteArray xmpMetadata_QByteArray(xmpMetadata.data, xmpMetadata.len);
|
|
|
|
self->setDocumentXmpMetadata(xmpMetadata_QByteArray);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_DocumentXmpMetadata(const QPdfWriter* self) {
|
|
|
|
QByteArray _qb = self->documentXmpMetadata();
|
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _qb.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _qb.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_AddFileAttachment(QPdfWriter* self, struct miqt_string fileName, struct miqt_string data) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
|
|
|
QByteArray data_QByteArray(data.data, data.len);
|
|
|
|
self->addFileAttachment(fileName_QString, data_QByteArray);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QPdfWriter::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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct miqt_string QPdfWriter_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QPdfWriter::tr(s, c, static_cast<int>(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<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_AddFileAttachment3(QPdfWriter* self, struct miqt_string fileName, struct miqt_string data, struct miqt_string mimeType) {
|
|
|
|
QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len);
|
|
|
|
QByteArray data_QByteArray(data.data, data.len);
|
|
|
|
QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len);
|
|
|
|
self->addFileAttachment(fileName_QString, data_QByteArray, mimeType_QString);
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
void QPdfWriter_override_virtual_NewPage(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__NewPage = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_NewPage(void* self) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_NewPage();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_PaintEngine(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__PaintEngine = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
QPaintEngine* QPdfWriter_virtualbase_PaintEngine(const void* self) {
|
|
|
|
return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_PaintEngine();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_Metric(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__Metric = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
int QPdfWriter_virtualbase_Metric(const void* self, int id) {
|
|
|
|
return ( (const MiqtVirtualQPdfWriter*)(self) )->virtualbase_Metric(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_Event(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__Event = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_Event(void* self, QEvent* event) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_Event(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_EventFilter(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__EventFilter = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_EventFilter(void* self, QObject* watched, QEvent* event) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_EventFilter(watched, event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_TimerEvent(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__TimerEvent = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_TimerEvent(void* self, QTimerEvent* event) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_TimerEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_ChildEvent(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__ChildEvent = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_ChildEvent(void* self, QChildEvent* event) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ChildEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_CustomEvent(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__CustomEvent = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_CustomEvent(void* self, QEvent* event) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_CustomEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_ConnectNotify(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__ConnectNotify = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_ConnectNotify(void* self, QMetaMethod* signal) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_ConnectNotify(signal);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_DisconnectNotify(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__DisconnectNotify = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_DisconnectNotify(signal);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_SetPageLayout(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__SetPageLayout = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_SetPageLayout(void* self, QPageLayout* pageLayout) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageLayout(pageLayout);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_SetPageSize(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__SetPageSize = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_SetPageSize(void* self, QPageSize* pageSize) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageSize(pageSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_SetPageOrientation(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__SetPageOrientation = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_SetPageOrientation(void* self, int orientation) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageOrientation(orientation);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_SetPageMargins(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__SetPageMargins = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPdfWriter_virtualbase_SetPageMargins(void* self, QMarginsF* margins, int units) {
|
|
|
|
return ( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageMargins(margins, units);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_override_virtual_SetPageRanges(void* self, intptr_t slot) {
|
|
|
|
dynamic_cast<MiqtVirtualQPdfWriter*>( (QPdfWriter*)(self) )->handle__SetPageRanges = slot;
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_virtualbase_SetPageRanges(void* self, QPageRanges* ranges) {
|
|
|
|
( (MiqtVirtualQPdfWriter*)(self) )->virtualbase_SetPageRanges(ranges);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPdfWriter_Delete(QPdfWriter* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<MiqtVirtualQPdfWriter*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|