2023-11-30 18:28:55 +00:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
2022-05-13 13:12:05 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2020-03-26 16:01:51 +00:00
|
|
|
import QtQuick
|
2023-05-11 02:27:08 +00:00
|
|
|
import WearableStyle
|
2016-12-17 03:20:45 +00:00
|
|
|
import "notifications.js" as NotificationData
|
|
|
|
|
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
Item {
|
|
|
|
id: notificationpage
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
ListView {
|
|
|
|
id: listview
|
2017-03-13 11:56:17 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 15
|
|
|
|
anchors.topMargin: 40 + 15
|
|
|
|
spacing: 10
|
|
|
|
clip: false
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
model: ListModel {
|
|
|
|
id: missedCallsList
|
|
|
|
}
|
2017-03-13 11:56:17 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
delegate: ListHeaderItem {
|
|
|
|
id: notificationItem
|
2017-03-13 11:56:17 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
required property string name
|
|
|
|
required property string date
|
|
|
|
required property string time
|
|
|
|
required property string text
|
2017-03-13 11:56:17 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
width: parent.width
|
|
|
|
height: 80
|
|
|
|
|
|
|
|
Item {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
height: 25
|
|
|
|
Text {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.margins: 10
|
|
|
|
text: notificationItem.name
|
|
|
|
color: UIStyle.titletextColor
|
|
|
|
font: UIStyle.h3
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.margins: 10
|
|
|
|
text: notificationItem.date + " " + notificationItem.time
|
|
|
|
color: UIStyle.titletextColor
|
|
|
|
font: UIStyle.p1
|
|
|
|
}
|
2017-03-13 13:22:17 +00:00
|
|
|
}
|
2016-12-17 03:20:45 +00:00
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
|
2017-03-13 13:22:17 +00:00
|
|
|
Text {
|
2023-11-30 18:28:55 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 10
|
|
|
|
anchors.topMargin: 30
|
|
|
|
text: notificationItem.text
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
color: UIStyle.textColor
|
|
|
|
font: UIStyle.p1
|
|
|
|
lineHeight: UIStyle.p1lineHeight
|
|
|
|
lineHeightMode: Text.FixedHeight
|
2016-12-17 03:20:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-30 18:28:55 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
NotificationData.populateData(missedCallsList)
|
|
|
|
}
|
2016-12-17 03:20:45 +00:00
|
|
|
}
|
|
|
|
}
|