Changeset View
Changeset View
Standalone View
Standalone View
kcms/feedback/package/contents/ui/main.qml
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 70 | QQC2.Slider { | |||
---|---|---|---|---|---|
84 | function findIndex(array, what) { | 84 | function findIndex(array, what) { | ||
85 | for (var v in array) { | 85 | for (var v in array) { | ||
86 | if (array[v] == what) | 86 | if (array[v] == what) | ||
87 | return v; | 87 | return v; | ||
88 | } | 88 | } | ||
89 | return null; | 89 | return null; | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | Component.onCompleted: { | 92 | Connections { | ||
93 | var idx = findIndex(modeOptions, kcm.plasmaFeedbackLevel) | 93 | target: kcm | ||
94 | value = idx===null ? 2 : modeOptions[idx] | 94 | onPlasmaFeedbackLevelChanged: { | ||
95 | statisticsModeSlider.value = statisticsModeSlider.findIndex(statisticsModeSlider.modeOptions, kcm.plasmaFeedbackLevel) | ||||
96 | } | ||||
95 | } | 97 | } | ||
96 | 98 | | |||
97 | onMoved: { | 99 | onMoved: { | ||
98 | kcm.plasmaFeedbackLevel = modeOptions[value] | 100 | kcm.plasmaFeedbackLevel = modeOptions[value] | ||
99 | } | 101 | } | ||
100 | } | 102 | } | ||
101 | 103 | | |||
102 | UserFeedback.FeedbackConfigUiController { | 104 | UserFeedback.FeedbackConfigUiController { | ||
Show All 26 Lines |