Merge pull request #2697 from Ultimaker/feature_add_user_agreement

Feature add user agreement
This commit is contained in:
Lipu Fei 2017-10-30 14:50:52 +01:00 committed by GitHub
commit e6e61e9a3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 166 additions and 1 deletions

View file

@ -215,6 +215,7 @@ class CuraApplication(QtApplication):
self.setRequiredPlugins([
"CuraEngineBackend",
"UserAgreement",
"SolidView",
"LayerView",
"STLReader",
@ -304,6 +305,8 @@ class CuraApplication(QtApplication):
preferences.addPreference("view/invert_zoom", False)
self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement")
for key in [
"dialog_load_path", # dialog_save_path is in LocalFileOutputDevicePlugin
"dialog_profile_path",
@ -376,6 +379,14 @@ class CuraApplication(QtApplication):
def _onEngineCreated(self):
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
@pyqtProperty(bool)
def needToShowUserAgreement(self):
return self._need_to_show_user_agreement
def setNeedToShowUserAgreement(self, set_value = True):
self._need_to_show_user_agreement = set_value
## The "Quit" button click event handler.
@pyqtSlot()
def closeApplication(self):