From 612dad640e2432c8c77f3ce7d77cf7eef7ea104d Mon Sep 17 00:00:00 2001 From: kelteseth Date: Fri, 14 Sep 2018 18:30:57 +0200 Subject: [PATCH] Add DataProtection and make SettingsExpander generic --- ScreenPlay/Resources.qrc | 1 + ScreenPlay/legal/DataProtection.txt | 25 ++++++++++++ ScreenPlay/qml/Settings/Settings.qml | 42 ++++++++++++++++++-- ScreenPlay/qml/Settings/SettingsExpander.qml | 16 +++----- ScreenPlay/src/settings.cpp | 16 ++++++++ ScreenPlay/src/settings.h | 4 +- 6 files changed, 88 insertions(+), 16 deletions(-) create mode 100644 ScreenPlay/legal/DataProtection.txt diff --git a/ScreenPlay/Resources.qrc b/ScreenPlay/Resources.qrc index b14f0361..6a30e257 100644 --- a/ScreenPlay/Resources.qrc +++ b/ScreenPlay/Resources.qrc @@ -116,5 +116,6 @@ legal/OpenSSL.txt legal/Qt LGPLv3.txt qml/Controls/Slider.qml + legal/DataProtection.txt diff --git a/ScreenPlay/legal/DataProtection.txt b/ScreenPlay/legal/DataProtection.txt new file mode 100644 index 00000000..78621f99 --- /dev/null +++ b/ScreenPlay/legal/DataProtection.txt @@ -0,0 +1,25 @@ +Privacy policy for the use of Google Analytics + +This app uses Google Analytics, a web analytics service provided by Google, Inc. "("Google"). Google Analytics uses "cookies", which are text files placed on your computer, to help the website analyze how users use the app. The information generated by the cookie about your use of the app is generally transmitted to and stored by Google on servers in the United States. However, if IP anonymisation is activated on this app, Google will previously shorten your IP address within member states of the European Union or in other signatory states to the Agreement on the European Economic Area. + +Only in exceptional cases is the full IP address transmitted to a Google server in the USA and shortened there. On behalf of the operator of this app, Google will use this information to evaluate your use of the app, compile reports on app activity and provide other services to the app operator in connection with app usage and internet usage. The IP address transmitted by your browser as part of Google Analytics is not combined with other data from Google. + + +Security + +The security of your Personal Information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security. + + +Changes To This Privacy Policy + +This Privacy Policy is effective as of 14.09.2018 and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page. + +We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy. + +If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website. + + + +Contact Us + +If you have any questions about this Privacy Policy, please contact us at contact@screen-play.app diff --git a/ScreenPlay/qml/Settings/Settings.qml b/ScreenPlay/qml/Settings/Settings.qml index 1657f9cb..f0b93084 100644 --- a/ScreenPlay/qml/Settings/Settings.qml +++ b/ScreenPlay/qml/Settings/Settings.qml @@ -345,22 +345,56 @@ Item { } } } - SettingsHorizontalSeperator { - } + SettingsHorizontalSeperator {} SettingsButton { headline: qsTr("Third Party Software") description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ") buttonText: qsTr("Licenses") onButtonPressed: { - expander.toggle() + expanderCopyright.toggle() } } SettingsExpander { - id:expander + id:expanderCopyright anchors { left: parent.left right: parent.right } + + Component.onCompleted: screenPlaySettings.requestAllLicenses() + + Connections { + target: screenPlaySettings + onAllLicenseLoaded: { + expanderCopyright.text = licensesText + } + } + } + + SettingsHorizontalSeperator {} + SettingsButton { + headline: qsTr("Data Protection") + description: qsTr("We use you data very carefully to improve ScreenPlay. We do not sell or share this (anonymous) information with others!") + buttonText: qsTr("Privacy") + onButtonPressed: { + expanderDataProtection.toggle() + } + } + SettingsExpander { + id:expanderDataProtection + anchors { + left: parent.left + right: parent.right + } + + Component.onCompleted: screenPlaySettings.requestAllLDataProtection() + + Connections { + target: screenPlaySettings + onAllDataProtectionLoaded: { + expanderDataProtection.text = dataProtectionText + } + } } } } diff --git a/ScreenPlay/qml/Settings/SettingsExpander.qml b/ScreenPlay/qml/Settings/SettingsExpander.qml index 9bf7ee51..f495e8f9 100644 --- a/ScreenPlay/qml/Settings/SettingsExpander.qml +++ b/ScreenPlay/qml/Settings/SettingsExpander.qml @@ -8,18 +8,11 @@ Rectangle { state: "off" clip: true - Component.onCompleted: screenPlaySettings.requestAllLicenses() - - Connections { - target: screenPlaySettings - onAllLicenseLoaded: { - txtLegal.text = licenses - } - } + property alias text: txtExpander.text Flickable { anchors.fill: parent - contentHeight: txtLegal.paintedHeight + contentHeight: txtExpander.paintedHeight z: 999 focus: true contentWidth: parent.width @@ -28,7 +21,7 @@ Rectangle { policy: ScrollBar.AlwaysOn } Text { - id: txtLegal + id: txtExpander anchors { top: parent.top right: parent.right @@ -37,7 +30,8 @@ Rectangle { } color: "#626262" renderType: Text.NativeRendering - height: txtLegal.paintedHeight + height: txtExpander.paintedHeight + wrapMode: Text.Wrap } } diff --git a/ScreenPlay/src/settings.cpp b/ScreenPlay/src/settings.cpp index dcfc58f1..8efb7fcb 100644 --- a/ScreenPlay/src/settings.cpp +++ b/ScreenPlay/src/settings.cpp @@ -217,6 +217,22 @@ void Settings::requestAllLicenses() }); } +void Settings::requestAllLDataProtection() +{ + QtConcurrent::run([this]() { + QString tmp; + QFile file; + QTextStream out(&file); + + file.setFileName(":/legal/DataProtection.txt"); + file.open(QIODevice::ReadOnly | QIODevice::Text); + tmp += out.readAll(); + file.close(); + + emit this->allDataProtectionLoaded(tmp); + }); +} + void Settings::setMuteAll(bool isMuted) { diff --git a/ScreenPlay/src/settings.h b/ScreenPlay/src/settings.h index 160aac81..586392df 100644 --- a/ScreenPlay/src/settings.h +++ b/ScreenPlay/src/settings.h @@ -136,7 +136,8 @@ signals: void activeWallpaperCounterChanged(int activeWallpaperCounter); void pauseWallpaperWhenIngameChanged(bool pauseWallpaperWhenIngame); void offlineModeChanged(bool offlineMode); - void allLicenseLoaded(QString licenses); + void allLicenseLoaded(QString licensesText); + void allDataProtectionLoaded(QString dataProtectionText); public slots: void setMuteAll(bool isMuted); @@ -146,6 +147,7 @@ public slots: void setGlobalFillMode(QString fillMode); void writeSingleSettingConfig(QString name, QVariant value); void requestAllLicenses(); + void requestAllLDataProtection(); bool autostart() const {