mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 15:25:09 -06:00
Add the digital factory button
CURA-7418
This commit is contained in:
parent
200e3d6ee7
commit
a7e7ddf4b5
4 changed files with 84 additions and 42 deletions
|
@ -261,6 +261,10 @@ class CuraApplication(QtApplication):
|
|||
def ultimakerCloudAccountRootUrl(self) -> str:
|
||||
return UltimakerCloudAuthentication.CuraCloudAccountAPIRoot
|
||||
|
||||
@pyqtProperty(str, constant=True)
|
||||
def ultimakerDigitalFactoryUrl(self) -> str:
|
||||
return UltimakerCloudAuthentication.CuraDigitalFactoryURL
|
||||
|
||||
def addCommandLineOptions(self):
|
||||
"""Adds command line options to the command line parser.
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
DEFAULT_CLOUD_API_ROOT = "https://api.ultimaker.com" # type: str
|
||||
DEFAULT_CLOUD_API_VERSION = "1" # type: str
|
||||
DEFAULT_CLOUD_ACCOUNT_API_ROOT = "https://account.ultimaker.com" # type: str
|
||||
DEFAULT_DIGITAL_FACTORY_URL = "https://digitalfactory.ultimaker.com" # type: str
|
||||
|
||||
try:
|
||||
from cura.CuraVersion import CuraCloudAPIRoot # type: ignore
|
||||
|
@ -28,3 +29,10 @@ try:
|
|||
CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT
|
||||
except ImportError:
|
||||
CuraCloudAccountAPIRoot = DEFAULT_CLOUD_ACCOUNT_API_ROOT
|
||||
|
||||
try:
|
||||
from cura.CuraVersion import CuraDigitalFactoryURL
|
||||
if CuraDigitalFactoryURL == "":
|
||||
CuraDigitalFactoryURL = DEFAULT_DIGITAL_FACTORY_URL
|
||||
except ImportError:
|
||||
CuraDigitalFactoryURL = DEFAULT_DIGITAL_FACTORY_URL
|
Loading…
Add table
Add a link
Reference in a new issue