mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
137 lines
3.8 KiB
C++
137 lines
3.8 KiB
C++
#include <QFrame>
|
|
#include <QMetaObject>
|
|
#include <QRect>
|
|
#include <QSize>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <cstring>
|
|
#include <QWidget>
|
|
#include "qframe.h"
|
|
#include "gen_qframe.h"
|
|
#include "_cgo_export.h"
|
|
|
|
QFrame* QFrame_new() {
|
|
return new QFrame();
|
|
}
|
|
|
|
QFrame* QFrame_new2(QWidget* parent) {
|
|
return new QFrame(parent);
|
|
}
|
|
|
|
QFrame* QFrame_new3(QWidget* parent, int f) {
|
|
return new QFrame(parent, static_cast<Qt::WindowFlags>(f));
|
|
}
|
|
|
|
QMetaObject* QFrame_MetaObject(const QFrame* self) {
|
|
return (QMetaObject*) self->metaObject();
|
|
}
|
|
|
|
struct miqt_string* QFrame_Tr(const char* s) {
|
|
QString _ret = QFrame::tr(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
struct miqt_string* QFrame_TrUtf8(const char* s) {
|
|
QString _ret = QFrame::trUtf8(s);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
int QFrame_FrameStyle(const QFrame* self) {
|
|
return self->frameStyle();
|
|
}
|
|
|
|
void QFrame_SetFrameStyle(QFrame* self, int frameStyle) {
|
|
self->setFrameStyle(static_cast<int>(frameStyle));
|
|
}
|
|
|
|
int QFrame_FrameWidth(const QFrame* self) {
|
|
return self->frameWidth();
|
|
}
|
|
|
|
QSize* QFrame_SizeHint(const QFrame* self) {
|
|
QSize _ret = self->sizeHint();
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
return static_cast<QSize*>(new QSize(_ret));
|
|
}
|
|
|
|
uintptr_t QFrame_FrameShape(const QFrame* self) {
|
|
QFrame::Shape _ret = self->frameShape();
|
|
return static_cast<uintptr_t>(_ret);
|
|
}
|
|
|
|
void QFrame_SetFrameShape(QFrame* self, uintptr_t frameShape) {
|
|
self->setFrameShape(static_cast<QFrame::Shape>(frameShape));
|
|
}
|
|
|
|
uintptr_t QFrame_FrameShadow(const QFrame* self) {
|
|
QFrame::Shadow _ret = self->frameShadow();
|
|
return static_cast<uintptr_t>(_ret);
|
|
}
|
|
|
|
void QFrame_SetFrameShadow(QFrame* self, uintptr_t frameShadow) {
|
|
self->setFrameShadow(static_cast<QFrame::Shadow>(frameShadow));
|
|
}
|
|
|
|
int QFrame_LineWidth(const QFrame* self) {
|
|
return self->lineWidth();
|
|
}
|
|
|
|
void QFrame_SetLineWidth(QFrame* self, int lineWidth) {
|
|
self->setLineWidth(static_cast<int>(lineWidth));
|
|
}
|
|
|
|
int QFrame_MidLineWidth(const QFrame* self) {
|
|
return self->midLineWidth();
|
|
}
|
|
|
|
void QFrame_SetMidLineWidth(QFrame* self, int midLineWidth) {
|
|
self->setMidLineWidth(static_cast<int>(midLineWidth));
|
|
}
|
|
|
|
QRect* QFrame_FrameRect(const QFrame* self) {
|
|
QRect _ret = self->frameRect();
|
|
// Copy-construct value returned type into heap-allocated copy
|
|
return static_cast<QRect*>(new QRect(_ret));
|
|
}
|
|
|
|
void QFrame_SetFrameRect(QFrame* self, QRect* frameRect) {
|
|
self->setFrameRect(*frameRect);
|
|
}
|
|
|
|
struct miqt_string* QFrame_Tr2(const char* s, const char* c) {
|
|
QString _ret = QFrame::tr(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
struct miqt_string* QFrame_Tr3(const char* s, const char* c, int n) {
|
|
QString _ret = QFrame::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();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
struct miqt_string* QFrame_TrUtf82(const char* s, const char* c) {
|
|
QString _ret = QFrame::trUtf8(s, c);
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
QByteArray _b = _ret.toUtf8();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
struct miqt_string* QFrame_TrUtf83(const char* s, const char* c, int n) {
|
|
QString _ret = QFrame::trUtf8(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();
|
|
return miqt_strdup(_b.data(), _b.length());
|
|
}
|
|
|
|
void QFrame_Delete(QFrame* self) {
|
|
delete self;
|
|
}
|
|
|