Warning, /plasma-mobile/calindori/src/contents/ui/EventCard.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 QtQuick.Controls 2.0 as Controls2
0009 import QtQuick.Layouts 1.3
0010 import org.kde.kirigami 2.4 as Kirigami
0011 import org.kde.calindori 0.1 as Calindori
0012 
0013 Kirigami.Card {
0014     id: root
0015 
0016     property var dataModel
0017 
0018     banner.title: dataModel && dataModel.summary
0019     banner.titleLevel: 3
0020     clip: true
0021 
0022     contentItem: Column {
0023         spacing: Kirigami.Units.largeSpacing
0024         topPadding: 0
0025         bottomPadding: Kirigami.Units.largeSpacing
0026 
0027         RowLayout {
0028             width: root.availableWidth
0029             spacing: Kirigami.Units.smallSpacing
0030 
0031             Kirigami.Icon {
0032                 source: "view-calendar-day"
0033                 width: Kirigami.Units.iconSizes.small
0034                 height: width
0035             }
0036 
0037             Controls2.Label {
0038                 wrapMode: Text.WordWrap
0039                 text: dataModel && dataModel.displayStartEndTime
0040 
0041                 Layout.fillWidth: true
0042             }
0043         }
0044 
0045         RowLayout {
0046             visible: dataModel && dataModel.isRepeating
0047             width: root.availableWidth
0048             spacing: Kirigami.Units.smallSpacing
0049 
0050             Kirigami.Icon {
0051                 source: "media-playlist-repeat"
0052                 width: Kirigami.Units.iconSizes.small
0053                 height: width
0054             }
0055 
0056             Controls2.Label {
0057                 wrapMode: Text.WordWrap
0058                 text: dataModel && _repeatModel && _repeatModel.repeatDescription(dataModel.repeatType, dataModel.repeatEvery, dataModel.repeatStopAfter)
0059                 Layout.fillWidth: true
0060             }
0061         }
0062 
0063         RowLayout {
0064             visible: dataModel && dataModel.displayAttendeeNames
0065             width: root.availableWidth
0066             spacing: Kirigami.Units.smallSpacing
0067 
0068             Kirigami.Icon {
0069                 source: "meeting-attending"
0070                 width: Kirigami.Units.iconSizes.small
0071                 height: width
0072             }
0073 
0074             Controls2.Label {
0075                 wrapMode: Text.WordWrap
0076                 text: dataModel && dataModel.displayAttendeeNames
0077                 Layout.fillWidth: true
0078             }
0079         }
0080 
0081         IncidenceCardData {
0082             dataModel: root.dataModel
0083             width: root.availableWidth
0084         }
0085     }
0086 }