mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Prepare "Add profile" dialog
This commit is contained in:
parent
bfa45245cc
commit
f97e2fa6aa
5 changed files with 61 additions and 26 deletions
|
@ -31,6 +31,7 @@ Item
|
|||
|
||||
property alias addMachine: addMachineAction;
|
||||
property alias configureMachines: settingsAction;
|
||||
property alias addProfile: addProfileAction;
|
||||
property alias manageProfiles: manageProfilesAction;
|
||||
|
||||
property alias preferences: preferencesAction;
|
||||
|
@ -95,6 +96,12 @@ Item
|
|||
iconName: "configure";
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: addProfileAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:profile","&Add Profile...");
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
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 { }
|
||||
|
||||
MenuItem { action: actions.addProfile; }
|
||||
MenuItem { action: actions.manageProfiles; }
|
||||
}
|
||||
|
||||
|
@ -461,6 +462,7 @@ UM.MainWindow
|
|||
|
||||
addMachineAction: actions.addMachine;
|
||||
configureMachinesAction: actions.configureMachines;
|
||||
addProfileAction: actions.addProfile;
|
||||
manageProfilesAction: actions.manageProfiles;
|
||||
}
|
||||
|
||||
|
@ -578,6 +580,7 @@ UM.MainWindow
|
|||
reloadAll.onTriggered: Printer.reloadAll()
|
||||
|
||||
addMachine.onTriggered: addMachineWizard.visible = true;
|
||||
addProfile.onTriggered: addProfileDialog.visible = true;
|
||||
|
||||
preferences.onTriggered: { preferences.visible = true; preferences.setPage(0); }
|
||||
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(3); }
|
||||
|
@ -670,6 +673,15 @@ UM.MainWindow
|
|||
id: addMachineWizard
|
||||
}
|
||||
|
||||
AddProfileDialog
|
||||
{
|
||||
id: addProfileDialog
|
||||
}
|
||||
|
||||
LoadProfileDialog
|
||||
{
|
||||
id: loadProfileDialog
|
||||
}
|
||||
|
||||
AboutDialog
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ Item{
|
|||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
property int totalHeightProfileSetup: childrenRect.height
|
||||
property Action manageProfilesAction
|
||||
property Action addProfileAction
|
||||
|
||||
Rectangle{
|
||||
id: globalProfileRow
|
||||
|
@ -63,36 +64,13 @@ Item{
|
|||
ExclusiveGroup { id: profileSelectionMenuGroup; }
|
||||
|
||||
MenuSeparator { }
|
||||
MenuItem {
|
||||
action: base.addProfileAction;
|
||||
}
|
||||
MenuItem {
|
||||
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 configureMachinesAction;
|
||||
property Action addProfileAction;
|
||||
property Action manageProfilesAction;
|
||||
property int currentModeIndex;
|
||||
|
||||
|
@ -63,6 +64,7 @@ Rectangle
|
|||
|
||||
ProfileSetup {
|
||||
id: profileItem
|
||||
addProfileAction: base.addProfileAction
|
||||
manageProfilesAction: base.manageProfilesAction
|
||||
anchors.top: settingsModeSelection.bottom
|
||||
anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue