2022-06-03 11:26:02 +00:00
|
|
|
// Copyright (C) 2018 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2018-08-03 12:21:05 +00:00
|
|
|
|
2020-12-01 12:57:32 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Material
|
|
|
|
import QtQuick.Layouts
|
|
|
|
import QtQuick.Window
|
2018-08-03 12:21:05 +00:00
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
id: window
|
|
|
|
width: 400
|
|
|
|
height: 500
|
|
|
|
visible: true
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: alarmListView
|
|
|
|
anchors.fill: parent
|
2018-10-04 12:27:58 +00:00
|
|
|
model: AlarmModel {}
|
2018-08-03 12:21:05 +00:00
|
|
|
delegate: AlarmDelegate {}
|
|
|
|
}
|
|
|
|
|
|
|
|
RoundButton {
|
|
|
|
id: addAlarmButton
|
|
|
|
text: "+"
|
|
|
|
anchors.bottom: alarmListView.bottom
|
|
|
|
anchors.bottomMargin: 8
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
onClicked: alarmDialog.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
AlarmDialog {
|
|
|
|
id: alarmDialog
|
|
|
|
x: Math.round((parent.width - width) / 2)
|
|
|
|
y: Math.round((parent.height - height) / 2)
|
|
|
|
alarmModel: alarmListView.model
|
|
|
|
}
|
|
|
|
}
|