Warning, /maui/mauikit-calendar/src/controls.5/MonthsGrid.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.4 0002 import QtQuick.Layouts 1.1 0003 import QtQuick.Controls 2.15 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 import org.mauikit.calendar 1.0 as Kalendar 0007 0008 0009 Page 0010 { 0011 id: control 0012 background: null 0013 padding: Maui.Style.defaultPadding 0014 0015 property int selectedMonth 0016 0017 signal monthSelected(var month) 0018 0019 contentItem: GridLayout 0020 { 0021 id: monthsGrid 0022 columns: 3 0023 0024 ButtonGroup 0025 { 0026 buttons: monthsGrid.children 0027 } 0028 0029 Repeater 0030 { 0031 model: 12 0032 0033 delegate: Button 0034 { 0035 Layout.fillWidth: true 0036 text: Qt.locale().standaloneMonthName(index) 0037 0038 checkable: true 0039 checked: control.selectedMonth === index 0040 0041 onClicked: 0042 { 0043 control.monthSelected(index) 0044 } 0045 0046 background: Rectangle 0047 { 0048 visible: checked 0049 color: checked ? Maui.Theme.highlightColor : hovered ? Maui.Theme.hoverColor : "transparent" 0050 radius: Maui.Style.radiusV 0051 } 0052 } 0053 } 0054 } 0055 }