mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 21:05:54 +08:00
Move TopBar to the Skeleton folder.
Clean up the Cura.qml even more by moving some components to the ApplicationMenu, where they are called. Contributes to CURA-5784.
This commit is contained in:
parent
193f113851
commit
8bdd27183f
@ -183,7 +183,6 @@ UM.MainWindow
|
||||
bottom: parent.bottom;
|
||||
left: parent.left;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Topbar
|
||||
@ -340,13 +339,6 @@ UM.MainWindow
|
||||
}
|
||||
}
|
||||
|
||||
WorkspaceSummaryDialog
|
||||
{
|
||||
id: saveWorkspaceDialog
|
||||
property var args
|
||||
onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.preferences
|
||||
@ -359,33 +351,6 @@ UM.MainWindow
|
||||
onShowPreferencesWindow: preferences.visible = true
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: newProjectDialog
|
||||
modality: Qt.ApplicationModal
|
||||
title: catalog.i18nc("@title:window", "New project")
|
||||
text: catalog.i18nc("@info:question", "Are you sure you want to start a new project? This will clear the build plate and any unsaved settings.")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
icon: StandardIcon.Question
|
||||
onYes:
|
||||
{
|
||||
CuraApplication.deleteAll();
|
||||
Cura.Actions.resetProfile.trigger();
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.newProject
|
||||
onTriggered:
|
||||
{
|
||||
if(Printer.platformActivity || Cura.MachineManager.hasUserSettings)
|
||||
{
|
||||
newProjectDialog.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.addProfile
|
||||
|
@ -11,10 +11,18 @@ import UM 1.3 as UM
|
||||
import Cura 1.1 as Cura
|
||||
|
||||
import "../Menus"
|
||||
import "../Dialogs"
|
||||
|
||||
UM.ApplicationMenu
|
||||
Item
|
||||
{
|
||||
id: menu
|
||||
width: applicationMenu.width
|
||||
height: applicationMenu.height
|
||||
property alias window: applicationMenu.window
|
||||
|
||||
UM.ApplicationMenu
|
||||
{
|
||||
id: applicationMenu
|
||||
|
||||
Menu
|
||||
{
|
||||
@ -231,4 +239,39 @@ UM.ApplicationMenu
|
||||
MenuSeparator { }
|
||||
MenuItem { action: Cura.Actions.about }
|
||||
}
|
||||
}
|
||||
|
||||
WorkspaceSummaryDialog
|
||||
{
|
||||
id: saveWorkspaceDialog
|
||||
property var args
|
||||
onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
{
|
||||
id: newProjectDialog
|
||||
modality: Qt.ApplicationModal
|
||||
title: catalog.i18nc("@title:window", "New project")
|
||||
text: catalog.i18nc("@info:question", "Are you sure you want to start a new project? This will clear the build plate and any unsaved settings.")
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
icon: StandardIcon.Question
|
||||
onYes:
|
||||
{
|
||||
CuraApplication.deleteAll();
|
||||
Cura.Actions.resetProfile.trigger();
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.newProject
|
||||
onTriggered:
|
||||
{
|
||||
if(Printer.platformActivity || Cura.MachineManager.hasUserSettings)
|
||||
{
|
||||
newProjectDialog.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
@ -8,7 +8,6 @@ import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.4 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import "Menus"
|
||||
|
||||
Rectangle
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user