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 All 40 Lines | |||||
112 | QtControls.Button { | 112 | QtControls.Button { | ||
113 | icon.name: "video" | 113 | icon.name: "video" | ||
114 | visible: model.VideoRole.toString() !== "" | 114 | visible: model.VideoRole.toString() !== "" | ||
115 | 115 | | |||
116 | onClicked: videoItem.showHide() | 116 | onClicked: videoItem.showHide() | ||
117 | } | 117 | } | ||
118 | 118 | | |||
119 | QtControls.Button { | 119 | QtControls.Button { | ||
120 | enabled: model.EffectStatusRole != Qt.Unchecked | 120 | enabled: model.StatusRole != Qt.Unchecked | ||
121 | icon.name: "configure" | 121 | icon.name: "configure" | ||
122 | visible: model.ConfigurableRole | 122 | visible: model.ConfigurableRole | ||
123 | 123 | | |||
124 | onClicked: kcm.configure(model.ServiceNameRole, this) | 124 | onClicked: kcm.configure(model.ServiceNameRole, this) | ||
125 | } | 125 | } | ||
126 | 126 | | |||
127 | QtControls.Button { | 127 | QtControls.Button { | ||
128 | icon.name: "dialog-information" | 128 | icon.name: "dialog-information" | ||
Show All 12 Lines |