2024-08-25 04:08:24 +00:00
|
|
|
#include <QAction>
|
|
|
|
#include <QIcon>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QRect>
|
|
|
|
#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 <QToolBar>
|
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qtoolbar.h"
|
|
|
|
#include "gen_qtoolbar.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QToolBar* QToolBar_new(struct miqt_string* title) {
|
|
|
|
QString title_QString = QString::fromUtf8(&title->data, title->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QToolBar(title_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QToolBar* QToolBar_new2() {
|
|
|
|
return new QToolBar();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QToolBar* QToolBar_new3(struct miqt_string* title, QWidget* parent) {
|
|
|
|
QString title_QString = QString::fromUtf8(&title->data, title->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QToolBar(title_QString, parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
QToolBar* QToolBar_new4(QWidget* parent) {
|
|
|
|
return new QToolBar(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QToolBar_MetaObject(const QToolBar* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QToolBar_Tr(const char* s) {
|
|
|
|
QString _ret = QToolBar::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* QToolBar_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QToolBar::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
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_SetMovable(QToolBar* self, bool movable) {
|
|
|
|
self->setMovable(movable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QToolBar_IsMovable(const QToolBar* self) {
|
|
|
|
return self->isMovable();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_SetAllowedAreas(QToolBar* self, int areas) {
|
|
|
|
self->setAllowedAreas(static_cast<Qt::ToolBarAreas>(areas));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QToolBar_AllowedAreas(const QToolBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ToolBarAreas _ret = self->allowedAreas();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
bool QToolBar_IsAreaAllowed(const QToolBar* self, int area) {
|
2024-09-11 05:41:09 +00:00
|
|
|
return self->isAreaAllowed(static_cast<Qt::ToolBarArea>(area));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QToolBar_SetOrientation(QToolBar* self, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setOrientation(static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QToolBar_Orientation(const QToolBar* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Orientation _ret = self->orientation();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_Clear(QToolBar* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QAction* QToolBar_AddAction(QToolBar* self, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->addAction(text_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QAction* QToolBar_AddAction2(QToolBar* self, QIcon* icon, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->addAction(*icon, text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* QToolBar_AddSeparator(QToolBar* self) {
|
|
|
|
return self->addSeparator();
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* QToolBar_InsertSeparator(QToolBar* self, QAction* before) {
|
|
|
|
return self->insertSeparator(before);
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* QToolBar_AddWidget(QToolBar* self, QWidget* widget) {
|
|
|
|
return self->addWidget(widget);
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* QToolBar_InsertWidget(QToolBar* self, QAction* before, QWidget* widget) {
|
|
|
|
return self->insertWidget(before, widget);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QRect* QToolBar_ActionGeometry(const QToolBar* self, QAction* action) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QRect(self->actionGeometry(action));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAction* QToolBar_ActionAt(const QToolBar* self, QPoint* p) {
|
|
|
|
return self->actionAt(*p);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAction* QToolBar_ActionAt2(const QToolBar* self, int x, int y) {
|
|
|
|
return self->actionAt(static_cast<int>(x), static_cast<int>(y));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QAction* QToolBar_ToggleViewAction(const QToolBar* self) {
|
|
|
|
return self->toggleViewAction();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QToolBar_IconSize(const QToolBar* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->iconSize());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QToolBar_ToolButtonStyle(const QToolBar* 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-11 05:41:09 +00:00
|
|
|
QWidget* QToolBar_WidgetForAction(const QToolBar* self, QAction* action) {
|
|
|
|
return self->widgetForAction(action);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QToolBar_IsFloatable(const QToolBar* self) {
|
|
|
|
return self->isFloatable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_SetFloatable(QToolBar* self, bool floatable) {
|
|
|
|
self->setFloatable(floatable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QToolBar_IsFloating(const QToolBar* self) {
|
|
|
|
return self->isFloating();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_SetIconSize(QToolBar* self, QSize* iconSize) {
|
|
|
|
self->setIconSize(*iconSize);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QToolBar_SetToolButtonStyle(QToolBar* self, int toolButtonStyle) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setToolButtonStyle(static_cast<Qt::ToolButtonStyle>(toolButtonStyle));
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QToolBar_ActionTriggered(QToolBar* self, QAction* action) {
|
|
|
|
self->actionTriggered(action);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_ActionTriggered(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(QAction*)>(&QToolBar::actionTriggered), self, [=](QAction* action) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QAction* sigval1 = action;
|
|
|
|
miqt_exec_callback_QToolBar_ActionTriggered(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_MovableChanged(QToolBar* self, bool movable) {
|
|
|
|
self->movableChanged(movable);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_MovableChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(bool)>(&QToolBar::movableChanged), self, [=](bool movable) {
|
2024-09-14 22:29:05 +00:00
|
|
|
bool sigval1 = movable;
|
|
|
|
miqt_exec_callback_QToolBar_MovableChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QToolBar_AllowedAreasChanged(QToolBar* self, int allowedAreas) {
|
|
|
|
self->allowedAreasChanged(static_cast<Qt::ToolBarAreas>(allowedAreas));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_AllowedAreasChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(Qt::ToolBarAreas)>(&QToolBar::allowedAreasChanged), self, [=](Qt::ToolBarAreas allowedAreas) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::ToolBarAreas allowedAreas_ret = allowedAreas;
|
|
|
|
int sigval1 = static_cast<int>(allowedAreas_ret);
|
|
|
|
miqt_exec_callback_QToolBar_AllowedAreasChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QToolBar_OrientationChanged(QToolBar* self, int orientation) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->orientationChanged(static_cast<Qt::Orientation>(orientation));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_OrientationChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(Qt::Orientation)>(&QToolBar::orientationChanged), self, [=](Qt::Orientation orientation) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Orientation orientation_ret = orientation;
|
2024-09-18 00:12:02 +00:00
|
|
|
int sigval1 = static_cast<int>(orientation_ret);
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QToolBar_OrientationChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QToolBar_IconSizeChanged(QToolBar* self, QSize* iconSize) {
|
|
|
|
self->iconSizeChanged(*iconSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_IconSizeChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(const QSize&)>(&QToolBar::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_QToolBar_IconSizeChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QToolBar_ToolButtonStyleChanged(QToolBar* self, int toolButtonStyle) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->toolButtonStyleChanged(static_cast<Qt::ToolButtonStyle>(toolButtonStyle));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_ToolButtonStyleChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(Qt::ToolButtonStyle)>(&QToolBar::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_QToolBar_ToolButtonStyleChanged(slot, sigval1);
|
2024-08-29 07:01:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QToolBar_TopLevelChanged(QToolBar* self, bool topLevel) {
|
|
|
|
self->topLevelChanged(topLevel);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_TopLevelChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(bool)>(&QToolBar::topLevelChanged), self, [=](bool topLevel) {
|
2024-09-14 22:29:05 +00:00
|
|
|
bool sigval1 = topLevel;
|
|
|
|
miqt_exec_callback_QToolBar_TopLevelChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_VisibilityChanged(QToolBar* self, bool visible) {
|
|
|
|
self->visibilityChanged(visible);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QToolBar_connect_VisibilityChanged(QToolBar* self, void* slot) {
|
|
|
|
QToolBar::connect(self, static_cast<void (QToolBar::*)(bool)>(&QToolBar::visibilityChanged), self, [=](bool visible) {
|
2024-09-14 22:29:05 +00:00
|
|
|
bool sigval1 = visible;
|
|
|
|
miqt_exec_callback_QToolBar_VisibilityChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QToolBar_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QToolBar::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* QToolBar_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QToolBar::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* QToolBar_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QToolBar::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* QToolBar_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QToolBar::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 QToolBar_Delete(QToolBar* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|