mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 05:53:59 -06:00
define action in qml and add alias
This commit is contained in:
parent
170b25749c
commit
3c1e26d535
1 changed files with 18 additions and 0 deletions
|
@ -78,6 +78,7 @@ Item
|
|||
property alias paste: pasteAction
|
||||
property alias copy: copyAction
|
||||
property alias cut: cutAction
|
||||
property alias exportProjectForSupport: exportProjectForSupportAction
|
||||
|
||||
readonly property bool copy_paste_enabled: {
|
||||
const all_enabled_packages = CuraApplication.getPackageManager().allEnabledPackages;
|
||||
|
@ -558,4 +559,21 @@ Item
|
|||
text: "&Marketplace"
|
||||
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…
Add table
Add a link
Reference in a new issue