2024-08-29 07:01:51 +00:00
|
|
|
#include <QAction>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QCompleter>
|
|
|
|
#include <QEvent>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QIcon>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QMargins>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QPoint>
|
|
|
|
#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 <QValidator>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include <QVariant>
|
2024-08-25 04:08:24 +00:00
|
|
|
#include <QWidget>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qlineedit.h"
|
|
|
|
#include "gen_qlineedit.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QLineEdit* QLineEdit_new() {
|
|
|
|
return new QLineEdit();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QLineEdit* QLineEdit_new2(struct miqt_string* param1) {
|
|
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QLineEdit(param1_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QLineEdit* QLineEdit_new3(QWidget* parent) {
|
|
|
|
return new QLineEdit(parent);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
QLineEdit* QLineEdit_new4(struct miqt_string* param1, QWidget* parent) {
|
|
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QLineEdit(param1_QString, parent);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMetaObject* QLineEdit_MetaObject(const QLineEdit* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-20 22:32:57 +00:00
|
|
|
void* QLineEdit_Metacast(QLineEdit* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLineEdit_Tr(const char* s) {
|
|
|
|
QString _ret = QLineEdit::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* QLineEdit_TrUtf8(const char* s) {
|
|
|
|
QString _ret = QLineEdit::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-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLineEdit_Text(const QLineEdit* self) {
|
|
|
|
QString _ret = self->text();
|
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* QLineEdit_DisplayText(const QLineEdit* self) {
|
|
|
|
QString _ret = self->displayText();
|
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* QLineEdit_PlaceholderText(const QLineEdit* self) {
|
|
|
|
QString _ret = self->placeholderText();
|
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
|
|
|
void QLineEdit_SetPlaceholderText(QLineEdit* self, struct miqt_string* placeholderText) {
|
|
|
|
QString placeholderText_QString = QString::fromUtf8(&placeholderText->data, placeholderText->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setPlaceholderText(placeholderText_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLineEdit_MaxLength(const QLineEdit* self) {
|
|
|
|
return self->maxLength();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetMaxLength(QLineEdit* self, int maxLength) {
|
|
|
|
self->setMaxLength(static_cast<int>(maxLength));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetFrame(QLineEdit* self, bool frame) {
|
|
|
|
self->setFrame(frame);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_HasFrame(const QLineEdit* self) {
|
|
|
|
return self->hasFrame();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetClearButtonEnabled(QLineEdit* self, bool enable) {
|
|
|
|
self->setClearButtonEnabled(enable);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_IsClearButtonEnabled(const QLineEdit* self) {
|
|
|
|
return self->isClearButtonEnabled();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QLineEdit_EchoMode(const QLineEdit* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QLineEdit::EchoMode _ret = self->echoMode();
|
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 QLineEdit_SetEchoMode(QLineEdit* self, int echoMode) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setEchoMode(static_cast<QLineEdit::EchoMode>(echoMode));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_IsReadOnly(const QLineEdit* self) {
|
|
|
|
return self->isReadOnly();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetReadOnly(QLineEdit* self, bool readOnly) {
|
|
|
|
self->setReadOnly(readOnly);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetValidator(QLineEdit* self, QValidator* validator) {
|
|
|
|
self->setValidator(validator);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QValidator* QLineEdit_Validator(const QLineEdit* self) {
|
|
|
|
return (QValidator*) self->validator();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetCompleter(QLineEdit* self, QCompleter* completer) {
|
|
|
|
self->setCompleter(completer);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QCompleter* QLineEdit_Completer(const QLineEdit* self) {
|
|
|
|
return self->completer();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLineEdit_SizeHint(const QLineEdit* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->sizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QSize* QLineEdit_MinimumSizeHint(const QLineEdit* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QSize(self->minimumSizeHint());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLineEdit_CursorPosition(const QLineEdit* self) {
|
|
|
|
return self->cursorPosition();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetCursorPosition(QLineEdit* self, int cursorPosition) {
|
|
|
|
self->setCursorPosition(static_cast<int>(cursorPosition));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QLineEdit_CursorPositionAt(QLineEdit* self, QPoint* pos) {
|
|
|
|
return self->cursorPositionAt(*pos);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QLineEdit_SetAlignment(QLineEdit* self, int flag) {
|
|
|
|
self->setAlignment(static_cast<Qt::Alignment>(flag));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLineEdit_Alignment(const QLineEdit* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::Alignment _ret = self->alignment();
|
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
void QLineEdit_CursorForward(QLineEdit* self, bool mark) {
|
|
|
|
self->cursorForward(mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_CursorBackward(QLineEdit* self, bool mark) {
|
|
|
|
self->cursorBackward(mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_CursorWordForward(QLineEdit* self, bool mark) {
|
|
|
|
self->cursorWordForward(mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_CursorWordBackward(QLineEdit* self, bool mark) {
|
|
|
|
self->cursorWordBackward(mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Backspace(QLineEdit* self) {
|
|
|
|
self->backspace();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Del(QLineEdit* self) {
|
|
|
|
self->del();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Home(QLineEdit* self, bool mark) {
|
|
|
|
self->home(mark);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_End(QLineEdit* self, bool mark) {
|
|
|
|
self->end(mark);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_IsModified(const QLineEdit* self) {
|
|
|
|
return self->isModified();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetModified(QLineEdit* self, bool modified) {
|
|
|
|
self->setModified(modified);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetSelection(QLineEdit* self, int param1, int param2) {
|
|
|
|
self->setSelection(static_cast<int>(param1), static_cast<int>(param2));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_HasSelectedText(const QLineEdit* self) {
|
|
|
|
return self->hasSelectedText();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLineEdit_SelectedText(const QLineEdit* self) {
|
|
|
|
QString _ret = self->selectedText();
|
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 QLineEdit_SelectionStart(const QLineEdit* self) {
|
|
|
|
return self->selectionStart();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLineEdit_SelectionEnd(const QLineEdit* self) {
|
|
|
|
return self->selectionEnd();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QLineEdit_SelectionLength(const QLineEdit* self) {
|
|
|
|
return self->selectionLength();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_IsUndoAvailable(const QLineEdit* self) {
|
|
|
|
return self->isUndoAvailable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_IsRedoAvailable(const QLineEdit* self) {
|
|
|
|
return self->isRedoAvailable();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetDragEnabled(QLineEdit* self, bool b) {
|
|
|
|
self->setDragEnabled(b);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_DragEnabled(const QLineEdit* self) {
|
|
|
|
return self->dragEnabled();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QLineEdit_SetCursorMoveStyle(QLineEdit* self, int style) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setCursorMoveStyle(static_cast<Qt::CursorMoveStyle>(style));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QLineEdit_CursorMoveStyle(const QLineEdit* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
Qt::CursorMoveStyle _ret = self->cursorMoveStyle();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLineEdit_InputMask(const QLineEdit* self) {
|
|
|
|
QString _ret = self->inputMask();
|
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
|
|
|
void QLineEdit_SetInputMask(QLineEdit* self, struct miqt_string* inputMask) {
|
|
|
|
QString inputMask_QString = QString::fromUtf8(&inputMask->data, inputMask->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setInputMask(inputMask_QString);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QLineEdit_HasAcceptableInput(const QLineEdit* self) {
|
|
|
|
return self->hasAcceptableInput();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetTextMargins(QLineEdit* self, int left, int top, int right, int bottom) {
|
|
|
|
self->setTextMargins(static_cast<int>(left), static_cast<int>(top), static_cast<int>(right), static_cast<int>(bottom));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SetTextMarginsWithMargins(QLineEdit* self, QMargins* margins) {
|
|
|
|
self->setTextMargins(*margins);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QLineEdit_GetTextMargins(const QLineEdit* self, int* left, int* top, int* right, int* bottom) {
|
|
|
|
self->getTextMargins(static_cast<int*>(left), static_cast<int*>(top), static_cast<int*>(right), static_cast<int*>(bottom));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QMargins* QLineEdit_TextMargins(const QLineEdit* self) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QMargins(self->textMargins());
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QLineEdit_AddAction(QLineEdit* self, QAction* action, int position) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->addAction(action, static_cast<QLineEdit::ActionPosition>(position));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QAction* QLineEdit_AddAction2(QLineEdit* self, QIcon* icon, int position) {
|
2024-08-29 07:01:51 +00:00
|
|
|
return self->addAction(*icon, static_cast<QLineEdit::ActionPosition>(position));
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLineEdit_SetText(QLineEdit* self, struct miqt_string* text) {
|
|
|
|
QString text_QString = QString::fromUtf8(&text->data, text->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->setText(text_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Clear(QLineEdit* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SelectAll(QLineEdit* self) {
|
|
|
|
self->selectAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Undo(QLineEdit* self) {
|
|
|
|
self->undo();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Redo(QLineEdit* self) {
|
|
|
|
self->redo();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Cut(QLineEdit* self) {
|
|
|
|
self->cut();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
void QLineEdit_Copy(const QLineEdit* self) {
|
|
|
|
self->copy();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Paste(QLineEdit* self) {
|
|
|
|
self->paste();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Deselect(QLineEdit* self) {
|
|
|
|
self->deselect();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLineEdit_Insert(QLineEdit* self, struct miqt_string* param1) {
|
|
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->insert(param1_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
QMenu* QLineEdit_CreateStandardContextMenu(QLineEdit* self) {
|
|
|
|
return self->createStandardContextMenu();
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLineEdit_TextChanged(QLineEdit* self, struct miqt_string* param1) {
|
|
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->textChanged(param1_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_TextChanged(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)(const QString&)>(&QLineEdit::textChanged), self, [=](const QString& param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString param1_ret = param1;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
|
|
miqt_exec_callback_QLineEdit_TextChanged(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
void QLineEdit_TextEdited(QLineEdit* self, struct miqt_string* param1) {
|
|
|
|
QString param1_QString = QString::fromUtf8(¶m1->data, param1->len);
|
2024-08-25 04:08:24 +00:00
|
|
|
self->textEdited(param1_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_TextEdited(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)(const QString&)>(&QLineEdit::textEdited), self, [=](const QString& param1) {
|
2024-09-14 22:29:05 +00:00
|
|
|
const QString param1_ret = param1;
|
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
|
|
|
QByteArray param1_b = param1_ret.toUtf8();
|
|
|
|
struct miqt_string* sigval1 = miqt_strdup(param1_b.data(), param1_b.length());
|
|
|
|
miqt_exec_callback_QLineEdit_TextEdited(slot, sigval1);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_CursorPositionChanged(QLineEdit* self, int param1, int param2) {
|
|
|
|
self->cursorPositionChanged(static_cast<int>(param1), static_cast<int>(param2));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_CursorPositionChanged(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)(int, int)>(&QLineEdit::cursorPositionChanged), self, [=](int param1, int param2) {
|
2024-09-14 22:29:05 +00:00
|
|
|
int sigval1 = param1;
|
|
|
|
int sigval2 = param2;
|
|
|
|
miqt_exec_callback_QLineEdit_CursorPositionChanged(slot, sigval1, sigval2);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_ReturnPressed(QLineEdit* self) {
|
|
|
|
self->returnPressed();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_ReturnPressed(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)()>(&QLineEdit::returnPressed), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QLineEdit_ReturnPressed(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_EditingFinished(QLineEdit* self) {
|
|
|
|
self->editingFinished();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_EditingFinished(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)()>(&QLineEdit::editingFinished), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QLineEdit_EditingFinished(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_SelectionChanged(QLineEdit* self) {
|
|
|
|
self->selectionChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_SelectionChanged(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)()>(&QLineEdit::selectionChanged), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QLineEdit_SelectionChanged(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_InputRejected(QLineEdit* self) {
|
|
|
|
self->inputRejected();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_connect_InputRejected(QLineEdit* self, void* slot) {
|
|
|
|
QLineEdit::connect(self, static_cast<void (QLineEdit::*)()>(&QLineEdit::inputRejected), self, [=]() {
|
2024-09-14 22:29:05 +00:00
|
|
|
miqt_exec_callback_QLineEdit_InputRejected(slot);
|
2024-08-25 04:08:24 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QVariant* QLineEdit_InputMethodQuery(const QLineEdit* self, int param1) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QVariant(self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(param1)));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
QVariant* QLineEdit_InputMethodQuery2(const QLineEdit* self, int property, QVariant* argument) {
|
2024-09-17 06:29:11 +00:00
|
|
|
return new QVariant(self->inputMethodQuery(static_cast<Qt::InputMethodQuery>(property), *argument));
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
bool QLineEdit_Event(QLineEdit* self, QEvent* param1) {
|
|
|
|
return self->event(param1);
|
|
|
|
}
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
struct miqt_string* QLineEdit_Tr2(const char* s, const char* c) {
|
|
|
|
QString _ret = QLineEdit::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* QLineEdit_Tr3(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QLineEdit::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* QLineEdit_TrUtf82(const char* s, const char* c) {
|
|
|
|
QString _ret = QLineEdit::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* QLineEdit_TrUtf83(const char* s, const char* c, int n) {
|
|
|
|
QString _ret = QLineEdit::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 QLineEdit_CursorForward2(QLineEdit* self, bool mark, int steps) {
|
|
|
|
self->cursorForward(mark, static_cast<int>(steps));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_CursorBackward2(QLineEdit* self, bool mark, int steps) {
|
|
|
|
self->cursorBackward(mark, static_cast<int>(steps));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLineEdit_Delete(QLineEdit* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|