Update profiles preferences page to QtControls 2

CURA-8684
This commit is contained in:
casper 2022-01-24 22:37:39 +01:00
parent b6e375a3be
commit 6dc535063b

View File

@ -2,7 +2,8 @@
// Uranium is released under the terms of the LGPLv3 or higher. // Uranium is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4 as OldControls
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
@ -82,7 +83,7 @@ Item
{ {
id: activateMenuButton id: activateMenuButton
text: catalog.i18nc("@action:button", "Activate") text: catalog.i18nc("@action:button", "Activate")
iconName: "list-activate" icon.name: "list-activate"
enabled: !isCurrentItemActivated && base.currentItem enabled: !isCurrentItemActivated && base.currentItem
onClicked: onClicked:
{ {
@ -102,7 +103,7 @@ Item
{ {
id: createMenuButton id: createMenuButton
text: catalog.i18nc("@label", "Create") text: catalog.i18nc("@label", "Create")
iconName: "list-add" icon.name: "list-add"
enabled: base.canCreateProfile && !Cura.MachineManager.stacksHaveErrors enabled: base.canCreateProfile && !Cura.MachineManager.stacksHaveErrors
visible: base.canCreateProfile visible: base.canCreateProfile
@ -119,7 +120,7 @@ Item
{ {
id: duplicateMenuButton id: duplicateMenuButton
text: catalog.i18nc("@label", "Duplicate") text: catalog.i18nc("@label", "Duplicate")
iconName: "list-add" icon.name: "list-add"
enabled: !base.canCreateProfile enabled: !base.canCreateProfile
visible: !base.canCreateProfile visible: !base.canCreateProfile
@ -136,7 +137,7 @@ Item
{ {
id: removeMenuButton id: removeMenuButton
text: catalog.i18nc("@action:button", "Remove") text: catalog.i18nc("@action:button", "Remove")
iconName: "list-remove" icon.name: "list-remove"
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated
onClicked: onClicked:
{ {
@ -150,7 +151,7 @@ Item
{ {
id: renameMenuButton id: renameMenuButton
text: catalog.i18nc("@action:button", "Rename") text: catalog.i18nc("@action:button", "Rename")
iconName: "edit-rename" icon.name: "edit-rename"
enabled: base.hasCurrentItem && !base.currentItem.is_read_only enabled: base.hasCurrentItem && !base.currentItem.is_read_only
onClicked: onClicked:
{ {
@ -165,7 +166,7 @@ Item
{ {
id: importMenuButton id: importMenuButton
text: catalog.i18nc("@action:button", "Import") text: catalog.i18nc("@action:button", "Import")
iconName: "document-import" icon.name: "document-import"
onClicked: onClicked:
{ {
importDialog.open(); importDialog.open();
@ -177,7 +178,7 @@ Item
{ {
id: exportMenuButton id: exportMenuButton
text: catalog.i18nc("@action:button", "Export") text: catalog.i18nc("@action:button", "Export")
iconName: "document-export" icon.name: "document-export"
enabled: base.hasCurrentItem && !base.currentItem.is_read_only enabled: base.hasCurrentItem && !base.currentItem.is_read_only
onClicked: onClicked:
{ {
@ -401,7 +402,7 @@ Item
elide: Text.ElideRight elide: Text.ElideRight
} }
ScrollView OldControls.ScrollView
{ {
id: profileScrollView id: profileScrollView
anchors anchors
@ -594,7 +595,7 @@ Item
} }
} }
TabView OldControls.TabView
{ {
anchors.left: parent.left anchors.left: parent.left
anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top