Changeset View
Changeset View
Standalone View
Standalone View
src/controls/Action.qml
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | 28 | QtObject { | |||
---|---|---|---|---|---|
142 | */ | 142 | */ | ||
143 | 143 | | |||
144 | /** | 144 | /** | ||
145 | * separator: bool | 145 | * separator: bool | ||
146 | * Whether the action is is a separator action; defaults to false. | 146 | * Whether the action is is a separator action; defaults to false. | ||
147 | */ | 147 | */ | ||
148 | property bool separator: false | 148 | property bool separator: false | ||
149 | 149 | | |||
150 | /** | ||||
151 | * expandible: bool | ||||
152 | * When true, actions in globalDrawers and contextDrawers will become titles displaying te child actions as sub items | ||||
153 | * @since 2.6 | ||||
154 | */ | ||||
155 | property bool expandible: false | ||||
156 | | ||||
157 | property QtObject parent | ||||
158 | | ||||
150 | default property alias children: root.__children | 159 | default property alias children: root.__children | ||
151 | property list<QtObject> __children | 160 | property list<QtObject> __children | ||
161 | onChildrenChanged: { | ||||
162 | for (var i in children) { | ||||
163 | children[i].parent = root | ||||
164 | } | ||||
165 | } | ||||
152 | property Shortcut __shortcut: Shortcut { | 166 | property Shortcut __shortcut: Shortcut { | ||
153 | property bool checked: false | 167 | property bool checked: false | ||
154 | id: shortcutItem | 168 | id: shortcutItem | ||
155 | enabled: root.enabled | 169 | enabled: root.enabled | ||
156 | onActivated: root.trigger(); | 170 | onActivated: root.trigger(); | ||
157 | } | 171 | } | ||
158 | function trigger(source) { | 172 | function trigger(source) { | ||
159 | if (!enabled) { | 173 | if (!enabled) { | ||
Show All 11 Lines |