Warning, /utilities/kongress/src/contents/ui/SettingsView.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2020 David Barchiesi <david@barchie.si>
0003  * SPDX-FileCopyrightText: 2020 Dimitris Kardarakos <dimkard@posteo.net>
0004  *
0005  * SPDX-License-Identifier: GPL-3.0-or-later
0006  */
0007 
0008 import QtQuick 2.7
0009 import QtQuick.Layouts 1.11
0010 import QtQuick.Controls 2.4 as Controls2
0011 import org.kde.kirigami 2.4 as Kirigami
0012 import org.kde.kongress 0.1 as Kongress
0013 
0014 Kirigami.ScrollablePage {
0015     id: root
0016 
0017     title: i18n("Settings")
0018 
0019     Kirigami.FormLayout {
0020 
0021         Item {
0022             Kirigami.FormData.isSection: true
0023             Kirigami.FormData.label: i18n("Appearance")
0024         }
0025 
0026         Controls2.CheckBox {
0027             checked: Kongress.SettingsController.displayInLocalTimezone
0028             Kirigami.FormData.label: i18n("Use local timezone")
0029 
0030             onToggled: Kongress.SettingsController.displayInLocalTimezone = checked
0031         }
0032 
0033         Item {
0034             Kirigami.FormData.isSection: true
0035             Kirigami.FormData.label: i18n("Notifications")
0036         }
0037 
0038         Controls2.CheckBox {
0039             Kirigami.FormData.label: i18n("Add reminder to favorite talks")
0040 
0041             enabled: Kongress.SettingsController.canAddReminder
0042             checked: Kongress.SettingsController.remindFavorites
0043             onToggled: Kongress.SettingsController.remindFavorites = checked
0044         }
0045 
0046         Controls2.SpinBox {
0047             Kirigami.FormData.label: i18n("Remind before talk start (minutes)")
0048 
0049             enabled: Kongress.SettingsController.canAddReminder
0050             from: 0
0051             value: Kongress.SettingsController.remindBeforeStart
0052             onValueModified: Kongress.SettingsController.remindBeforeStart = value
0053         }
0054 
0055         Kirigami.InlineMessage {
0056             Kirigami.FormData.isSection: true
0057             visible: !Kongress.SettingsController.canAddReminder
0058             type: Kirigami.MessageType.Warning
0059             text: i18n("Notifications are not supported on your platform")
0060         }
0061     }
0062 
0063 }