Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwineffects/package/contents/ui/Effect.qml
Show All 33 Lines | 32 | RowLayout { | |||
---|---|---|---|---|---|
34 | 34 | | |||
35 | x: spacing | 35 | x: spacing | ||
36 | width: parent.width - 2 * spacing | 36 | width: parent.width - 2 * spacing | ||
37 | 37 | | |||
38 | QtControls.RadioButton { | 38 | QtControls.RadioButton { | ||
39 | property bool _exclusive: model.ExclusiveRole != "" | 39 | property bool _exclusive: model.ExclusiveRole != "" | ||
40 | property bool _toggled: false | 40 | property bool _toggled: false | ||
41 | 41 | | |||
42 | checked: model.EffectStatusRole | 42 | checked: model.StatusRole | ||
43 | visible: _exclusive | 43 | visible: _exclusive | ||
44 | QtControls.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null | 44 | QtControls.ButtonGroup.group: _exclusive ? effectsList.findButtonGroup(model.ExclusiveRole) : null | ||
45 | 45 | | |||
46 | onToggled: { | 46 | onToggled: { | ||
47 | model.EffectStatusRole = checked ? Qt.Checked : Qt.Unchecked; | 47 | model.StatusRole = checked ? Qt.Checked : Qt.Unchecked; | ||
48 | _toggled = true; | 48 | _toggled = true; | ||
49 | } | 49 | } | ||
50 | onClicked: { | 50 | onClicked: { | ||
51 | // Uncheck the radio button if it's clicked. | 51 | // Uncheck the radio button if it's clicked. | ||
52 | if (checked && !_toggled) { | 52 | if (checked && !_toggled) { | ||
53 | model.EffectStatusRole = Qt.Unchecked; | 53 | model.StatusRole = Qt.Unchecked; | ||
54 | } | 54 | } | ||
55 | _toggled = false; | 55 | _toggled = false; | ||
56 | } | 56 | } | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | QtControls.CheckBox { | 59 | QtControls.CheckBox { | ||
60 | checkState: model.EffectStatusRole | 60 | checkState: model.StatusRole | ||
61 | visible: model.ExclusiveRole == "" | 61 | visible: model.ExclusiveRole == "" | ||
62 | 62 | | |||
63 | onToggled: model.EffectStatusRole = checkState | 63 | onToggled: model.StatusRole = checkState | ||
64 | } | 64 | } | ||
65 | 65 | | |||
66 | ColumnLayout { | 66 | ColumnLayout { | ||
67 | QtControls.Label { | 67 | QtControls.Label { | ||
68 | Layout.fillWidth: true | 68 | Layout.fillWidth: true | ||
69 | 69 | | |||
70 | font.weight: Font.Bold | 70 | font.weight: Font.Bold | ||
71 | text: model.NameRole | 71 | text: model.NameRole | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
114 | QtControls.Button { | 114 | QtControls.Button { | ||
115 | icon.name: "video" | 115 | icon.name: "video" | ||
116 | visible: model.VideoRole.toString() !== "" | 116 | visible: model.VideoRole.toString() !== "" | ||
117 | 117 | | |||
118 | onClicked: videoItem.showHide() | 118 | onClicked: videoItem.showHide() | ||
119 | } | 119 | } | ||
120 | 120 | | |||
121 | QtControls.Button { | 121 | QtControls.Button { | ||
122 | enabled: model.EffectStatusRole != Qt.Unchecked | 122 | enabled: model.StatusRole != Qt.Unchecked | ||
123 | icon.name: "configure" | 123 | icon.name: "configure" | ||
124 | visible: model.ConfigurableRole | 124 | visible: model.ConfigurableRole | ||
125 | 125 | | |||
126 | onClicked: kcm.configure(model.ServiceNameRole, this) | 126 | onClicked: kcm.configure(model.ServiceNameRole, this) | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | QtControls.Button { | 129 | QtControls.Button { | ||
130 | icon.name: "dialog-information" | 130 | icon.name: "dialog-information" | ||
Show All 12 Lines |