2024-08-25 04:08:24 +00:00
|
|
|
#include <QPaintDevice>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QPalette>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QPixmap>
|
|
|
|
#include <QRect>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QStyle>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QStyleOption>
|
|
|
|
#include <QStyleOptionComplex>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QStylePainter>
|
|
|
|
#include <QWidget>
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qstylepainter.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qstylepainter.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QStylePainter* QStylePainter_new(QWidget* w) {
|
|
|
|
return new QStylePainter(w);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-10-26 00:46:42 +00:00
|
|
|
QStylePainter* QStylePainter_new2() {
|
|
|
|
return new QStylePainter();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w) {
|
|
|
|
return new QStylePainter(pd, w);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QStylePainter_Begin(QStylePainter* self, QWidget* w) {
|
|
|
|
return self->begin(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QStylePainter_Begin2(QStylePainter* self, QPaintDevice* pd, QWidget* w) {
|
|
|
|
return self->begin(pd, w);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QStylePainter_DrawPrimitive(QStylePainter* self, int pe, QStyleOption* opt) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawPrimitive(static_cast<QStyle::PrimitiveElement>(pe), *opt);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QStylePainter_DrawControl(QStylePainter* self, int ce, QStyleOption* opt) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawControl(static_cast<QStyle::ControlElement>(ce), *opt);
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QStylePainter_DrawComplexControl(QStylePainter* self, int cc, QStyleOptionComplex* opt) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawComplexControl(static_cast<QStyle::ComplexControl>(cc), *opt);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QStylePainter_DrawItemText(QStylePainter* self, QRect* r, int flags, QPalette* pal, bool enabled, struct miqt_string text) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawItemText(*r, static_cast<int>(flags), *pal, enabled, text_QString);
|
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QStylePainter_DrawItemPixmap(QStylePainter* self, QRect* r, int flags, QPixmap* pixmap) {
|
|
|
|
self->drawItemPixmap(*r, static_cast<int>(flags), *pixmap);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QStyle* QStylePainter_Style(const QStylePainter* self) {
|
|
|
|
return self->style();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
void QStylePainter_DrawItemText6(QStylePainter* self, QRect* r, int flags, QPalette* pal, bool enabled, struct miqt_string text, int textRole) {
|
|
|
|
QString text_QString = QString::fromUtf8(text.data, text.len);
|
2024-08-29 07:01:51 +00:00
|
|
|
self->drawItemText(*r, static_cast<int>(flags), *pal, enabled, text_QString, static_cast<QPalette::ColorRole>(textRole));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QStylePainter_Delete(QStylePainter* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|