def __init__(self, app: CuraApplication) -> None: if self.__instance is not None: raise RuntimeError("This is a Singleton. use getInstance()") self._scope = UltimakerCloudScope(app) # type: UltimakerCloudScope app.getPackageManager().packageInstalled.connect( self._onPackageInstalled)
def __init__(self, app: CuraApplication) -> None: super().__init__() # Differentiate This PluginObject from the Toolbox. self.getId() includes _name. # getPluginId() will return the same value for The toolbox extension and this one self._name = "SyncOrchestrator" self._package_manager = app.getPackageManager() self._cloud_package_manager = CloudPackageManager(app) self._checker = CloudPackageChecker(app) # type: CloudPackageChecker self._checker.discrepancies.connect(self._onDiscrepancies) self._discrepancies_presenter = DiscrepanciesPresenter( app) # type: DiscrepanciesPresenter self._discrepancies_presenter.packageMutations.connect( self._onPackageMutations) self._download_presenter = DownloadPresenter( app) # type: DownloadPresenter self._license_presenter = LicensePresenter( app) # type: LicensePresenter self._license_presenter.licenseAnswers.connect(self._onLicenseAnswers) self._restart_presenter = RestartApplicationPresenter(app)
def __init__(self, app: CuraApplication) -> None: super().__init__() self._dialog = None # type: Optional[QObject] self._package_manager = app.getPackageManager() # type: PackageManager # Emits List[Dict[str, [Any]] containing for example # [{ "package_id": "BarbarianPlugin", "package_path" : "/tmp/dg345as", "accepted" : True }] self.licenseAnswers = Signal() self._current_package_idx = 0 self._package_models = [] # type: List[Dict] self._license_model = LicenseModel() # type: LicenseModel self._app = app self._compatibility_dialog_path = "resources/qml/dialogs/ToolboxLicenseDialog.qml"
def __init__(self, app: CuraApplication) -> None: super().__init__() self._presented = False """Whether present() has been called and state is expected to be initialized""" self._catalog = i18nCatalog("cura") self._dialog = None # type: Optional[QObject] self._package_manager = app.getPackageManager() # type: PackageManager # Emits List[Dict[str, [Any]] containing for example # [{ "package_id": "BarbarianPlugin", "package_path" : "/tmp/dg345as", "accepted" : True }] self.licenseAnswers = Signal() self._current_package_idx = 0 self._package_models = [] # type: List[Dict] decline_button_text = self._catalog.i18nc( "@button", "Decline and remove from account") self._license_model = LicenseModel( decline_button_text=decline_button_text) # type: LicenseModel self._page_count = 0 self._app = app self._compatibility_dialog_path = "resources/qml/dialogs/ToolboxLicenseDialog.qml"