Organize files better

First things first... organize!
This commit is contained in:
Ian Paschal 2018-09-07 14:11:37 +02:00
parent 49d72f5855
commit 18e0dacda4
32 changed files with 21 additions and 22 deletions

View file

@ -1,11 +1,11 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from . import DiscoverUM3Action
from .src import DiscoverUM3Action
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
from . import UM3OutputDevicePlugin
from .src import UM3OutputDevicePlugin
def getMetaData():
return {}

View file

@ -16,7 +16,6 @@ Component
id: base
property var lineColor: "#DCDCDC" // TODO: Should be linked to theme.
property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme.
visible: OutputDevice != null
anchors.fill: parent
@ -154,11 +153,11 @@ Component
switch(modelData.type)
{
case "Ultimaker 3":
return "UM3-icon.svg"
return "../svg/UM3-icon.svg"
case "Ultimaker 3 Extended":
return "UM3x-icon.svg"
return "../svg/UM3x-icon.svg"
case "Ultimaker S5":
return "UMs5-icon.svg"
return "../svg/UMs5-icon.svg"
}
}
width: sourceSize.width
@ -563,15 +562,15 @@ Component
switch(modelData.activePrintJob.state)
{
case "paused":
return "paused-icon.svg"
return "../svg/paused-icon.svg"
case "wait_cleanup":
if(modelData.activePrintJob.timeElapsed < modelData.activePrintJob.timeTotal)
{
return "aborted-icon.svg"
return "../svg/aborted-icon.svg"
}
return "approved-icon.svg"
return "../svg/approved-icon.svg"
case "wait_user_action":
return "aborted-icon.svg"
return "../svg/aborted-icon.svg"
default:
return ""
}
@ -599,7 +598,7 @@ Component
height: width
anchors.right: parent.right
anchors.rightMargin: parent.rightMargin
source: "camera-icon.svg"
source: "../svg/camera-icon.svg"
}
MouseArea
{

View file

@ -93,7 +93,7 @@ Item
{
id: statusImage
anchors.centerIn: printJobPreview
source: printJob.state == "error" ? "aborted-icon.svg" : ""
source: printJob.state == "error" ? "../svg/aborted-icon.svg" : ""
visible: source != ""
width: 0.5 * printJobPreview.width
height: 0.5 * printJobPreview.height

View file

@ -166,7 +166,7 @@ Rectangle
height: width
anchors.right: parent.right
anchors.rightMargin: parent.rightMargin
source: "camera-icon.svg"
source: "../svg/camera-icon.svg"
}
}
@ -317,7 +317,7 @@ Rectangle
source: {
if (printer.state == "disabled")
{
return "blocked-icon.svg";
return "../svg/blocked-icon.svg";
}
if (printer.state === "unreachable")
@ -329,11 +329,11 @@ Rectangle
{
if(printJob.state === "queued")
{
return "action-required-icon.svg";
return "../svg/action-required-icon.svg";
}
else if (printJob.state === "wait_cleanup")
{
return "checkmark-icon.svg";
return "../svg/checkmark-icon.svg";
}
}
return ""; // We're not going to show it, so it will not be resolved as a url.

View file

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 847 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 854 B

After

Width:  |  Height:  |  Size: 854 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 842 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 386 B

After

Width:  |  Height:  |  Size: 386 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 844 B

After

Width:  |  Height:  |  Size: 844 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 431 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 311 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 194 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 308 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 684 B

Before After
Before After

View file

@ -62,8 +62,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
self._print_jobs = [] # type: List[PrintJobOutputModel]
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ClusterMonitorItem.qml")
self._control_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ClusterControlItem.qml")
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/ClusterMonitorItem.qml")
self._control_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/ClusterControlItem.qml")
# See comments about this hack with the clusterPrintersChanged signal
self.printersChanged.connect(self.clusterPrintersChanged)
@ -158,7 +158,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
def _spawnPrinterSelectionDialog(self):
if self._printer_selection_dialog is None:
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "PrintWindow.qml")
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/PrintWindow.qml")
self._printer_selection_dialog = CuraApplication.getInstance().createQmlComponent(path, {"OutputDevice": self})
if self._printer_selection_dialog is not None:
self._printer_selection_dialog.show()

View file

@ -24,7 +24,7 @@ class DiscoverUM3Action(MachineAction):
def __init__(self) -> None:
super().__init__("DiscoverUM3Action", catalog.i18nc("@action","Connect via Network"))
self._qml_url = "DiscoverUM3Action.qml"
self._qml_url = "../resources/qml/DiscoverUM3Action.qml"
self._network_plugin = None #type: Optional[UM3OutputDevicePlugin]
@ -174,7 +174,7 @@ class DiscoverUM3Action(MachineAction):
plugin_path = PluginRegistry.getInstance().getPluginPath("UM3NetworkPrinting")
if not plugin_path:
return
path = os.path.join(plugin_path, "UM3InfoComponents.qml")
path = os.path.join(plugin_path, "resources/qml/UM3InfoComponents.qml")
self.__additional_components_view = CuraApplication.getInstance().createQmlComponent(path, {"manager": self})
if not self.__additional_components_view:
Logger.log("w", "Could not create ui components for UM3.")

View file

@ -76,7 +76,7 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
self.setIconName("print")
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "MonitorItem.qml")
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../resources/qml/MonitorItem.qml")
self._output_controller = LegacyUM3PrinterOutputController(self)