diff options
Diffstat (limited to 'cura/CuraApplication.py')
-rwxr-xr-x | cura/CuraApplication.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 4a54f5b0ba..96d8ced7a6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -300,6 +300,9 @@ class CuraApplication(QtApplication): preferences.addPreference("view/invert_zoom", False) + self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement") + self._has_user_agreement_shown = False + for key in [ "dialog_load_path", # dialog_save_path is in LocalFileOutputDevicePlugin "dialog_profile_path", @@ -372,6 +375,22 @@ class CuraApplication(QtApplication): def _onEngineCreated(self): self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider()) + onHasUserAgreementShownChanged = pyqtSignal() + + @pyqtProperty(bool) + def needToShowUserAgreement(self): + return self._need_to_show_user_agreement + + @pyqtProperty(bool, notify = onHasUserAgreementShownChanged) + def hasUserAgreementShown(self): + return self._has_user_agreement_shown + + def setHasShownUserAgreement(self, shown = True): + emit_signal = self._has_user_agreement_shown != shown + self._has_user_agreement_shown = shown + if emit_signal: + self.onHasUserAgreementShownChanged.emit() + ## The "Quit" button click event handler. @pyqtSlot() def closeApplication(self): |