mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Don't hardcode plugin directory
Contributes to CL-1274
This commit is contained in:
parent
cac8c85489
commit
a1e0ddd9df
4 changed files with 13 additions and 10 deletions
|
@ -23,6 +23,7 @@ from cura.PrinterOutputDevice import ConnectionType
|
||||||
|
|
||||||
from .CloudOutputController import CloudOutputController
|
from .CloudOutputController import CloudOutputController
|
||||||
from ..MeshFormatHandler import MeshFormatHandler
|
from ..MeshFormatHandler import MeshFormatHandler
|
||||||
|
from ..UM3OutputDevicePlugin import UM3OutputDevicePlugin
|
||||||
from ..UM3PrintJobOutputModel import UM3PrintJobOutputModel
|
from ..UM3PrintJobOutputModel import UM3PrintJobOutputModel
|
||||||
from .CloudProgressMessage import CloudProgressMessage
|
from .CloudProgressMessage import CloudProgressMessage
|
||||||
from .CloudApiClient import CloudApiClient
|
from .CloudApiClient import CloudApiClient
|
||||||
|
@ -85,8 +86,8 @@ class CloudOutputDevice(NetworkedPrinterOutputDevice):
|
||||||
|
|
||||||
# We use the Cura Connect monitor tab to get most functionality right away.
|
# We use the Cura Connect monitor tab to get most functionality right away.
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getPluginDirectory(),
|
PluginRegistry.getInstance().getPluginPath(UM3OutputDevicePlugin().getPluginId()),
|
||||||
"UM3NetworkPrinting", "resources", "qml", "MonitorStage.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Trigger the printersChanged signal when the private signal is triggered.
|
# Trigger the printersChanged signal when the private signal is triggered.
|
||||||
|
|
|
@ -32,6 +32,7 @@ from .ConfigurationChangeModel import ConfigurationChangeModel
|
||||||
from .MeshFormatHandler import MeshFormatHandler
|
from .MeshFormatHandler import MeshFormatHandler
|
||||||
from .SendMaterialJob import SendMaterialJob
|
from .SendMaterialJob import SendMaterialJob
|
||||||
from .UM3PrintJobOutputModel import UM3PrintJobOutputModel
|
from .UM3PrintJobOutputModel import UM3PrintJobOutputModel
|
||||||
|
from .UM3OutputDevicePlugin import UM3OutputDevicePlugin
|
||||||
|
|
||||||
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply
|
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply
|
||||||
from PyQt5.QtGui import QDesktopServices, QImage
|
from PyQt5.QtGui import QDesktopServices, QImage
|
||||||
|
@ -66,8 +67,8 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
self._received_print_jobs = False # type: bool
|
self._received_print_jobs = False # type: bool
|
||||||
|
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getPluginDirectory(),
|
PluginRegistry.getInstance().getPluginPath(UM3OutputDevicePlugin().getPluginId()),
|
||||||
"UM3NetworkPrinting", "resources", "qml", "MonitorStage.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Trigger the printersChanged signal when the private signal is triggered
|
# Trigger the printersChanged signal when the private signal is triggered
|
||||||
|
|
|
@ -23,6 +23,7 @@ from PyQt5.QtCore import QTimer, QUrl
|
||||||
from PyQt5.QtWidgets import QMessageBox
|
from PyQt5.QtWidgets import QMessageBox
|
||||||
|
|
||||||
from .LegacyUM3PrinterOutputController import LegacyUM3PrinterOutputController
|
from .LegacyUM3PrinterOutputController import LegacyUM3PrinterOutputController
|
||||||
|
from .UM3OutputDevicePlugin import UM3OutputDevicePlugin
|
||||||
|
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
|
@ -78,8 +79,8 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
|
||||||
self.setIconName("print")
|
self.setIconName("print")
|
||||||
|
|
||||||
self._monitor_view_qml_path = os.path.join(
|
self._monitor_view_qml_path = os.path.join(
|
||||||
PluginRegistry.getPluginDirectory(),
|
PluginRegistry.getInstance().getPluginPath(UM3OutputDevicePlugin().getPluginId()),
|
||||||
"UM3NetworkPrinting", "resources", "qml", "MonitorItem.qml"
|
"resources", "qml", "MonitorStage.qml"
|
||||||
)
|
)
|
||||||
|
|
||||||
self._output_controller = LegacyUM3PrinterOutputController(self)
|
self._output_controller = LegacyUM3PrinterOutputController(self)
|
||||||
|
|
|
@ -458,8 +458,8 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
text = i18n_catalog.i18nc("@info:status", "Send and monitor print jobs from anywhere using your Ultimaker account."),
|
text = i18n_catalog.i18nc("@info:status", "Send and monitor print jobs from anywhere using your Ultimaker account."),
|
||||||
lifetime = 0,
|
lifetime = 0,
|
||||||
image_source = QUrl.fromLocalFile(os.path.join(
|
image_source = QUrl.fromLocalFile(os.path.join(
|
||||||
PluginRegistry.getPluginDirectory(),
|
PluginRegistry.getInstance().getPluginPath(self.getPluginId()),
|
||||||
"UM3NetworkPrinting", "resources", "svg", "cloud-flow-start.svg"
|
"resources", "svg", "cloud-flow-start.svg"
|
||||||
)),
|
)),
|
||||||
image_caption = i18n_catalog.i18nc("@info:status", "Connect to Ultimaker Cloud"),
|
image_caption = i18n_catalog.i18nc("@info:status", "Connect to Ultimaker Cloud"),
|
||||||
option_text = i18n_catalog.i18nc("@action", "Don't ask me again for this printer."),
|
option_text = i18n_catalog.i18nc("@action", "Don't ask me again for this printer."),
|
||||||
|
@ -482,8 +482,8 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||||
text = i18n_catalog.i18nc("@info:status", "You can now send and monitor print jobs from anywhere using your Ultimaker account."),
|
text = i18n_catalog.i18nc("@info:status", "You can now send and monitor print jobs from anywhere using your Ultimaker account."),
|
||||||
lifetime = 30,
|
lifetime = 30,
|
||||||
image_source = QUrl.fromLocalFile(os.path.join(
|
image_source = QUrl.fromLocalFile(os.path.join(
|
||||||
PluginRegistry.getPluginDirectory(),
|
PluginRegistry.getInstance().getPluginPath(self.getPluginId()),
|
||||||
"UM3NetworkPrinting", "resources", "svg", "cloud-flow-completed.svg"
|
"resources", "svg", "cloud-flow-completed.svg"
|
||||||
)),
|
)),
|
||||||
image_caption = i18n_catalog.i18nc("@info:status", "Connected!")
|
image_caption = i18n_catalog.i18nc("@info:status", "Connected!")
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue