2019-08-16 01:29:22 +10:00
|
|
|
import QtQuick 2.12
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick.Layouts 1.12
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../Base"
|
2019-03-26 09:29:46 +11:00
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HRowLayout {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: toolBar
|
2019-03-26 09:29:46 +11:00
|
|
|
|
2019-07-03 03:59:52 +10:00
|
|
|
property alias roomFilter: filterField.text
|
|
|
|
|
2019-04-29 02:08:54 +10:00
|
|
|
Layout.fillWidth: true
|
2019-07-16 19:13:19 +10:00
|
|
|
Layout.preferredHeight: theme.baseElementsHeight
|
2019-03-26 09:29:46 +11:00
|
|
|
|
2019-07-11 05:03:05 +10:00
|
|
|
HUIButton {
|
2019-07-19 14:22:31 +10:00
|
|
|
iconName: "add-account"
|
2019-07-07 07:50:55 +10:00
|
|
|
backgroundColor: theme.sidePane.settingsButton.background
|
2019-07-07 07:29:32 +10:00
|
|
|
Layout.preferredHeight: parent.height
|
2019-07-19 14:22:31 +10:00
|
|
|
|
|
|
|
onClicked: pageStack.showPage("SignIn")
|
2019-04-29 05:13:18 +10:00
|
|
|
}
|
2019-03-26 09:29:46 +11:00
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HTextField {
|
2019-03-26 09:29:46 +11:00
|
|
|
id: filterField
|
|
|
|
placeholderText: qsTr("Filter rooms")
|
2019-07-07 07:50:55 +10:00
|
|
|
backgroundColor: theme.sidePane.filterRooms.background
|
2019-07-19 10:39:13 +10:00
|
|
|
bordered: false
|
2019-04-29 02:08:54 +10:00
|
|
|
|
2019-03-26 09:29:46 +11:00
|
|
|
Layout.fillWidth: true
|
2019-05-13 05:57:18 +10:00
|
|
|
Layout.preferredHeight: parent.height
|
2019-08-16 01:29:22 +10:00
|
|
|
|
|
|
|
onTextChanged: {
|
|
|
|
if (window.uiState.sidePaneFilter == text) return
|
|
|
|
window.uiState.sidePaneFilter = text
|
|
|
|
window.uiStateChanged()
|
|
|
|
}
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: window
|
2019-08-16 01:31:24 +10:00
|
|
|
// Keep multiple instances of PaneToolBar in sync.
|
|
|
|
// This also sets the text on startup.
|
2019-08-16 01:29:22 +10:00
|
|
|
onUiStateChanged: filterField.text = uiState.sidePaneFilter
|
|
|
|
}
|
|
|
|
|
2019-03-26 09:29:46 +11:00
|
|
|
}
|
|
|
|
}
|