mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
06a044b40f
3 changed files with 18 additions and 19 deletions
|
@ -7,6 +7,7 @@ from PyQt5.QtCore import pyqtSlot, pyqtProperty, pyqtSignal, QObject
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
|
from UM.Util import parseBool
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
|
@ -89,7 +90,8 @@ class DiscoveredPrintersModel(QObject):
|
||||||
|
|
||||||
@pyqtProperty(list, notify = discoveredPrintersChanged)
|
@pyqtProperty(list, notify = discoveredPrintersChanged)
|
||||||
def discoveredPrinters(self) -> List["DiscoveredPrinter"]:
|
def discoveredPrinters(self) -> List["DiscoveredPrinter"]:
|
||||||
item_list = list(x for x in self._discovered_printer_by_ip_dict.values())
|
item_list = list(
|
||||||
|
x for x in self._discovered_printer_by_ip_dict.values() if not parseBool(x.device.getProperty("temporary")))
|
||||||
item_list.sort(key = lambda x: x.device.name)
|
item_list.sort(key = lambda x: x.device.name)
|
||||||
return item_list
|
return item_list
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,6 @@ import QtQuick.Controls 2.3
|
||||||
import UM 1.3 as UM
|
import UM 1.3 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
import "../PrinterSelector"
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is the widget for adding a network printer. There are 2 parts in this widget. One is a scroll view of a list
|
// This is the widget for adding a network printer. There are 2 parts in this widget. One is a scroll view of a list
|
||||||
// of discovered network printers. Beneath the scroll view is a container with 3 buttons: "Refresh", "Add by IP", and
|
// of discovered network printers. Beneath the scroll view is a container with 3 buttons: "Refresh", "Add by IP", and
|
||||||
|
@ -84,13 +81,11 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: MachineSelectorButton
|
delegate: Cura.MachineSelectorButton
|
||||||
{
|
{
|
||||||
text: modelData.device.name
|
text: modelData.device.name
|
||||||
|
|
||||||
anchors.left: parent.left
|
width: networkPrinterListView.width
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
outputDevice: modelData.device
|
outputDevice: modelData.device
|
||||||
|
|
||||||
enabled: !modelData.isUnknownMachineType
|
enabled: !modelData.isUnknownMachineType
|
||||||
|
@ -119,22 +114,23 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Horizontal line separating the buttons (below) and the discovered network printers (above)
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: separator
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: networkPrinterInfo.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: UM.Theme.getSize("default_lining").height
|
||||||
|
color: UM.Theme.getColor("lining")
|
||||||
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: controlsRectangle
|
id: controlsRectangle
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: networkPrinterInfo.bottom
|
anchors.top: separator.bottom
|
||||||
|
|
||||||
// Horizontal line separating the buttons (below) and the discovered network printers (above)
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: UM.Theme.getSize("default_lining").width
|
|
||||||
color: UM.Theme.getColor("lining")
|
|
||||||
}
|
|
||||||
|
|
||||||
height: UM.Theme.getSize("message_action_button").height + UM.Theme.getSize("default_margin").height
|
height: UM.Theme.getSize("message_action_button").height + UM.Theme.getSize("default_margin").height
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
module Cura
|
module Cura
|
||||||
|
|
||||||
MachineSelector 1.0 MachineSelector.qml
|
MachineSelector 1.0 MachineSelector.qml
|
||||||
|
MachineSelectorButton 1.0 MachineSelectorButton.qml
|
||||||
CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml
|
CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml
|
||||||
PrintSetupSelector 1.0 PrintSetupSelector.qml
|
PrintSetupSelector 1.0 PrintSetupSelector.qml
|
||||||
ActionButton 1.0 ActionButton.qml
|
ActionButton 1.0 ActionButton.qml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue