mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Switch out the file, view and edit menu for controls 2
CURA-8683
This commit is contained in:
parent
58a3aef8d4
commit
052898ce21
9 changed files with 285 additions and 251 deletions
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Copyright (c) 2022 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import UM 1.6 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -13,31 +13,34 @@ Menu
|
|||
title: catalog.i18nc("@title:menu menubar:toplevel", "&File")
|
||||
property var fileProviderModel: CuraApplication.getFileProviderModel()
|
||||
|
||||
MenuItem
|
||||
|
||||
UM.MenuItem
|
||||
{
|
||||
id: newProjectMenu
|
||||
action: Cura.Actions.newProject
|
||||
}
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: openMenu
|
||||
action: Cura.Actions.open
|
||||
visible: (base.fileProviderModel.count == 1)
|
||||
visible: base.fileProviderModel.count == 1
|
||||
height: visible ? implicitHeight: 0
|
||||
}
|
||||
|
||||
OpenFilesMenu
|
||||
{
|
||||
id: openFilesMenu
|
||||
visible: (base.fileProviderModel.count > 1)
|
||||
|
||||
shouldBeVisible: base.fileProviderModel.count > 1
|
||||
}
|
||||
|
||||
RecentFilesMenu { }
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: saveWorkspaceMenu
|
||||
shortcut: visible ? StandardKey.Save : ""
|
||||
shortcut: StandardKey.Save
|
||||
text: catalog.i18nc("@title:menu menubar:file", "&Save Project...")
|
||||
visible: saveProjectMenu.model.count == 1
|
||||
enabled: UM.WorkspaceFileHandler.enabled
|
||||
|
@ -62,13 +65,13 @@ Menu
|
|||
{
|
||||
id: saveProjectMenu
|
||||
model: projectOutputDevicesModel
|
||||
visible: model.count > 1
|
||||
shouldBeVisible: model.count > 1
|
||||
enabled: UM.WorkspaceFileHandler.enabled
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: saveAsMenu
|
||||
text: catalog.i18nc("@title:menu menubar:file", "&Export...")
|
||||
|
@ -79,18 +82,18 @@ Menu
|
|||
}
|
||||
}
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: exportSelectionMenu
|
||||
text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection...")
|
||||
enabled: UM.Selection.hasSelection
|
||||
iconName: "document-save-as"
|
||||
icon.name: "document-save-as"
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"})
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem
|
||||
UM.MenuItem
|
||||
{
|
||||
id: reloadAllMenu
|
||||
action: Cura.Actions.reloadAll
|
||||
|
@ -98,5 +101,5 @@ Menu
|
|||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: Cura.Actions.quit }
|
||||
UM.MenuItem { action: Cura.Actions.quit }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue