2019-11-07 09:50:59 -04:00
|
|
|
import QtQuick 2.12
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import "../../Base"
|
|
|
|
|
|
|
|
HPage {
|
2019-11-07 11:08:47 -04:00
|
|
|
id: addChatPage
|
2019-11-07 09:50:59 -04:00
|
|
|
onFocusChanged: createRoom.forceActiveFocus()
|
|
|
|
|
2019-11-07 11:08:47 -04:00
|
|
|
|
|
|
|
property string userId
|
|
|
|
|
|
|
|
|
2019-11-07 10:41:10 -04:00
|
|
|
HColumnLayout {
|
2019-11-07 09:50:59 -04:00
|
|
|
Layout.alignment: Qt.AlignCenter
|
2019-11-07 10:41:10 -04:00
|
|
|
Layout.minimumWidth: Layout.maximumWidth
|
|
|
|
Layout.maximumWidth:
|
2019-11-07 11:08:47 -04:00
|
|
|
Math.max(tabBar.contentWidth, swipeView.contentWidth)
|
2019-11-07 09:50:59 -04:00
|
|
|
|
|
|
|
TabBar {
|
|
|
|
id: tabBar
|
|
|
|
position: TabBar.Header
|
|
|
|
currentIndex: 1
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: [
|
|
|
|
qsTr("Find someone"),
|
|
|
|
qsTr("Create room"),
|
|
|
|
qsTr("Join room"),
|
|
|
|
]
|
|
|
|
|
2019-11-07 10:41:10 -04:00
|
|
|
HTabButton {
|
2019-11-07 09:50:59 -04:00
|
|
|
text: modelData
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SwipeView {
|
2019-11-07 10:41:10 -04:00
|
|
|
id: swipeView
|
2019-11-07 09:50:59 -04:00
|
|
|
clip: true
|
|
|
|
currentIndex: tabBar.currentIndex
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
Item {}
|
|
|
|
|
|
|
|
CreateRoom {
|
|
|
|
id: createRoom
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|