mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Support for manual device addition for plugins (WIP). [CURA-6294]
This commit is contained in:
parent
48cc9b3c1d
commit
7a7e710b2a
3 changed files with 11 additions and 3 deletions
|
@ -7,6 +7,7 @@ from PyQt5.QtCore import QUrl, Qt
|
|||
|
||||
from UM.Qt.ListModel import ListModel
|
||||
from UM.Resources import Resources
|
||||
from logging import Logger
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from PyQt5.QtCore import QObject
|
||||
|
@ -17,6 +18,7 @@ class WelcomePagesModel(ListModel):
|
|||
PageUrlRole = Qt.UserRole + 2 # URL to the page's QML file
|
||||
NextPageIdRole = Qt.UserRole + 3 # The next page ID it should go to
|
||||
|
||||
|
||||
def __init__(self, parent: Optional["QObject"] = None) -> None:
|
||||
super().__init__(parent)
|
||||
|
||||
|
@ -28,6 +30,7 @@ class WelcomePagesModel(ListModel):
|
|||
|
||||
def initialize(self) -> None:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
|
||||
# Add default welcome pages
|
||||
self._pages.append({"id": "welcome",
|
||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||
|
@ -51,9 +54,7 @@ class WelcomePagesModel(ListModel):
|
|||
})
|
||||
self._pages.append({"id": "add_printer_by_ip",
|
||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||
os.path.join("WelcomePages",
|
||||
"AddPrinterByIpContent.qml"))),
|
||||
})
|
||||
os.path.join("WelcomePages", "AddPrinterByIpContent.qml")))})
|
||||
self._pages.append({"id": "cloud",
|
||||
"page_url": QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
|
||||
os.path.join("WelcomePages",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue