43
44
property bool externalKeyboardPresent: keyboardsModel.count > 0
45
property var pluginOptions
48
onCurrentPageChanged: {
49
// If we are called with subpage=foo, push foo on the stack.
51
// We need to wait until the PageComponent has been pushed to the stack
52
// before pushing the subpages, otherwise they will be pushed below the
54
if (pageStack.currentPage === root) {
55
if (pluginOptions && pluginOptions['subpage']) {
56
switch (pluginOptions['subpage']) {
57
case 'hw-keyboard-layouts':
58
pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
59
plugin: hwKeyboardPlugin,
60
currentLayoutsDraggable: true
66
// Once done, disable this Connections, so that if the user navigates
67
// back to the root we won't push the subpages again
47
if (pluginOptions && pluginOptions['subpage']) {
48
switch (pluginOptions['subpage']) {
49
case 'hw-keyboard-layouts':
50
pageStack.addPageToNextColumn(
51
root, Qt.resolvedUrl('KeyboardLayouts.qml'), {
52
plugin: hwKeyboardPlugin,
53
currentLayoutsDraggable: true
159
147
value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ?
160
148
oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] :
161
149
oskPlugin.keyboardLayoutsModel.subset.length
162
onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
150
onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("KeyboardLayouts.qml"), {
163
151
plugin: oskPlugin
168
156
text: i18n.tr("External keyboard")
169
157
progression: true
170
158
showDivider: false
171
onClicked: pageStack.push(Qt.resolvedUrl("PageHardwareKeyboard.qml"))
159
onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PageHardwareKeyboard.qml"))
172
160
visible: externalKeyboardPresent || showAllUI