mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
add removeButton API to ToolbarScriptingInterface
This commit is contained in:
parent
39c7805ca2
commit
345478eb36
1 changed files with 6 additions and 2 deletions
|
@ -14,7 +14,7 @@ class QmlWrapper : public QObject {
|
|||
Q_OBJECT
|
||||
public:
|
||||
QmlWrapper(QObject* qmlObject, QObject* parent = nullptr)
|
||||
: QObject(parent), _qmlObject(qmlObject) {
|
||||
: QObject(parent), _qmlObject(qmlObject) {
|
||||
}
|
||||
|
||||
Q_INVOKABLE void writeProperty(QString propertyName, QVariant propertyValue) {
|
||||
|
@ -91,6 +91,10 @@ public:
|
|||
|
||||
return new ToolbarButtonProxy(rawButton, this);
|
||||
}
|
||||
|
||||
Q_INVOKABLE void removeButton(const QVariant& name) {
|
||||
QMetaObject::invokeMethod(_qmlObject, "removeButton", Qt::AutoConnection, Q_ARG(QVariant, name));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -112,4 +116,4 @@ QObject* ToolbarScriptingInterface::getToolbar(const QString& toolbarId) {
|
|||
}
|
||||
|
||||
|
||||
#include "ToolbarScriptingInterface.moc"
|
||||
#include "ToolbarScriptingInterface.moc"
|
||||
|
|
Loading…
Reference in a new issue