2024-08-25 04:08:24 +00:00
|
|
|
#include <QMargins>
|
|
|
|
#include <QMarginsF>
|
|
|
|
#include <QPageLayout>
|
|
|
|
#include <QPageSize>
|
|
|
|
#include <QRect>
|
|
|
|
#include <QRectF>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qpagelayout.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qpagelayout.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QPageLayout* QPageLayout_new() {
|
|
|
|
return new QPageLayout();
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QPageLayout(*pageSize, static_cast<QPageLayout::Orientation>(orientation), *margins);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPageLayout* QPageLayout_new3(QPageLayout* other) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QPageLayout(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QPageLayout(*pageSize, static_cast<QPageLayout::Orientation>(orientation), *margins, static_cast<QPageLayout::Unit>(units));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return new QPageLayout(*pageSize, static_cast<QPageLayout::Orientation>(orientation), *margins, static_cast<QPageLayout::Unit>(units), *minMargins);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other) {
|
|
|
|
self->operator=(*other);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPageLayout_Swap(QPageLayout* self, QPageLayout* other) {
|
|
|
|
self->swap(*other);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPageLayout_IsEquivalentTo(const QPageLayout* self, QPageLayout* other) {
|
|
|
|
return self->isEquivalentTo(*other);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QPageLayout_IsValid(const QPageLayout* self) {
|
|
|
|
return self->isValid();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPageLayout_SetMode(QPageLayout* self, int mode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setMode(static_cast<QPageLayout::Mode>(mode));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageLayout_Mode(const QPageLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageLayout::Mode _ret = self->mode();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPageLayout_SetPageSize(QPageLayout* self, QPageSize* pageSize) {
|
|
|
|
self->setPageSize(*pageSize);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPageSize* QPageLayout_PageSize(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QPageSize(self->pageSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPageLayout_SetOrientation(QPageLayout* self, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setOrientation(static_cast<QPageLayout::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageLayout_Orientation(const QPageLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageLayout::Orientation _ret = self->orientation();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QPageLayout_SetUnits(QPageLayout* self, int units) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setUnits(static_cast<QPageLayout::Unit>(units));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QPageLayout_Units(const QPageLayout* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPageLayout::Unit _ret = self->units();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QPageLayout_SetMargins(QPageLayout* self, QMarginsF* margins) {
|
|
|
|
return self->setMargins(*margins);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPageLayout_SetLeftMargin(QPageLayout* self, double leftMargin) {
|
|
|
|
return self->setLeftMargin(static_cast<qreal>(leftMargin));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPageLayout_SetRightMargin(QPageLayout* self, double rightMargin) {
|
|
|
|
return self->setRightMargin(static_cast<qreal>(rightMargin));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPageLayout_SetTopMargin(QPageLayout* self, double topMargin) {
|
|
|
|
return self->setTopMargin(static_cast<qreal>(topMargin));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QPageLayout_SetBottomMargin(QPageLayout* self, double bottomMargin) {
|
|
|
|
return self->setBottomMargin(static_cast<qreal>(bottomMargin));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMarginsF* QPageLayout_Margins(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMarginsF(self->margins());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QMarginsF* QPageLayout_MarginsWithUnits(const QPageLayout* self, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMarginsF(self->margins(static_cast<QPageLayout::Unit>(units)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMargins* QPageLayout_MarginsPoints(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMargins(self->marginsPoints());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMargins* QPageLayout_MarginsPixels(const QPageLayout* self, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMargins(self->marginsPixels(static_cast<int>(resolution)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPageLayout_SetMinimumMargins(QPageLayout* self, QMarginsF* minMargins) {
|
|
|
|
self->setMinimumMargins(*minMargins);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMarginsF* QPageLayout_MinimumMargins(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMarginsF(self->minimumMargins());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMarginsF* QPageLayout_MaximumMargins(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMarginsF(self->maximumMargins());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRectF* QPageLayout_FullRect(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRectF(self->fullRect());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QRectF* QPageLayout_FullRectWithUnits(const QPageLayout* self, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRectF(self->fullRect(static_cast<QPageLayout::Unit>(units)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageLayout_FullRectPoints(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->fullRectPoints());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageLayout_FullRectPixels(const QPageLayout* self, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->fullRectPixels(static_cast<int>(resolution)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRectF* QPageLayout_PaintRect(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRectF(self->paintRect());
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QRectF* QPageLayout_PaintRectWithUnits(const QPageLayout* self, int units) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRectF(self->paintRect(static_cast<QPageLayout::Unit>(units)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageLayout_PaintRectPoints(const QPageLayout* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->paintRectPoints());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QPageLayout_PaintRectPixels(const QPageLayout* self, int resolution) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->paintRectPixels(static_cast<int>(resolution)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QPageLayout_SetPageSize2(QPageLayout* self, QPageSize* pageSize, QMarginsF* minMargins) {
|
|
|
|
self->setPageSize(*pageSize, *minMargins);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QPageLayout_Delete(QPageLayout* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|