Showing the changes to interface/src/scripting/ToolbarScriptingInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -14,7 +14,7 @@ class QmlWrapper : public QObject { · 13 unmodified lines | ||
| 14 | 14 | Q_OBJECT |
| 15 | 15 | public: |
| 16 | 16 | QmlWrapper(QObject* qmlObject, QObject* parent = nullptr) |
| 17 | − : QObject(parent), _qmlObject(qmlObject) { | |
| 17 | + : QObject(parent), _qmlObject(qmlObject) { | |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | Q_INVOKABLE void writeProperty(QString propertyName, QVariant propertyValue) { |
| @@ -91,6 +91,10 @@ public: · 70 unmodified lines | ||
| 91 | 91 | |
| 92 | 92 | return new ToolbarButtonProxy(rawButton, this); |
| 93 | 93 | } |
| 94 | + | |
| 95 | + Q_INVOKABLE void removeButton(const QVariant& name) { | |
| 96 | + QMetaObject::invokeMethod(_qmlObject, "removeButton", Qt::AutoConnection, Q_ARG(QVariant, name)); | |
| 97 | + } | |
| 94 | 98 | }; |
| 95 | 99 | |
| 96 | 100 | |
| @@ -112,4 +116,4 @@ QObject* ToolbarScriptingInterface::getToolbar(const QString& toolbarId) { · 15 unmodified lines | ||
| 112 | 116 | } |
| 113 | 117 | |
| 114 | 118 | |
| 115 | −#include "ToolbarScriptingInterface.moc" | |
| 119 | +#include "ToolbarScriptingInterface.moc" | |