Просмотр исходного кода

Expose the Actions object as a QML singleton

This makes it much simpler to use actions from within other objects
Arjen Hiemstra 8 лет назад
Родитель
Сommit
fbbe6cde78
2 измененных файлов с 5 добавлено и 0 удалено
  1. 2 0
      resources/qml/Actions.qml
  2. 3 0
      resources/qml/qmldir

+ 2 - 0
resources/qml/Actions.qml

@@ -1,6 +1,8 @@
 // Copyright (c) 2015 Ultimaker B.V.
 // Cura is released under the terms of the AGPLv3 or higher.
 
+pragma Singleton
+
 import QtQuick 2.2
 import QtQuick.Controls 1.1
 import UM 1.1 as UM

+ 3 - 0
resources/qml/qmldir

@@ -0,0 +1,3 @@
+module Cura
+
+singleton Actions 1.0 Actions.qml