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
|
|
|
|
|
2020-05-20 20:49:00 +00:00
|
|
|
import "../opaque" as Opaque
|
2020-05-20 00:03:08 +00:00
|
|
|
import "../opaque/styles"
|
2019-01-26 22:54:08 +00:00
|
|
|
import "../overlays"
|
2020-08-24 22:01:00 +00:00
|
|
|
import "../opaque/fonts"
|
|
|
|
import "../opaque/theme"
|
|
|
|
|
2019-01-26 22:54:08 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
2020-04-27 21:55:10 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
id: overlay
|
2020-08-24 22:01:00 +00:00
|
|
|
|
2020-04-27 21:55:10 +00:00
|
|
|
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-04-27 21:55:10 +00:00
|
|
|
|
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
|
2020-08-24 22:01:00 +00:00
|
|
|
Layout.fillWidth: true
|
2020-12-03 02:10:52 +00:00
|
|
|
width: parent.width
|
2020-08-24 22:01:00 +00:00
|
|
|
|
|
|
|
|
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
|
2020-04-01 23:09:50 +00:00
|
|
|
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
|
|
|
|
2020-04-01 23:09:50 +00:00
|
|
|
MembershipOverlay { //3
|
2020-04-27 21:55:10 +00:00
|
|
|
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-02-14 02:42:13 +00:00
|
|
|
|
2019-03-05 22:02:29 +00:00
|
|
|
Connections {
|
|
|
|
target: gcd
|
2019-02-14 02:42:13 +00:00
|
|
|
|
2020-04-27 21:55:10 +00:00
|
|
|
onResetMessagePane: function() {
|
2020-11-24 00:36:50 +00:00
|
|
|
tabBar.currentIndex = 0
|
2020-04-27 21:55:10 +00:00
|
|
|
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
|
2019-03-06 21:18:00 +00:00
|
|
|
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
|
|
|
}
|
2020-04-27 21:55:10 +00:00
|
|
|
}
|