Warning, /utilities/kongress/src/contents/ui/Main.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.1 0008 import QtQml 2.1 0009 import QtQuick.Layouts 1.2 0010 import org.kde.kirigami 2.0 as Kirigami 0011 import org.kde.kongress 0.1 as Kongress 0012 0013 Kirigami.ApplicationWindow { 0014 id: root 0015 0016 property Kongress.Conference activeConference: Kongress.ConferenceController.activeConference 0017 0018 width: Kirigami.Units.gridUnit * 65 0019 0020 globalDrawer: GlobalDrawer { 0021 modal: !root.wideScreen 0022 onModalChanged: drawerOpen = !modal 0023 activeConference: root.activeConference 0024 handleVisible: modal 0025 pageStack: root.pageStack 0026 } 0027 0028 contextDrawer: Kirigami.ContextDrawer {} 0029 0030 pageStack { 0031 initialPage: Kongress.ConferenceController.defaultConferenceId ? scheduleView : conferencesView 0032 defaultColumnWidth: Kirigami.Units.gridUnit * 40 0033 } 0034 0035 Kongress.LocalCalendar { 0036 id: onlineCalendar 0037 0038 calendarController: Kongress.CalendarController 0039 calendarId: root.activeConference && root.activeConference.id 0040 calendarUrl: root.activeConference && root.activeConference.icalUrl 0041 calendarTzId: root.activeConference && root.activeConference.timeZoneId 0042 calendarType: 1 0043 0044 } 0045 0046 Kongress.LocalCalendar { 0047 id: favoritesCalendar 0048 0049 calendarController: Kongress.CalendarController 0050 0051 calendarId: root.activeConference && ("favorites_" + root.activeConference.id) 0052 calendarUrl: "" 0053 calendarTzId: root.activeConference && root.activeConference.timeZoneId 0054 calendarType: 2 0055 } 0056 0057 Component { 0058 id: scheduleView 0059 0060 ScheduleView { 0061 roCalendar: onlineCalendar 0062 rwCalendar: favoritesCalendar 0063 0064 title: i18n("Schedule") 0065 } 0066 } 0067 0068 Component { 0069 id: favoritesView 0070 0071 FavoritesView { 0072 roCalendar: favoritesCalendar 0073 rwCalendar: favoritesCalendar 0074 0075 title: i18n("Favorites") 0076 0077 } 0078 } 0079 0080 Component { 0081 id: conferencesView 0082 0083 Conferences { 0084 0085 /** 0086 * Expects @selectedConferenceId variable object to provide the information of the selected conference 0087 */ 0088 onSelected: { 0089 Kongress.ConferenceController.activateConference(selectedConferenceId) 0090 pageStack.pop(root); 0091 pageStack.push(scheduleView, {eventStartDt: ""}); 0092 } 0093 } 0094 } 0095 0096 Component { 0097 id: mapView 0098 0099 MapView { 0100 imageUrl: root.activeConference.venueImageUrl 0101 latitude: root.activeConference.venueLatitude 0102 longitude: root.activeConference.venueLongitude 0103 geoUrl: { 0104 if (root.activeConference.venueOsmUrl !== "") 0105 return root.activeConference.venueOsmUrl 0106 return "geo:" + root.activeConference.venueLatitude + "," + root.activeConference.venueLongitude + "?z=19"; 0107 } 0108 } 0109 } 0110 }