1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Window
import QtQuick.Controls
ApplicationWindow {
visible: true
width: 640
height: 600
AboutDialog {
id: aboutDialog
anchors.centerIn: parent
}
WasmMenu {
id: wasmMenu
Accessible.focusable: true
focusPolicy: Qt.StrongFocus
focus: true
property string timeCaption: "Initiated at :"
anchors {
left: parent.left
leftMargin: 20
top: parent.top
}
function getCurrentDate() {
var currentDate = new Date()
var year = currentDate.getFullYear()
var month = currentDate.getMonth() + 1
var day = currentDate.getDate()
return day + "/" + month + "/" + year
}
function getCurrentTime() {
var currentDate = new Date()
var hours = currentDate.getHours()
var minutes = currentDate.getMinutes()
var seconds = currentDate.getSeconds()
return hours + ":" + minutes + ":" + seconds
}
function removeTextAfterIndex(rmText, currdateTime) {
var index = currdateTime.indexOf(rmText)
if (index !== -1) {
currdateTime = currdateTime.substring(0, index)
}
return currdateTime
}
onShowTime: {
timeCaption = removeTextAfterIndex(", time:", timeCaption)
timeCaption += ", time: " + getCurrentTime()
meetingTabs.setTime.text = timeCaption
}
onShowDate: {
timeCaption = removeTextAfterIndex(" date:", timeCaption)
timeCaption += " date: " + getCurrentDate()
meetingTabs.setTime.text = timeCaption
}
onShowAboutDialog: {
aboutDialog.open()
}
}
WasmToolBar {
id: wasmToolbar
anchors {
left: parent.left
leftMargin: 20
top: wasmMenu.bottom
topMargin: 3
}
enabled: meetingTabs.currentIndex === MeetingTabs.Types.Summary ? true : false
}
Rectangle {
width: parent.width - 30
height: parent.height - wasmToolbar.height - wasmMenu.height - 30
border.color: "black"
border.width: 1
id:outerRect
anchors {
left: parent.left
leftMargin: 20
top: wasmToolbar.bottom
topMargin: 10
bottomMargin: 10
}
MeetingTabs {
id: meetingTabs
parent:outerRect
anchors {
centerIn: parent
}
height: parent.height - 20
width: parent.width - 20
}
}
}
|