mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 01:59:17 +08:00
Prepare "Add profile" dialog
This commit is contained in:
parent
bfa45245cc
commit
f97e2fa6aa
@ -31,6 +31,7 @@ Item
|
|||||||
|
|
||||||
property alias addMachine: addMachineAction;
|
property alias addMachine: addMachineAction;
|
||||||
property alias configureMachines: settingsAction;
|
property alias configureMachines: settingsAction;
|
||||||
|
property alias addProfile: addProfileAction;
|
||||||
property alias manageProfiles: manageProfilesAction;
|
property alias manageProfiles: manageProfilesAction;
|
||||||
|
|
||||||
property alias preferences: preferencesAction;
|
property alias preferences: preferencesAction;
|
||||||
@ -95,6 +96,12 @@ Item
|
|||||||
iconName: "configure";
|
iconName: "configure";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: addProfileAction;
|
||||||
|
text: catalog.i18nc("@action:inmenu menubar:profile","&Add Profile...");
|
||||||
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: manageProfilesAction;
|
id: manageProfilesAction;
|
||||||
|
36
resources/qml/AddProfileDialog.qml
Normal file
36
resources/qml/AddProfileDialog.qml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// Copyright (c) 2015 Ultimaker B.V.
|
||||||
|
// Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
|
import QtQuick 2.2
|
||||||
|
import QtQuick.Controls 1.1
|
||||||
|
import QtQuick.Window 2.1
|
||||||
|
|
||||||
|
import UM 1.1 as UM
|
||||||
|
|
||||||
|
UM.Dialog
|
||||||
|
{
|
||||||
|
id: base
|
||||||
|
|
||||||
|
//: About dialog title
|
||||||
|
title: catalog.i18nc("@title:window","Add profile")
|
||||||
|
width: 400
|
||||||
|
height: childrenRect.height
|
||||||
|
|
||||||
|
rightButtons: Row
|
||||||
|
{
|
||||||
|
spacing: UM.Theme.sizes.default_margin.width
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@action:button","Add");
|
||||||
|
isDefault: true
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@action:button","Cancel");
|
||||||
|
|
||||||
|
onClicked: base.visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -230,6 +230,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
||||||
|
MenuItem { action: actions.addProfile; }
|
||||||
MenuItem { action: actions.manageProfiles; }
|
MenuItem { action: actions.manageProfiles; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,6 +462,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
addMachineAction: actions.addMachine;
|
addMachineAction: actions.addMachine;
|
||||||
configureMachinesAction: actions.configureMachines;
|
configureMachinesAction: actions.configureMachines;
|
||||||
|
addProfileAction: actions.addProfile;
|
||||||
manageProfilesAction: actions.manageProfiles;
|
manageProfilesAction: actions.manageProfiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,6 +580,7 @@ UM.MainWindow
|
|||||||
reloadAll.onTriggered: Printer.reloadAll()
|
reloadAll.onTriggered: Printer.reloadAll()
|
||||||
|
|
||||||
addMachine.onTriggered: addMachineWizard.visible = true;
|
addMachine.onTriggered: addMachineWizard.visible = true;
|
||||||
|
addProfile.onTriggered: addProfileDialog.visible = true;
|
||||||
|
|
||||||
preferences.onTriggered: { preferences.visible = true; preferences.setPage(0); }
|
preferences.onTriggered: { preferences.visible = true; preferences.setPage(0); }
|
||||||
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); }
|
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); }
|
||||||
@ -670,6 +673,15 @@ UM.MainWindow
|
|||||||
id: addMachineWizard
|
id: addMachineWizard
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddProfileDialog
|
||||||
|
{
|
||||||
|
id: addProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadProfileDialog
|
||||||
|
{
|
||||||
|
id: loadProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
AboutDialog
|
AboutDialog
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,7 @@ Item{
|
|||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
property int totalHeightProfileSetup: childrenRect.height
|
property int totalHeightProfileSetup: childrenRect.height
|
||||||
property Action manageProfilesAction
|
property Action manageProfilesAction
|
||||||
|
property Action addProfileAction
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: globalProfileRow
|
id: globalProfileRow
|
||||||
@ -63,36 +64,13 @@ Item{
|
|||||||
ExclusiveGroup { id: profileSelectionMenuGroup; }
|
ExclusiveGroup { id: profileSelectionMenuGroup; }
|
||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
MenuItem {
|
||||||
|
action: base.addProfileAction;
|
||||||
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
action: base.manageProfilesAction;
|
action: base.manageProfilesAction;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Button {
|
|
||||||
// id: saveProfileButton
|
|
||||||
// visible: true
|
|
||||||
// anchors.top: parent.top
|
|
||||||
// x: globalProfileSelection.width + 2
|
|
||||||
// width: parent.width/100*25
|
|
||||||
// text: catalog.i18nc("@action:button", "Save");
|
|
||||||
// height: parent.height
|
|
||||||
//
|
|
||||||
// style: ButtonStyle {
|
|
||||||
// background: Rectangle {
|
|
||||||
// color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
|
||||||
// Behavior on color { ColorAnimation { duration: 50; } }
|
|
||||||
// width: actualLabel.width + UM.Theme.sizes.default_margin.width
|
|
||||||
// Label {
|
|
||||||
// id: actualLabel
|
|
||||||
// anchors.centerIn: parent
|
|
||||||
// color: UM.Theme.colors.load_save_button_text
|
|
||||||
// font: UM.Theme.fonts.default
|
|
||||||
// text: control.text;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// label: Item { }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ Rectangle
|
|||||||
|
|
||||||
property Action addMachineAction;
|
property Action addMachineAction;
|
||||||
property Action configureMachinesAction;
|
property Action configureMachinesAction;
|
||||||
|
property Action addProfileAction;
|
||||||
property Action manageProfilesAction;
|
property Action manageProfilesAction;
|
||||||
property int currentModeIndex;
|
property int currentModeIndex;
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ Rectangle
|
|||||||
|
|
||||||
ProfileSetup {
|
ProfileSetup {
|
||||||
id: profileItem
|
id: profileItem
|
||||||
|
addProfileAction: base.addProfileAction
|
||||||
manageProfilesAction: base.manageProfilesAction
|
manageProfilesAction: base.manageProfilesAction
|
||||||
anchors.top: settingsModeSelection.bottom
|
anchors.top: settingsModeSelection.bottom
|
||||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
|
Loading…
x
Reference in New Issue
Block a user