Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura/CuraApplication.py')
-rwxr-xr-xcura/CuraApplication.py19
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):