mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:35:57 +08:00
define action in qml and add alias
This commit is contained in:
parent
170b25749c
commit
3c1e26d535
@ -78,6 +78,7 @@ Item
|
|||||||
property alias paste: pasteAction
|
property alias paste: pasteAction
|
||||||
property alias copy: copyAction
|
property alias copy: copyAction
|
||||||
property alias cut: cutAction
|
property alias cut: cutAction
|
||||||
|
property alias exportProjectForSupport: exportProjectForSupportAction
|
||||||
|
|
||||||
readonly property bool copy_paste_enabled: {
|
readonly property bool copy_paste_enabled: {
|
||||||
const all_enabled_packages = CuraApplication.getPackageManager().allEnabledPackages;
|
const all_enabled_packages = CuraApplication.getPackageManager().allEnabledPackages;
|
||||||
@ -558,4 +559,21 @@ Item
|
|||||||
text: "&Marketplace"
|
text: "&Marketplace"
|
||||||
icon.name: "plugins_browse"
|
icon.name: "plugins_browse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: exportProjectForSupportAction
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:help","Export Project For Support")
|
||||||
|
onTriggered:
|
||||||
|
{
|
||||||
|
var supportName = CuraActions.supportProjectTag()
|
||||||
|
var args = {
|
||||||
|
"filter_by_machine": false,
|
||||||
|
"file_type": "workspace",
|
||||||
|
"preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
|
||||||
|
"limit_mimetypes": ["application/vnd.ms-package.3dmanufacturing-3dmodel+xml"],
|
||||||
|
};
|
||||||
|
UM.OutputDeviceManager.requestWriteToDevice("local_file", supportName, args)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user