2024-08-25 04:08:24 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QDockWidget>
|
|
|
|
#include <QList>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMenuBar>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QSize>
|
|
|
|
#include <QStatusBar>
|
|
|
|
#include <QString>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QToolBar>
|
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qmainwindow.h"
|
|
|
|
#include "gen_qmainwindow.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
|
|
|
QMainWindow* QMainWindow_new() {
|
|
|
|
return new QMainWindow();
|
|
|
|
}
|
|
|
|
|
|
|
|
QMainWindow* QMainWindow_new2(QWidget* parent) {
|
|
|
|
return new QMainWindow(parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QMainWindow* QMainWindow_new3(QWidget* parent, int flags) {
|
|
|
|
return new QMainWindow(parent, static_cast<Qt::WindowFlags>(flags));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QMainWindow_MetaObject(const QMainWindow* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QMainWindow_Tr(const char* s) {
|
|
|
|
QString _ret = QMainWindow::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* QMainWindow_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QMainWindow::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
|
|
|
QSize* QMainWindow_IconSize(const QMainWindow* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->iconSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetIconSize(QMainWindow* self, QSize* iconSize) {
|
|
|
|
self->setIconSize(*iconSize);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_ToolButtonStyle(const QMainWindow* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ToolButtonStyle _ret = self->toolButtonStyle();
|
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 QMainWindow_SetToolButtonStyle(QMainWindow* self, int toolButtonStyle) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setToolButtonStyle(static_cast<Qt::ToolButtonStyle>(toolButtonStyle));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_IsAnimated(const QMainWindow* self) {
|
|
|
|
return self->isAnimated();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_IsDockNestingEnabled(const QMainWindow* self) {
|
|
|
|
return self->isDockNestingEnabled();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_DocumentMode(const QMainWindow* self) {
|
|
|
|
return self->documentMode();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetDocumentMode(QMainWindow* self, bool enabled) {
|
|
|
|
self->setDocumentMode(enabled);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_TabShape(const QMainWindow* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTabWidget::TabShape _ret = self->tabShape();
|
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 QMainWindow_SetTabShape(QMainWindow* self, int tabShape) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTabShape(static_cast<QTabWidget::TabShape>(tabShape));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_TabPosition(const QMainWindow* self, int area) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QTabWidget::TabPosition _ret = self->tabPosition(static_cast<Qt::DockWidgetArea>(area));
|
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 QMainWindow_SetTabPosition(QMainWindow* self, int areas, int tabPosition) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setTabPosition(static_cast<Qt::DockWidgetAreas>(areas), static_cast<QTabWidget::TabPosition>(tabPosition));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetDockOptions(QMainWindow* self, int options) {
|
|
|
|
self->setDockOptions(static_cast<QMainWindow::DockOptions>(options));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QMainWindow_DockOptions(const QMainWindow* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QMainWindow::DockOptions _ret = self->dockOptions();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_IsSeparator(const QMainWindow* self, QPoint* pos) {
|
|
|
|
return self->isSeparator(*pos);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMenuBar* QMainWindow_MenuBar(const QMainWindow* self) {
|
|
|
|
return self->menuBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetMenuBar(QMainWindow* self, QMenuBar* menubar) {
|
|
|
|
self->setMenuBar(menubar);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QMainWindow_MenuWidget(const QMainWindow* self) {
|
|
|
|
return self->menuWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetMenuWidget(QMainWindow* self, QWidget* menubar) {
|
|
|
|
self->setMenuWidget(menubar);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QStatusBar* QMainWindow_StatusBar(const QMainWindow* self) {
|
|
|
|
return self->statusBar();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetStatusBar(QMainWindow* self, QStatusBar* statusbar) {
|
|
|
|
self->setStatusBar(statusbar);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QWidget* QMainWindow_CentralWidget(const QMainWindow* self) {
|
|
|
|
return self->centralWidget();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetCentralWidget(QMainWindow* self, QWidget* widget) {
|
|
|
|
self->setCentralWidget(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget* QMainWindow_TakeCentralWidget(QMainWindow* self) {
|
|
|
|
return self->takeCentralWidget();
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_SetCorner(QMainWindow* self, int corner, int area) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setCorner(static_cast<Qt::Corner>(corner), static_cast<Qt::DockWidgetArea>(area));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_Corner(const QMainWindow* self, int corner) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::DockWidgetArea _ret = self->corner(static_cast<Qt::Corner>(corner));
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_AddToolBarBreak(QMainWindow* self) {
|
|
|
|
self->addToolBarBreak();
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QMainWindow_InsertToolBarBreak(QMainWindow* self, QToolBar* before) {
|
|
|
|
self->insertToolBarBreak(before);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_AddToolBar(QMainWindow* self, int area, QToolBar* toolbar) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->addToolBar(static_cast<Qt::ToolBarArea>(area), toolbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_AddToolBarWithToolbar(QMainWindow* self, QToolBar* toolbar) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->addToolBar(toolbar);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QToolBar* QMainWindow_AddToolBarWithTitle(QMainWindow* self, struct miqt_string* title) {
|
|
|
|
QString title_QString = QString::fromUtf8(&title->data, title->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->addToolBar(title_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_InsertToolBar(QMainWindow* self, QToolBar* before, QToolBar* toolbar) {
|
|
|
|
self->insertToolBar(before, toolbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_RemoveToolBar(QMainWindow* self, QToolBar* toolbar) {
|
|
|
|
self->removeToolBar(toolbar);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_RemoveToolBarBreak(QMainWindow* self, QToolBar* before) {
|
|
|
|
self->removeToolBarBreak(before);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_UnifiedTitleAndToolBarOnMac(const QMainWindow* self) {
|
|
|
|
return self->unifiedTitleAndToolBarOnMac();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_ToolBarArea(const QMainWindow* self, QToolBar* toolbar) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ToolBarArea _ret = self->toolBarArea(toolbar);
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QMainWindow_ToolBarBreak(const QMainWindow* self, QToolBar* toolbar) {
|
|
|
|
return self->toolBarBreak(toolbar);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_AddDockWidget(QMainWindow* self, int area, QDockWidget* dockwidget) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->addDockWidget(static_cast<Qt::DockWidgetArea>(area), dockwidget);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_AddDockWidget2(QMainWindow* self, int area, QDockWidget* dockwidget, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->addDockWidget(static_cast<Qt::DockWidgetArea>(area), dockwidget, static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_SplitDockWidget(QMainWindow* self, QDockWidget* after, QDockWidget* dockwidget, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->splitDockWidget(after, dockwidget, static_cast<Qt::Orientation>(orientation));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_TabifyDockWidget(QMainWindow* self, QDockWidget* first, QDockWidget* second) {
|
|
|
|
self->tabifyDockWidget(first, second);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* QMainWindow_TabifiedDockWidgets(const QMainWindow* self, QDockWidget* dockwidget) {
|
2024-09-18 00:12:02 +00:00
|
|
|
QList<QDockWidget *> _ret = self->tabifiedDockWidgets(dockwidget);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Convert QList<> from C++ memory to manually-managed C memory
|
2024-09-14 22:29:05 +00:00
|
|
|
QDockWidget** _arr = static_cast<QDockWidget**>(malloc(sizeof(QDockWidget*) * _ret.length()));
|
|
|
|
for (size_t i = 0, e = _ret.length(); i < e; ++i) {
|
|
|
|
_arr[i] = _ret[i];
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_array* _out = static_cast<struct miqt_array*>(malloc(sizeof(struct miqt_array)));
|
|
|
|
_out->len = _ret.length();
|
|
|
|
_out->data = static_cast<void*>(_arr);
|
|
|
|
return _out;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_RemoveDockWidget(QMainWindow* self, QDockWidget* dockwidget) {
|
|
|
|
self->removeDockWidget(dockwidget);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QMainWindow_RestoreDockWidget(QMainWindow* self, QDockWidget* dockwidget) {
|
|
|
|
return self->restoreDockWidget(dockwidget);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QMainWindow_DockWidgetArea(const QMainWindow* self, QDockWidget* dockwidget) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::DockWidgetArea _ret = self->dockWidgetArea(dockwidget);
|
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 QMainWindow_ResizeDocks(QMainWindow* self, struct miqt_array* /* of QDockWidget* */ docks, struct miqt_array* /* of int */ sizes, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
QList<QDockWidget*> docks_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
docks_QList.reserve(docks->len);
|
|
|
|
QDockWidget** docks_arr = static_cast<QDockWidget**>(docks->data);
|
|
|
|
for(size_t i = 0; i < docks->len; ++i) {
|
|
|
|
docks_QList.push_back(docks_arr[i]);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
QList<int> sizes_QList;
|
2024-09-14 22:29:05 +00:00
|
|
|
sizes_QList.reserve(sizes->len);
|
|
|
|
int* sizes_arr = static_cast<int*>(sizes->data);
|
|
|
|
for(size_t i = 0; i < sizes->len; ++i) {
|
2024-09-17 07:43:35 +00:00
|
|
|
sizes_QList.push_back(static_cast<int>(sizes_arr[i]));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
self->resizeDocks(docks_QList, sizes_QList, static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QByteArray* QMainWindow_SaveState(const QMainWindow* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QByteArray(self->saveState());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QMainWindow_RestoreState(QMainWindow* self, QByteArray* state) {
|
|
|
|
return self->restoreState(*state);
|
|
|
|
}
|
|
|
|
|
|
|
|
QMenu* QMainWindow_CreatePopupMenu(QMainWindow* self) {
|
|
|
|
return self->createPopupMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetAnimated(QMainWindow* self, bool enabled) {
|
|
|
|
self->setAnimated(enabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetDockNestingEnabled(QMainWindow* self, bool enabled) {
|
|
|
|
self->setDockNestingEnabled(enabled);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_SetUnifiedTitleAndToolBarOnMac(QMainWindow* self, bool set) {
|
|
|
|
self->setUnifiedTitleAndToolBarOnMac(set);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_IconSizeChanged(QMainWindow* self, QSize* iconSize) {
|
|
|
|
self->iconSizeChanged(*iconSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_connect_IconSizeChanged(QMainWindow* self, void* slot) {
|
|
|
|
QMainWindow::connect(self, static_cast<void (QMainWindow::*)(const QSize&)>(&QMainWindow::iconSizeChanged), self, [=](const QSize& iconSize) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QSize& iconSize_ret = iconSize;
|
|
|
|
// Cast returned reference into pointer
|
|
|
|
QSize* sigval1 = const_cast<QSize*>(&iconSize_ret);
|
|
|
|
miqt_exec_callback_QMainWindow_IconSizeChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_ToolButtonStyleChanged(QMainWindow* self, int toolButtonStyle) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->toolButtonStyleChanged(static_cast<Qt::ToolButtonStyle>(toolButtonStyle));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_connect_ToolButtonStyleChanged(QMainWindow* self, void* slot) {
|
|
|
|
QMainWindow::connect(self, static_cast<void (QMainWindow::*)(Qt::ToolButtonStyle)>(&QMainWindow::toolButtonStyleChanged), self, [=](Qt::ToolButtonStyle toolButtonStyle) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ToolButtonStyle toolButtonStyle_ret = toolButtonStyle;
|
2024-09-18 00:12:02 +00:00
|
|
|
int sigval1 = static_cast<int>(toolButtonStyle_ret);
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QMainWindow_ToolButtonStyleChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QMainWindow_TabifiedDockWidgetActivated(QMainWindow* self, QDockWidget* dockWidget) {
|
|
|
|
self->tabifiedDockWidgetActivated(dockWidget);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_connect_TabifiedDockWidgetActivated(QMainWindow* self, void* slot) {
|
|
|
|
QMainWindow::connect(self, static_cast<void (QMainWindow::*)(QDockWidget*)>(&QMainWindow::tabifiedDockWidgetActivated), self, [=](QDockWidget* dockWidget) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDockWidget* sigval1 = dockWidget;
|
|
|
|
miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QMainWindow_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QMainWindow::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* QMainWindow_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QMainWindow::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* QMainWindow_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QMainWindow::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* QMainWindow_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QMainWindow::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
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QMainWindow_AddToolBarBreak1(QMainWindow* self, int area) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->addToolBarBreak(static_cast<Qt::ToolBarArea>(area));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QByteArray* QMainWindow_SaveState1(const QMainWindow* self, int version) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QByteArray(self->saveState(static_cast<int>(version)));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool QMainWindow_RestoreState2(QMainWindow* self, QByteArray* state, int version) {
|
|
|
|
return self->restoreState(*state, static_cast<int>(version));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QMainWindow_Delete(QMainWindow* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|