Add bunch of ID's to qml components so it's easier to test them.

CURA-5618
This commit is contained in:
Jaime van Kessel 2018-09-11 16:05:53 +02:00
parent f628b63c29
commit a809575bc8
7 changed files with 31 additions and 13 deletions

View file

@ -33,6 +33,7 @@ Window
{
id: header
}
Item
{
id: mainView
@ -75,6 +76,7 @@ Window
visible: toolbox.viewCategory == "installed"
}
}
ToolboxFooter
{
id: footer

View file

@ -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

View file

@ -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