mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 15:35:59 +08:00
Add bunch of ID's to qml components so it's easier to test them.
CURA-5618
This commit is contained in:
parent
f628b63c29
commit
a809575bc8
@ -33,6 +33,7 @@ Window
|
||||
{
|
||||
id: header
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
id: mainView
|
||||
@ -75,6 +76,7 @@ Window
|
||||
visible: toolbox.viewCategory == "installed"
|
||||
}
|
||||
}
|
||||
|
||||
ToolboxFooter
|
||||
{
|
||||
id: footer
|
||||
|
@ -9,6 +9,7 @@ import UM 1.1 as UM
|
||||
|
||||
Item
|
||||
{
|
||||
id: toolboxDownloadsGridTile
|
||||
property int packageCount: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getTotalNumberOfMaterialPackagesByAuthor(model.id) : 1
|
||||
property int installedPackages: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0)
|
||||
height: childrenRect.height
|
||||
|
@ -21,8 +21,10 @@ Item
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("default_margin").width
|
||||
}
|
||||
|
||||
ToolboxTabButton
|
||||
{
|
||||
id: pluginsTabButton
|
||||
text: catalog.i18nc("@title:tab", "Plugins")
|
||||
active: toolbox.viewCategory == "plugin" && enabled
|
||||
enabled: toolbox.viewPage != "loading" && toolbox.viewPage != "errored"
|
||||
@ -36,6 +38,7 @@ Item
|
||||
|
||||
ToolboxTabButton
|
||||
{
|
||||
id: materialsTabButton
|
||||
text: catalog.i18nc("@title:tab", "Materials")
|
||||
active: toolbox.viewCategory == "material" && enabled
|
||||
enabled: toolbox.viewPage != "loading" && toolbox.viewPage != "errored"
|
||||
@ -49,6 +52,7 @@ Item
|
||||
}
|
||||
ToolboxTabButton
|
||||
{
|
||||
id: installedTabButton
|
||||
text: catalog.i18nc("@title:tab", "Installed")
|
||||
active: toolbox.viewCategory == "installed"
|
||||
anchors
|
||||
|
@ -79,6 +79,7 @@ UM.Dialog
|
||||
section.property: "section"
|
||||
section.delegate: Button
|
||||
{
|
||||
id: machineSectionButton
|
||||
text: section
|
||||
width: machineList.width
|
||||
style: ButtonStyle
|
||||
@ -214,6 +215,7 @@ UM.Dialog
|
||||
|
||||
Button
|
||||
{
|
||||
id: addPrinterButton
|
||||
text: catalog.i18nc("@action:button", "Add Printer")
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
|
@ -104,11 +104,13 @@ UM.MainWindow
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","&File");
|
||||
MenuItem
|
||||
{
|
||||
id: newProjectMenu
|
||||
action: Cura.Actions.newProject;
|
||||
}
|
||||
|
||||
MenuItem
|
||||
{
|
||||
id: openMenu
|
||||
action: Cura.Actions.open;
|
||||
}
|
||||
|
||||
@ -148,6 +150,7 @@ UM.MainWindow
|
||||
|
||||
MenuItem
|
||||
{
|
||||
id: exportSelectionMenu
|
||||
text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection...");
|
||||
enabled: UM.Selection.hasSelection;
|
||||
iconName: "document-save-as";
|
||||
@ -156,7 +159,11 @@ UM.MainWindow
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
MenuItem { action: Cura.Actions.reloadAll; }
|
||||
MenuItem
|
||||
{
|
||||
id: reloadAllMenu
|
||||
action: Cura.Actions.reloadAll;
|
||||
}
|
||||
|
||||
MenuSeparator { }
|
||||
|
||||
@ -284,6 +291,7 @@ UM.MainWindow
|
||||
|
||||
Menu
|
||||
{
|
||||
id: preferencesMenu
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","P&references");
|
||||
|
||||
MenuItem { action: Cura.Actions.preferences; }
|
||||
@ -291,7 +299,7 @@ UM.MainWindow
|
||||
|
||||
Menu
|
||||
{
|
||||
//: Help menu
|
||||
id: helpMenu
|
||||
title: catalog.i18nc("@title:menu menubar:toplevel","&Help");
|
||||
|
||||
MenuItem { action: Cura.Actions.showProfileFolder; }
|
||||
|
@ -13,6 +13,7 @@ UM.PreferencesPage
|
||||
{
|
||||
//: General configuration page title
|
||||
title: catalog.i18nc("@title:tab","General")
|
||||
id: generalPreferencesPage
|
||||
|
||||
function setDefaultLanguage(languageCode)
|
||||
{
|
||||
@ -283,9 +284,6 @@ UM.PreferencesPage
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
id: languageCaption
|
||||
|
@ -16,6 +16,7 @@ Button
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
background: Rectangle
|
||||
{
|
||||
id: backgroundRectangle
|
||||
implicitHeight: UM.Theme.getSize("section").height
|
||||
color: {
|
||||
if (base.color) {
|
||||
@ -35,6 +36,7 @@ Button
|
||||
Behavior on color { ColorAnimation { duration: 50; } }
|
||||
Rectangle
|
||||
{
|
||||
id: backgroundLiningRectangle
|
||||
height: UM.Theme.getSize("default_lining").height
|
||||
width: parent.width
|
||||
anchors.bottom: parent.bottom
|
||||
@ -68,6 +70,7 @@ Button
|
||||
anchors.left: parent.left
|
||||
|
||||
Label {
|
||||
id: settingNameLabel
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
|
Loading…
x
Reference in New Issue
Block a user