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