mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
CURA-4870 Prepare the UI to show the list of configurations
This commit is contained in:
parent
6e35fc5035
commit
49fcf35d9b
9 changed files with 113 additions and 100 deletions
|
@ -2,7 +2,8 @@
|
|||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
@ -21,12 +22,13 @@ Column
|
|||
width: parent.width - 2 * parent.padding
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
ScrollView {
|
||||
id: container
|
||||
width: parent.width - 2 * parent.padding
|
||||
height: childrenRect.height
|
||||
|
||||
style: UM.Theme.styles.scrollview
|
||||
|
||||
Repeater {
|
||||
height: childrenRect.height
|
||||
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : null
|
||||
|
@ -42,23 +44,24 @@ Column
|
|||
|
||||
ListView
|
||||
{
|
||||
id: grid
|
||||
id: configurationList
|
||||
anchors.top: printerTypeHeader.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: container.width
|
||||
height: childrenRect.height
|
||||
model: outputDevice.printers
|
||||
model: outputDevice.uniqueConfigurations
|
||||
delegate: ConfigurationItem
|
||||
{
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
printer: modelData
|
||||
configuration: modelData
|
||||
onConfigurationSelected:
|
||||
{
|
||||
print("SELECCIONANDO IMPRESORA", printer.name)
|
||||
outputDevice.setActivePrinter(printer)
|
||||
print("SELECCIONANDO CONFIGURACION", JSON.stringify(configuration))
|
||||
}
|
||||
Component.onCompleted: {print("$$$$$$$$$$$$$$$$$$ Configuracion", JSON.stringify(configuration))}
|
||||
}
|
||||
Component.onCompleted: {print("$$$$$$$$$$$$$$$$$$ Elementos del modelo", JSON.stringify(outputDevice.uniqueConfigurations))}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue