By default user created buttons will appear after system buttons.
Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 16 files). Show all
Unified · Split
| @@ -388,10 +388,13 @@ QQuickItem* TabletProxy::getQmlMenu() const { · 387 unmodified lines | |||
| 388 | // | 388 | // |
| 389 | 389 | ||
| 390 | const QString UUID_KEY = "uuid"; | 390 | const QString UUID_KEY = "uuid"; |
| 391 | const QString STABLE_ORDER_KEY = "stableOrder"; | ||
| 392 | static int s_stableOrder = 1; | ||
| 391 | 393 | ||
| 392 | TabletButtonProxy::TabletButtonProxy(const QVariantMap& properties) : _uuid(QUuid::createUuid()), _properties(properties) { | 394 | TabletButtonProxy::TabletButtonProxy(const QVariantMap& properties) : _uuid(QUuid::createUuid()), _stableOrder(++s_stableOrder), _properties(properties) { |
| 393 | // this is used to uniquely identify this button. | 395 | // this is used to uniquely identify this button. |
| 394 | _properties[UUID_KEY] = _uuid; | 396 | _properties[UUID_KEY] = _uuid; |
| 397 | _properties[STABLE_ORDER_KEY] = _stableOrder; | ||
| 395 | } | 398 | } |
| 396 | 399 | ||
| 397 | void TabletButtonProxy::setQmlButton(QQuickItem* qmlButton) { | 400 | void TabletButtonProxy::setQmlButton(QQuickItem* qmlButton) { |