2024-08-25 04:08:24 +00:00
|
|
|
#include <QDialog>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qdialog.h"
|
|
|
|
#include "gen_qdialog.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDialog* QDialog_new() {
|
|
|
|
return new QDialog();
|
|
|
|
}
|
|
|
|
|
|
|
|
QDialog* QDialog_new2(QWidget* parent) {
|
|
|
|
return new QDialog(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QDialog* QDialog_new3(QWidget* parent, int f) {
|
|
|
|
return new QDialog(parent, static_cast<Qt::WindowFlags>(f));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QDialog_MetaObject(const QDialog* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_Tr(const char* s) {
|
|
|
|
QString _ret = QDialog::tr(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QDialog::trUtf8(s);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDialog_Result(const QDialog* self) {
|
|
|
|
return self->result();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_SetVisible(QDialog* self, bool visible) {
|
|
|
|
self->setVisible(visible);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDialog_SetOrientation(QDialog* self, uintptr_t orientation) {
|
|
|
|
self->setOrientation(static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
uintptr_t QDialog_Orientation(const QDialog* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Orientation _ret = self->orientation();
|
|
|
|
return static_cast<uintptr_t>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QDialog_SetExtension(QDialog* self, QWidget* extension) {
|
|
|
|
self->setExtension(extension);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QDialog_Extension(const QDialog* self) {
|
|
|
|
return self->extension();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QDialog_SizeHint(const QDialog* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->sizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QDialog_MinimumSizeHint(const QDialog* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QSize _ret = self->minimumSizeHint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QSize*>(new QSize(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_SetSizeGripEnabled(QDialog* self, bool sizeGripEnabled) {
|
|
|
|
self->setSizeGripEnabled(sizeGripEnabled);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDialog_IsSizeGripEnabled(const QDialog* self) {
|
|
|
|
return self->isSizeGripEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_SetModal(QDialog* self, bool modal) {
|
|
|
|
self->setModal(modal);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_SetResult(QDialog* self, int r) {
|
|
|
|
self->setResult(static_cast<int>(r));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Finished(QDialog* self, int result) {
|
|
|
|
self->finished(static_cast<int>(result));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_connect_Finished(QDialog* self, void* slot) {
|
|
|
|
QDialog::connect(self, static_cast<void (QDialog::*)(int)>(&QDialog::finished), self, [=](int result) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = result;
|
|
|
|
miqt_exec_callback_QDialog_Finished(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Accepted(QDialog* self) {
|
|
|
|
self->accepted();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_connect_Accepted(QDialog* self, void* slot) {
|
|
|
|
QDialog::connect(self, static_cast<void (QDialog::*)()>(&QDialog::accepted), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QDialog_Accepted(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Rejected(QDialog* self) {
|
|
|
|
self->rejected();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_connect_Rejected(QDialog* self, void* slot) {
|
|
|
|
QDialog::connect(self, static_cast<void (QDialog::*)()>(&QDialog::rejected), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QDialog_Rejected(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Open(QDialog* self) {
|
|
|
|
self->open();
|
|
|
|
}
|
|
|
|
|
|
|
|
int QDialog_Exec(QDialog* self) {
|
|
|
|
return self->exec();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Done(QDialog* self, int param1) {
|
|
|
|
self->done(static_cast<int>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Accept(QDialog* self) {
|
|
|
|
self->accept();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Reject(QDialog* self) {
|
|
|
|
self->reject();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_ShowExtension(QDialog* self, bool param1) {
|
|
|
|
self->showExtension(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QDialog::tr(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QDialog::tr(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QDialog::trUtf8(s, c);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QDialog_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QDialog::trUtf8(s, c, static_cast<int>(n));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
|
|
|
return miqt_strdup(_b.data(), _b.length());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDialog_Delete(QDialog* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|