mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:19:04 +08:00
Added extensions as a working plugin type
This commit is contained in:
parent
b82ff11d54
commit
f6daca8c53
@ -64,6 +64,7 @@ class PrinterApplication(QtApplication):
|
||||
self._plugin_registry.loadPlugins({ "type": "mesh_writer" })
|
||||
self._plugin_registry.loadPlugins({ "type": "tool" })
|
||||
|
||||
self._plugin_registry.loadPlugin('USBPrinting')
|
||||
self._plugin_registry.loadPlugin('CuraEngineBackend')
|
||||
|
||||
def run(self):
|
||||
|
@ -73,11 +73,36 @@ UM.MainWindow {
|
||||
}
|
||||
|
||||
Menu {
|
||||
id:extension_menu
|
||||
//: Extensions menu
|
||||
title: qsTr("E&xtensions");
|
||||
|
||||
//: Empty extensions menu
|
||||
MenuItem { text: qsTr("No extensions loaded"); enabled: false; }
|
||||
Instantiator
|
||||
{
|
||||
model: UM.Models.extensionModel
|
||||
id: blub
|
||||
|
||||
Menu
|
||||
{
|
||||
title: model.name;
|
||||
id: sub_menu
|
||||
Instantiator
|
||||
{
|
||||
model: actions
|
||||
MenuItem
|
||||
{
|
||||
text:model.text
|
||||
onTriggered: UM.Models.extensionModel.subMenuTriggered(name,model.text)
|
||||
}
|
||||
onObjectAdded: sub_menu.insertItem(index, object)
|
||||
onObjectRemoved: sub_menu.removeItem(object)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
onObjectAdded: extension_menu.insertItem(index, object)
|
||||
onObjectRemoved: extension_menu.removeItem(object)
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
|
Loading…
x
Reference in New Issue
Block a user