Changeset View
Changeset View
Standalone View
Standalone View
kcms/feedback/package/contents/ui/main.qml
Show All 26 Lines | |||||
27 | 27 | | |||
28 | SimpleKCM { | 28 | SimpleKCM { | ||
29 | id: root | 29 | id: root | ||
30 | 30 | | |||
31 | ConfigModule.buttons: ConfigModule.Defaults | ConfigModule.Apply | 31 | ConfigModule.buttons: ConfigModule.Defaults | ConfigModule.Apply | ||
32 | leftPadding: width * 0.1 | 32 | leftPadding: width * 0.1 | ||
33 | rightPadding: leftPadding | 33 | rightPadding: leftPadding | ||
34 | 34 | | |||
35 | | ||||
35 | ColumnLayout { | 36 | ColumnLayout { | ||
37 | Kirigami.InlineMessage { | ||||
38 | id: infoLabel | ||||
39 | Layout.fillWidth: true | ||||
36 | 40 | | |||
37 | QQC2.CheckBox { | 41 | type: Kirigami.MessageType.Error | ||
38 | Layout.topMargin: Kirigami.Units.gridUnit | 42 | visible: !form.enabled | ||
39 | Layout.bottomMargin: Kirigami.Units.gridUnit | 43 | text: i18n("User Feedback has been disabled centrally. Please contact your distributor.") | ||
davidedmundson: warning? It's not really an error exactly if it's configured. | |||||
40 | Layout.alignment: Qt.AlignHCenter | | |||
41 | checked: kcm.feedbackEnabled | | |||
42 | onToggled: kcm.feedbackEnabled = checked | | |||
43 | text: i18n("Allow KDE software to collect anonymous usage information") | | |||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | QQC2.Label { | 46 | QQC2.Label { | ||
47 | Kirigami.FormData.label: i18n("Plasma:") | 47 | Kirigami.FormData.label: i18n("Plasma:") | ||
48 | Layout.alignment: Qt.AlignHCenter | 48 | Layout.alignment: Qt.AlignHCenter | ||
49 | Layout.fillWidth: true | 49 | Layout.fillWidth: true | ||
50 | wrapMode: Text.WordWrap | 50 | wrapMode: Text.WordWrap | ||
51 | text: xi18nc("@info", "You can help us improve this software by sharing information about how you use it. This allows us to focus on things that matter to you.<nl/><nl/>Contributing usage information is optional and entirely anonymous. It will not associate the data with any kind of unique identifier, and will never track the documents you open, the websites you visit, or any other kind of personal information.<nl/><nl/>You can read more about our policy in the following link:") | 51 | text: xi18nc("@info", "You can read about our policy in the following link:") | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | Kirigami.UrlButton { | 54 | Kirigami.UrlButton { | ||
55 | Layout.alignment: Qt.AlignHCenter | 55 | Layout.alignment: Qt.AlignHCenter | ||
56 | url: "https://kde.org/privacypolicy-apps.php" | 56 | url: "https://kde.org/privacypolicy-apps.php" | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | Kirigami.Separator { | 59 | Kirigami.Separator { | ||
60 | Layout.fillWidth: true | 60 | Layout.fillWidth: true | ||
61 | Layout.topMargin: Kirigami.Units.gridUnit | 61 | Layout.topMargin: Kirigami.Units.gridUnit | ||
62 | Layout.bottomMargin: Kirigami.Units.gridUnit | 62 | Layout.bottomMargin: Kirigami.Units.gridUnit | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | Kirigami.FormLayout { | 65 | Kirigami.FormLayout { | ||
66 | id: form | ||||
67 | enabled: kcm.feedbackEnabled | ||||
66 | QQC2.Slider { | 68 | QQC2.Slider { | ||
67 | id: statisticsModeSlider | 69 | id: statisticsModeSlider | ||
68 | Kirigami.FormData.label: i18n("Plasma:") | 70 | Kirigami.FormData.label: i18n("Plasma:") | ||
69 | enabled: kcm.feedbackEnabled | 71 | enabled: kcm.feedbackEnabled | ||
70 | Layout.fillWidth: true | 72 | Layout.fillWidth: true | ||
71 | 73 | | |||
72 | readonly property var modeOptions: [UserFeedback.Provider.NoTelemetry, UserFeedback.Provider.BasicSystemInformation, UserFeedback.Provider.BasicUsageStatistics, | 74 | readonly property var modeOptions: [UserFeedback.Provider.NoTelemetry, UserFeedback.Provider.BasicSystemInformation, UserFeedback.Provider.BasicUsageStatistics, | ||
73 | UserFeedback.Provider.DetailedSystemInformation, UserFeedback.Provider.DetailedUsageStatistics] | 75 | UserFeedback.Provider.DetailedSystemInformation, UserFeedback.Provider.DetailedUsageStatistics] | ||
Show All 28 Lines | |||||
102 | Kirigami.Heading { | 104 | Kirigami.Heading { | ||
103 | Layout.alignment: Qt.AlignHCenter | 105 | Layout.alignment: Qt.AlignHCenter | ||
104 | Layout.maximumWidth: root.width * 0.5 | 106 | Layout.maximumWidth: root.width * 0.5 | ||
105 | wrapMode: Text.WordWrap | 107 | wrapMode: Text.WordWrap | ||
106 | level: 3 | 108 | level: 3 | ||
107 | text: feedbackController.telemetryName(statisticsModeSlider.modeOptions[statisticsModeSlider.value]) | 109 | text: feedbackController.telemetryName(statisticsModeSlider.modeOptions[statisticsModeSlider.value]) | ||
108 | } | 110 | } | ||
109 | QQC2.Label { | 111 | QQC2.Label { | ||
110 | Layout.alignment: Qt.AlignHCenter | 112 | Layout.alignment: Qt.AlignHCenter | ||
Option to consider with regards to Nate's comment: enabled: slider.value > 0 so it greys out really showing it's disabled, but still has the useful text. davidedmundson: Option to consider with regards to Nate's comment:
enabled: slider.value > 0
so it greys out… | |||||
111 | Layout.maximumWidth: root.width * 0.5 | 113 | Layout.maximumWidth: root.width * 0.5 | ||
112 | wrapMode: Text.WordWrap | 114 | wrapMode: Text.WordWrap | ||
113 | text: feedbackController.telemetryDescription(statisticsModeSlider.modeOptions[statisticsModeSlider.value]) | 115 | text: feedbackController.telemetryDescription(statisticsModeSlider.modeOptions[statisticsModeSlider.value]) | ||
114 | } | 116 | } | ||
davidedmundson: I don't understand this top line | |||||
Yeah... feedbackController.telemetryDescription() function depends on applicationName, but since it's a function we don't have a way to notify the text changes. Maybe we could look into improving the API upstream, but it's the only reliable way I found to do this as is. apol: Yeah... feedbackController.telemetryDescription() function depends on applicationName, but… | |||||
115 | } | 117 | } | ||
116 | } | 118 | } | ||
117 | } | 119 | } | ||
118 | 120 | |
warning? It's not really an error exactly if it's configured.