diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 64e9b3b1a2..3f7098cadb 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -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; diff --git a/resources/qml/AddProfileDialog.qml b/resources/qml/AddProfileDialog.qml new file mode 100644 index 0000000000..17e7790a1d --- /dev/null +++ b/resources/qml/AddProfileDialog.qml @@ -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; + } + } +} + diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index b8db22eee4..7e8cb30fe9 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -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 { diff --git a/resources/qml/ProfileSetup.qml b/resources/qml/ProfileSetup.qml index 3757d64773..52e9bc0827 100644 --- a/resources/qml/ProfileSetup.qml +++ b/resources/qml/ProfileSetup.qml @@ -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 { } -// } -// } } } } diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 46fb34b3c4..ac511a4df8 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -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