morpheus

A Matrix client written in Go-QT
git clone git://archive.git.mtrnord.blog/Nordgedanken/morpheus.git
Log | Files | Refs | README | LICENSE

commit 67b4ec1edd86e5772ce5d5826c127d66c6b54efc
parent 65c449b3ea024ec3d94c0ccf431eb7ec0b06822c
Author: MTRNord <mtrnord1@gmail.com>
Date:   Tue, 10 Oct 2017 19:55:46 +0200

Add AppIcon, Fix typo in sending field, rework resizing on resizing, add messages to DB, add new message design (bug with ScrollArea still), rework on how messages get added

Signed-off-by: MTRNord <mtrnord1@gmail.com>

Diffstat:
DLogo/LogoBeta.png | 0
DLogo/icon.svg | 2--
Melements/messageList.go | 49+++++++++++++++++++++++++++++--------------------
Melements/moc.cpp | 248++++++++++++++++++++++++++++++++++++++++----------------------------------------
Melements/moc.go | 466++++++++++++++++++++++++++++++++++++++++----------------------------------------
Melements/moc.h | 106++++++++++++++++++++++++++++++++++++++++----------------------------------------
Melements/moc_moc.h | 36++++++++++++++++++------------------
Mmain.go | 11+++++++++--
Mmatrix/db.go | 18+++++++++++++++++-
RLogo/Logo.png -> qml/resources/logos/MorpheusBig.png | 0
Mqml/ui/chat.ui | 2+-
Mqml/ui/message.ui | 4++--
Muis.go | 47+++++++++++++++++++++++++++++++----------------
13 files changed, 517 insertions(+), 472 deletions(-)

diff --git a/Logo/LogoBeta.png b/Logo/LogoBeta.png Binary files differ. diff --git a/Logo/icon.svg b/Logo/icon.svg @@ -1 +0,0 @@ -<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48"><defs><linearGradient x1="12.94323" y1="13.95561" x2="54.72492" y2="55.76969" gradientUnits="userSpaceOnUse" id="color-1"><stop offset="0.19" stop-color="#000000" stop-opacity="0.57"></stop><stop offset="1" stop-color="#000000" stop-opacity="0"></stop></linearGradient><linearGradient x1="33.625" y1="14.375" x2="43" y2="23.75" gradientUnits="userSpaceOnUse" id="color-2"><stop offset="0" stop-color="#000000" stop-opacity="0.57"></stop><stop offset="1" stop-color="#000000" stop-opacity="0"></stop></linearGradient><filter id="dropshadow-base"><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .8 0"></feColorMatrix> <feOffset dx="0" dy="1"></feOffset> <feGaussianBlur stdDeviation="1"></feGaussianBlur> <feComposite in="SourceGraphic"></feComposite></filter><filter id="dropshadow-banner" x="-10%" y="-10%" width="120%" height="130%"><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"></feColorMatrix> <feOffset dx="0" dy="1"></feOffset> <feGaussianBlur stdDeviation="0.5"></feGaussianBlur> <feComposite in="SourceGraphic"></feComposite></filter></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="none" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M7,43c-1.10457,0 -2,-0.89543 -2,-2v-34c0,-1.10457 0.89543,-2 2,-2l26,0l10,10v26c0,1.10457 -0.89543,2 -2,2z" id="base 1 9 1 2" fill="#ffba94" stroke-width="1"></path><path d="M29.58844,16.81144l13.41156,13.41156v10.777c0,1.10457 -0.89543,2 -2,2l-12.83414,0l-12.36001,-12.36001c-1.7685,-1.7685 -2.86261,-4.2134 -2.86261,-6.91428c0,-5.39588 4.36698,-9.77011 9.75391,-9.77011c2.69054,0 5.12664,1.09118 6.8913,2.85583z" fill="url(#color-1)" stroke-width="1"></path><path d="M12.94324,23.72571c0,-5.39588 4.36697,-9.77011 9.75391,-9.77011c5.38693,0 9.75391,4.37423 9.75391,9.77011c0,5.39588 -4.36697,9.77011 -9.75391,9.77011c-5.38693,0 -9.75391,-4.37423 -9.75391,-9.77011z" id="path4574 1 1" fill="none" stroke-width="0"></path><g id="svg8 2"><g id="layer2 1" fill="#bdbdbd" stroke-width="0.26458"><path d="M12.94324,23.72571c0,-5.39588 4.36697,-9.77011 9.75391,-9.77011c5.38693,0 9.75391,4.37423 9.75391,9.77011c0,5.39588 -4.36697,9.77011 -9.75391,9.77011c-5.38693,0 -9.75391,-4.37423 -9.75391,-9.77011z" id="path4574 1"></path></g><g id="layer1 1" fill="#ffffff" stroke-width="0.16607"><path d="M16.4002,29.59082l-0.2394,-0.2394v-5.54085v-5.54084l0.2394,-0.2394c0.17386,-0.17386 0.31827,-0.23941 0.52749,-0.23941c0.32864,0 0.24577,-0.0629 3.69461,2.80416l2.20925,1.83658l2.6693,-2.22758c1.46812,-1.22517 2.74732,-2.26933 2.84269,-2.32037c0.31343,-0.16775 0.66947,-0.11147 0.92755,0.14661l0.2394,0.2394v5.49989v5.49989l-0.2394,0.2394c-0.33041,0.33041 -0.74689,0.33041 -1.0773,0l-0.2394,-0.2394v-4.46984c0,-2.45842 -0.01947,-4.46985 -0.04328,-4.46985c-0.02381,0 -1.0281,0.8215 -2.23177,1.82556c-1.20367,1.00405 -2.27962,1.88857 -2.39099,1.96559c-0.47224,0.32659 -0.5853,0.26401 -2.74278,-1.51843c-1.10409,-0.91216 -2.183,-1.79682 -2.39758,-1.96591l-0.39014,-0.30744l-0.04095,4.55289l-0.04095,4.55289l-0.22979,0.19762c-0.32864,0.28263 -0.73789,0.26628 -1.04596,-0.04177z" id="path32 1"></path></g></g><path d="M2,24c0,-12.15026 9.84974,-22 22,-22c12.15026,0 22,9.84974 22,22c0,12.15026 -9.84974,22 -22,22c-12.15026,0 -22,-9.84974 -22,-22z" id="base 1 5 1" fill="none" stroke-width="1"></path><path d="M2,24c0,-12.15026 9.84974,-22 22,-22c12.15026,0 22,9.84974 22,22c0,12.15026 -9.84974,22 -22,22c-12.15026,0 -22,-9.84974 -22,-22z" id="base 1 1 1" fill="none" stroke-width="1"></path><g fill="#000000" stroke-width="1" font-family="Roboto, sans-serif" font-weight="normal" font-size="14" text-anchor="start"></g><rect x="2" y="2" width="44" height="22" fill="none" stroke-width="1"></rect><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><g id="svg8 1 1" fill="#000000" stroke-width="1" font-family="Roboto, sans-serif" font-weight="normal" font-size="14" text-anchor="start"><g id="layer2 1 1"></g><g id="layer1 1 1"></g></g><rect x="2" y="2" width="44" height="22" fill="none" stroke-width="1"></rect><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M2,24v-22h44v22z" fill="none" stroke-width="1"></path><path d="M33.625,14.375l9.375,0.625v8.75z" fill="url(#color-2)" stroke-width="1"></path><path d="M33,5l10,10h-8c-1,0 -2,-1 -2,-2z" fill="#ffd8b2" stroke-width="1"></path></g></svg> -\ No newline at end of file diff --git a/elements/messageList.go b/elements/messageList.go @@ -2,46 +2,55 @@ package elements import ( "github.com/therecipe/qt/core" + "github.com/therecipe/qt/gui" + "github.com/therecipe/qt/uitools" "github.com/therecipe/qt/widgets" ) -type QGridLayoutWithTriggerSlot struct { - widgets.QGridLayout +type QVBoxLayoutWithTriggerSlot struct { + widgets.QVBoxLayout _ func(messageBody string) `slot:"TriggerMessage"` } -func NewMessageList() (messageView *widgets.QWidget, messageViewLayout *QGridLayoutWithTriggerSlot) { +func NewMessageList() (messageView *widgets.QWidget, messageViewLayout *QVBoxLayoutWithTriggerSlot) { messageView = widgets.NewQWidget(nil, 0) - messageScroll := widgets.NewQScrollArea(nil) - messageScroll.SetObjectName("messageScroll") - messageScroll.SetStyleSheet("QScrollArea#messageScroll { border: 0px; };") - messageScroll.SetStyleSheet("QScrollArea#messageScroll { border: 0px; };") + messageViewLayout = NewQVBoxLayoutWithTriggerSlot2(messageView) - messageViewLayout = NewQGridLayoutWithTriggerSlot(messageView) - - //messageViewLayout = widgets.NewQGridLayout(messageView) messageViewLayout.SetSpacing(0) messageViewLayout.SetContentsMargins(0, 0, 0, 0) - messageScroll.SetWidget(messageView) - messageScroll.SetWidgetResizable(true) - return } -func (messageViewLayout *QGridLayoutWithTriggerSlot) NewMessage(messageBody string) { - mesageWidget := widgets.NewQWidget(nil, 0) - mesageWidget.SetStyleSheet("QLabel { border: 0px; }; QWidget { border: 0px; };") +func (messageViewLayout *QVBoxLayoutWithTriggerSlot) NewMessage(messageBody string, widthScrollArea *widgets.QScrollArea, chatWidget *widgets.QWidget) { + var widget = widgets.NewQWidget(nil, 0) + + var loader = uitools.NewQUiLoader(nil) + var file = core.NewQFile2(":/qml/ui/message.ui") + + file.Open(core.QIODevice__ReadOnly) + var wrapperWidget = loader.Load(file, widget) + file.Close() - messageLayout := widgets.NewQVBoxLayout2(mesageWidget) + messageWidget := widgets.NewQWidgetFromPointer(widget.FindChild("message", core.Qt__FindChildrenRecursively).Pointer()) + message := widgets.NewQLabelFromPointer(widget.FindChild("messageContent", core.Qt__FindChildrenRecursively).Pointer()) - message := widgets.NewQLabel2(messageBody, nil, 0) + chatWidget.ConnectResizeEvent(func(event *gui.QResizeEvent) { + messageWidget.SetMinimumSize2(widthScrollArea.Size().Width(), wrapperWidget.Size().Height()) + message.SetMinimumWidth(widthScrollArea.Size().Width()) + }) - message.SetLayout(messageLayout) + message.SetText(messageBody) + message.SetMinimumWidth(widthScrollArea.Size().Width()) + + messageWidget.SetMinimumSize2(widthScrollArea.Size().Width(), wrapperWidget.Size().Height()) + messageWidget.Resize(wrapperWidget.Size()) + + messageViewLayout.SetSpacing(0) - messageViewLayout.AddWidget(message, 0, 0, core.Qt__AlignTop) + messageViewLayout.AddWidget(messageWidget, 0, core.Qt__AlignBottom) return } diff --git a/elements/moc.cpp b/elements/moc.cpp @@ -9,7 +9,6 @@ #include <QByteArray> #include <QChildEvent> #include <QEvent> -#include <QGridLayout> #include <QLayout> #include <QLayoutItem> #include <QList> @@ -24,326 +23,327 @@ #include <QTime> #include <QTimer> #include <QTimerEvent> +#include <QVBoxLayout> #include <QWidget> -class QGridLayoutWithTriggerSlot: public QGridLayout +class QVBoxLayoutWithTriggerSlot: public QVBoxLayout { Q_OBJECT public: - QGridLayoutWithTriggerSlot() : QGridLayout() {qRegisterMetaType<quintptr>("quintptr");QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType();QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaTypes();callbackQGridLayoutWithTriggerSlot_Constructor(this);}; - QGridLayoutWithTriggerSlot(QWidget *parent) : QGridLayout(parent) {qRegisterMetaType<quintptr>("quintptr");QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType();QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaTypes();callbackQGridLayoutWithTriggerSlot_Constructor(this);}; - QLayoutItem * takeAt(int index) { return static_cast<QLayoutItem*>(callbackQGridLayoutWithTriggerSlot_TakeAt(this, index)); }; - void invalidate() { callbackQGridLayoutWithTriggerSlot_Invalidate(this); }; - void setGeometry(const QRect & rect) { callbackQGridLayoutWithTriggerSlot_SetGeometry(this, const_cast<QRect*>(&rect)); }; - QLayoutItem * itemAt(int index) const { return static_cast<QLayoutItem*>(callbackQGridLayoutWithTriggerSlot_ItemAt(const_cast<void*>(static_cast<const void*>(this)), index)); }; - QSize maximumSize() const { return *static_cast<QSize*>(callbackQGridLayoutWithTriggerSlot_MaximumSize(const_cast<void*>(static_cast<const void*>(this)))); }; - QSize minimumSize() const { return *static_cast<QSize*>(callbackQGridLayoutWithTriggerSlot_MinimumSize(const_cast<void*>(static_cast<const void*>(this)))); }; - QSize sizeHint() const { return *static_cast<QSize*>(callbackQGridLayoutWithTriggerSlot_SizeHint(const_cast<void*>(static_cast<const void*>(this)))); }; - Qt::Orientations expandingDirections() const { return static_cast<Qt::Orientation>(callbackQGridLayoutWithTriggerSlot_ExpandingDirections(const_cast<void*>(static_cast<const void*>(this)))); }; - bool hasHeightForWidth() const { return callbackQGridLayoutWithTriggerSlot_HasHeightForWidth(const_cast<void*>(static_cast<const void*>(this))) != 0; }; - int count() const { return callbackQGridLayoutWithTriggerSlot_Count(const_cast<void*>(static_cast<const void*>(this))); }; - int heightForWidth(int w) const { return callbackQGridLayoutWithTriggerSlot_HeightForWidth(const_cast<void*>(static_cast<const void*>(this)), w); }; - int minimumHeightForWidth(int w) const { return callbackQGridLayoutWithTriggerSlot_MinimumHeightForWidth(const_cast<void*>(static_cast<const void*>(this)), w); }; - QLayout * layout() { return static_cast<QLayout*>(callbackQGridLayoutWithTriggerSlot_Layout(this)); }; - void addItem(QLayoutItem * item) { callbackQGridLayoutWithTriggerSlot_AddItem(this, item); }; - void childEvent(QChildEvent * e) { callbackQGridLayoutWithTriggerSlot_ChildEvent(this, e); }; - QRect geometry() const { return *static_cast<QRect*>(callbackQGridLayoutWithTriggerSlot_Geometry(const_cast<void*>(static_cast<const void*>(this)))); }; - QSizePolicy::ControlTypes controlTypes() const { return static_cast<QSizePolicy::ControlType>(callbackQGridLayoutWithTriggerSlot_ControlTypes(const_cast<void*>(static_cast<const void*>(this)))); }; - bool isEmpty() const { return callbackQGridLayoutWithTriggerSlot_IsEmpty(const_cast<void*>(static_cast<const void*>(this))) != 0; }; - int indexOf(QWidget * widget) const { return callbackQGridLayoutWithTriggerSlot_IndexOf(const_cast<void*>(static_cast<const void*>(this)), widget); }; - bool event(QEvent * e) { return callbackQGridLayoutWithTriggerSlot_Event(this, e) != 0; }; - bool eventFilter(QObject * watched, QEvent * event) { return callbackQGridLayoutWithTriggerSlot_EventFilter(this, watched, event) != 0; }; - void connectNotify(const QMetaMethod & sign) { callbackQGridLayoutWithTriggerSlot_ConnectNotify(this, const_cast<QMetaMethod*>(&sign)); }; - void customEvent(QEvent * event) { callbackQGridLayoutWithTriggerSlot_CustomEvent(this, event); }; - void deleteLater() { callbackQGridLayoutWithTriggerSlot_DeleteLater(this); }; - void Signal_Destroyed(QObject * obj) { callbackQGridLayoutWithTriggerSlot_Destroyed(this, obj); }; - void disconnectNotify(const QMetaMethod & sign) { callbackQGridLayoutWithTriggerSlot_DisconnectNotify(this, const_cast<QMetaMethod*>(&sign)); }; - void Signal_ObjectNameChanged(const QString & objectName) { QByteArray taa2c4f = objectName.toUtf8(); Moc_PackedString objectNamePacked = { const_cast<char*>(taa2c4f.prepend("WHITESPACE").constData()+10), taa2c4f.size()-10 };callbackQGridLayoutWithTriggerSlot_ObjectNameChanged(this, objectNamePacked); }; - void timerEvent(QTimerEvent * event) { callbackQGridLayoutWithTriggerSlot_TimerEvent(this, event); }; + QVBoxLayoutWithTriggerSlot() : QVBoxLayout() {qRegisterMetaType<quintptr>("quintptr");QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType();QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaTypes();callbackQVBoxLayoutWithTriggerSlot_Constructor(this);}; + QVBoxLayoutWithTriggerSlot(QWidget *parent) : QVBoxLayout(parent) {qRegisterMetaType<quintptr>("quintptr");QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType();QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaTypes();callbackQVBoxLayoutWithTriggerSlot_Constructor(this);}; + QLayoutItem * takeAt(int index) { return static_cast<QLayoutItem*>(callbackQVBoxLayoutWithTriggerSlot_TakeAt(this, index)); }; + void addItem(QLayoutItem * item) { callbackQVBoxLayoutWithTriggerSlot_AddItem(this, item); }; + void invalidate() { callbackQVBoxLayoutWithTriggerSlot_Invalidate(this); }; + void setGeometry(const QRect & r) { callbackQVBoxLayoutWithTriggerSlot_SetGeometry(this, const_cast<QRect*>(&r)); }; + QLayoutItem * itemAt(int index) const { return static_cast<QLayoutItem*>(callbackQVBoxLayoutWithTriggerSlot_ItemAt(const_cast<void*>(static_cast<const void*>(this)), index)); }; + QSize maximumSize() const { return *static_cast<QSize*>(callbackQVBoxLayoutWithTriggerSlot_MaximumSize(const_cast<void*>(static_cast<const void*>(this)))); }; + QSize minimumSize() const { return *static_cast<QSize*>(callbackQVBoxLayoutWithTriggerSlot_MinimumSize(const_cast<void*>(static_cast<const void*>(this)))); }; + QSize sizeHint() const { return *static_cast<QSize*>(callbackQVBoxLayoutWithTriggerSlot_SizeHint(const_cast<void*>(static_cast<const void*>(this)))); }; + Qt::Orientations expandingDirections() const { return static_cast<Qt::Orientation>(callbackQVBoxLayoutWithTriggerSlot_ExpandingDirections(const_cast<void*>(static_cast<const void*>(this)))); }; + bool hasHeightForWidth() const { return callbackQVBoxLayoutWithTriggerSlot_HasHeightForWidth(const_cast<void*>(static_cast<const void*>(this))) != 0; }; + int count() const { return callbackQVBoxLayoutWithTriggerSlot_Count(const_cast<void*>(static_cast<const void*>(this))); }; + int heightForWidth(int w) const { return callbackQVBoxLayoutWithTriggerSlot_HeightForWidth(const_cast<void*>(static_cast<const void*>(this)), w); }; + int minimumHeightForWidth(int w) const { return callbackQVBoxLayoutWithTriggerSlot_MinimumHeightForWidth(const_cast<void*>(static_cast<const void*>(this)), w); }; + QLayout * layout() { return static_cast<QLayout*>(callbackQVBoxLayoutWithTriggerSlot_Layout(this)); }; + void childEvent(QChildEvent * e) { callbackQVBoxLayoutWithTriggerSlot_ChildEvent(this, e); }; + QRect geometry() const { return *static_cast<QRect*>(callbackQVBoxLayoutWithTriggerSlot_Geometry(const_cast<void*>(static_cast<const void*>(this)))); }; + QSizePolicy::ControlTypes controlTypes() const { return static_cast<QSizePolicy::ControlType>(callbackQVBoxLayoutWithTriggerSlot_ControlTypes(const_cast<void*>(static_cast<const void*>(this)))); }; + bool isEmpty() const { return callbackQVBoxLayoutWithTriggerSlot_IsEmpty(const_cast<void*>(static_cast<const void*>(this))) != 0; }; + int indexOf(QWidget * widget) const { return callbackQVBoxLayoutWithTriggerSlot_IndexOf(const_cast<void*>(static_cast<const void*>(this)), widget); }; + bool event(QEvent * e) { return callbackQVBoxLayoutWithTriggerSlot_Event(this, e) != 0; }; + bool eventFilter(QObject * watched, QEvent * event) { return callbackQVBoxLayoutWithTriggerSlot_EventFilter(this, watched, event) != 0; }; + void connectNotify(const QMetaMethod & sign) { callbackQVBoxLayoutWithTriggerSlot_ConnectNotify(this, const_cast<QMetaMethod*>(&sign)); }; + void customEvent(QEvent * event) { callbackQVBoxLayoutWithTriggerSlot_CustomEvent(this, event); }; + void deleteLater() { callbackQVBoxLayoutWithTriggerSlot_DeleteLater(this); }; + void Signal_Destroyed(QObject * obj) { callbackQVBoxLayoutWithTriggerSlot_Destroyed(this, obj); }; + void disconnectNotify(const QMetaMethod & sign) { callbackQVBoxLayoutWithTriggerSlot_DisconnectNotify(this, const_cast<QMetaMethod*>(&sign)); }; + void Signal_ObjectNameChanged(const QString & objectName) { QByteArray taa2c4f = objectName.toUtf8(); Moc_PackedString objectNamePacked = { const_cast<char*>(taa2c4f.prepend("WHITESPACE").constData()+10), taa2c4f.size()-10 };callbackQVBoxLayoutWithTriggerSlot_ObjectNameChanged(this, objectNamePacked); }; + void timerEvent(QTimerEvent * event) { callbackQVBoxLayoutWithTriggerSlot_TimerEvent(this, event); }; - QSpacerItem * spacerItem() { return static_cast<QSpacerItem*>(callbackQGridLayoutWithTriggerSlot_SpacerItem(this)); }; - QWidget * widget() { return static_cast<QWidget*>(callbackQGridLayoutWithTriggerSlot_Widget(this)); }; + QSpacerItem * spacerItem() { return static_cast<QSpacerItem*>(callbackQVBoxLayoutWithTriggerSlot_SpacerItem(this)); }; + QWidget * widget() { return static_cast<QWidget*>(callbackQVBoxLayoutWithTriggerSlot_Widget(this)); }; signals: public slots: - void TriggerMessage(QString messageBody) { QByteArray t59bf16 = messageBody.toUtf8(); Moc_PackedString messageBodyPacked = { const_cast<char*>(t59bf16.prepend("WHITESPACE").constData()+10), t59bf16.size()-10 };callbackQGridLayoutWithTriggerSlot_TriggerMessage(this, messageBodyPacked); }; + void TriggerMessage(QString messageBody) { QByteArray t59bf16 = messageBody.toUtf8(); Moc_PackedString messageBodyPacked = { const_cast<char*>(t59bf16.prepend("WHITESPACE").constData()+10), t59bf16.size()-10 };callbackQVBoxLayoutWithTriggerSlot_TriggerMessage(this, messageBodyPacked); }; private: }; -Q_DECLARE_METATYPE(QGridLayoutWithTriggerSlot*) +Q_DECLARE_METATYPE(QVBoxLayoutWithTriggerSlot*) -void QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaTypes() { +void QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaTypes() { } -void QGridLayoutWithTriggerSlot_TriggerMessage(void* ptr, struct Moc_PackedString messageBody) +void QVBoxLayoutWithTriggerSlot_TriggerMessage(void* ptr, struct Moc_PackedString messageBody) { - QMetaObject::invokeMethod(static_cast<QGridLayoutWithTriggerSlot*>(ptr), "TriggerMessage", Q_ARG(QString, QString::fromUtf8(messageBody.data, messageBody.len))); + QMetaObject::invokeMethod(static_cast<QVBoxLayoutWithTriggerSlot*>(ptr), "TriggerMessage", Q_ARG(QString, QString::fromUtf8(messageBody.data, messageBody.len))); } -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType() +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType() { - return qRegisterMetaType<QGridLayoutWithTriggerSlot*>(); + return qRegisterMetaType<QVBoxLayoutWithTriggerSlot*>(); } -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType2(char* typeName) +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType2(char* typeName) { - return qRegisterMetaType<QGridLayoutWithTriggerSlot*>(const_cast<const char*>(typeName)); + return qRegisterMetaType<QVBoxLayoutWithTriggerSlot*>(const_cast<const char*>(typeName)); } -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType() +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType() { #ifdef QT_QML_LIB - return qmlRegisterType<QGridLayoutWithTriggerSlot>(); + return qmlRegisterType<QVBoxLayoutWithTriggerSlot>(); #else return 0; #endif } -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName) +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName) { #ifdef QT_QML_LIB - return qmlRegisterType<QGridLayoutWithTriggerSlot>(const_cast<const char*>(uri), versionMajor, versionMinor, const_cast<const char*>(qmlName)); + return qmlRegisterType<QVBoxLayoutWithTriggerSlot>(const_cast<const char*>(uri), versionMajor, versionMinor, const_cast<const char*>(qmlName)); #else return 0; #endif } -void* QGridLayoutWithTriggerSlot___dynamicPropertyNames_atList(void* ptr, int i) +void* QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_atList(void* ptr, int i) { return new QByteArray(static_cast<QList<QByteArray>*>(ptr)->at(i)); } -void QGridLayoutWithTriggerSlot___dynamicPropertyNames_setList(void* ptr, void* i) +void QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_setList(void* ptr, void* i) { static_cast<QList<QByteArray>*>(ptr)->append(*static_cast<QByteArray*>(i)); } -void* QGridLayoutWithTriggerSlot___dynamicPropertyNames_newList(void* ptr) +void* QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_newList(void* ptr) { Q_UNUSED(ptr); return new QList<QByteArray>; } -void* QGridLayoutWithTriggerSlot___findChildren_atList2(void* ptr, int i) +void* QVBoxLayoutWithTriggerSlot___findChildren_atList2(void* ptr, int i) { return const_cast<QObject*>(static_cast<QList<QObject*>*>(ptr)->at(i)); } -void QGridLayoutWithTriggerSlot___findChildren_setList2(void* ptr, void* i) +void QVBoxLayoutWithTriggerSlot___findChildren_setList2(void* ptr, void* i) { static_cast<QList<QObject*>*>(ptr)->append(static_cast<QObject*>(i)); } -void* QGridLayoutWithTriggerSlot___findChildren_newList2(void* ptr) +void* QVBoxLayoutWithTriggerSlot___findChildren_newList2(void* ptr) { Q_UNUSED(ptr); return new QList<QObject*>; } -void* QGridLayoutWithTriggerSlot___findChildren_atList3(void* ptr, int i) +void* QVBoxLayoutWithTriggerSlot___findChildren_atList3(void* ptr, int i) { return const_cast<QObject*>(static_cast<QList<QObject*>*>(ptr)->at(i)); } -void QGridLayoutWithTriggerSlot___findChildren_setList3(void* ptr, void* i) +void QVBoxLayoutWithTriggerSlot___findChildren_setList3(void* ptr, void* i) { static_cast<QList<QObject*>*>(ptr)->append(static_cast<QObject*>(i)); } -void* QGridLayoutWithTriggerSlot___findChildren_newList3(void* ptr) +void* QVBoxLayoutWithTriggerSlot___findChildren_newList3(void* ptr) { Q_UNUSED(ptr); return new QList<QObject*>; } -void* QGridLayoutWithTriggerSlot___findChildren_atList(void* ptr, int i) +void* QVBoxLayoutWithTriggerSlot___findChildren_atList(void* ptr, int i) { return const_cast<QObject*>(static_cast<QList<QObject*>*>(ptr)->at(i)); } -void QGridLayoutWithTriggerSlot___findChildren_setList(void* ptr, void* i) +void QVBoxLayoutWithTriggerSlot___findChildren_setList(void* ptr, void* i) { static_cast<QList<QObject*>*>(ptr)->append(static_cast<QObject*>(i)); } -void* QGridLayoutWithTriggerSlot___findChildren_newList(void* ptr) +void* QVBoxLayoutWithTriggerSlot___findChildren_newList(void* ptr) { Q_UNUSED(ptr); return new QList<QObject*>; } -void* QGridLayoutWithTriggerSlot___children_atList(void* ptr, int i) +void* QVBoxLayoutWithTriggerSlot___children_atList(void* ptr, int i) { return const_cast<QObject*>(static_cast<QList<QObject *>*>(ptr)->at(i)); } -void QGridLayoutWithTriggerSlot___children_setList(void* ptr, void* i) +void QVBoxLayoutWithTriggerSlot___children_setList(void* ptr, void* i) { static_cast<QList<QObject *>*>(ptr)->append(static_cast<QObject*>(i)); } -void* QGridLayoutWithTriggerSlot___children_newList(void* ptr) +void* QVBoxLayoutWithTriggerSlot___children_newList(void* ptr) { Q_UNUSED(ptr); return new QList<QObject *>; } -void* QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot2() +void* QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot() { - return new QGridLayoutWithTriggerSlot(); + return new QVBoxLayoutWithTriggerSlot(); } -void* QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot(void* parent) +void* QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot2(void* parent) { - return new QGridLayoutWithTriggerSlot(static_cast<QWidget*>(parent)); + return new QVBoxLayoutWithTriggerSlot(static_cast<QWidget*>(parent)); } -void QGridLayoutWithTriggerSlot_DestroyQGridLayoutWithTriggerSlot(void* ptr) +void QVBoxLayoutWithTriggerSlot_DestroyQVBoxLayoutWithTriggerSlot(void* ptr) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->~QGridLayoutWithTriggerSlot(); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->~QVBoxLayoutWithTriggerSlot(); } -void* QGridLayoutWithTriggerSlot_TakeAtDefault(void* ptr, int index) +void* QVBoxLayoutWithTriggerSlot_TakeAtDefault(void* ptr, int index) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::takeAt(index); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::takeAt(index); } -void QGridLayoutWithTriggerSlot_InvalidateDefault(void* ptr) +void QVBoxLayoutWithTriggerSlot_AddItemDefault(void* ptr, void* item) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::invalidate(); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::addItem(static_cast<QLayoutItem*>(item)); } -void QGridLayoutWithTriggerSlot_SetGeometryDefault(void* ptr, void* rect) +void QVBoxLayoutWithTriggerSlot_InvalidateDefault(void* ptr) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::setGeometry(*static_cast<QRect*>(rect)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::invalidate(); } -void* QGridLayoutWithTriggerSlot_ItemAtDefault(void* ptr, int index) +void QVBoxLayoutWithTriggerSlot_SetGeometryDefault(void* ptr, void* r) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::itemAt(index); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::setGeometry(*static_cast<QRect*>(r)); } -void* QGridLayoutWithTriggerSlot_MaximumSizeDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_ItemAtDefault(void* ptr, int index) { - return ({ QSize tmpValue = static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::maximumSize(); new QSize(tmpValue.width(), tmpValue.height()); }); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::itemAt(index); } -void* QGridLayoutWithTriggerSlot_MinimumSizeDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_MaximumSizeDefault(void* ptr) { - return ({ QSize tmpValue = static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::minimumSize(); new QSize(tmpValue.width(), tmpValue.height()); }); + return ({ QSize tmpValue = static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::maximumSize(); new QSize(tmpValue.width(), tmpValue.height()); }); } -void* QGridLayoutWithTriggerSlot_SizeHintDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_MinimumSizeDefault(void* ptr) { - return ({ QSize tmpValue = static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::sizeHint(); new QSize(tmpValue.width(), tmpValue.height()); }); + return ({ QSize tmpValue = static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::minimumSize(); new QSize(tmpValue.width(), tmpValue.height()); }); } -long long QGridLayoutWithTriggerSlot_ExpandingDirectionsDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_SizeHintDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::expandingDirections(); + return ({ QSize tmpValue = static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::sizeHint(); new QSize(tmpValue.width(), tmpValue.height()); }); } -char QGridLayoutWithTriggerSlot_HasHeightForWidthDefault(void* ptr) +long long QVBoxLayoutWithTriggerSlot_ExpandingDirectionsDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::hasHeightForWidth(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::expandingDirections(); } -int QGridLayoutWithTriggerSlot_CountDefault(void* ptr) +char QVBoxLayoutWithTriggerSlot_HasHeightForWidthDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::count(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::hasHeightForWidth(); } -int QGridLayoutWithTriggerSlot_HeightForWidthDefault(void* ptr, int w) +int QVBoxLayoutWithTriggerSlot_CountDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::heightForWidth(w); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::count(); } -int QGridLayoutWithTriggerSlot_MinimumHeightForWidthDefault(void* ptr, int w) +int QVBoxLayoutWithTriggerSlot_HeightForWidthDefault(void* ptr, int w) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::minimumHeightForWidth(w); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::heightForWidth(w); } -void* QGridLayoutWithTriggerSlot_LayoutDefault(void* ptr) +int QVBoxLayoutWithTriggerSlot_MinimumHeightForWidthDefault(void* ptr, int w) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::layout(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::minimumHeightForWidth(w); } -void QGridLayoutWithTriggerSlot_AddItemDefault(void* ptr, void* item) +void* QVBoxLayoutWithTriggerSlot_LayoutDefault(void* ptr) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::addItem(static_cast<QLayoutItem*>(item)); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::layout(); } -void QGridLayoutWithTriggerSlot_ChildEventDefault(void* ptr, void* e) +void QVBoxLayoutWithTriggerSlot_ChildEventDefault(void* ptr, void* e) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::childEvent(static_cast<QChildEvent*>(e)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::childEvent(static_cast<QChildEvent*>(e)); } -void* QGridLayoutWithTriggerSlot_GeometryDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_GeometryDefault(void* ptr) { - return ({ QRect tmpValue = static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::geometry(); new QRect(tmpValue.x(), tmpValue.y(), tmpValue.width(), tmpValue.height()); }); + return ({ QRect tmpValue = static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::geometry(); new QRect(tmpValue.x(), tmpValue.y(), tmpValue.width(), tmpValue.height()); }); } -long long QGridLayoutWithTriggerSlot_ControlTypesDefault(void* ptr) +long long QVBoxLayoutWithTriggerSlot_ControlTypesDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::controlTypes(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::controlTypes(); } -char QGridLayoutWithTriggerSlot_IsEmptyDefault(void* ptr) +char QVBoxLayoutWithTriggerSlot_IsEmptyDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::isEmpty(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::isEmpty(); } -int QGridLayoutWithTriggerSlot_IndexOfDefault(void* ptr, void* widget) +int QVBoxLayoutWithTriggerSlot_IndexOfDefault(void* ptr, void* widget) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::indexOf(static_cast<QWidget*>(widget)); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::indexOf(static_cast<QWidget*>(widget)); } -char QGridLayoutWithTriggerSlot_EventDefault(void* ptr, void* e) +char QVBoxLayoutWithTriggerSlot_EventDefault(void* ptr, void* e) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::event(static_cast<QEvent*>(e)); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::event(static_cast<QEvent*>(e)); } -char QGridLayoutWithTriggerSlot_EventFilterDefault(void* ptr, void* watched, void* event) +char QVBoxLayoutWithTriggerSlot_EventFilterDefault(void* ptr, void* watched, void* event) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::eventFilter(static_cast<QObject*>(watched), static_cast<QEvent*>(event)); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::eventFilter(static_cast<QObject*>(watched), static_cast<QEvent*>(event)); } -void QGridLayoutWithTriggerSlot_ConnectNotifyDefault(void* ptr, void* sign) +void QVBoxLayoutWithTriggerSlot_ConnectNotifyDefault(void* ptr, void* sign) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::connectNotify(*static_cast<QMetaMethod*>(sign)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::connectNotify(*static_cast<QMetaMethod*>(sign)); } -void QGridLayoutWithTriggerSlot_CustomEventDefault(void* ptr, void* event) +void QVBoxLayoutWithTriggerSlot_CustomEventDefault(void* ptr, void* event) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::customEvent(static_cast<QEvent*>(event)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::customEvent(static_cast<QEvent*>(event)); } -void QGridLayoutWithTriggerSlot_DeleteLaterDefault(void* ptr) +void QVBoxLayoutWithTriggerSlot_DeleteLaterDefault(void* ptr) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::deleteLater(); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::deleteLater(); } -void QGridLayoutWithTriggerSlot_DisconnectNotifyDefault(void* ptr, void* sign) +void QVBoxLayoutWithTriggerSlot_DisconnectNotifyDefault(void* ptr, void* sign) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::disconnectNotify(*static_cast<QMetaMethod*>(sign)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::disconnectNotify(*static_cast<QMetaMethod*>(sign)); } -void QGridLayoutWithTriggerSlot_TimerEventDefault(void* ptr, void* event) +void QVBoxLayoutWithTriggerSlot_TimerEventDefault(void* ptr, void* event) { - static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::timerEvent(static_cast<QTimerEvent*>(event)); + static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::timerEvent(static_cast<QTimerEvent*>(event)); } -void* QGridLayoutWithTriggerSlot_SpacerItemDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_SpacerItemDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::spacerItem(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::spacerItem(); } -void* QGridLayoutWithTriggerSlot_WidgetDefault(void* ptr) +void* QVBoxLayoutWithTriggerSlot_WidgetDefault(void* ptr) { - return static_cast<QGridLayoutWithTriggerSlot*>(ptr)->QGridLayout::widget(); + return static_cast<QVBoxLayoutWithTriggerSlot*>(ptr)->QVBoxLayout::widget(); } #include "moc_moc.h" diff --git a/elements/moc.go b/elements/moc.go @@ -21,71 +21,71 @@ func cGoUnpackString(s C.struct_Moc_PackedString) string { return C.GoStringN(s.data, C.int(s.len)) } -type QGridLayoutWithTriggerSlot_ITF interface { - std_widgets.QGridLayout_ITF - QGridLayoutWithTriggerSlot_PTR() *QGridLayoutWithTriggerSlot +type QVBoxLayoutWithTriggerSlot_ITF interface { + std_widgets.QVBoxLayout_ITF + QVBoxLayoutWithTriggerSlot_PTR() *QVBoxLayoutWithTriggerSlot } -func (ptr *QGridLayoutWithTriggerSlot) QGridLayoutWithTriggerSlot_PTR() *QGridLayoutWithTriggerSlot { +func (ptr *QVBoxLayoutWithTriggerSlot) QVBoxLayoutWithTriggerSlot_PTR() *QVBoxLayoutWithTriggerSlot { return ptr } -func (ptr *QGridLayoutWithTriggerSlot) Pointer() unsafe.Pointer { +func (ptr *QVBoxLayoutWithTriggerSlot) Pointer() unsafe.Pointer { if ptr != nil { - return ptr.QGridLayout_PTR().Pointer() + return ptr.QVBoxLayout_PTR().Pointer() } return nil } -func (ptr *QGridLayoutWithTriggerSlot) SetPointer(p unsafe.Pointer) { +func (ptr *QVBoxLayoutWithTriggerSlot) SetPointer(p unsafe.Pointer) { if ptr != nil { - ptr.QGridLayout_PTR().SetPointer(p) + ptr.QVBoxLayout_PTR().SetPointer(p) } } -func PointerFromQGridLayoutWithTriggerSlot(ptr QGridLayoutWithTriggerSlot_ITF) unsafe.Pointer { +func PointerFromQVBoxLayoutWithTriggerSlot(ptr QVBoxLayoutWithTriggerSlot_ITF) unsafe.Pointer { if ptr != nil { - return ptr.QGridLayoutWithTriggerSlot_PTR().Pointer() + return ptr.QVBoxLayoutWithTriggerSlot_PTR().Pointer() } return nil } -func NewQGridLayoutWithTriggerSlotFromPointer(ptr unsafe.Pointer) *QGridLayoutWithTriggerSlot { - var n *QGridLayoutWithTriggerSlot +func NewQVBoxLayoutWithTriggerSlotFromPointer(ptr unsafe.Pointer) *QVBoxLayoutWithTriggerSlot { + var n *QVBoxLayoutWithTriggerSlot if gPtr, ok := qt.Receive(ptr); !ok { - n = new(QGridLayoutWithTriggerSlot) + n = new(QVBoxLayoutWithTriggerSlot) n.SetPointer(ptr) } else { switch deduced := gPtr.(type) { - case *QGridLayoutWithTriggerSlot: + case *QVBoxLayoutWithTriggerSlot: n = deduced - case *std_widgets.QGridLayout: - n = &QGridLayoutWithTriggerSlot{QGridLayout: *deduced} + case *std_widgets.QVBoxLayout: + n = &QVBoxLayoutWithTriggerSlot{QVBoxLayout: *deduced} default: - n = new(QGridLayoutWithTriggerSlot) + n = new(QVBoxLayoutWithTriggerSlot) n.SetPointer(ptr) } } return n } -//export callbackQGridLayoutWithTriggerSlot_Constructor -func callbackQGridLayoutWithTriggerSlot_Constructor(ptr unsafe.Pointer) { - gPtr := NewQGridLayoutWithTriggerSlotFromPointer(ptr) +//export callbackQVBoxLayoutWithTriggerSlot_Constructor +func callbackQVBoxLayoutWithTriggerSlot_Constructor(ptr unsafe.Pointer) { + gPtr := NewQVBoxLayoutWithTriggerSlotFromPointer(ptr) qt.Register(ptr, gPtr) } -//export callbackQGridLayoutWithTriggerSlot_TriggerMessage -func callbackQGridLayoutWithTriggerSlot_TriggerMessage(ptr unsafe.Pointer, messageBody C.struct_Moc_PackedString) { +//export callbackQVBoxLayoutWithTriggerSlot_TriggerMessage +func callbackQVBoxLayoutWithTriggerSlot_TriggerMessage(ptr unsafe.Pointer, messageBody C.struct_Moc_PackedString) { if signal := qt.GetSignal(ptr, "TriggerMessage"); signal != nil { signal.(func(string))(cGoUnpackString(messageBody)) } } -func (ptr *QGridLayoutWithTriggerSlot) ConnectTriggerMessage(f func(messageBody string)) { +func (ptr *QVBoxLayoutWithTriggerSlot) ConnectTriggerMessage(f func(messageBody string)) { if ptr.Pointer() != nil { if signal := qt.LendSignal(ptr.Pointer(), "TriggerMessage"); signal != nil { @@ -99,59 +99,59 @@ func (ptr *QGridLayoutWithTriggerSlot) ConnectTriggerMessage(f func(messageBody } } -func (ptr *QGridLayoutWithTriggerSlot) DisconnectTriggerMessage() { +func (ptr *QVBoxLayoutWithTriggerSlot) DisconnectTriggerMessage() { if ptr.Pointer() != nil { qt.DisconnectSignal(ptr.Pointer(), "TriggerMessage") } } -func (ptr *QGridLayoutWithTriggerSlot) TriggerMessage(messageBody string) { +func (ptr *QVBoxLayoutWithTriggerSlot) TriggerMessage(messageBody string) { if ptr.Pointer() != nil { var messageBodyC *C.char if messageBody != "" { messageBodyC = C.CString(messageBody) defer C.free(unsafe.Pointer(messageBodyC)) } - C.QGridLayoutWithTriggerSlot_TriggerMessage(ptr.Pointer(), C.struct_Moc_PackedString{data: messageBodyC, len: C.longlong(len(messageBody))}) + C.QVBoxLayoutWithTriggerSlot_TriggerMessage(ptr.Pointer(), C.struct_Moc_PackedString{data: messageBodyC, len: C.longlong(len(messageBody))}) } } -func QGridLayoutWithTriggerSlot_QRegisterMetaType() int { - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType())) +func QVBoxLayoutWithTriggerSlot_QRegisterMetaType() int { + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType())) } -func (ptr *QGridLayoutWithTriggerSlot) QRegisterMetaType() int { - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType())) +func (ptr *QVBoxLayoutWithTriggerSlot) QRegisterMetaType() int { + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType())) } -func QGridLayoutWithTriggerSlot_QRegisterMetaType2(typeName string) int { +func QVBoxLayoutWithTriggerSlot_QRegisterMetaType2(typeName string) int { var typeNameC *C.char if typeName != "" { typeNameC = C.CString(typeName) defer C.free(unsafe.Pointer(typeNameC)) } - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType2(typeNameC))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType2(typeNameC))) } -func (ptr *QGridLayoutWithTriggerSlot) QRegisterMetaType2(typeName string) int { +func (ptr *QVBoxLayoutWithTriggerSlot) QRegisterMetaType2(typeName string) int { var typeNameC *C.char if typeName != "" { typeNameC = C.CString(typeName) defer C.free(unsafe.Pointer(typeNameC)) } - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType2(typeNameC))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType2(typeNameC))) } -func QGridLayoutWithTriggerSlot_QmlRegisterType() int { - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType())) +func QVBoxLayoutWithTriggerSlot_QmlRegisterType() int { + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType())) } -func (ptr *QGridLayoutWithTriggerSlot) QmlRegisterType() int { - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType())) +func (ptr *QVBoxLayoutWithTriggerSlot) QmlRegisterType() int { + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType())) } -func QGridLayoutWithTriggerSlot_QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { +func QVBoxLayoutWithTriggerSlot_QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { var uriC *C.char if uri != "" { uriC = C.CString(uri) @@ -162,10 +162,10 @@ func QGridLayoutWithTriggerSlot_QmlRegisterType2(uri string, versionMajor int, v qmlNameC = C.CString(qmlName) defer C.free(unsafe.Pointer(qmlNameC)) } - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) } -func (ptr *QGridLayoutWithTriggerSlot) QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { +func (ptr *QVBoxLayoutWithTriggerSlot) QmlRegisterType2(uri string, versionMajor int, versionMinor int, qmlName string) int { var uriC *C.char if uri != "" { uriC = C.CString(uri) @@ -176,31 +176,31 @@ func (ptr *QGridLayoutWithTriggerSlot) QmlRegisterType2(uri string, versionMajor qmlNameC = C.CString(qmlName) defer C.free(unsafe.Pointer(qmlNameC)) } - return int(int32(C.QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType2(uriC, C.int(int32(versionMajor)), C.int(int32(versionMinor)), qmlNameC))) } -func (ptr *QGridLayoutWithTriggerSlot) __dynamicPropertyNames_atList(i int) *std_core.QByteArray { +func (ptr *QVBoxLayoutWithTriggerSlot) __dynamicPropertyNames_atList(i int) *std_core.QByteArray { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQByteArrayFromPointer(C.QGridLayoutWithTriggerSlot___dynamicPropertyNames_atList(ptr.Pointer(), C.int(int32(i)))) + var tmpValue = std_core.NewQByteArrayFromPointer(C.QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_atList(ptr.Pointer(), C.int(int32(i)))) runtime.SetFinalizer(tmpValue, (*std_core.QByteArray).DestroyQByteArray) return tmpValue } return nil } -func (ptr *QGridLayoutWithTriggerSlot) __dynamicPropertyNames_setList(i std_core.QByteArray_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) __dynamicPropertyNames_setList(i std_core.QByteArray_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot___dynamicPropertyNames_setList(ptr.Pointer(), std_core.PointerFromQByteArray(i)) + C.QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_setList(ptr.Pointer(), std_core.PointerFromQByteArray(i)) } } -func (ptr *QGridLayoutWithTriggerSlot) __dynamicPropertyNames_newList() unsafe.Pointer { - return unsafe.Pointer(C.QGridLayoutWithTriggerSlot___dynamicPropertyNames_newList(ptr.Pointer())) +func (ptr *QVBoxLayoutWithTriggerSlot) __dynamicPropertyNames_newList() unsafe.Pointer { + return unsafe.Pointer(C.QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_newList(ptr.Pointer())) } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList2(i int) *std_core.QObject { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_atList2(i int) *std_core.QObject { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQObjectFromPointer(C.QGridLayoutWithTriggerSlot___findChildren_atList2(ptr.Pointer(), C.int(int32(i)))) + var tmpValue = std_core.NewQObjectFromPointer(C.QVBoxLayoutWithTriggerSlot___findChildren_atList2(ptr.Pointer(), C.int(int32(i)))) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } @@ -209,19 +209,19 @@ func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList2(i int) *std_core.Q return nil } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_setList2(i std_core.QObject_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_setList2(i std_core.QObject_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot___findChildren_setList2(ptr.Pointer(), std_core.PointerFromQObject(i)) + C.QVBoxLayoutWithTriggerSlot___findChildren_setList2(ptr.Pointer(), std_core.PointerFromQObject(i)) } } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_newList2() unsafe.Pointer { - return unsafe.Pointer(C.QGridLayoutWithTriggerSlot___findChildren_newList2(ptr.Pointer())) +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_newList2() unsafe.Pointer { + return unsafe.Pointer(C.QVBoxLayoutWithTriggerSlot___findChildren_newList2(ptr.Pointer())) } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList3(i int) *std_core.QObject { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_atList3(i int) *std_core.QObject { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQObjectFromPointer(C.QGridLayoutWithTriggerSlot___findChildren_atList3(ptr.Pointer(), C.int(int32(i)))) + var tmpValue = std_core.NewQObjectFromPointer(C.QVBoxLayoutWithTriggerSlot___findChildren_atList3(ptr.Pointer(), C.int(int32(i)))) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } @@ -230,19 +230,19 @@ func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList3(i int) *std_core.Q return nil } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_setList3(i std_core.QObject_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_setList3(i std_core.QObject_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot___findChildren_setList3(ptr.Pointer(), std_core.PointerFromQObject(i)) + C.QVBoxLayoutWithTriggerSlot___findChildren_setList3(ptr.Pointer(), std_core.PointerFromQObject(i)) } } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_newList3() unsafe.Pointer { - return unsafe.Pointer(C.QGridLayoutWithTriggerSlot___findChildren_newList3(ptr.Pointer())) +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_newList3() unsafe.Pointer { + return unsafe.Pointer(C.QVBoxLayoutWithTriggerSlot___findChildren_newList3(ptr.Pointer())) } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList(i int) *std_core.QObject { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_atList(i int) *std_core.QObject { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQObjectFromPointer(C.QGridLayoutWithTriggerSlot___findChildren_atList(ptr.Pointer(), C.int(int32(i)))) + var tmpValue = std_core.NewQObjectFromPointer(C.QVBoxLayoutWithTriggerSlot___findChildren_atList(ptr.Pointer(), C.int(int32(i)))) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } @@ -251,19 +251,19 @@ func (ptr *QGridLayoutWithTriggerSlot) __findChildren_atList(i int) *std_core.QO return nil } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_setList(i std_core.QObject_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_setList(i std_core.QObject_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot___findChildren_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) + C.QVBoxLayoutWithTriggerSlot___findChildren_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) } } -func (ptr *QGridLayoutWithTriggerSlot) __findChildren_newList() unsafe.Pointer { - return unsafe.Pointer(C.QGridLayoutWithTriggerSlot___findChildren_newList(ptr.Pointer())) +func (ptr *QVBoxLayoutWithTriggerSlot) __findChildren_newList() unsafe.Pointer { + return unsafe.Pointer(C.QVBoxLayoutWithTriggerSlot___findChildren_newList(ptr.Pointer())) } -func (ptr *QGridLayoutWithTriggerSlot) __children_atList(i int) *std_core.QObject { +func (ptr *QVBoxLayoutWithTriggerSlot) __children_atList(i int) *std_core.QObject { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQObjectFromPointer(C.QGridLayoutWithTriggerSlot___children_atList(ptr.Pointer(), C.int(int32(i)))) + var tmpValue = std_core.NewQObjectFromPointer(C.QVBoxLayoutWithTriggerSlot___children_atList(ptr.Pointer(), C.int(int32(i)))) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } @@ -272,248 +272,263 @@ func (ptr *QGridLayoutWithTriggerSlot) __children_atList(i int) *std_core.QObjec return nil } -func (ptr *QGridLayoutWithTriggerSlot) __children_setList(i std_core.QObject_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) __children_setList(i std_core.QObject_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot___children_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) + C.QVBoxLayoutWithTriggerSlot___children_setList(ptr.Pointer(), std_core.PointerFromQObject(i)) } } -func (ptr *QGridLayoutWithTriggerSlot) __children_newList() unsafe.Pointer { - return unsafe.Pointer(C.QGridLayoutWithTriggerSlot___children_newList(ptr.Pointer())) +func (ptr *QVBoxLayoutWithTriggerSlot) __children_newList() unsafe.Pointer { + return unsafe.Pointer(C.QVBoxLayoutWithTriggerSlot___children_newList(ptr.Pointer())) } -func NewQGridLayoutWithTriggerSlot2() *QGridLayoutWithTriggerSlot { - var tmpValue = NewQGridLayoutWithTriggerSlotFromPointer(C.QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot2()) +func NewQVBoxLayoutWithTriggerSlot() *QVBoxLayoutWithTriggerSlot { + var tmpValue = NewQVBoxLayoutWithTriggerSlotFromPointer(C.QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot()) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } return tmpValue } -func NewQGridLayoutWithTriggerSlot(parent std_widgets.QWidget_ITF) *QGridLayoutWithTriggerSlot { - var tmpValue = NewQGridLayoutWithTriggerSlotFromPointer(C.QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot(std_widgets.PointerFromQWidget(parent))) +func NewQVBoxLayoutWithTriggerSlot2(parent std_widgets.QWidget_ITF) *QVBoxLayoutWithTriggerSlot { + var tmpValue = NewQVBoxLayoutWithTriggerSlotFromPointer(C.QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot2(std_widgets.PointerFromQWidget(parent))) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } return tmpValue } -func (ptr *QGridLayoutWithTriggerSlot) DestroyQGridLayoutWithTriggerSlot() { +func (ptr *QVBoxLayoutWithTriggerSlot) DestroyQVBoxLayoutWithTriggerSlot() { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_DestroyQGridLayoutWithTriggerSlot(ptr.Pointer()) + C.QVBoxLayoutWithTriggerSlot_DestroyQVBoxLayoutWithTriggerSlot(ptr.Pointer()) ptr.SetPointer(nil) runtime.SetFinalizer(ptr, nil) } } -//export callbackQGridLayoutWithTriggerSlot_TakeAt -func callbackQGridLayoutWithTriggerSlot_TakeAt(ptr unsafe.Pointer, index C.int) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_TakeAt +func callbackQVBoxLayoutWithTriggerSlot_TakeAt(ptr unsafe.Pointer, index C.int) unsafe.Pointer { if signal := qt.GetSignal(ptr, "takeAt"); signal != nil { return std_widgets.PointerFromQLayoutItem(signal.(func(int) *std_widgets.QLayoutItem)(int(int32(index)))) } - return std_widgets.PointerFromQLayoutItem(NewQGridLayoutWithTriggerSlotFromPointer(ptr).TakeAtDefault(int(int32(index)))) + return std_widgets.PointerFromQLayoutItem(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).TakeAtDefault(int(int32(index)))) } -func (ptr *QGridLayoutWithTriggerSlot) TakeAtDefault(index int) *std_widgets.QLayoutItem { +func (ptr *QVBoxLayoutWithTriggerSlot) TakeAtDefault(index int) *std_widgets.QLayoutItem { if ptr.Pointer() != nil { - return std_widgets.NewQLayoutItemFromPointer(C.QGridLayoutWithTriggerSlot_TakeAtDefault(ptr.Pointer(), C.int(int32(index)))) + return std_widgets.NewQLayoutItemFromPointer(C.QVBoxLayoutWithTriggerSlot_TakeAtDefault(ptr.Pointer(), C.int(int32(index)))) } return nil } -//export callbackQGridLayoutWithTriggerSlot_Invalidate -func callbackQGridLayoutWithTriggerSlot_Invalidate(ptr unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_AddItem +func callbackQVBoxLayoutWithTriggerSlot_AddItem(ptr unsafe.Pointer, item unsafe.Pointer) { + if signal := qt.GetSignal(ptr, "addItem"); signal != nil { + signal.(func(*std_widgets.QLayoutItem))(std_widgets.NewQLayoutItemFromPointer(item)) + } else { + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).AddItemDefault(std_widgets.NewQLayoutItemFromPointer(item)) + } +} + +func (ptr *QVBoxLayoutWithTriggerSlot) AddItemDefault(item std_widgets.QLayoutItem_ITF) { + if ptr.Pointer() != nil { + C.QVBoxLayoutWithTriggerSlot_AddItemDefault(ptr.Pointer(), std_widgets.PointerFromQLayoutItem(item)) + } +} + +//export callbackQVBoxLayoutWithTriggerSlot_Invalidate +func callbackQVBoxLayoutWithTriggerSlot_Invalidate(ptr unsafe.Pointer) { if signal := qt.GetSignal(ptr, "invalidate"); signal != nil { signal.(func())() } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).InvalidateDefault() + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).InvalidateDefault() } } -func (ptr *QGridLayoutWithTriggerSlot) InvalidateDefault() { +func (ptr *QVBoxLayoutWithTriggerSlot) InvalidateDefault() { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_InvalidateDefault(ptr.Pointer()) + C.QVBoxLayoutWithTriggerSlot_InvalidateDefault(ptr.Pointer()) } } -//export callbackQGridLayoutWithTriggerSlot_SetGeometry -func callbackQGridLayoutWithTriggerSlot_SetGeometry(ptr unsafe.Pointer, rect unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_SetGeometry +func callbackQVBoxLayoutWithTriggerSlot_SetGeometry(ptr unsafe.Pointer, r unsafe.Pointer) { if signal := qt.GetSignal(ptr, "setGeometry"); signal != nil { - signal.(func(*std_core.QRect))(std_core.NewQRectFromPointer(rect)) + signal.(func(*std_core.QRect))(std_core.NewQRectFromPointer(r)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).SetGeometryDefault(std_core.NewQRectFromPointer(rect)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).SetGeometryDefault(std_core.NewQRectFromPointer(r)) } } -func (ptr *QGridLayoutWithTriggerSlot) SetGeometryDefault(rect std_core.QRect_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) SetGeometryDefault(r std_core.QRect_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_SetGeometryDefault(ptr.Pointer(), std_core.PointerFromQRect(rect)) + C.QVBoxLayoutWithTriggerSlot_SetGeometryDefault(ptr.Pointer(), std_core.PointerFromQRect(r)) } } -//export callbackQGridLayoutWithTriggerSlot_ItemAt -func callbackQGridLayoutWithTriggerSlot_ItemAt(ptr unsafe.Pointer, index C.int) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_ItemAt +func callbackQVBoxLayoutWithTriggerSlot_ItemAt(ptr unsafe.Pointer, index C.int) unsafe.Pointer { if signal := qt.GetSignal(ptr, "itemAt"); signal != nil { return std_widgets.PointerFromQLayoutItem(signal.(func(int) *std_widgets.QLayoutItem)(int(int32(index)))) } - return std_widgets.PointerFromQLayoutItem(NewQGridLayoutWithTriggerSlotFromPointer(ptr).ItemAtDefault(int(int32(index)))) + return std_widgets.PointerFromQLayoutItem(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).ItemAtDefault(int(int32(index)))) } -func (ptr *QGridLayoutWithTriggerSlot) ItemAtDefault(index int) *std_widgets.QLayoutItem { +func (ptr *QVBoxLayoutWithTriggerSlot) ItemAtDefault(index int) *std_widgets.QLayoutItem { if ptr.Pointer() != nil { - return std_widgets.NewQLayoutItemFromPointer(C.QGridLayoutWithTriggerSlot_ItemAtDefault(ptr.Pointer(), C.int(int32(index)))) + return std_widgets.NewQLayoutItemFromPointer(C.QVBoxLayoutWithTriggerSlot_ItemAtDefault(ptr.Pointer(), C.int(int32(index)))) } return nil } -//export callbackQGridLayoutWithTriggerSlot_MaximumSize -func callbackQGridLayoutWithTriggerSlot_MaximumSize(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_MaximumSize +func callbackQVBoxLayoutWithTriggerSlot_MaximumSize(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "maximumSize"); signal != nil { return std_core.PointerFromQSize(signal.(func() *std_core.QSize)()) } - return std_core.PointerFromQSize(NewQGridLayoutWithTriggerSlotFromPointer(ptr).MaximumSizeDefault()) + return std_core.PointerFromQSize(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).MaximumSizeDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) MaximumSizeDefault() *std_core.QSize { +func (ptr *QVBoxLayoutWithTriggerSlot) MaximumSizeDefault() *std_core.QSize { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQSizeFromPointer(C.QGridLayoutWithTriggerSlot_MaximumSizeDefault(ptr.Pointer())) + var tmpValue = std_core.NewQSizeFromPointer(C.QVBoxLayoutWithTriggerSlot_MaximumSizeDefault(ptr.Pointer())) runtime.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) return tmpValue } return nil } -//export callbackQGridLayoutWithTriggerSlot_MinimumSize -func callbackQGridLayoutWithTriggerSlot_MinimumSize(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_MinimumSize +func callbackQVBoxLayoutWithTriggerSlot_MinimumSize(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "minimumSize"); signal != nil { return std_core.PointerFromQSize(signal.(func() *std_core.QSize)()) } - return std_core.PointerFromQSize(NewQGridLayoutWithTriggerSlotFromPointer(ptr).MinimumSizeDefault()) + return std_core.PointerFromQSize(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).MinimumSizeDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) MinimumSizeDefault() *std_core.QSize { +func (ptr *QVBoxLayoutWithTriggerSlot) MinimumSizeDefault() *std_core.QSize { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQSizeFromPointer(C.QGridLayoutWithTriggerSlot_MinimumSizeDefault(ptr.Pointer())) + var tmpValue = std_core.NewQSizeFromPointer(C.QVBoxLayoutWithTriggerSlot_MinimumSizeDefault(ptr.Pointer())) runtime.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) return tmpValue } return nil } -//export callbackQGridLayoutWithTriggerSlot_SizeHint -func callbackQGridLayoutWithTriggerSlot_SizeHint(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_SizeHint +func callbackQVBoxLayoutWithTriggerSlot_SizeHint(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "sizeHint"); signal != nil { return std_core.PointerFromQSize(signal.(func() *std_core.QSize)()) } - return std_core.PointerFromQSize(NewQGridLayoutWithTriggerSlotFromPointer(ptr).SizeHintDefault()) + return std_core.PointerFromQSize(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).SizeHintDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) SizeHintDefault() *std_core.QSize { +func (ptr *QVBoxLayoutWithTriggerSlot) SizeHintDefault() *std_core.QSize { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQSizeFromPointer(C.QGridLayoutWithTriggerSlot_SizeHintDefault(ptr.Pointer())) + var tmpValue = std_core.NewQSizeFromPointer(C.QVBoxLayoutWithTriggerSlot_SizeHintDefault(ptr.Pointer())) runtime.SetFinalizer(tmpValue, (*std_core.QSize).DestroyQSize) return tmpValue } return nil } -//export callbackQGridLayoutWithTriggerSlot_ExpandingDirections -func callbackQGridLayoutWithTriggerSlot_ExpandingDirections(ptr unsafe.Pointer) C.longlong { +//export callbackQVBoxLayoutWithTriggerSlot_ExpandingDirections +func callbackQVBoxLayoutWithTriggerSlot_ExpandingDirections(ptr unsafe.Pointer) C.longlong { if signal := qt.GetSignal(ptr, "expandingDirections"); signal != nil { return C.longlong(signal.(func() std_core.Qt__Orientation)()) } - return C.longlong(NewQGridLayoutWithTriggerSlotFromPointer(ptr).ExpandingDirectionsDefault()) + return C.longlong(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).ExpandingDirectionsDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) ExpandingDirectionsDefault() std_core.Qt__Orientation { +func (ptr *QVBoxLayoutWithTriggerSlot) ExpandingDirectionsDefault() std_core.Qt__Orientation { if ptr.Pointer() != nil { - return std_core.Qt__Orientation(C.QGridLayoutWithTriggerSlot_ExpandingDirectionsDefault(ptr.Pointer())) + return std_core.Qt__Orientation(C.QVBoxLayoutWithTriggerSlot_ExpandingDirectionsDefault(ptr.Pointer())) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_HasHeightForWidth -func callbackQGridLayoutWithTriggerSlot_HasHeightForWidth(ptr unsafe.Pointer) C.char { +//export callbackQVBoxLayoutWithTriggerSlot_HasHeightForWidth +func callbackQVBoxLayoutWithTriggerSlot_HasHeightForWidth(ptr unsafe.Pointer) C.char { if signal := qt.GetSignal(ptr, "hasHeightForWidth"); signal != nil { return C.char(int8(qt.GoBoolToInt(signal.(func() bool)()))) } - return C.char(int8(qt.GoBoolToInt(NewQGridLayoutWithTriggerSlotFromPointer(ptr).HasHeightForWidthDefault()))) + return C.char(int8(qt.GoBoolToInt(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).HasHeightForWidthDefault()))) } -func (ptr *QGridLayoutWithTriggerSlot) HasHeightForWidthDefault() bool { +func (ptr *QVBoxLayoutWithTriggerSlot) HasHeightForWidthDefault() bool { if ptr.Pointer() != nil { - return C.QGridLayoutWithTriggerSlot_HasHeightForWidthDefault(ptr.Pointer()) != 0 + return C.QVBoxLayoutWithTriggerSlot_HasHeightForWidthDefault(ptr.Pointer()) != 0 } return false } -//export callbackQGridLayoutWithTriggerSlot_Count -func callbackQGridLayoutWithTriggerSlot_Count(ptr unsafe.Pointer) C.int { +//export callbackQVBoxLayoutWithTriggerSlot_Count +func callbackQVBoxLayoutWithTriggerSlot_Count(ptr unsafe.Pointer) C.int { if signal := qt.GetSignal(ptr, "count"); signal != nil { return C.int(int32(signal.(func() int)())) } - return C.int(int32(NewQGridLayoutWithTriggerSlotFromPointer(ptr).CountDefault())) + return C.int(int32(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).CountDefault())) } -func (ptr *QGridLayoutWithTriggerSlot) CountDefault() int { +func (ptr *QVBoxLayoutWithTriggerSlot) CountDefault() int { if ptr.Pointer() != nil { - return int(int32(C.QGridLayoutWithTriggerSlot_CountDefault(ptr.Pointer()))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_CountDefault(ptr.Pointer()))) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_HeightForWidth -func callbackQGridLayoutWithTriggerSlot_HeightForWidth(ptr unsafe.Pointer, w C.int) C.int { +//export callbackQVBoxLayoutWithTriggerSlot_HeightForWidth +func callbackQVBoxLayoutWithTriggerSlot_HeightForWidth(ptr unsafe.Pointer, w C.int) C.int { if signal := qt.GetSignal(ptr, "heightForWidth"); signal != nil { return C.int(int32(signal.(func(int) int)(int(int32(w))))) } - return C.int(int32(NewQGridLayoutWithTriggerSlotFromPointer(ptr).HeightForWidthDefault(int(int32(w))))) + return C.int(int32(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).HeightForWidthDefault(int(int32(w))))) } -func (ptr *QGridLayoutWithTriggerSlot) HeightForWidthDefault(w int) int { +func (ptr *QVBoxLayoutWithTriggerSlot) HeightForWidthDefault(w int) int { if ptr.Pointer() != nil { - return int(int32(C.QGridLayoutWithTriggerSlot_HeightForWidthDefault(ptr.Pointer(), C.int(int32(w))))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_HeightForWidthDefault(ptr.Pointer(), C.int(int32(w))))) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_MinimumHeightForWidth -func callbackQGridLayoutWithTriggerSlot_MinimumHeightForWidth(ptr unsafe.Pointer, w C.int) C.int { +//export callbackQVBoxLayoutWithTriggerSlot_MinimumHeightForWidth +func callbackQVBoxLayoutWithTriggerSlot_MinimumHeightForWidth(ptr unsafe.Pointer, w C.int) C.int { if signal := qt.GetSignal(ptr, "minimumHeightForWidth"); signal != nil { return C.int(int32(signal.(func(int) int)(int(int32(w))))) } - return C.int(int32(NewQGridLayoutWithTriggerSlotFromPointer(ptr).MinimumHeightForWidthDefault(int(int32(w))))) + return C.int(int32(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).MinimumHeightForWidthDefault(int(int32(w))))) } -func (ptr *QGridLayoutWithTriggerSlot) MinimumHeightForWidthDefault(w int) int { +func (ptr *QVBoxLayoutWithTriggerSlot) MinimumHeightForWidthDefault(w int) int { if ptr.Pointer() != nil { - return int(int32(C.QGridLayoutWithTriggerSlot_MinimumHeightForWidthDefault(ptr.Pointer(), C.int(int32(w))))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_MinimumHeightForWidthDefault(ptr.Pointer(), C.int(int32(w))))) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_Layout -func callbackQGridLayoutWithTriggerSlot_Layout(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_Layout +func callbackQVBoxLayoutWithTriggerSlot_Layout(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "layout"); signal != nil { return std_widgets.PointerFromQLayout(signal.(func() *std_widgets.QLayout)()) } - return std_widgets.PointerFromQLayout(NewQGridLayoutWithTriggerSlotFromPointer(ptr).LayoutDefault()) + return std_widgets.PointerFromQLayout(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).LayoutDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) LayoutDefault() *std_widgets.QLayout { +func (ptr *QVBoxLayoutWithTriggerSlot) LayoutDefault() *std_widgets.QLayout { if ptr.Pointer() != nil { - var tmpValue = std_widgets.NewQLayoutFromPointer(C.QGridLayoutWithTriggerSlot_LayoutDefault(ptr.Pointer())) + var tmpValue = std_widgets.NewQLayoutFromPointer(C.QVBoxLayoutWithTriggerSlot_LayoutDefault(ptr.Pointer())) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } @@ -522,255 +537,240 @@ func (ptr *QGridLayoutWithTriggerSlot) LayoutDefault() *std_widgets.QLayout { return nil } -//export callbackQGridLayoutWithTriggerSlot_AddItem -func callbackQGridLayoutWithTriggerSlot_AddItem(ptr unsafe.Pointer, item unsafe.Pointer) { - if signal := qt.GetSignal(ptr, "addItem"); signal != nil { - signal.(func(*std_widgets.QLayoutItem))(std_widgets.NewQLayoutItemFromPointer(item)) - } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).AddItemDefault(std_widgets.NewQLayoutItemFromPointer(item)) - } -} - -func (ptr *QGridLayoutWithTriggerSlot) AddItemDefault(item std_widgets.QLayoutItem_ITF) { - if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_AddItemDefault(ptr.Pointer(), std_widgets.PointerFromQLayoutItem(item)) - } -} - -//export callbackQGridLayoutWithTriggerSlot_ChildEvent -func callbackQGridLayoutWithTriggerSlot_ChildEvent(ptr unsafe.Pointer, e unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_ChildEvent +func callbackQVBoxLayoutWithTriggerSlot_ChildEvent(ptr unsafe.Pointer, e unsafe.Pointer) { if signal := qt.GetSignal(ptr, "childEvent"); signal != nil { signal.(func(*std_core.QChildEvent))(std_core.NewQChildEventFromPointer(e)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).ChildEventDefault(std_core.NewQChildEventFromPointer(e)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).ChildEventDefault(std_core.NewQChildEventFromPointer(e)) } } -func (ptr *QGridLayoutWithTriggerSlot) ChildEventDefault(e std_core.QChildEvent_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) ChildEventDefault(e std_core.QChildEvent_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_ChildEventDefault(ptr.Pointer(), std_core.PointerFromQChildEvent(e)) + C.QVBoxLayoutWithTriggerSlot_ChildEventDefault(ptr.Pointer(), std_core.PointerFromQChildEvent(e)) } } -//export callbackQGridLayoutWithTriggerSlot_Geometry -func callbackQGridLayoutWithTriggerSlot_Geometry(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_Geometry +func callbackQVBoxLayoutWithTriggerSlot_Geometry(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "geometry"); signal != nil { return std_core.PointerFromQRect(signal.(func() *std_core.QRect)()) } - return std_core.PointerFromQRect(NewQGridLayoutWithTriggerSlotFromPointer(ptr).GeometryDefault()) + return std_core.PointerFromQRect(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).GeometryDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) GeometryDefault() *std_core.QRect { +func (ptr *QVBoxLayoutWithTriggerSlot) GeometryDefault() *std_core.QRect { if ptr.Pointer() != nil { - var tmpValue = std_core.NewQRectFromPointer(C.QGridLayoutWithTriggerSlot_GeometryDefault(ptr.Pointer())) + var tmpValue = std_core.NewQRectFromPointer(C.QVBoxLayoutWithTriggerSlot_GeometryDefault(ptr.Pointer())) runtime.SetFinalizer(tmpValue, (*std_core.QRect).DestroyQRect) return tmpValue } return nil } -//export callbackQGridLayoutWithTriggerSlot_ControlTypes -func callbackQGridLayoutWithTriggerSlot_ControlTypes(ptr unsafe.Pointer) C.longlong { +//export callbackQVBoxLayoutWithTriggerSlot_ControlTypes +func callbackQVBoxLayoutWithTriggerSlot_ControlTypes(ptr unsafe.Pointer) C.longlong { if signal := qt.GetSignal(ptr, "controlTypes"); signal != nil { return C.longlong(signal.(func() std_widgets.QSizePolicy__ControlType)()) } - return C.longlong(NewQGridLayoutWithTriggerSlotFromPointer(ptr).ControlTypesDefault()) + return C.longlong(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).ControlTypesDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) ControlTypesDefault() std_widgets.QSizePolicy__ControlType { +func (ptr *QVBoxLayoutWithTriggerSlot) ControlTypesDefault() std_widgets.QSizePolicy__ControlType { if ptr.Pointer() != nil { - return std_widgets.QSizePolicy__ControlType(C.QGridLayoutWithTriggerSlot_ControlTypesDefault(ptr.Pointer())) + return std_widgets.QSizePolicy__ControlType(C.QVBoxLayoutWithTriggerSlot_ControlTypesDefault(ptr.Pointer())) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_IsEmpty -func callbackQGridLayoutWithTriggerSlot_IsEmpty(ptr unsafe.Pointer) C.char { +//export callbackQVBoxLayoutWithTriggerSlot_IsEmpty +func callbackQVBoxLayoutWithTriggerSlot_IsEmpty(ptr unsafe.Pointer) C.char { if signal := qt.GetSignal(ptr, "isEmpty"); signal != nil { return C.char(int8(qt.GoBoolToInt(signal.(func() bool)()))) } - return C.char(int8(qt.GoBoolToInt(NewQGridLayoutWithTriggerSlotFromPointer(ptr).IsEmptyDefault()))) + return C.char(int8(qt.GoBoolToInt(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).IsEmptyDefault()))) } -func (ptr *QGridLayoutWithTriggerSlot) IsEmptyDefault() bool { +func (ptr *QVBoxLayoutWithTriggerSlot) IsEmptyDefault() bool { if ptr.Pointer() != nil { - return C.QGridLayoutWithTriggerSlot_IsEmptyDefault(ptr.Pointer()) != 0 + return C.QVBoxLayoutWithTriggerSlot_IsEmptyDefault(ptr.Pointer()) != 0 } return false } -//export callbackQGridLayoutWithTriggerSlot_IndexOf -func callbackQGridLayoutWithTriggerSlot_IndexOf(ptr unsafe.Pointer, widget unsafe.Pointer) C.int { +//export callbackQVBoxLayoutWithTriggerSlot_IndexOf +func callbackQVBoxLayoutWithTriggerSlot_IndexOf(ptr unsafe.Pointer, widget unsafe.Pointer) C.int { if signal := qt.GetSignal(ptr, "indexOf"); signal != nil { return C.int(int32(signal.(func(*std_widgets.QWidget) int)(std_widgets.NewQWidgetFromPointer(widget)))) } - return C.int(int32(NewQGridLayoutWithTriggerSlotFromPointer(ptr).IndexOfDefault(std_widgets.NewQWidgetFromPointer(widget)))) + return C.int(int32(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).IndexOfDefault(std_widgets.NewQWidgetFromPointer(widget)))) } -func (ptr *QGridLayoutWithTriggerSlot) IndexOfDefault(widget std_widgets.QWidget_ITF) int { +func (ptr *QVBoxLayoutWithTriggerSlot) IndexOfDefault(widget std_widgets.QWidget_ITF) int { if ptr.Pointer() != nil { - return int(int32(C.QGridLayoutWithTriggerSlot_IndexOfDefault(ptr.Pointer(), std_widgets.PointerFromQWidget(widget)))) + return int(int32(C.QVBoxLayoutWithTriggerSlot_IndexOfDefault(ptr.Pointer(), std_widgets.PointerFromQWidget(widget)))) } return 0 } -//export callbackQGridLayoutWithTriggerSlot_Event -func callbackQGridLayoutWithTriggerSlot_Event(ptr unsafe.Pointer, e unsafe.Pointer) C.char { +//export callbackQVBoxLayoutWithTriggerSlot_Event +func callbackQVBoxLayoutWithTriggerSlot_Event(ptr unsafe.Pointer, e unsafe.Pointer) C.char { if signal := qt.GetSignal(ptr, "event"); signal != nil { return C.char(int8(qt.GoBoolToInt(signal.(func(*std_core.QEvent) bool)(std_core.NewQEventFromPointer(e))))) } - return C.char(int8(qt.GoBoolToInt(NewQGridLayoutWithTriggerSlotFromPointer(ptr).EventDefault(std_core.NewQEventFromPointer(e))))) + return C.char(int8(qt.GoBoolToInt(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).EventDefault(std_core.NewQEventFromPointer(e))))) } -func (ptr *QGridLayoutWithTriggerSlot) EventDefault(e std_core.QEvent_ITF) bool { +func (ptr *QVBoxLayoutWithTriggerSlot) EventDefault(e std_core.QEvent_ITF) bool { if ptr.Pointer() != nil { - return C.QGridLayoutWithTriggerSlot_EventDefault(ptr.Pointer(), std_core.PointerFromQEvent(e)) != 0 + return C.QVBoxLayoutWithTriggerSlot_EventDefault(ptr.Pointer(), std_core.PointerFromQEvent(e)) != 0 } return false } -//export callbackQGridLayoutWithTriggerSlot_EventFilter -func callbackQGridLayoutWithTriggerSlot_EventFilter(ptr unsafe.Pointer, watched unsafe.Pointer, event unsafe.Pointer) C.char { +//export callbackQVBoxLayoutWithTriggerSlot_EventFilter +func callbackQVBoxLayoutWithTriggerSlot_EventFilter(ptr unsafe.Pointer, watched unsafe.Pointer, event unsafe.Pointer) C.char { if signal := qt.GetSignal(ptr, "eventFilter"); signal != nil { return C.char(int8(qt.GoBoolToInt(signal.(func(*std_core.QObject, *std_core.QEvent) bool)(std_core.NewQObjectFromPointer(watched), std_core.NewQEventFromPointer(event))))) } - return C.char(int8(qt.GoBoolToInt(NewQGridLayoutWithTriggerSlotFromPointer(ptr).EventFilterDefault(std_core.NewQObjectFromPointer(watched), std_core.NewQEventFromPointer(event))))) + return C.char(int8(qt.GoBoolToInt(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).EventFilterDefault(std_core.NewQObjectFromPointer(watched), std_core.NewQEventFromPointer(event))))) } -func (ptr *QGridLayoutWithTriggerSlot) EventFilterDefault(watched std_core.QObject_ITF, event std_core.QEvent_ITF) bool { +func (ptr *QVBoxLayoutWithTriggerSlot) EventFilterDefault(watched std_core.QObject_ITF, event std_core.QEvent_ITF) bool { if ptr.Pointer() != nil { - return C.QGridLayoutWithTriggerSlot_EventFilterDefault(ptr.Pointer(), std_core.PointerFromQObject(watched), std_core.PointerFromQEvent(event)) != 0 + return C.QVBoxLayoutWithTriggerSlot_EventFilterDefault(ptr.Pointer(), std_core.PointerFromQObject(watched), std_core.PointerFromQEvent(event)) != 0 } return false } -//export callbackQGridLayoutWithTriggerSlot_ConnectNotify -func callbackQGridLayoutWithTriggerSlot_ConnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_ConnectNotify +func callbackQVBoxLayoutWithTriggerSlot_ConnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { if signal := qt.GetSignal(ptr, "connectNotify"); signal != nil { signal.(func(*std_core.QMetaMethod))(std_core.NewQMetaMethodFromPointer(sign)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).ConnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).ConnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) } } -func (ptr *QGridLayoutWithTriggerSlot) ConnectNotifyDefault(sign std_core.QMetaMethod_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) ConnectNotifyDefault(sign std_core.QMetaMethod_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_ConnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) + C.QVBoxLayoutWithTriggerSlot_ConnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) } } -//export callbackQGridLayoutWithTriggerSlot_CustomEvent -func callbackQGridLayoutWithTriggerSlot_CustomEvent(ptr unsafe.Pointer, event unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_CustomEvent +func callbackQVBoxLayoutWithTriggerSlot_CustomEvent(ptr unsafe.Pointer, event unsafe.Pointer) { if signal := qt.GetSignal(ptr, "customEvent"); signal != nil { signal.(func(*std_core.QEvent))(std_core.NewQEventFromPointer(event)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).CustomEventDefault(std_core.NewQEventFromPointer(event)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).CustomEventDefault(std_core.NewQEventFromPointer(event)) } } -func (ptr *QGridLayoutWithTriggerSlot) CustomEventDefault(event std_core.QEvent_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) CustomEventDefault(event std_core.QEvent_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_CustomEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event)) + C.QVBoxLayoutWithTriggerSlot_CustomEventDefault(ptr.Pointer(), std_core.PointerFromQEvent(event)) } } -//export callbackQGridLayoutWithTriggerSlot_DeleteLater -func callbackQGridLayoutWithTriggerSlot_DeleteLater(ptr unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_DeleteLater +func callbackQVBoxLayoutWithTriggerSlot_DeleteLater(ptr unsafe.Pointer) { if signal := qt.GetSignal(ptr, "deleteLater"); signal != nil { signal.(func())() } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).DeleteLaterDefault() + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).DeleteLaterDefault() } } -func (ptr *QGridLayoutWithTriggerSlot) DeleteLaterDefault() { +func (ptr *QVBoxLayoutWithTriggerSlot) DeleteLaterDefault() { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_DeleteLaterDefault(ptr.Pointer()) + C.QVBoxLayoutWithTriggerSlot_DeleteLaterDefault(ptr.Pointer()) ptr.SetPointer(nil) runtime.SetFinalizer(ptr, nil) } } -//export callbackQGridLayoutWithTriggerSlot_Destroyed -func callbackQGridLayoutWithTriggerSlot_Destroyed(ptr unsafe.Pointer, obj unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_Destroyed +func callbackQVBoxLayoutWithTriggerSlot_Destroyed(ptr unsafe.Pointer, obj unsafe.Pointer) { if signal := qt.GetSignal(ptr, "destroyed"); signal != nil { signal.(func(*std_core.QObject))(std_core.NewQObjectFromPointer(obj)) } } -//export callbackQGridLayoutWithTriggerSlot_DisconnectNotify -func callbackQGridLayoutWithTriggerSlot_DisconnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_DisconnectNotify +func callbackQVBoxLayoutWithTriggerSlot_DisconnectNotify(ptr unsafe.Pointer, sign unsafe.Pointer) { if signal := qt.GetSignal(ptr, "disconnectNotify"); signal != nil { signal.(func(*std_core.QMetaMethod))(std_core.NewQMetaMethodFromPointer(sign)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).DisconnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).DisconnectNotifyDefault(std_core.NewQMetaMethodFromPointer(sign)) } } -func (ptr *QGridLayoutWithTriggerSlot) DisconnectNotifyDefault(sign std_core.QMetaMethod_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) DisconnectNotifyDefault(sign std_core.QMetaMethod_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_DisconnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) + C.QVBoxLayoutWithTriggerSlot_DisconnectNotifyDefault(ptr.Pointer(), std_core.PointerFromQMetaMethod(sign)) } } -//export callbackQGridLayoutWithTriggerSlot_ObjectNameChanged -func callbackQGridLayoutWithTriggerSlot_ObjectNameChanged(ptr unsafe.Pointer, objectName C.struct_Moc_PackedString) { +//export callbackQVBoxLayoutWithTriggerSlot_ObjectNameChanged +func callbackQVBoxLayoutWithTriggerSlot_ObjectNameChanged(ptr unsafe.Pointer, objectName C.struct_Moc_PackedString) { if signal := qt.GetSignal(ptr, "objectNameChanged"); signal != nil { signal.(func(string))(cGoUnpackString(objectName)) } } -//export callbackQGridLayoutWithTriggerSlot_TimerEvent -func callbackQGridLayoutWithTriggerSlot_TimerEvent(ptr unsafe.Pointer, event unsafe.Pointer) { +//export callbackQVBoxLayoutWithTriggerSlot_TimerEvent +func callbackQVBoxLayoutWithTriggerSlot_TimerEvent(ptr unsafe.Pointer, event unsafe.Pointer) { if signal := qt.GetSignal(ptr, "timerEvent"); signal != nil { signal.(func(*std_core.QTimerEvent))(std_core.NewQTimerEventFromPointer(event)) } else { - NewQGridLayoutWithTriggerSlotFromPointer(ptr).TimerEventDefault(std_core.NewQTimerEventFromPointer(event)) + NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).TimerEventDefault(std_core.NewQTimerEventFromPointer(event)) } } -func (ptr *QGridLayoutWithTriggerSlot) TimerEventDefault(event std_core.QTimerEvent_ITF) { +func (ptr *QVBoxLayoutWithTriggerSlot) TimerEventDefault(event std_core.QTimerEvent_ITF) { if ptr.Pointer() != nil { - C.QGridLayoutWithTriggerSlot_TimerEventDefault(ptr.Pointer(), std_core.PointerFromQTimerEvent(event)) + C.QVBoxLayoutWithTriggerSlot_TimerEventDefault(ptr.Pointer(), std_core.PointerFromQTimerEvent(event)) } } -//export callbackQGridLayoutWithTriggerSlot_SpacerItem -func callbackQGridLayoutWithTriggerSlot_SpacerItem(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_SpacerItem +func callbackQVBoxLayoutWithTriggerSlot_SpacerItem(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "spacerItem"); signal != nil { return std_widgets.PointerFromQSpacerItem(signal.(func() *std_widgets.QSpacerItem)()) } - return std_widgets.PointerFromQSpacerItem(NewQGridLayoutWithTriggerSlotFromPointer(ptr).SpacerItemDefault()) + return std_widgets.PointerFromQSpacerItem(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).SpacerItemDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) SpacerItemDefault() *std_widgets.QSpacerItem { +func (ptr *QVBoxLayoutWithTriggerSlot) SpacerItemDefault() *std_widgets.QSpacerItem { if ptr.Pointer() != nil { - return std_widgets.NewQSpacerItemFromPointer(C.QGridLayoutWithTriggerSlot_SpacerItemDefault(ptr.Pointer())) + return std_widgets.NewQSpacerItemFromPointer(C.QVBoxLayoutWithTriggerSlot_SpacerItemDefault(ptr.Pointer())) } return nil } -//export callbackQGridLayoutWithTriggerSlot_Widget -func callbackQGridLayoutWithTriggerSlot_Widget(ptr unsafe.Pointer) unsafe.Pointer { +//export callbackQVBoxLayoutWithTriggerSlot_Widget +func callbackQVBoxLayoutWithTriggerSlot_Widget(ptr unsafe.Pointer) unsafe.Pointer { if signal := qt.GetSignal(ptr, "widget"); signal != nil { return std_widgets.PointerFromQWidget(signal.(func() *std_widgets.QWidget)()) } - return std_widgets.PointerFromQWidget(NewQGridLayoutWithTriggerSlotFromPointer(ptr).WidgetDefault()) + return std_widgets.PointerFromQWidget(NewQVBoxLayoutWithTriggerSlotFromPointer(ptr).WidgetDefault()) } -func (ptr *QGridLayoutWithTriggerSlot) WidgetDefault() *std_widgets.QWidget { +func (ptr *QVBoxLayoutWithTriggerSlot) WidgetDefault() *std_widgets.QWidget { if ptr.Pointer() != nil { - var tmpValue = std_widgets.NewQWidgetFromPointer(C.QGridLayoutWithTriggerSlot_WidgetDefault(ptr.Pointer())) + var tmpValue = std_widgets.NewQWidgetFromPointer(C.QVBoxLayoutWithTriggerSlot_WidgetDefault(ptr.Pointer())) if !qt.ExistsSignal(tmpValue.Pointer(), "destroyed") { tmpValue.ConnectDestroyed(func(*std_core.QObject) { tmpValue.SetPointer(nil) }) } diff --git a/elements/moc.h b/elements/moc.h @@ -8,65 +8,65 @@ #include <stdint.h> #ifdef __cplusplus -class QGridLayoutWithTriggerSlot; -void QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaTypes(); +class QVBoxLayoutWithTriggerSlot; +void QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaTypes(); extern "C" { #endif struct Moc_PackedString { char* data; long long len; }; struct Moc_PackedList { void* data; long long len; }; -void QGridLayoutWithTriggerSlot_TriggerMessage(void* ptr, struct Moc_PackedString messageBody); -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType(); -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QRegisterMetaType2(char* typeName); -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType(); -int QGridLayoutWithTriggerSlot_QGridLayoutWithTriggerSlot_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName); -void* QGridLayoutWithTriggerSlot___dynamicPropertyNames_atList(void* ptr, int i); -void QGridLayoutWithTriggerSlot___dynamicPropertyNames_setList(void* ptr, void* i); -void* QGridLayoutWithTriggerSlot___dynamicPropertyNames_newList(void* ptr); -void* QGridLayoutWithTriggerSlot___findChildren_atList2(void* ptr, int i); -void QGridLayoutWithTriggerSlot___findChildren_setList2(void* ptr, void* i); -void* QGridLayoutWithTriggerSlot___findChildren_newList2(void* ptr); -void* QGridLayoutWithTriggerSlot___findChildren_atList3(void* ptr, int i); -void QGridLayoutWithTriggerSlot___findChildren_setList3(void* ptr, void* i); -void* QGridLayoutWithTriggerSlot___findChildren_newList3(void* ptr); -void* QGridLayoutWithTriggerSlot___findChildren_atList(void* ptr, int i); -void QGridLayoutWithTriggerSlot___findChildren_setList(void* ptr, void* i); -void* QGridLayoutWithTriggerSlot___findChildren_newList(void* ptr); -void* QGridLayoutWithTriggerSlot___children_atList(void* ptr, int i); -void QGridLayoutWithTriggerSlot___children_setList(void* ptr, void* i); -void* QGridLayoutWithTriggerSlot___children_newList(void* ptr); -void* QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot2(); -void* QGridLayoutWithTriggerSlot_NewQGridLayoutWithTriggerSlot(void* parent); -void QGridLayoutWithTriggerSlot_DestroyQGridLayoutWithTriggerSlot(void* ptr); -void* QGridLayoutWithTriggerSlot_TakeAtDefault(void* ptr, int index); -void QGridLayoutWithTriggerSlot_InvalidateDefault(void* ptr); -void QGridLayoutWithTriggerSlot_SetGeometryDefault(void* ptr, void* rect); -void* QGridLayoutWithTriggerSlot_ItemAtDefault(void* ptr, int index); -void* QGridLayoutWithTriggerSlot_MaximumSizeDefault(void* ptr); -void* QGridLayoutWithTriggerSlot_MinimumSizeDefault(void* ptr); -void* QGridLayoutWithTriggerSlot_SizeHintDefault(void* ptr); -long long QGridLayoutWithTriggerSlot_ExpandingDirectionsDefault(void* ptr); -char QGridLayoutWithTriggerSlot_HasHeightForWidthDefault(void* ptr); -int QGridLayoutWithTriggerSlot_CountDefault(void* ptr); -int QGridLayoutWithTriggerSlot_HeightForWidthDefault(void* ptr, int w); -int QGridLayoutWithTriggerSlot_MinimumHeightForWidthDefault(void* ptr, int w); -void* QGridLayoutWithTriggerSlot_LayoutDefault(void* ptr); -void QGridLayoutWithTriggerSlot_AddItemDefault(void* ptr, void* item); -void QGridLayoutWithTriggerSlot_ChildEventDefault(void* ptr, void* e); -void* QGridLayoutWithTriggerSlot_GeometryDefault(void* ptr); -long long QGridLayoutWithTriggerSlot_ControlTypesDefault(void* ptr); -char QGridLayoutWithTriggerSlot_IsEmptyDefault(void* ptr); -int QGridLayoutWithTriggerSlot_IndexOfDefault(void* ptr, void* widget); -char QGridLayoutWithTriggerSlot_EventDefault(void* ptr, void* e); -char QGridLayoutWithTriggerSlot_EventFilterDefault(void* ptr, void* watched, void* event); -void QGridLayoutWithTriggerSlot_ConnectNotifyDefault(void* ptr, void* sign); -void QGridLayoutWithTriggerSlot_CustomEventDefault(void* ptr, void* event); -void QGridLayoutWithTriggerSlot_DeleteLaterDefault(void* ptr); -void QGridLayoutWithTriggerSlot_DisconnectNotifyDefault(void* ptr, void* sign); -void QGridLayoutWithTriggerSlot_TimerEventDefault(void* ptr, void* event); +void QVBoxLayoutWithTriggerSlot_TriggerMessage(void* ptr, struct Moc_PackedString messageBody); +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType(); +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QRegisterMetaType2(char* typeName); +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType(); +int QVBoxLayoutWithTriggerSlot_QVBoxLayoutWithTriggerSlot_QmlRegisterType2(char* uri, int versionMajor, int versionMinor, char* qmlName); +void* QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_atList(void* ptr, int i); +void QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_setList(void* ptr, void* i); +void* QVBoxLayoutWithTriggerSlot___dynamicPropertyNames_newList(void* ptr); +void* QVBoxLayoutWithTriggerSlot___findChildren_atList2(void* ptr, int i); +void QVBoxLayoutWithTriggerSlot___findChildren_setList2(void* ptr, void* i); +void* QVBoxLayoutWithTriggerSlot___findChildren_newList2(void* ptr); +void* QVBoxLayoutWithTriggerSlot___findChildren_atList3(void* ptr, int i); +void QVBoxLayoutWithTriggerSlot___findChildren_setList3(void* ptr, void* i); +void* QVBoxLayoutWithTriggerSlot___findChildren_newList3(void* ptr); +void* QVBoxLayoutWithTriggerSlot___findChildren_atList(void* ptr, int i); +void QVBoxLayoutWithTriggerSlot___findChildren_setList(void* ptr, void* i); +void* QVBoxLayoutWithTriggerSlot___findChildren_newList(void* ptr); +void* QVBoxLayoutWithTriggerSlot___children_atList(void* ptr, int i); +void QVBoxLayoutWithTriggerSlot___children_setList(void* ptr, void* i); +void* QVBoxLayoutWithTriggerSlot___children_newList(void* ptr); +void* QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot(); +void* QVBoxLayoutWithTriggerSlot_NewQVBoxLayoutWithTriggerSlot2(void* parent); +void QVBoxLayoutWithTriggerSlot_DestroyQVBoxLayoutWithTriggerSlot(void* ptr); +void* QVBoxLayoutWithTriggerSlot_TakeAtDefault(void* ptr, int index); +void QVBoxLayoutWithTriggerSlot_AddItemDefault(void* ptr, void* item); +void QVBoxLayoutWithTriggerSlot_InvalidateDefault(void* ptr); +void QVBoxLayoutWithTriggerSlot_SetGeometryDefault(void* ptr, void* r); +void* QVBoxLayoutWithTriggerSlot_ItemAtDefault(void* ptr, int index); +void* QVBoxLayoutWithTriggerSlot_MaximumSizeDefault(void* ptr); +void* QVBoxLayoutWithTriggerSlot_MinimumSizeDefault(void* ptr); +void* QVBoxLayoutWithTriggerSlot_SizeHintDefault(void* ptr); +long long QVBoxLayoutWithTriggerSlot_ExpandingDirectionsDefault(void* ptr); +char QVBoxLayoutWithTriggerSlot_HasHeightForWidthDefault(void* ptr); +int QVBoxLayoutWithTriggerSlot_CountDefault(void* ptr); +int QVBoxLayoutWithTriggerSlot_HeightForWidthDefault(void* ptr, int w); +int QVBoxLayoutWithTriggerSlot_MinimumHeightForWidthDefault(void* ptr, int w); +void* QVBoxLayoutWithTriggerSlot_LayoutDefault(void* ptr); +void QVBoxLayoutWithTriggerSlot_ChildEventDefault(void* ptr, void* e); +void* QVBoxLayoutWithTriggerSlot_GeometryDefault(void* ptr); +long long QVBoxLayoutWithTriggerSlot_ControlTypesDefault(void* ptr); +char QVBoxLayoutWithTriggerSlot_IsEmptyDefault(void* ptr); +int QVBoxLayoutWithTriggerSlot_IndexOfDefault(void* ptr, void* widget); +char QVBoxLayoutWithTriggerSlot_EventDefault(void* ptr, void* e); +char QVBoxLayoutWithTriggerSlot_EventFilterDefault(void* ptr, void* watched, void* event); +void QVBoxLayoutWithTriggerSlot_ConnectNotifyDefault(void* ptr, void* sign); +void QVBoxLayoutWithTriggerSlot_CustomEventDefault(void* ptr, void* event); +void QVBoxLayoutWithTriggerSlot_DeleteLaterDefault(void* ptr); +void QVBoxLayoutWithTriggerSlot_DisconnectNotifyDefault(void* ptr, void* sign); +void QVBoxLayoutWithTriggerSlot_TimerEventDefault(void* ptr, void* event); ; -void* QGridLayoutWithTriggerSlot_SpacerItemDefault(void* ptr); -void* QGridLayoutWithTriggerSlot_WidgetDefault(void* ptr); +void* QVBoxLayoutWithTriggerSlot_SpacerItemDefault(void* ptr); +void* QVBoxLayoutWithTriggerSlot_WidgetDefault(void* ptr); #ifdef __cplusplus } diff --git a/elements/moc_moc.h b/elements/moc_moc.h @@ -19,29 +19,29 @@ QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED -struct qt_meta_stringdata_QGridLayoutWithTriggerSlot_t { +struct qt_meta_stringdata_QVBoxLayoutWithTriggerSlot_t { QByteArrayData data[4]; char stringdata0[55]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ - qptrdiff(offsetof(qt_meta_stringdata_QGridLayoutWithTriggerSlot_t, stringdata0) + ofs \ + qptrdiff(offsetof(qt_meta_stringdata_QVBoxLayoutWithTriggerSlot_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) -static const qt_meta_stringdata_QGridLayoutWithTriggerSlot_t qt_meta_stringdata_QGridLayoutWithTriggerSlot = { +static const qt_meta_stringdata_QVBoxLayoutWithTriggerSlot_t qt_meta_stringdata_QVBoxLayoutWithTriggerSlot = { { -QT_MOC_LITERAL(0, 0, 26), // "QGridLayoutWithTriggerSlot" +QT_MOC_LITERAL(0, 0, 26), // "QVBoxLayoutWithTriggerSlot" QT_MOC_LITERAL(1, 27, 14), // "TriggerMessage" QT_MOC_LITERAL(2, 42, 0), // "" QT_MOC_LITERAL(3, 43, 11) // "messageBody" }, - "QGridLayoutWithTriggerSlot\0TriggerMessage\0" + "QVBoxLayoutWithTriggerSlot\0TriggerMessage\0" "\0messageBody" }; #undef QT_MOC_LITERAL -static const uint qt_meta_data_QGridLayoutWithTriggerSlot[] = { +static const uint qt_meta_data_QVBoxLayoutWithTriggerSlot[] = { // content: 7, // revision @@ -63,10 +63,10 @@ static const uint qt_meta_data_QGridLayoutWithTriggerSlot[] = { 0 // eod }; -void QGridLayoutWithTriggerSlot::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) +void QVBoxLayoutWithTriggerSlot::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { - QGridLayoutWithTriggerSlot *_t = static_cast<QGridLayoutWithTriggerSlot *>(_o); + QVBoxLayoutWithTriggerSlot *_t = static_cast<QVBoxLayoutWithTriggerSlot *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->TriggerMessage((*reinterpret_cast< QString(*)>(_a[1]))); break; @@ -75,28 +75,28 @@ void QGridLayoutWithTriggerSlot::qt_static_metacall(QObject *_o, QMetaObject::Ca } } -const QMetaObject QGridLayoutWithTriggerSlot::staticMetaObject = { - { &QGridLayout::staticMetaObject, qt_meta_stringdata_QGridLayoutWithTriggerSlot.data, - qt_meta_data_QGridLayoutWithTriggerSlot, qt_static_metacall, nullptr, nullptr} +const QMetaObject QVBoxLayoutWithTriggerSlot::staticMetaObject = { + { &QVBoxLayout::staticMetaObject, qt_meta_stringdata_QVBoxLayoutWithTriggerSlot.data, + qt_meta_data_QVBoxLayoutWithTriggerSlot, qt_static_metacall, nullptr, nullptr} }; -const QMetaObject *QGridLayoutWithTriggerSlot::metaObject() const +const QMetaObject *QVBoxLayoutWithTriggerSlot::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } -void *QGridLayoutWithTriggerSlot::qt_metacast(const char *_clname) +void *QVBoxLayoutWithTriggerSlot::qt_metacast(const char *_clname) { if (!_clname) return nullptr; - if (!strcmp(_clname, qt_meta_stringdata_QGridLayoutWithTriggerSlot.stringdata0)) - return static_cast<void*>(const_cast< QGridLayoutWithTriggerSlot*>(this)); - return QGridLayout::qt_metacast(_clname); + if (!strcmp(_clname, qt_meta_stringdata_QVBoxLayoutWithTriggerSlot.stringdata0)) + return static_cast<void*>(const_cast< QVBoxLayoutWithTriggerSlot*>(this)); + return QVBoxLayout::qt_metacast(_clname); } -int QGridLayoutWithTriggerSlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +int QVBoxLayoutWithTriggerSlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { - _id = QGridLayout::qt_metacall(_c, _id, _a); + _id = QVBoxLayout::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { diff --git a/main.go b/main.go @@ -7,6 +7,8 @@ import ( "github.com/Nordgedanken/Morpheus/matrix" "github.com/Nordgedanken/Morpheus/util" "github.com/matrix-org/gomatrix" + "github.com/therecipe/qt/core" + "github.com/therecipe/qt/gui" "github.com/therecipe/qt/widgets" "github.com/tidwall/buntdb" _ "image/png" @@ -28,7 +30,13 @@ func main() { localLog.Println("Starting Morpheus") - widgets.NewQApplication(len(os.Args), os.Args) + app := widgets.NewQApplication(len(os.Args), os.Args) + + app.SetAttribute(core.Qt__AA_UseHighDpiPixmaps, true) + app.SetApplicationName("Morpheus") + app.SetApplicationVersion("0.0.1") + appIcon := gui.NewQIcon5(":/qml/resources/logos/MorpheusBig.png") + app.SetWindowIcon(appIcon) desktopApp := widgets.QApplication_Desktop() primaryScreen := desktopApp.PrimaryScreen() @@ -37,7 +45,6 @@ func main() { windowHeight := screen.Height() / 2 window = widgets.NewQMainWindow(nil, 0) - //window.SetMinimumSize2(windowWidth, windowHeight) var accessToken string var homeserverURL string diff --git a/matrix/db.go b/matrix/db.go @@ -44,7 +44,8 @@ func InitData(cli *gomatrix.Client, db *buntdb.DB) { for index, alias := range roomAliases.Content.Aliases { // Update cache DBerr := db.Update(func(tx *buntdb.Tx) error { - tx.Set("room:"+room+":aliases"+string(index), alias, nil) + localLog.Println(room) + tx.Set("room:"+room+":aliases:"+string(index), alias, nil) return nil }) if DBerr != nil { @@ -54,3 +55,18 @@ func InitData(cli *gomatrix.Client, db *buntdb.DB) { } } + +func CacheMessageEvents(id, sender, roomID, message string, timestamp int64, db *buntdb.DB) { + // Update cache + DBerr := db.Update(func(tx *buntdb.Tx) error { + localLog.Println(roomID) + tx.Set("room:"+roomID+":messages:"+id+":id", id, nil) + tx.Set("room:"+roomID+":messages:"+id+":sender", sender, nil) + tx.Set("room:"+roomID+":messages:"+id+":message", message, nil) + tx.Set("room:"+roomID+":messages:"+id+":timestamp", string(timestamp), nil) + return nil + }) + if DBerr != nil { + localLog.Fatalln(DBerr) + } +} diff --git a/Logo/Logo.png b/qml/resources/logos/MorpheusBig.png Binary files differ. diff --git a/qml/ui/chat.ui b/qml/ui/chat.ui @@ -904,7 +904,7 @@ padding: 3px</string> <bool>false</bool> </property> <property name="placeholderText"> - <string>Send a Message (unecrypted)...</string> + <string>Send a Message (unencrypted)...</string> </property> <property name="clearButtonEnabled"> <bool>false</bool> diff --git a/qml/ui/message.ui b/qml/ui/message.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>Form</class> - <widget class="QWidget" name="Form"> + <class>message</class> + <widget class="QWidget" name="message"> <property name="geometry"> <rect> <x>0</x> diff --git a/uis.go b/uis.go @@ -159,16 +159,18 @@ func NewMainUI(windowWidth, windowHeight int, cli *gomatrix.Client) *widgets.QWi file.Close() matrix.InitData(cli, db) - mainWidget.SetMinimumSize2(windowWidth, windowHeight) - mainWidget.Resize2(windowWidth, windowHeight) - mainWidget.SetGeometry2(0, 0, windowWidth, windowHeight) + mainWidget.SetMinimumSize2(window.Size().Width(), window.Size().Height()) + mainWidget.SetGeometry2(0, 0, window.Size().Width(), window.Size().Height()) + mainWidget.Resize2(window.Size().Width(), window.Size().Height()) - widget.SetMinimumSize2(windowWidth, windowHeight) - widget.SetGeometry2(0, 0, windowWidth, windowHeight) + widget.SetMinimumSize2(window.Size().Width(), window.Size().Height()) + widget.SetGeometry2(0, 0, window.Size().Width(), window.Size().Height()) chatWidget := widgets.NewQWidgetFromPointer(widget.FindChild("ChatWidget", core.Qt__FindChildrenRecursively).Pointer()) - chatWidget.SetMinimumSize2(windowWidth, windowHeight) - chatWidget.SetGeometry2(0, 0, windowWidth, windowHeight) + chatWidget.SetMinimumSize2(window.Size().Width(), window.Size().Height()) + chatWidget.SetGeometry2(0, 0, window.Size().Width(), window.Size().Height()) + + messageScrollArea := widgets.NewQScrollAreaFromPointer(widget.FindChild("messageScroll", core.Qt__FindChildrenRecursively).Pointer()) mainWidget.SetWindowTitle("Morpheus - MatrixHQ") var layout = widgets.NewQHBoxLayout() @@ -178,11 +180,6 @@ func NewMainUI(windowWidth, windowHeight int, cli *gomatrix.Client) *widgets.QWi layout.SetContentsMargins(0, 0, 0, 0) window.ConnectResizeEvent(func(event *gui.QResizeEvent) { - - widget.SetGeometry2(0, 0, event.Size().Width(), event.Size().Height()) - mainWidget.SetGeometry2(0, 0, event.Size().Width(), event.Size().Height()) - chatWidget.SetGeometry2(0, 0, event.Size().Width(), event.Size().Height()) - widget.Resize(event.Size()) mainWidget.Resize(event.Size()) chatWidget.Resize(event.Size()) @@ -240,19 +237,37 @@ func NewMainUI(windowWidth, windowHeight int, cli *gomatrix.Client) *widgets.QWi syncer.Store = customStore // Init Message View - _, messageListLayout := elements.NewMessageList() + messageView, messageListLayout := elements.NewMessageList() messageListLayout.ConnectTriggerMessage(func(messageBody string) { localLog.Println("messageTriggered:", messageBody) - messageListLayout.NewMessage(messageBody) - }) + chatWidgetSize := chatWidget.Size() + widgetSize := widget.Size() + mainWidgetSize := mainWidget.Size() - messageScrollArea := widgets.NewQScrollAreaFromPointer(widget.FindChild("messageScroll", core.Qt__FindChildrenRecursively).Pointer()) + messageListLayout.NewMessage(messageBody, messageScrollArea, chatWidget) + + chatWidget.Resize(chatWidgetSize) + widget.Resize(widgetSize) + mainWidget.Resize(mainWidgetSize) + }) messageScrollArea.SetLayout(messageListLayout) + messageScrollArea.SetWidgetResizable(true) + messageScrollArea.SetObjectName("messageScroll") + //messageScrollArea.SetStyleSheet("QScrollArea#messageScroll { border: 0px; };") + messageScrollArea.SetHorizontalScrollBarPolicy(core.Qt__ScrollBarAlwaysOff) + messageScrollArea.SetVerticalScrollBarPolicy(core.Qt__ScrollBarAsNeeded) + messageScrollArea.SetContentsMargins(0, 0, 0, 0) + messageScrollArea.SetWidget(messageView) syncer.OnEventType("m.room.message", func(ev *gomatrix.Event) { msg, _ := ev.Body() + room := ev.RoomID + sender := ev.Sender + id := ev.ID + timestamp := ev.Timestamp + matrix.CacheMessageEvents(id, sender, room, msg, timestamp, db) localLog.Println("message:", msg) messageListLayout.TriggerMessage(msg) })