2020-03-28 22:18:00 +11:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
|
|
|
|
import QtQuick 2.12
|
|
|
|
import "../Base"
|
|
|
|
|
|
|
|
HQtObject {
|
2020-03-29 03:31:42 +11:00
|
|
|
id: root
|
|
|
|
|
2020-03-28 22:18:00 +11:00
|
|
|
property Item container: parent
|
2020-06-25 22:32:08 +10:00
|
|
|
property bool active: container.count > 1
|
2020-03-28 22:18:00 +11:00
|
|
|
|
|
|
|
|
|
|
|
HShortcut {
|
2020-04-01 23:01:13 +11:00
|
|
|
active: root.active
|
2020-03-28 22:18:00 +11:00
|
|
|
sequences: window.settings.keys.previousTab
|
|
|
|
onActivated: container.setCurrentIndex(
|
|
|
|
utils.numberWrapAt(container.currentIndex - 1, container.count),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
HShortcut {
|
2020-04-01 23:01:13 +11:00
|
|
|
active: root.active
|
2020-03-28 22:18:00 +11:00
|
|
|
sequences: window.settings.keys.nextTab
|
|
|
|
onActivated: container.setCurrentIndex(
|
|
|
|
utils.numberWrapAt(container.currentIndex + 1, container.count),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|