Warning, /plasma-mobile/calindori/src/contents/ui/WeekPage.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2020 Dimitris Kardarakos <dimkard@posteo.net>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 import QtQuick 2.7
0008 import org.kde.kirigami 2.0 as Kirigami
0009 import org.kde.calindori 0.1 as Calindori
0010 
0011 Kirigami.ScrollablePage {
0012     id: root
0013 
0014     property alias startDate: weekView.startDate
0015     property bool wideScreen
0016 
0017     title: weekView.selectedDate.toLocaleDateString(_appLocale, Locale.ShortFormat)
0018 
0019     actions {
0020         left: Kirigami.Action {
0021             iconName: "arrow-left"
0022             text: i18n("Previous week")
0023             displayHint: Kirigami.Action.IconOnly
0024             onTriggered: weekView.previousWeek()
0025         }
0026 
0027         main: Kirigami.Action {
0028             iconName: "view-calendar-day"
0029             text: i18n("Current Week")
0030 
0031             onTriggered: weekView.goCurrentWeek()
0032         }
0033 
0034         right: Kirigami.Action {
0035             iconName: "arrow-right"
0036             text: i18n("Next week")
0037             displayHint: Kirigami.Action.IconOnly
0038             onTriggered: weekView.nextWeek()
0039         }
0040 
0041     }
0042 
0043     WeekView {
0044         id: weekView
0045 
0046         cal: Calindori.CalendarController.activeCalendar
0047         wideScreen: root.wideScreen
0048 
0049         onSelectedWeekDateChanged: {
0050             if (pageStack.depth > 1) {
0051                 pageStack.pop(null);
0052             }
0053         }
0054     }
0055 }