Warning, /pim/kube/views/calendar/qml/MonthView.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * Copyright (C) 2018 Michael Bohlender, <bohlender@kolabsys.com> 0003 * Copyright (C) 2018 Christian Mollekopf, <mollekopf@kolabsys.com> 0004 * 0005 * This program is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This program is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU General Public License along 0016 * with this program; if not, write to the Free Software Foundation, Inc., 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0018 */ 0019 0020 import QtQuick 2.4 0021 import QtQuick.Layouts 1.1 0022 import QtQuick.Controls 2.2 0023 0024 import org.kube.framework 1.0 as Kube 0025 import "dateutils.js" as DateUtils 0026 0027 FocusScope { 0028 id: root 0029 0030 property alias startDate: dayView.startDate 0031 property alias currentDate: dayView.currentDate 0032 property alias calendarFilter: dayView.calendarFilter 0033 property alias month: dayView.month 0034 0035 MultiDayView { 0036 id: dayView 0037 objectName: "monthView" 0038 anchors.fill: parent 0039 daysToShow: daysPerRow * 6 0040 daysPerRow: 7 0041 paintGrid: true 0042 showDayIndicator: true 0043 dayHeaderDelegate: Item { 0044 height: Kube.Units.gridUnit + Kube.Units.smallSpacing * 3 0045 Column { 0046 anchors.centerIn: parent 0047 Kube.Label { 0048 anchors.horizontalCenter: parent.horizontalCenter 0049 font.bold: true 0050 text: day.toLocaleString(Qt.locale(), "dddd") 0051 } 0052 } 0053 } 0054 weekHeaderDelegate: Item { 0055 width: Kube.Units.gridUnit 0056 Kube.Label { 0057 anchors.centerIn: parent 0058 font.bold: true 0059 text: DateUtils.getWeek(startDate, Qt.locale().firstDayOfWeek) 0060 color: Kube.Colors.disabledTextColor 0061 } 0062 } 0063 } 0064 }