This repository has been archived on 2021-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
ui/qml/panes/OverlayPane.qml

88 lines
2.1 KiB
QML
Raw Normal View History

2019-01-26 22:54:08 +00:00
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import "../opaque" as Opaque
import "../opaque/styles"
2019-01-26 22:54:08 +00:00
import "../overlays"
import "../opaque/fonts"
import "../opaque/theme"
2019-01-26 22:54:08 +00:00
ColumnLayout {
Layout.fillWidth: true
id: overlay
property string name
property bool accepted
property bool inGroup
2020-11-24 00:36:50 +00:00
Opaque.TabBar {
id: tabBar
Layout.fillWidth: true
2020-11-23 23:50:16 +00:00
model: [qsTr("chat-btn"), qsTr("lists-btn"), qsTr("bulletins-btn")]
2020-11-24 22:48:29 +00:00
onCurrentIndexChanged: overlayStack.overlay = currentIndex
2020-11-23 23:50:16 +00:00
}
2019-01-26 22:54:08 +00:00
StackLayout {
id: overlayStack
Layout.fillWidth: true
2020-12-03 02:10:52 +00:00
width: parent.width
2019-03-05 22:02:29 +00:00
implicitHeight: height
2019-01-26 22:54:08 +00:00
currentIndex: 0
property alias overlay: overlayStack.currentIndex
readonly property int chatOverlay: 0
readonly property int listOverlay: 1
readonly property int bulletinOverlay: 2
readonly property int membershipOverlay: 3
2019-01-26 22:54:08 +00:00
2019-03-05 22:02:29 +00:00
ChatOverlay { //0
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}
2019-01-26 22:54:08 +00:00
2019-03-05 22:02:29 +00:00
ListOverlay{ //1
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}
2019-01-26 22:54:08 +00:00
2019-03-05 22:02:29 +00:00
BulletinOverlay{ //2
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
}
2019-01-26 22:54:08 +00:00
MembershipOverlay { //3
Layout.maximumHeight: overlayStack.height
Layout.maximumWidth: overlayStack.width
2019-03-06 19:38:08 +00:00
}
2019-01-26 22:54:08 +00:00
}
2019-03-05 22:02:29 +00:00
Connections {
target: gcd
onResetMessagePane: function() {
2020-11-24 00:36:50 +00:00
tabBar.currentIndex = 0
overlay.inGroup = false
}
2019-03-05 22:02:29 +00:00
onSupplyGroupSettings: function(gid, name, server, invite, accepted, addrbooknames, addrbookaddrs) {
overlay.name = name
overlay.accepted = accepted
overlay.inGroup = true
2019-03-05 22:02:29 +00:00
}
2020-09-21 21:31:45 +00:00
onSupplyServerSettings: function(server) {
overlay.name = server
}
2019-03-05 22:02:29 +00:00
}
}