aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-05-15 10:39:51 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-05-28 08:09:33 +0200
commit0e18524a84d2aae65c54edc676d8ad7348f7d61c (patch)
tree4e61bfe0b80ed66fbe888a90b5bb3550d14c7747 /src/imports
parentf91f9587ea27b5d5d802f1d75982792e988308f5 (diff)
Remove Qt Labs Calendar
This is getting its own repository as part of the move to the marketplace. Task-number: QTBUG-84172 Pick-to: 5.15 Change-Id: I2f963c298d6ef95e0832f95aa1e1ea809f4867a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/CMakeLists.txt1
-rw-r--r--src/imports/calendar/CMakeLists.txt67
-rw-r--r--src/imports/calendar/DayOfWeekRow.qml85
-rw-r--r--src/imports/calendar/MonthGrid.qml87
-rw-r--r--src/imports/calendar/WeekNumberColumn.qml85
-rw-r--r--src/imports/calendar/calendar.pri24
-rw-r--r--src/imports/calendar/calendar.pro23
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-calendarmodel.pngbin4576 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow-layout.pngbin5816 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow.pngbin1996 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-monthgrid-layout.pngbin6648 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-monthgrid.pngbin2819 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn-layout.pngbin3860 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn.pngbin1432 -> 0 bytes
-rw-r--r--src/imports/calendar/doc/qtlabscalendar.qdocconf41
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml57
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml47
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml35
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml61
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml37
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml49
-rw-r--r--src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml37
-rw-r--r--src/imports/calendar/doc/src/qtlabscalendar-index.qdoc51
-rw-r--r--src/imports/calendar/doc/src/qtlabscalendar-qmltypes.qdoc58
-rw-r--r--src/imports/calendar/plugins.qmltypes435
-rw-r--r--src/imports/calendar/qmldir6
-rw-r--r--src/imports/calendar/qquickcalendar.cpp92
-rw-r--r--src/imports/calendar/qquickcalendar_p.h99
-rw-r--r--src/imports/calendar/qquickcalendarmodel.cpp290
-rw-r--r--src/imports/calendar/qquickcalendarmodel_p.h123
-rw-r--r--src/imports/calendar/qquickdayofweekmodel.cpp135
-rw-r--r--src/imports/calendar/qquickdayofweekmodel_p.h110
-rw-r--r--src/imports/calendar/qquickdayofweekrow.cpp207
-rw-r--r--src/imports/calendar/qquickdayofweekrow_p.h106
-rw-r--r--src/imports/calendar/qquickmonthgrid.cpp463
-rw-r--r--src/imports/calendar/qquickmonthgrid_p.h129
-rw-r--r--src/imports/calendar/qquickmonthmodel.cpp240
-rw-r--r--src/imports/calendar/qquickmonthmodel_p.h129
-rw-r--r--src/imports/calendar/qquickweeknumbercolumn.cpp275
-rw-r--r--src/imports/calendar/qquickweeknumbercolumn_p.h116
-rw-r--r--src/imports/calendar/qquickweeknumbermodel.cpp194
-rw-r--r--src/imports/calendar/qquickweeknumbermodel_p.h118
-rw-r--r--src/imports/calendar/qtlabscalendarplugin.cpp93
-rw-r--r--src/imports/controls/CMakeLists.txt2
-rw-r--r--src/imports/controls/doc/doc.pri1
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc10
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc4
-rw-r--r--src/imports/imports.pro1
48 files changed, 8 insertions, 4215 deletions
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
index 9bec7cd4..46b803f7 100644
--- a/src/imports/CMakeLists.txt
+++ b/src/imports/CMakeLists.txt
@@ -1,7 +1,6 @@
# Generated from imports.pro.
add_subdirectory(controls)
-add_subdirectory(calendar)
add_subdirectory(platform)
add_subdirectory(templates)
add_subdirectory(controls/fusion)
diff --git a/src/imports/calendar/CMakeLists.txt b/src/imports/calendar/CMakeLists.txt
deleted file mode 100644
index bc9e7f08..00000000
--- a/src/imports/calendar/CMakeLists.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-# Generated from calendar.pro.
-
-#####################################################################
-## qtlabscalendarplugin Plugin:
-#####################################################################
-
-qt_add_qml_module(qtlabscalendarplugin
- URI "Qt.labs.calendar"
- VERSION "1.0"
- CLASSNAME QtLabsCalendarPlugin
- SOURCES
- qquickcalendar.cpp qquickcalendar_p.h
- qquickcalendarmodel.cpp qquickcalendarmodel_p.h
- qquickdayofweekmodel.cpp qquickdayofweekmodel_p.h
- qquickdayofweekrow.cpp qquickdayofweekrow_p.h
- qquickmonthgrid.cpp qquickmonthgrid_p.h
- qquickmonthmodel.cpp qquickmonthmodel_p.h
- qquickweeknumbercolumn.cpp qquickweeknumbercolumn_p.h
- qquickweeknumbermodel.cpp qquickweeknumbermodel_p.h
- qtlabscalendarplugin.cpp
- DEFINES
- QT_NO_CAST_FROM_ASCII
- QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::QmlPrivate
- Qt::QuickPrivate
- Qt::QuickTemplates2Private
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-#### Keys ignored in scope 1:.:.:calendar.pro:<TRUE>:
-# IMPORT_VERSION = "1.0"
-# OTHER_FILES = "qmldir"
-# TARGETPATH = "Qt/labs/calendar"
-
-## Scopes:
-#####################################################################
-
-set(qml_files
- "DayOfWeekRow.qml"
- "MonthGrid.qml"
- "WeekNumberColumn.qml"
-)
-set_source_files_properties(DayOfWeekRow.qml PROPERTIES
- QT_QML_SOURCE_VERSION "1.0"
-)
-set_source_files_properties(MonthGrid.qml PROPERTIES
- QT_QML_SOURCE_VERSION "1.0"
-)
-set_source_files_properties(WeekNumberColumn.qml PROPERTIES
- QT_QML_SOURCE_VERSION "1.0"
-)
-
-qt6_target_qml_files(qtlabscalendarplugin
- FILES
- ${qml_files}
-)
-qt_add_docs(qtlabscalendarplugin
- doc/qtlabscalendar.qdocconf
-)
-
diff --git a/src/imports/calendar/DayOfWeekRow.qml b/src/imports/calendar/DayOfWeekRow.qml
deleted file mode 100644
index e2eeb88b..00000000
--- a/src/imports/calendar/DayOfWeekRow.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-AbstractDayOfWeekRow {
- id: control
-
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
-
- spacing: 6
- topPadding: 6
- bottomPadding: 6
- font.bold: true
-
- //! [delegate]
- delegate: Text {
- text: model.shortName
- font: control.font
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- //! [delegate]
-
- //! [contentItem]
- contentItem: Row {
- spacing: control.spacing
- Repeater {
- model: control.source
- delegate: control.delegate
- }
- }
- //! [contentItem]
-}
diff --git a/src/imports/calendar/MonthGrid.qml b/src/imports/calendar/MonthGrid.qml
deleted file mode 100644
index 8947af08..00000000
--- a/src/imports/calendar/MonthGrid.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-AbstractMonthGrid {
- id: control
-
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
-
- spacing: 6
-
- //! [delegate]
- delegate: Text {
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- opacity: model.month === control.month ? 1 : 0
- text: model.day
- font: control.font
- }
- //! [delegate]
-
- //! [contentItem]
- contentItem: Grid {
- rows: 6
- columns: 7
- rowSpacing: control.spacing
- columnSpacing: control.spacing
-
- Repeater {
- model: control.source
- delegate: control.delegate
- }
- }
- //! [contentItem]
-}
diff --git a/src/imports/calendar/WeekNumberColumn.qml b/src/imports/calendar/WeekNumberColumn.qml
deleted file mode 100644
index c4fbca62..00000000
--- a/src/imports/calendar/WeekNumberColumn.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-AbstractWeekNumberColumn {
- id: control
-
- implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
-
- spacing: 6
- leftPadding: 6
- rightPadding: 6
- font.bold: true
-
- //! [delegate]
- delegate: Text {
- text: model.weekNumber
- font: control.font
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- //! [delegate]
-
- //! [contentItem]
- contentItem: Column {
- spacing: control.spacing
- Repeater {
- model: control.source
- delegate: control.delegate
- }
- }
- //! [contentItem]
-}
diff --git a/src/imports/calendar/calendar.pri b/src/imports/calendar/calendar.pri
deleted file mode 100644
index 00ed1209..00000000
--- a/src/imports/calendar/calendar.pri
+++ /dev/null
@@ -1,24 +0,0 @@
-QML_FILES = \
- DayOfWeekRow.qml \
- MonthGrid.qml \
- WeekNumberColumn.qml
-
-HEADERS += \
- $$PWD/qquickcalendar_p.h \
- $$PWD/qquickcalendarmodel_p.h \
- $$PWD/qquickdayofweekmodel_p.h \
- $$PWD/qquickdayofweekrow_p.h \
- $$PWD/qquickmonthgrid_p.h \
- $$PWD/qquickmonthmodel_p.h \
- $$PWD/qquickweeknumbercolumn_p.h \
- $$PWD/qquickweeknumbermodel_p.h
-
-SOURCES += \
- $$PWD/qquickcalendar.cpp \
- $$PWD/qquickcalendarmodel.cpp \
- $$PWD/qquickdayofweekmodel.cpp \
- $$PWD/qquickdayofweekrow.cpp \
- $$PWD/qquickmonthgrid.cpp \
- $$PWD/qquickmonthmodel.cpp \
- $$PWD/qquickweeknumbercolumn.cpp \
- $$PWD/qquickweeknumbermodel.cpp
diff --git a/src/imports/calendar/calendar.pro b/src/imports/calendar/calendar.pro
deleted file mode 100644
index 039906c1..00000000
--- a/src/imports/calendar/calendar.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-TARGET = qtlabscalendarplugin
-TARGETPATH = Qt/labs/calendar
-IMPORT_VERSION = 1.0
-
-QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
-
-DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
-
-QMAKE_DOCS = $$PWD/doc/qtlabscalendar.qdocconf
-
-OTHER_FILES += \
- qmldir
-
-SOURCES += \
- $$PWD/qtlabscalendarplugin.cpp
-
-include(calendar.pri)
-
-!static: CONFIG += qmlcache
-
-CONFIG += no_cxx_module
-load(qml_plugin)
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-calendarmodel.png b/src/imports/calendar/doc/images/qtlabscalendar-calendarmodel.png
deleted file mode 100644
index a0176823..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-calendarmodel.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow-layout.png b/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow-layout.png
deleted file mode 100644
index 3a816e85..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow-layout.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow.png b/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow.png
deleted file mode 100644
index 7548e221..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-dayofweekrow.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-monthgrid-layout.png b/src/imports/calendar/doc/images/qtlabscalendar-monthgrid-layout.png
deleted file mode 100644
index f67501a7..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-monthgrid-layout.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-monthgrid.png b/src/imports/calendar/doc/images/qtlabscalendar-monthgrid.png
deleted file mode 100644
index a2f9a47f..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-monthgrid.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn-layout.png b/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn-layout.png
deleted file mode 100644
index 19fbeefd..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn-layout.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn.png b/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn.png
deleted file mode 100644
index a73cccd5..00000000
--- a/src/imports/calendar/doc/images/qtlabscalendar-weeknumbercolumn.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/calendar/doc/qtlabscalendar.qdocconf b/src/imports/calendar/doc/qtlabscalendar.qdocconf
deleted file mode 100644
index 9a88cb25..00000000
--- a/src/imports/calendar/doc/qtlabscalendar.qdocconf
+++ /dev/null
@@ -1,41 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-include($QT_INSTALL_DOCS/config/exampleurl-qtquickcontrols2.qdocconf)
-
-project = QtLabsCalendar
-description = Qt Labs Calendar Reference Documentation
-version = $QT_VERSION
-
-qhp.projects = QtLabsCalendar
-
-qhp.QtLabsCalendar.file = qtlabscalendar.qhp
-qhp.QtLabsCalendar.namespace = org.qt-project.qtlabscalendar.$QT_VERSION_TAG
-qhp.QtLabsCalendar.virtualFolder = qtlabscalendar
-qhp.QtLabsCalendar.indexTitle = Qt Labs Calendar
-qhp.QtLabsCalendar.indexRoot =
-
-qhp.QtLabsCalendar.filterAttributes = qtlabscalendar $QT_VERSION qtrefdoc
-qhp.QtLabsCalendar.customFilters.Qt.name = QtLabsCalendar $QT_VERSION
-qhp.QtLabsCalendar.customFilters.Qt.filterAttributes = qtlabscalendar $QT_VERSION
-
-qhp.QtLabsCalendar.subprojects = qmltypes
-qhp.QtLabsCalendar.subprojects.qmltypes.title = QML Types
-qhp.QtLabsCalendar.subprojects.qmltypes.indexTitle = Qt Labs Calendar QML Types
-qhp.QtLabsCalendar.subprojects.qmltypes.selectors = qmlclass
-qhp.QtLabsCalendar.subprojects.qmltypes.sortPages = true
-
-depends = qtcore qtgui qtdoc qtqml qtquick qtquickcontrols
-
-# This module has no documented C++ types, clear the module header
-moduleheader =
-
-headerdirs += ../
-sourcedirs += ../ src
-exampledirs += ../ snippets
-imagedirs += images
-
-navigation.landingpage = "Qt Labs Calendar"
-navigation.qmltypespage = "Qt Labs Calendar QML Types"
-
-tagfile = qtlabscalendar.tags
-
-macro.labs = "\\note \\e{Types in Qt.labs modules are not guaranteed to remain compatible in future versions.}"
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml
deleted file mode 100644
index 6f6e8f2e..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-calendarmodel.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-import QtQuick.Controls 2.12
-
-//! [1]
-ListView {
- id: listview
-
- width: 200; height: 200
- snapMode: ListView.SnapOneItem
- orientation: ListView.Horizontal
- highlightRangeMode: ListView.StrictlyEnforceRange
-
- model: CalendarModel {
- from: new Date(2015, 0, 1)
- to: new Date(2015, 11, 31)
- }
-
- delegate: MonthGrid {
- width: listview.width
- height: listview.height
-
- month: model.month
- year: model.year
- locale: Qt.locale("en_US")
- }
-
- ScrollIndicator.horizontal: ScrollIndicator { }
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml
deleted file mode 100644
index 2de76098..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-ColumnLayout {
- DayOfWeekRow {
- locale: grid.locale
- Layout.fillWidth: true
- }
-
- MonthGrid {
- id: grid
- month: Calendar.December
- year: 2015
- locale: Qt.locale("en_US")
- Layout.fillWidth: true
- }
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml
deleted file mode 100644
index e52ebb2d..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-dayofweekrow.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-DayOfWeekRow {
- locale: Qt.locale("en_US")
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml
deleted file mode 100644
index 5710b4dd..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid-layout.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-GridLayout {
- columns: 2
-
- DayOfWeekRow {
- locale: grid.locale
-
- Layout.column: 1
- Layout.fillWidth: true
- }
-
- WeekNumberColumn {
- month: grid.month
- year: grid.year
- locale: grid.locale
-
- Layout.fillHeight: true
- }
-
- MonthGrid {
- id: grid
- month: Calendar.December
- year: 2015
- locale: Qt.locale("en_US")
-
- Layout.fillWidth: true
- Layout.fillHeight: true
- }
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml
deleted file mode 100644
index cdb7201e..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-monthgrid.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-MonthGrid {
- month: Calendar.December
- year: 2015
- locale: Qt.locale("en_US")
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml
deleted file mode 100644
index 18613f12..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-RowLayout {
- WeekNumberColumn {
- month: grid.month
- year: grid.year
- locale: grid.locale
- Layout.fillHeight: true
- }
-
- MonthGrid {
- id: grid
- month: Calendar.December
- year: 2015
- locale: Qt.locale("en_US")
- Layout.fillHeight: true
- }
-}
-//! [1]
diff --git a/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml b/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml
deleted file mode 100644
index f086468b..00000000
--- a/src/imports/calendar/doc/snippets/qtlabscalendar-weeknumbercolumn.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import Qt.labs.calendar 1.0
-
-//! [1]
-WeekNumberColumn {
- month: Calendar.December
- year: 2015
- locale: Qt.locale("en_US")
-}
-//! [1]
diff --git a/src/imports/calendar/doc/src/qtlabscalendar-index.qdoc b/src/imports/calendar/doc/src/qtlabscalendar-index.qdoc
deleted file mode 100644
index 065379ec..00000000
--- a/src/imports/calendar/doc/src/qtlabscalendar-index.qdoc
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscalendar-index.html
- \title Qt Labs Calendar
-
- \brief The experimental Qt Labs Calendar module provides a set of UI controls
- for Qt Quick.
-
- The experimental Qt Labs Calendar module provides a set of types that can be
- used to build calendars in Qt Quick. The module was introduced in Qt 5.7.
-
- \section1 QML Types
-
- \generatelist {qmltypesbymodule Qt.labs.calendar}
-
- \labs
-
- \section1 Related Information
-
- \list
- \li \l{Qt Quick}
- \li \l{Qt Quick Layouts}
- \li \l{Qt Quick Controls}
- \endlist
-*/
diff --git a/src/imports/calendar/doc/src/qtlabscalendar-qmltypes.qdoc b/src/imports/calendar/doc/src/qtlabscalendar-qmltypes.qdoc
deleted file mode 100644
index b63263a9..00000000
--- a/src/imports/calendar/doc/src/qtlabscalendar-qmltypes.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \qmlmodule Qt.labs.calendar 1.0
- \title Qt Labs Calendar QML Types
- \ingroup qmlmodules
- \brief Provides QML types for calendars (Qt Labs Calendar).
-
- The \l{Qt Labs Calendar} module provides QML types for creating
- calendars. These QML types work in conjunction with \l{Qt Quick} and
- \l{Qt Quick Controls}.
-
- The QML types can be imported into your application using the
- following import statement in your .qml file:
-
- \qml
- import Qt.labs.calendar 1.0
- \endqml
-
- \section1 QML Types
-
- \generatelist {qmltypesbymodule Qt.labs.calendar}
-
- \labs
-
- \section1 Related Information
-
- \list
- \li \l {Qt Quick Controls QML Types}
- \endlist
-
- \noautolist
-*/
diff --git a/src/imports/calendar/plugins.qmltypes b/src/imports/calendar/plugins.qmltypes
deleted file mode 100644
index e004d63d..00000000
--- a/src/imports/calendar/plugins.qmltypes
+++ /dev/null
@@ -1,435 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt.labs.calendar 1.0'
-
-Module {
- dependencies: ["QtQuick 2.12"]
- Component {
- name: "QAbstractItemModel"
- prototype: "QObject"
- Enum {
- name: "LayoutChangeHint"
- values: {
- "NoLayoutChangeHint": 0,
- "VerticalSortHint": 1,
- "HorizontalSortHint": 2
- }
- }
- Enum {
- name: "CheckIndexOption"
- values: {
- "NoOption": 0,
- "IndexIsValid": 1,
- "DoNotUseParent": 2,
- "ParentIsInvalid": 4
- }
- }
- Signal {
- name: "dataChanged"
- Parameter { name: "topLeft"; type: "QModelIndex" }
- Parameter { name: "bottomRight"; type: "QModelIndex" }
- Parameter { name: "roles"; type: "QVector<int>" }
- }
- Signal {
- name: "dataChanged"
- Parameter { name: "topLeft"; type: "QModelIndex" }
- Parameter { name: "bottomRight"; type: "QModelIndex" }
- }
- Signal {
- name: "headerDataChanged"
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "layoutChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
- }
- Signal {
- name: "layoutChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- }
- Signal { name: "layoutChanged" }
- Signal {
- name: "layoutAboutToBeChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
- }
- Signal {
- name: "layoutAboutToBeChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- }
- Signal { name: "layoutAboutToBeChanged" }
- Signal {
- name: "rowsAboutToBeInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsAboutToBeRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal { name: "modelAboutToBeReset" }
- Signal { name: "modelReset" }
- Signal {
- name: "rowsAboutToBeMoved"
- Parameter { name: "sourceParent"; type: "QModelIndex" }
- Parameter { name: "sourceStart"; type: "int" }
- Parameter { name: "sourceEnd"; type: "int" }
- Parameter { name: "destinationParent"; type: "QModelIndex" }
- Parameter { name: "destinationRow"; type: "int" }
- }
- Signal {
- name: "rowsMoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "start"; type: "int" }
- Parameter { name: "end"; type: "int" }
- Parameter { name: "destination"; type: "QModelIndex" }
- Parameter { name: "row"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeMoved"
- Parameter { name: "sourceParent"; type: "QModelIndex" }
- Parameter { name: "sourceStart"; type: "int" }
- Parameter { name: "sourceEnd"; type: "int" }
- Parameter { name: "destinationParent"; type: "QModelIndex" }
- Parameter { name: "destinationColumn"; type: "int" }
- }
- Signal {
- name: "columnsMoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "start"; type: "int" }
- Parameter { name: "end"; type: "int" }
- Parameter { name: "destination"; type: "QModelIndex" }
- Parameter { name: "column"; type: "int" }
- }
- Method { name: "submit"; type: "bool" }
- Method { name: "revert" }
- Method {
- name: "hasIndex"
- type: "bool"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "hasIndex"
- type: "bool"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- }
- Method {
- name: "index"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "index"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- }
- Method {
- name: "parent"
- type: "QModelIndex"
- Parameter { name: "child"; type: "QModelIndex" }
- }
- Method {
- name: "sibling"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "idx"; type: "QModelIndex" }
- }
- Method {
- name: "rowCount"
- type: "int"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "rowCount"; type: "int" }
- Method {
- name: "columnCount"
- type: "int"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "columnCount"; type: "int" }
- Method {
- name: "hasChildren"
- type: "bool"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "hasChildren"; type: "bool" }
- Method {
- name: "data"
- type: "QVariant"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "data"
- type: "QVariant"
- Parameter { name: "index"; type: "QModelIndex" }
- }
- Method {
- name: "setData"
- type: "bool"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "setData"
- type: "bool"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "value"; type: "QVariant" }
- }
- Method {
- name: "headerData"
- type: "QVariant"
- Parameter { name: "section"; type: "int" }
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "headerData"
- type: "QVariant"
- Parameter { name: "section"; type: "int" }
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- }
- Method {
- name: "fetchMore"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "canFetchMore"
- type: "bool"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "flags"
- type: "Qt::ItemFlags"
- Parameter { name: "index"; type: "QModelIndex" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "hits"; type: "int" }
- Parameter { name: "flags"; type: "Qt::MatchFlags" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "hits"; type: "int" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- }
- }
- Component { name: "QAbstractListModel"; prototype: "QAbstractItemModel" }
- Component {
- name: "QQuickCalendar"
- prototype: "QObject"
- exports: ["Qt.labs.calendar/Calendar 1.0"]
- isCreatable: false
- isSingleton: true
- exportMetaObjectRevisions: [0]
- Enum {
- name: "Month"
- values: {
- "January": 0,
- "February": 1,
- "March": 2,
- "April": 3,
- "May": 4,
- "June": 5,
- "July": 6,
- "August": 7,
- "September": 8,
- "October": 9,
- "November": 10,
- "December": 11
- }
- }
- }
- Component {
- name: "QQuickCalendarModel"
- prototype: "QAbstractListModel"
- exports: ["Qt.labs.calendar/CalendarModel 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "from"; type: "QDate" }
- Property { name: "to"; type: "QDate" }
- Property { name: "count"; type: "int"; isReadonly: true }
- Method {
- name: "monthAt"
- type: "int"
- Parameter { name: "index"; type: "int" }
- }
- Method {
- name: "yearAt"
- type: "int"
- Parameter { name: "index"; type: "int" }
- }
- Method {
- name: "indexOf"
- type: "int"
- Parameter { name: "date"; type: "QDate" }
- }
- Method {
- name: "indexOf"
- type: "int"
- Parameter { name: "year"; type: "int" }
- Parameter { name: "month"; type: "int" }
- }
- }
- Component {
- name: "QQuickControl"
- defaultProperty: "data"
- prototype: "QQuickItem"
- Property { name: "font"; type: "QFont" }
- Property { name: "availableWidth"; type: "double"; isReadonly: true }
- Property { name: "availableHeight"; type: "double"; isReadonly: true }
- Property { name: "padding"; type: "double" }
- Property { name: "topPadding"; type: "double" }
- Property { name: "leftPadding"; type: "double" }
- Property { name: "rightPadding"; type: "double" }
- Property { name: "bottomPadding"; type: "double" }
- Property { name: "spacing"; type: "double" }
- Property { name: "locale"; type: "QLocale" }
- Property { name: "mirrored"; type: "bool"; isReadonly: true }
- Property { name: "focusPolicy"; type: "Qt::FocusPolicy" }
- Property { name: "focusReason"; type: "Qt::FocusReason" }
- Property { name: "visualFocus"; type: "bool"; isReadonly: true }
- Property { name: "hovered"; type: "bool"; isReadonly: true }
- Property { name: "hoverEnabled"; type: "bool" }
- Property { name: "wheelEnabled"; type: "bool" }
- Property { name: "background"; type: "QQuickItem"; isPointer: true }
- Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
- Property { name: "baselineOffset"; type: "double" }
- Property { name: "palette"; revision: 3; type: "QPalette" }
- Property { name: "horizontalPadding"; revision: 5; type: "double" }
- Property { name: "verticalPadding"; revision: 5; type: "double" }
- Property { name: "implicitContentWidth"; revision: 5; type: "double"; isReadonly: true }
- Property { name: "implicitContentHeight"; revision: 5; type: "double"; isReadonly: true }
- Property { name: "implicitBackgroundWidth"; revision: 5; type: "double"; isReadonly: true }
- Property { name: "implicitBackgroundHeight"; revision: 5; type: "double"; isReadonly: true }
- Property { name: "topInset"; revision: 5; type: "double" }
- Property { name: "leftInset"; revision: 5; type: "double" }
- Property { name: "rightInset"; revision: 5; type: "double" }
- Property { name: "bottomInset"; revision: 5; type: "double" }
- Signal { name: "paletteChanged"; revision: 3 }
- Signal { name: "horizontalPaddingChanged"; revision: 5 }
- Signal { name: "verticalPaddingChanged"; revision: 5 }
- Signal { name: "implicitContentWidthChanged"; revision: 5 }
- Signal { name: "implicitContentHeightChanged"; revision: 5 }
- Signal { name: "implicitBackgroundWidthChanged"; revision: 5 }
- Signal { name: "implicitBackgroundHeightChanged"; revision: 5 }
- Signal { name: "topInsetChanged"; revision: 5 }
- Signal { name: "leftInsetChanged"; revision: 5 }
- Signal { name: "rightInsetChanged"; revision: 5 }
- Signal { name: "bottomInsetChanged"; revision: 5 }
- }
- Component {
- name: "QQuickDayOfWeekRow"
- defaultProperty: "data"
- prototype: "QQuickControl"
- exports: ["Qt.labs.calendar/AbstractDayOfWeekRow 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "source"; type: "QVariant" }
- Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
- }
- Component {
- name: "QQuickMonthGrid"
- defaultProperty: "data"
- prototype: "QQuickControl"
- exports: ["Qt.labs.calendar/AbstractMonthGrid 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "month"; type: "int" }
- Property { name: "year"; type: "int" }
- Property { name: "source"; type: "QVariant" }
- Property { name: "title"; type: "string" }
- Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
- Signal {
- name: "pressed"
- Parameter { name: "date"; type: "QDate" }
- }
- Signal {
- name: "released"
- Parameter { name: "date"; type: "QDate" }
- }
- Signal {
- name: "clicked"
- Parameter { name: "date"; type: "QDate" }
- }
- Signal {
- name: "pressAndHold"
- Parameter { name: "date"; type: "QDate" }
- }
- }
- Component {
- name: "QQuickWeekNumberColumn"
- defaultProperty: "data"
- prototype: "QQuickControl"
- exports: ["Qt.labs.calendar/AbstractWeekNumberColumn 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "month"; type: "int" }
- Property { name: "year"; type: "int" }
- Property { name: "source"; type: "QVariant" }
- Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
- }
-}
diff --git a/src/imports/calendar/qmldir b/src/imports/calendar/qmldir
deleted file mode 100644
index 9b9e9031..00000000
--- a/src/imports/calendar/qmldir
+++ /dev/null
@@ -1,6 +0,0 @@
-module Qt.labs.calendar
-plugin qtlabscalendarplugin
-classname QtLabsCalendarPlugin
-DayOfWeekRow 1.0 DayOfWeekRow.qml
-MonthGrid 1.0 MonthGrid.qml
-WeekNumberColumn 1.0 WeekNumberColumn.qml
diff --git a/src/imports/calendar/qquickcalendar.cpp b/src/imports/calendar/qquickcalendar.cpp
deleted file mode 100644
index cb36fd27..00000000
--- a/src/imports/calendar/qquickcalendar.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickcalendar_p.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype Calendar
- \inherits QObject
-//! \instantiates QQuickCalendar
- \inqmlmodule Qt.labs.calendar
- \brief A calendar namespace.
-
- The Calendar singleton provides miscellaneous calendar related
- utilities.
-
- The Qt Labs Calendar module uses 0-based month numbers to be consistent
- with the JavaScript Date type, that is used by the QML language. This
- means that \c Date::getMonth() can be assigned to MonthGrid::month and
- WeekNumberColumn::month as is. When dealing with month numbers
- directly, it is highly recommended to use the following enumeration values
- to avoid confusion.
-
- \value Calendar.January January (0)
- \value Calendar.February February (1)
- \value Calendar.March March (2)
- \value Calendar.April April (3)
- \value Calendar.May May (4)
- \value Calendar.June June (5)
- \value Calendar.July July (6)
- \value Calendar.August August (7)
- \value Calendar.September September (8)
- \value Calendar.October October (9)
- \value Calendar.November November (10)
- \value Calendar.December December (11)
-
- \sa MonthGrid, DayOfWeekRow, WeekNumberColumn
-*/
-
-QQuickCalendar::QQuickCalendar(QObject *parent) : QObject(parent)
-{
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickcalendar_p.h b/src/imports/calendar/qquickcalendar_p.h
deleted file mode 100644
index 95f3e1df..00000000
--- a/src/imports/calendar/qquickcalendar_p.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKCALENDAR_P_H
-#define QQUICKCALENDAR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qobject.h>
-#include <QtCore/qdatetime.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickCalendar : public QObject
-{
- Q_OBJECT
-
-public:
- explicit QQuickCalendar(QObject *parent = nullptr);
-
- enum Month {
- January,
- February,
- March,
- April,
- May,
- June,
- July,
- August,
- September,
- October,
- November,
- December
- };
- Q_ENUM(Month)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickCalendar)
-
-#endif // QQUICKCALENDAR_P_H
diff --git a/src/imports/calendar/qquickcalendarmodel.cpp b/src/imports/calendar/qquickcalendarmodel.cpp
deleted file mode 100644
index 8826e92e..00000000
--- a/src/imports/calendar/qquickcalendarmodel.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickcalendarmodel_p.h"
-
-#include <QtCore/private/qabstractitemmodel_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype CalendarModel
- \inherits QAbstractListModel
-//! \instantiates QQuickCalendarModel
- \inqmlmodule Qt.labs.calendar
- \brief A calendar model.
-
- CalendarModel provides a way of creating a range of MonthGrid
- instances. It is typically used as a model for a ListView that uses
- MonthGrid as a delegate.
-
- \snippet qtlabscalendar-calendarmodel.qml 1
-
- In addition to the \c index property, a list of model data roles
- are available in the context of each delegate:
- \table
- \row \li \b model.month : int \li The number of the month
- \row \li \b model.year : int \li The number of the year
- \endtable
-
- The Qt Labs Calendar module uses 0-based month numbers to be consistent
- with the JavaScript Date type, that is used by the QML language. This
- means that \c Date::getMonth() can be passed to the methods as is. When
- dealing with month numbers directly, it is highly recommended to use the
- following enumeration values to avoid confusion.
-
- \value Calendar.January January (0)
- \value Calendar.February February (1)
- \value Calendar.March March (2)
- \value Calendar.April April (3)
- \value Calendar.May May (4)
- \value Calendar.June June (5)
- \value Calendar.July July (6)
- \value Calendar.August August (7)
- \value Calendar.September September (8)
- \value Calendar.October October (9)
- \value Calendar.November November (10)
- \value Calendar.December December (11)
-
- \labs
-
- \sa MonthGrid, Calendar
-*/
-
-class QQuickCalendarModelPrivate : public QAbstractItemModelPrivate
-{
- Q_DECLARE_PUBLIC(QQuickCalendarModel)
-
-public:
- QQuickCalendarModelPrivate() : complete(false),
- from(1,1,1), to(275759, 9, 25), count(0)
- {
- }
-
- static int getCount(const QDate& from, const QDate &to);
-
- void populate(const QDate &from, const QDate &to, bool force = false);
-
- bool complete;
- QDate from;
- QDate to;
- int count;
-};
-
-int QQuickCalendarModelPrivate::getCount(const QDate& from, const QDate &to)
-{
- if (!from.isValid() || !to.isValid())
- return 0;
-
- QDate f(from.year(), from.month(), 1);
- QDate t(to.year(), to.month(), to.daysInMonth());
- int days = f.daysTo(t);
- if (days < 0)
- return 0;
-
- QDate r = QDate(1, 1, 1).addDays(days);
- int years = r.year() - 1;
- int months = r.month() - 1;
- return 12 * years + months + (r.day() / t.day());
-}
-
-void QQuickCalendarModelPrivate::populate(const QDate &f, const QDate &t, bool force)
-{
- Q_Q(QQuickCalendarModel);
- if (!force && f == from && t == to)
- return;
-
- int c = getCount(from, to);
- if (c != count) {
- q->beginResetModel();
- count = c;
- q->endResetModel();
- emit q->countChanged();
- } else {
- emit q->dataChanged(q->index(0, 0), q->index(c - 1, 0));
- }
-}
-
-QQuickCalendarModel::QQuickCalendarModel(QObject *parent) :
- QAbstractListModel(*(new QQuickCalendarModelPrivate), parent)
-{
-}
-
-/*!
- \qmlproperty date Qt.labs.calendar::CalendarModel::from
-
- This property holds the start date.
-*/
-QDate QQuickCalendarModel::from() const
-{
- Q_D(const QQuickCalendarModel);
- return d->from;
-}
-
-void QQuickCalendarModel::setFrom(const QDate &from)
-{
- Q_D(QQuickCalendarModel);
- if (d->from != from) {
- if (d->complete)
- d->populate(from, d->to);
- d->from = from;
- emit fromChanged();
- }
-}
-
-/*!
- \qmlproperty date Qt.labs.calendar::CalendarModel::to
-
- This property holds the end date.
-*/
-QDate QQuickCalendarModel::to() const
-{
- Q_D(const QQuickCalendarModel);
- return d->to;
-}
-
-void QQuickCalendarModel::setTo(const QDate &to)
-{
- Q_D(QQuickCalendarModel);
- if (d->to != to) {
- if (d->complete)
- d->populate(d->from, to);
- d->to = to;
- emit toChanged();
- }
-}
-
-/*!
- \qmlmethod int Qt.labs.calendar::CalendarModel::monthAt(int index)
-
- Returns the month number at the specified model \a index.
-*/
-int QQuickCalendarModel::monthAt(int index) const
-{
- Q_D(const QQuickCalendarModel);
- return d->from.addMonths(index).month() - 1;
-}
-
-/*!
- \qmlmethod int Qt.labs.calendar::CalendarModel::yearAt(int index)
-
- Returns the year number at the specified model \a index.
-*/
-int QQuickCalendarModel::yearAt(int index) const
-{
- Q_D(const QQuickCalendarModel);
- return d->from.addMonths(index).year();
-}
-
-/*!
- \qmlmethod int Qt.labs.calendar::CalendarModel::indexOf(Date date)
-
- Returns the model index of the specified \a date.
-*/
-int QQuickCalendarModel::indexOf(const QDate &date) const
-{
- Q_D(const QQuickCalendarModel);
- return d->getCount(d->from, date) - 1;
-}
-
-/*!
- \qmlmethod int Qt.labs.calendar::CalendarModel::indexOf(int year, int month)
-
- Returns the model index of the specified \a year and \a month.
-*/
-int QQuickCalendarModel::indexOf(int year, int month) const
-{
- return indexOf(QDate(year, month + 1, 1));
-}
-
-QVariant QQuickCalendarModel::data(const QModelIndex &index, int role) const
-{
- Q_D(const QQuickCalendarModel);
- if (index.isValid() && index.row() < d->count) {
- switch (role) {
- case MonthRole:
- return monthAt(index.row());
- case YearRole:
- return yearAt(index.row());
- default:
- break;
- }
- }
- return QVariant();
-}
-
-int QQuickCalendarModel::rowCount(const QModelIndex &parent) const
-{
- Q_D(const QQuickCalendarModel);
- if (!parent.isValid())
- return d->count;
- return 0;
-}
-
-QHash<int, QByteArray> QQuickCalendarModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[MonthRole] = QByteArrayLiteral("month");
- roles[YearRole] = QByteArrayLiteral("year");
- return roles;
-}
-
-void QQuickCalendarModel::classBegin()
-{
-}
-
-void QQuickCalendarModel::componentComplete()
-{
- Q_D(QQuickCalendarModel);
- d->complete = true;
- d->populate(d->from, d->to, true);
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickcalendarmodel_p.h b/src/imports/calendar/qquickcalendarmodel_p.h
deleted file mode 100644
index 9c442123..00000000
--- a/src/imports/calendar/qquickcalendarmodel_p.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKCALENDARMODEL_P_H
-#define QQUICKCALENDARMODEL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstractitemmodel.h>
-#include <QtCore/qdatetime.h>
-#include <QtQml/qqmlparserstatus.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickCalendarModelPrivate;
-
-class QQuickCalendarModel : public QAbstractListModel, public QQmlParserStatus
-{
- Q_OBJECT
- Q_INTERFACES(QQmlParserStatus)
- Q_PROPERTY(QDate from READ from WRITE setFrom NOTIFY fromChanged FINAL)
- Q_PROPERTY(QDate to READ to WRITE setTo NOTIFY toChanged FINAL)
- Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
-
-public:
- explicit QQuickCalendarModel(QObject *parent = nullptr);
-
- QDate from() const;
- void setFrom(const QDate &from);
-
- QDate to() const;
- void setTo(const QDate &to);
-
- Q_INVOKABLE int monthAt(int index) const;
- Q_INVOKABLE int yearAt(int index) const;
- Q_INVOKABLE int indexOf(const QDate &date) const;
- Q_INVOKABLE int indexOf(int year, int month) const;
-
- enum {
- MonthRole,
- YearRole
- };
-
- QHash<int, QByteArray> roleNames() const override;
- QVariant data(const QModelIndex &index, int role) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-
-Q_SIGNALS:
- void fromChanged();
- void toChanged();
- void countChanged();
-
-protected:
- void classBegin() override;
- void componentComplete() override;
-
-private:
- Q_DISABLE_COPY(QQuickCalendarModel)
- Q_DECLARE_PRIVATE(QQuickCalendarModel)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickCalendarModel)
-
-#endif // QQUICKCALENDARMODEL_P_H
diff --git a/src/imports/calendar/qquickdayofweekmodel.cpp b/src/imports/calendar/qquickdayofweekmodel.cpp
deleted file mode 100644
index 6c478310..00000000
--- a/src/imports/calendar/qquickdayofweekmodel.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickdayofweekmodel_p.h"
-
-#include <QtCore/private/qabstractitemmodel_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickDayOfWeekModelPrivate : public QAbstractItemModelPrivate
-{
- Q_DECLARE_PUBLIC(QQuickDayOfWeekModel)
-
-public:
- QLocale locale;
-};
-
-QQuickDayOfWeekModel::QQuickDayOfWeekModel(QObject *parent) :
- QAbstractListModel(*(new QQuickDayOfWeekModelPrivate), parent)
-{
-}
-
-QLocale QQuickDayOfWeekModel::locale() const
-{
- Q_D(const QQuickDayOfWeekModel);
- return d->locale;
-}
-
-void QQuickDayOfWeekModel::setLocale(const QLocale &locale)
-{
- Q_D(QQuickDayOfWeekModel);
- if (d->locale != locale) {
- d->locale = locale;
- emit localeChanged();
- emit dataChanged(index(0, 0), index(6, 0));
- }
-}
-
-int QQuickDayOfWeekModel::dayAt(int index) const
-{
- Q_D(const QQuickDayOfWeekModel);
- int day = d->locale.firstDayOfWeek() + index;
- if (day > 7)
- day -= 7;
- if (day == 7)
- day = 0; // Qt::Sunday = 7, but Sunday is 0 in JS Date
- return day;
-}
-
-QVariant QQuickDayOfWeekModel::data(const QModelIndex &index, int role) const
-{
- Q_D(const QQuickDayOfWeekModel);
- if (index.isValid() && index.row() < 7) {
- int day = dayAt(index.row());
- switch (role) {
- case DayRole:
- return day;
- case LongNameRole:
- return d->locale.standaloneDayName(day == 0 ? Qt::Sunday : day, QLocale::LongFormat);
- case ShortNameRole:
- return d->locale.standaloneDayName(day == 0 ? Qt::Sunday : day, QLocale::ShortFormat);
- case NarrowNameRole:
- return d->locale.standaloneDayName(day == 0 ? Qt::Sunday : day, QLocale::NarrowFormat);
- default:
- break;
- }
- }
- return QVariant();
-}
-
-int QQuickDayOfWeekModel::rowCount(const QModelIndex &parent) const
-{
- if (parent.isValid())
- return 0;
- return 7;
-}
-
-QHash<int, QByteArray> QQuickDayOfWeekModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[DayRole] = QByteArrayLiteral("day");
- roles[LongNameRole] = QByteArrayLiteral("longName");
- roles[ShortNameRole] = QByteArrayLiteral("shortName");
- roles[NarrowNameRole] = QByteArrayLiteral("narrowName");
- return roles;
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickdayofweekmodel_p.h b/src/imports/calendar/qquickdayofweekmodel_p.h
deleted file mode 100644
index 0dd9c9b3..00000000
--- a/src/imports/calendar/qquickdayofweekmodel_p.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKDAYOFWEEKMODEL_P_H
-#define QQUICKDAYOFWEEKMODEL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstractitemmodel.h>
-#include <QtCore/qlocale.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickDayOfWeekModelPrivate;
-
-class QQuickDayOfWeekModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
- Q_PROPERTY(int count READ rowCount CONSTANT FINAL)
-
-public:
- explicit QQuickDayOfWeekModel(QObject *parent = nullptr);
-
- QLocale locale() const;
- void setLocale(const QLocale &locale);
-
- Q_INVOKABLE int dayAt(int index) const;
-
- enum {
- DayRole = Qt::UserRole + 1,
- LongNameRole,
- ShortNameRole,
- NarrowNameRole
- };
-
- QHash<int, QByteArray> roleNames() const override;
- QVariant data(const QModelIndex &index, int role) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-
-Q_SIGNALS:
- void localeChanged();
-
-private:
- Q_DISABLE_COPY(QQuickDayOfWeekModel)
- Q_DECLARE_PRIVATE(QQuickDayOfWeekModel)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickDayOfWeekModel)
-
-#endif // QQUICKDAYOFWEEKMODEL_P_H
diff --git a/src/imports/calendar/qquickdayofweekrow.cpp b/src/imports/calendar/qquickdayofweekrow.cpp
deleted file mode 100644
index faf8b8c6..00000000
--- a/src/imports/calendar/qquickdayofweekrow.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickdayofweekrow_p.h"
-#include "qquickdayofweekmodel_p.h"
-
-#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype DayOfWeekRow
- \inherits Control
-//! \instantiates QQuickDayOfWeekRow
- \inqmlmodule Qt.labs.calendar
- \brief A row of names for the days in a week.
-
- DayOfWeekRow presents day of week names in a row. The names of the days
- are ordered and formatted using the specified \l {Control::locale}{locale}.
-
- \image qtlabscalendar-dayofweekrow.png
- \snippet qtlabscalendar-dayofweekrow.qml 1
-
- DayOfWeekRow can be used as a standalone control, but it is most
- often used in conjunction with MonthGrid. Regardless of the use case,
- positioning of the row is left to the user.
-
- \image qtlabscalendar-dayofweekrow-layout.png
- \snippet qtlabscalendar-dayofweekrow-layout.qml 1
-
- The visual appearance of DayOfWeekRow can be changed by
- implementing a \l {delegate}{custom delegate}.
-
- \labs
-
- \sa MonthGrid, WeekNumberColumn
-*/
-
-class QQuickDayOfWeekRowPrivate : public QQuickControlPrivate
-{
-public:
- QQuickDayOfWeekRowPrivate() : delegate(nullptr), model(nullptr) { }
-
- void resizeItems();
-
- QVariant source;
- QQmlComponent *delegate;
- QQuickDayOfWeekModel *model;
-};
-
-void QQuickDayOfWeekRowPrivate::resizeItems()
-{
- if (!contentItem)
- return;
-
- QSizeF itemSize;
- itemSize.setWidth((contentItem->width() - 6 * spacing) / 7);
- itemSize.setHeight(contentItem->height());
-
- const auto childItems = contentItem->childItems();
- for (QQuickItem *item : childItems)
- item->setSize(itemSize);
-}
-
-QQuickDayOfWeekRow::QQuickDayOfWeekRow(QQuickItem *parent) :
- QQuickControl(*(new QQuickDayOfWeekRowPrivate), parent)
-{
- Q_D(QQuickDayOfWeekRow);
- d->model = new QQuickDayOfWeekModel(this);
- d->source = QVariant::fromValue(d->model);
-}
-
-/*!
- \internal
- \qmlproperty model Qt.labs.calendar::DayOfWeekRow::source
-
- This property holds the source model that is used as a data model
- for the internal content row.
-*/
-QVariant QQuickDayOfWeekRow::source() const
-{
- Q_D(const QQuickDayOfWeekRow);
- return d->source;
-}
-
-void QQuickDayOfWeekRow::setSource(const QVariant &source)
-{
- Q_D(QQuickDayOfWeekRow);
- if (d->source != source) {
- d->source = source;
- emit sourceChanged();
- }
-}
-
-/*!
- \qmlproperty Component Qt.labs.calendar::DayOfWeekRow::delegate
-
- This property holds the item delegate that visualizes each day of the week.
-
- In addition to the \c index property, a list of model data roles
- are available in the context of each delegate:
- \table
- \row \li \b model.day : int \li The day of week (\l Qt::DayOfWeek)
- \row \li \b model.longName : string \li The long version of the day name; for example, "Monday" (\l QLocale::LongFormat)
- \row \li \b model.shortName : string \li The short version of the day name; for example, "Mon" (\l QLocale::ShortFormat)
- \row \li \b model.narrowName : string \li A special version of the day name for use when space is limited; for example, "M" (\l QLocale::NarrowFormat)
- \endtable
-
- The following snippet presents the default implementation of the item
- delegate. It can be used as a starting point for implementing custom
- delegates.
-
- \snippet DayOfWeekRow.qml delegate
-*/
-QQmlComponent *QQuickDayOfWeekRow::delegate() const
-{
- Q_D(const QQuickDayOfWeekRow);
- return d->delegate;
-}
-
-void QQuickDayOfWeekRow::setDelegate(QQmlComponent *delegate)
-{
- Q_D(QQuickDayOfWeekRow);
- if (d->delegate != delegate) {
- d->delegate = delegate;
- emit delegateChanged();
- }
-}
-
-void QQuickDayOfWeekRow::componentComplete()
-{
- Q_D(QQuickDayOfWeekRow);
- QQuickControl::componentComplete();
- d->resizeItems();
-}
-
-void QQuickDayOfWeekRow::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- Q_D(QQuickDayOfWeekRow);
- QQuickControl::geometryChange(newGeometry, oldGeometry);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-void QQuickDayOfWeekRow::localeChange(const QLocale &newLocale, const QLocale &oldLocale)
-{
- Q_D(QQuickDayOfWeekRow);
- QQuickControl::localeChange(newLocale, oldLocale);
- d->model->setLocale(newLocale);
-}
-
-void QQuickDayOfWeekRow::paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding)
-{
- Q_D(QQuickDayOfWeekRow);
- QQuickControl::paddingChange(newPadding, oldPadding);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickdayofweekrow_p.h b/src/imports/calendar/qquickdayofweekrow_p.h
deleted file mode 100644
index 87dc3163..00000000
--- a/src/imports/calendar/qquickdayofweekrow_p.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKDAYOFWEEKROW_P_H
-#define QQUICKDAYOFWEEKROW_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQuickTemplates2/private/qquickcontrol_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQmlComponent;
-class QQuickDayOfWeekRowPrivate;
-
-class QQuickDayOfWeekRow : public QQuickControl
-{
- Q_OBJECT
- Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL)
- Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
-
-public:
- explicit QQuickDayOfWeekRow(QQuickItem *parent = nullptr);
-
- QVariant source() const;
- void setSource(const QVariant &source);
-
- QQmlComponent *delegate() const;
- void setDelegate(QQmlComponent *delegate);
-
-Q_SIGNALS:
- void sourceChanged();
- void delegateChanged();
-
-protected:
- void componentComplete() override;
- void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
- void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
- void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
-
-private:
- Q_DISABLE_COPY(QQuickDayOfWeekRow)
- Q_DECLARE_PRIVATE(QQuickDayOfWeekRow)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickDayOfWeekRow)
-
-#endif // QQUICKDAYOFWEEKROW_P_H
diff --git a/src/imports/calendar/qquickmonthgrid.cpp b/src/imports/calendar/qquickmonthgrid.cpp
deleted file mode 100644
index 0999e2ab..00000000
--- a/src/imports/calendar/qquickmonthgrid.cpp
+++ /dev/null
@@ -1,463 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickmonthgrid_p.h"
-#include "qquickmonthmodel_p.h"
-
-#include <QtGui/qstylehints.h>
-#include <QtGui/qguiapplication.h>
-#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
-#include <QtQml/qqmlinfo.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype MonthGrid
- \inherits Control
-//! \instantiates QQuickMonthGrid
- \inqmlmodule Qt.labs.calendar
- \brief A grid of days for a calendar month.
-
- MonthGrid presents a calendar month in a grid. The contents are
- calculated for a given \l month and \l year, using the specified
- \l {Control::locale}{locale}.
-
- \image qtlabscalendar-monthgrid.png
- \snippet qtlabscalendar-monthgrid.qml 1
-
- MonthGrid can be used as a standalone control, but it is most often
- used in conjunction with DayOfWeekRow and WeekNumberColumn. Regardless
- of the use case, positioning of the grid is left to the user.
-
- \image qtlabscalendar-monthgrid-layout.png
- \snippet qtlabscalendar-monthgrid-layout.qml 1
-
- The visual appearance of MonthGrid can be changed by
- implementing a \l {delegate}{custom delegate}.
-
- \labs
-
- \sa DayOfWeekRow, WeekNumberColumn, CalendarModel
-*/
-
-/*!
- \qmlsignal Qt.labs.calendar::MonthGrid::pressed(date date)
-
- This signal is emitted when \a date is pressed.
-*/
-
-/*!
- \qmlsignal Qt.labs.calendar::MonthGrid::released(date date)
-
- This signal is emitted when \a date is released.
-*/
-
-/*!
- \qmlsignal Qt.labs.calendar::MonthGrid::clicked(date date)
-
- This signal is emitted when \a date is clicked.
-*/
-
-/*!
- \qmlsignal Qt.labs.calendar::MonthGrid::pressAndHold(date date)
-
- This signal is emitted when \a date is pressed and held down.
-*/
-
-class QQuickMonthGridPrivate : public QQuickControlPrivate
-{
- Q_DECLARE_PUBLIC(QQuickMonthGrid)
-
-public:
- QQuickMonthGridPrivate() : pressTimer(0), pressedItem(nullptr), model(nullptr), delegate(nullptr) { }
-
- void resizeItems();
-
- QQuickItem *cellAt(const QPointF &pos) const;
- QDate dateOf(QQuickItem *cell) const;
-
- void updatePress(const QPointF &pos);
- void clearPress(bool clicked);
-
- void handlePress(const QPointF &point) override;
- void handleMove(const QPointF &point) override;
- void handleRelease(const QPointF &point) override;
- void handleUngrab() override;
-
- static void setContextProperty(QQuickItem *item, const QString &name, const QVariant &value);
-
- QString title;
- QVariant source;
- QDate pressedDate;
- int pressTimer;
- QQuickItem *pressedItem;
- QQuickMonthModel *model;
- QQmlComponent *delegate;
-};
-
-void QQuickMonthGridPrivate::resizeItems()
-{
- if (!contentItem)
- return;
-
- QSizeF itemSize;
- itemSize.setWidth((contentItem->width() - 6 * spacing) / 7);
- itemSize.setHeight((contentItem->height() - 5 * spacing) / 6);
-
- const auto childItems = contentItem->childItems();
- for (QQuickItem *item : childItems) {
- if (!QQuickItemPrivate::get(item)->isTransparentForPositioner())
- item->setSize(itemSize);
- }
-}
-
-QQuickItem *QQuickMonthGridPrivate::cellAt(const QPointF &pos) const
-{
- Q_Q(const QQuickMonthGrid);
- if (contentItem) {
- QPointF mapped = q->mapToItem(contentItem, pos);
- return contentItem->childAt(mapped.x(), mapped.y());
- }
- return nullptr;
-}
-
-QDate QQuickMonthGridPrivate::dateOf(QQuickItem *cell) const
-{
- if (contentItem)
- return model->dateAt(contentItem->childItems().indexOf(cell));
- return QDate();
-}
-
-void QQuickMonthGridPrivate::updatePress(const QPointF &pos)
-{
- Q_Q(QQuickMonthGrid);
- clearPress(false);
- pressedItem = cellAt(pos);
- setContextProperty(pressedItem, QStringLiteral("pressed"), true);
- pressedDate = dateOf(pressedItem);
- if (pressedDate.isValid())
- emit q->pressed(pressedDate);
-}
-
-void QQuickMonthGridPrivate::clearPress(bool clicked)
-{
- Q_Q(QQuickMonthGrid);
- setContextProperty(pressedItem, QStringLiteral("pressed"), false);
- if (pressedDate.isValid()) {
- emit q->released(pressedDate);
- if (clicked)
- emit q->clicked(pressedDate);
- }
- pressedDate = QDate();
- pressedItem = nullptr;
-}
-
-void QQuickMonthGridPrivate::handlePress(const QPointF &point)
-{
- Q_Q(QQuickMonthGrid);
- QQuickControlPrivate::handlePress(point);
- updatePress(point);
- if (pressedDate.isValid())
- pressTimer = q->startTimer(qGuiApp->styleHints()->mousePressAndHoldInterval());
-}
-
-void QQuickMonthGridPrivate::handleMove(const QPointF &point)
-{
- QQuickControlPrivate::handleMove(point);
- updatePress(point);
-}
-
-void QQuickMonthGridPrivate::handleRelease(const QPointF &point)
-{
- QQuickControlPrivate::handleRelease(point);
- clearPress(true);
-}
-
-void QQuickMonthGridPrivate::handleUngrab()
-{
- QQuickControlPrivate::handleUngrab();
- clearPress(false);
-}
-
-void QQuickMonthGridPrivate::setContextProperty(QQuickItem *item, const QString &name, const QVariant &value)
-{
- QQmlContext *context = qmlContext(item);
- if (context && context->isValid()) {
- context = context->parentContext();
- if (context && context->isValid())
- context->setContextProperty(name, value);
- }
-}
-
-QQuickMonthGrid::QQuickMonthGrid(QQuickItem *parent) :
- QQuickControl(*(new QQuickMonthGridPrivate), parent)
-{
- Q_D(QQuickMonthGrid);
- setFlag(ItemIsFocusScope);
- setActiveFocusOnTab(true);
- setAcceptedMouseButtons(Qt::LeftButton);
-#if QT_CONFIG(cursor)
- setCursor(Qt::ArrowCursor);
-#endif
-
- d->model = new QQuickMonthModel(this);
- d->source = QVariant::fromValue(d->model);
- connect(d->model, &QQuickMonthModel::monthChanged, this, &QQuickMonthGrid::monthChanged);
- connect(d->model, &QQuickMonthModel::yearChanged, this, &QQuickMonthGrid::yearChanged);
- connect(d->model, &QQuickMonthModel::titleChanged, this, &QQuickMonthGrid::titleChanged);
-}
-
-/*!
- \qmlproperty int Qt.labs.calendar::MonthGrid::month
-
- This property holds the number of the month. The default value is the
- current month.
-
- The Qt Labs Calendar module uses 0-based month numbers to be consistent
- with the JavaScript Date type, that is used by the QML language. This
- means that \c Date::getMonth() can be assigned to this property as is.
- When dealing with dealing with month numbers directly, it is highly
- recommended to use the following enumeration values to avoid confusion.
-
- \value Calendar.January January (0)
- \value Calendar.February February (1)
- \value Calendar.March March (2)
- \value Calendar.April April (3)
- \value Calendar.May May (4)
- \value Calendar.June June (5)
- \value Calendar.July July (6)
- \value Calendar.August August (7)
- \value Calendar.September September (8)
- \value Calendar.October October (9)
- \value Calendar.November November (10)
- \value Calendar.December December (11)
-
- \sa Calendar
-*/
-int QQuickMonthGrid::month() const
-{
- Q_D(const QQuickMonthGrid);
- return d->model->month() - 1;
-}
-
-void QQuickMonthGrid::setMonth(int month)
-{
- Q_D(QQuickMonthGrid);
- if (month < 0 || month > 11) {
- qmlWarning(this) << "month " << month << " is out of range [0...11]";
- return;
- }
- d->model->setMonth(month + 1);
-}
-
-/*!
- \qmlproperty int Qt.labs.calendar::MonthGrid::year
-
- This property holds the number of the year.
-
- The value must be in the range from \c -271820 to \c 275759. The default
- value is the current year.
-*/
-int QQuickMonthGrid::year() const
-{
- Q_D(const QQuickMonthGrid);
- return d->model->year();
-}
-
-void QQuickMonthGrid::setYear(int year)
-{
- Q_D(QQuickMonthGrid);
- if (year < -271820 || year > 275759) {
- qmlWarning(this) << "year " << year << " is out of range [-271820...275759]";
- return;
- }
- d->model->setYear(year);
-}
-
-/*!
- \internal
- \qmlproperty model Qt.labs.calendar::MonthGrid::source
-
- This property holds the source model that is used as a data model
- for the internal content column.
-*/
-QVariant QQuickMonthGrid::source() const
-{
- Q_D(const QQuickMonthGrid);
- return d->source;
-}
-
-void QQuickMonthGrid::setSource(const QVariant &source)
-{
- Q_D(QQuickMonthGrid);
- if (d->source != source) {
- d->source = source;
- emit sourceChanged();
- }
-}
-
-/*!
- \qmlproperty string Qt.labs.calendar::MonthGrid::title
-
- This property holds a title for the calendar.
-
- This property is provided for convenience. MonthGrid itself does
- not visualize the title. The default value consists of the month name,
- formatted using \l {Control::locale}{locale}, and the year number.
-*/
-QString QQuickMonthGrid::title() const
-{
- Q_D(const QQuickMonthGrid);
- if (d->title.isNull())
- return d->model->title();
- return d->title;
-}
-
-void QQuickMonthGrid::setTitle(const QString &title)
-{
- Q_D(QQuickMonthGrid);
- if (d->title != title) {
- d->title = title;
- emit titleChanged();
- }
-}
-
-/*!
- \qmlproperty Component Qt.labs.calendar::MonthGrid::delegate
-
- This property holds the item delegate that visualizes each day.
-
- In addition to the \c index property, a list of model data roles
- are available in the context of each delegate:
- \table
- \row \li \b model.date : date \li The date of the cell
- \row \li \b model.day : int \li The number of the day
- \row \li \b model.today : bool \li Whether the delegate represents today
- \row \li \b model.weekNumber : int \li The week number
- \row \li \b model.month : int \li The number of the month
- \row \li \b model.year : int \li The number of the year
- \endtable
-
- The following snippet presents the default implementation of the item
- delegate. It can be used as a starting point for implementing custom
- delegates.
-
- \snippet MonthGrid.qml delegate
-*/
-QQmlComponent *QQuickMonthGrid::delegate() const
-{
- Q_D(const QQuickMonthGrid);
- return d->delegate;
-}
-
-void QQuickMonthGrid::setDelegate(QQmlComponent *delegate)
-{
- Q_D(QQuickMonthGrid);
- if (d->delegate != delegate) {
- d->delegate = delegate;
- emit delegateChanged();
- }
-}
-
-void QQuickMonthGrid::componentComplete()
-{
- Q_D(QQuickMonthGrid);
- QQuickControl::componentComplete();
- if (d->contentItem) {
- const auto childItems = d->contentItem->childItems();
- for (QQuickItem *child : childItems) {
- if (!QQuickItemPrivate::get(child)->isTransparentForPositioner())
- d->setContextProperty(child, QStringLiteral("pressed"), false);
- }
- }
- d->resizeItems();
-}
-
-void QQuickMonthGrid::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- Q_D(QQuickMonthGrid);
- QQuickControl::geometryChange(newGeometry, oldGeometry);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-void QQuickMonthGrid::localeChange(const QLocale &newLocale, const QLocale &oldLocale)
-{
- Q_D(QQuickMonthGrid);
- QQuickControl::localeChange(newLocale, oldLocale);
- d->model->setLocale(newLocale);
-}
-
-void QQuickMonthGrid::paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding)
-{
- Q_D(QQuickMonthGrid);
- QQuickControl::paddingChange(newPadding, oldPadding);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-void QQuickMonthGrid::updatePolish()
-{
- Q_D(QQuickMonthGrid);
- QQuickControl::updatePolish();
- d->resizeItems();
-}
-
-void QQuickMonthGrid::timerEvent(QTimerEvent *event)
-{
- Q_D(QQuickMonthGrid);
- if (event->timerId() == d->pressTimer) {
- if (d->pressedDate.isValid())
- emit pressAndHold(d->pressedDate);
- killTimer(d->pressTimer);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickmonthgrid_p.h b/src/imports/calendar/qquickmonthgrid_p.h
deleted file mode 100644
index 104dfbb5..00000000
--- a/src/imports/calendar/qquickmonthgrid_p.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKMONTHGRID_P_H
-#define QQUICKMONTHGRID_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQuickTemplates2/private/qquickcontrol_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQmlComponent;
-class QQuickMonthGridPrivate;
-
-class QQuickMonthGrid : public QQuickControl
-{
- Q_OBJECT
- Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
- Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL)
- Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL)
- Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
- Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
-
-public:
- explicit QQuickMonthGrid(QQuickItem *parent = nullptr);
-
- int month() const;
- void setMonth(int month);
-
- int year() const;
- void setYear(int year);
-
- QVariant source() const;
- void setSource(const QVariant &source);
-
- QString title() const;
- void setTitle(const QString &title);
-
- QQmlComponent *delegate() const;
- void setDelegate(QQmlComponent *delegate);
-
-Q_SIGNALS:
- void monthChanged();
- void yearChanged();
- void sourceChanged();
- void titleChanged();
- void delegateChanged();
-
- void pressed(const QDate &date);
- void released(const QDate &date);
- void clicked(const QDate &date);
- void pressAndHold(const QDate &date);
-
-protected:
- void componentComplete() override;
- void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
- void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
- void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
- void updatePolish() override;
-
- void timerEvent(QTimerEvent *event) override;
-
-private:
- Q_DISABLE_COPY(QQuickMonthGrid)
- Q_DECLARE_PRIVATE(QQuickMonthGrid)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickMonthGrid)
-
-#endif // QQUICKMONTHGRID_P_H
diff --git a/src/imports/calendar/qquickmonthmodel.cpp b/src/imports/calendar/qquickmonthmodel.cpp
deleted file mode 100644
index 0d83ace3..00000000
--- a/src/imports/calendar/qquickmonthmodel.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickmonthmodel_p.h"
-
-#include <QtCore/private/qabstractitemmodel_p.h>
-
-namespace {
- static const int daysInAWeek = 7;
- static const int weeksOnACalendarMonth = 6;
- static const int daysOnACalendarMonth = daysInAWeek * weeksOnACalendarMonth;
-}
-
-QT_BEGIN_NAMESPACE
-
-class QQuickMonthModelPrivate : public QAbstractItemModelPrivate
-{
- Q_DECLARE_PUBLIC(QQuickMonthModel)
-
-public:
- QQuickMonthModelPrivate() : dates(daysOnACalendarMonth)
- {
- today = QDate::currentDate();
- month = today.month();
- year = today.year();
- }
-
- bool populate(int month, int year, const QLocale &locale, bool force = false);
-
- int month;
- int year;
- QString title;
- QLocale locale;
- QVector<QDate> dates;
- QDate today;
-};
-
-bool QQuickMonthModelPrivate::populate(int m, int y, const QLocale &l, bool force)
-{
- Q_Q(QQuickMonthModel);
- if (!force && m == month && y == year && l.firstDayOfWeek() == locale.firstDayOfWeek())
- return false;
-
- // The actual first (1st) day of the month.
- QDate firstDayOfMonthDate(y, m, 1);
- int difference = ((firstDayOfMonthDate.dayOfWeek() - l.firstDayOfWeek()) + 7) % 7;
- // The first day to display should never be the 1st of the month, as we want some days from
- // the previous month to be visible.
- if (difference == 0)
- difference += 7;
- QDate firstDateToDisplay = firstDayOfMonthDate.addDays(-difference);
-
- today = QDate::currentDate();
- for (int i = 0; i < daysOnACalendarMonth; ++i)
- dates[i] = firstDateToDisplay.addDays(i);
-
- q->setTitle(l.standaloneMonthName(m) + QStringLiteral(" ") + QString::number(y));
-
- return true;
-}
-
-QQuickMonthModel::QQuickMonthModel(QObject *parent) :
- QAbstractListModel(*(new QQuickMonthModelPrivate), parent)
-{
- Q_D(QQuickMonthModel);
- d->populate(d->month, d->year, d->locale, true);
-}
-
-int QQuickMonthModel::month() const
-{
- Q_D(const QQuickMonthModel);
- return d->month;
-}
-
-void QQuickMonthModel::setMonth(int month)
-{
- Q_D(QQuickMonthModel);
- if (d->month != month) {
- if (d->populate(month, d->year, d->locale))
- emit dataChanged(index(0, 0), index(daysOnACalendarMonth - 1, 0));
- d->month = month;
- emit monthChanged();
- }
-}
-
-int QQuickMonthModel::year() const
-{
- Q_D(const QQuickMonthModel);
- return d->year;
-}
-
-void QQuickMonthModel::setYear(int year)
-{
- Q_D(QQuickMonthModel);
- if (d->year != year) {
- if (d->populate(d->month, year, d->locale))
- emit dataChanged(index(0, 0), index(daysOnACalendarMonth - 1, 0));
- d->year = year;
- emit yearChanged();
- }
-}
-
-QLocale QQuickMonthModel::locale() const
-{
- Q_D(const QQuickMonthModel);
- return d->locale;
-}
-
-void QQuickMonthModel::setLocale(const QLocale &locale)
-{
- Q_D(QQuickMonthModel);
- if (d->locale != locale) {
- if (d->populate(d->month, d->year, locale))
- emit dataChanged(index(0, 0), index(daysOnACalendarMonth - 1, 0));
- d->locale = locale;
- emit localeChanged();
- }
-}
-
-QString QQuickMonthModel::title() const
-{
- Q_D(const QQuickMonthModel);
- return d->title;
-}
-
-void QQuickMonthModel::setTitle(const QString &title)
-{
- Q_D(QQuickMonthModel);
- if (d->title != title) {
- d->title = title;
- emit titleChanged();
- }
-}
-
-QDate QQuickMonthModel::dateAt(int index) const
-{
- Q_D(const QQuickMonthModel);
- return d->dates.value(index);
-}
-
-int QQuickMonthModel::indexOf(const QDate &date) const
-{
- Q_D(const QQuickMonthModel);
- if (date < d->dates.first() || date > d->dates.last())
- return -1;
- return qMax(qint64(0), d->dates.first().daysTo(date));
-}
-
-QVariant QQuickMonthModel::data(const QModelIndex &index, int role) const
-{
- Q_D(const QQuickMonthModel);
- if (index.isValid() && index.row() < daysOnACalendarMonth) {
- const QDate date = d->dates.at(index.row());
- switch (role) {
- case DateRole:
- return date;
- case DayRole:
- return date.day();
- case TodayRole:
- return date == d->today;
- case WeekNumberRole:
- return date.weekNumber();
- case MonthRole:
- return date.month() - 1;
- case YearRole:
- return date.year();
- default:
- break;
- }
- }
- return QVariant();
-}
-
-int QQuickMonthModel::rowCount(const QModelIndex &parent) const
-{
- if (parent.isValid())
- return 0;
- return daysOnACalendarMonth;
-}
-
-QHash<int, QByteArray> QQuickMonthModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[DateRole] = QByteArrayLiteral("date");
- roles[DayRole] = QByteArrayLiteral("day");
- roles[TodayRole] = QByteArrayLiteral("today");
- roles[WeekNumberRole] = QByteArrayLiteral("weekNumber");
- roles[MonthRole] = QByteArrayLiteral("month");
- roles[YearRole] = QByteArrayLiteral("year");
- return roles;
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickmonthmodel_p.h b/src/imports/calendar/qquickmonthmodel_p.h
deleted file mode 100644
index a0c7ab24..00000000
--- a/src/imports/calendar/qquickmonthmodel_p.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKMONTHMODEL_P_H
-#define QQUICKMONTHMODEL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstractitemmodel.h>
-#include <QtCore/qdatetime.h>
-#include <QtCore/qlocale.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickMonthModelPrivate;
-
-class QQuickMonthModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
- Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL)
- Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
- Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL)
- Q_PROPERTY(int count READ rowCount CONSTANT FINAL)
-
-public:
- explicit QQuickMonthModel(QObject *parent = nullptr);
-
- int month() const;
- void setMonth(int month);
-
- int year() const;
- void setYear(int year);
-
- QLocale locale() const;
- void setLocale(const QLocale &locale);
-
- QString title() const;
- void setTitle(const QString &title);
-
- Q_INVOKABLE QDate dateAt(int index) const;
- Q_INVOKABLE int indexOf(const QDate &date) const;
-
- enum {
- DateRole = Qt::UserRole + 1,
- DayRole,
- TodayRole,
- WeekNumberRole,
- MonthRole,
- YearRole
- };
-
- QHash<int, QByteArray> roleNames() const override;
- QVariant data(const QModelIndex &index, int role) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-
-Q_SIGNALS:
- void monthChanged();
- void yearChanged();
- void localeChanged();
- void titleChanged();
-
-private:
- Q_DISABLE_COPY(QQuickMonthModel)
- Q_DECLARE_PRIVATE(QQuickMonthModel)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickMonthModel)
-
-#endif // QQUICKMONTHMODEL_P_H
diff --git a/src/imports/calendar/qquickweeknumbercolumn.cpp b/src/imports/calendar/qquickweeknumbercolumn.cpp
deleted file mode 100644
index 55d32981..00000000
--- a/src/imports/calendar/qquickweeknumbercolumn.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickweeknumbercolumn_p.h"
-#include "qquickweeknumbermodel_p.h"
-
-#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
-#include <QtQml/qqmlinfo.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \qmltype WeekNumberColumn
- \inherits Control
-//! \instantiates QQuickWeekNumberColumn
- \inqmlmodule Qt.labs.calendar
- \brief A column of week numbers.
-
- WeekNumberColumn presents week numbers in a column. The week numbers
- are calculated for a given \l month and \l year, using the specified
- \l {Control::locale}{locale}.
-
- \image qtlabscalendar-weeknumbercolumn.png
- \snippet qtlabscalendar-weeknumbercolumn.qml 1
-
- WeekNumberColumn can be used as a standalone control, but it is most
- often used in conjunction with MonthGrid. Regardless of the use case,
- positioning of the column is left to the user.
-
- \image qtlabscalendar-weeknumbercolumn-layout.png
- \snippet qtlabscalendar-weeknumbercolumn-layout.qml 1
-
- The visual appearance of WeekNumberColumn can be changed by
- implementing a \l {delegate}{custom delegate}.
-
- \labs
-
- \sa MonthGrid, DayOfWeekRow
-*/
-
-class QQuickWeekNumberColumnPrivate : public QQuickControlPrivate
-{
-public:
- QQuickWeekNumberColumnPrivate() : delegate(nullptr), model(nullptr) { }
-
- void resizeItems();
-
- QVariant source;
- QQmlComponent *delegate;
- QQuickWeekNumberModel *model;
-};
-
-void QQuickWeekNumberColumnPrivate::resizeItems()
-{
- if (!contentItem)
- return;
-
- QSizeF itemSize;
- itemSize.setWidth(contentItem->width());
- itemSize.setHeight((contentItem->height() - 5 * spacing) / 6);
-
- const auto childItems = contentItem->childItems();
- for (QQuickItem *item : childItems)
- item->setSize(itemSize);
-}
-
-QQuickWeekNumberColumn::QQuickWeekNumberColumn(QQuickItem *parent) :
- QQuickControl(*(new QQuickWeekNumberColumnPrivate), parent)
-{
- Q_D(QQuickWeekNumberColumn);
- d->model = new QQuickWeekNumberModel(this);
- d->source = QVariant::fromValue(d->model);
- connect(d->model, &QQuickWeekNumberModel::monthChanged, this, &QQuickWeekNumberColumn::monthChanged);
- connect(d->model, &QQuickWeekNumberModel::yearChanged, this, &QQuickWeekNumberColumn::yearChanged);
-}
-
-/*!
- \qmlproperty int Qt.labs.calendar::WeekNumberColumn::month
-
- This property holds the number of the month that the week numbers are
- calculated for. The default value is the current month.
-
- The Qt Labs Calendar module uses 0-based month numbers to be consistent
- with the JavaScript Date type, that is used by the QML language. This
- means that \c Date::getMonth() can be assigned to this property as is.
- When dealing with dealing with month numbers directly, it is highly
- recommended to use the following enumeration values to avoid confusion.
-
- \value Calendar.January January (0)
- \value Calendar.February February (1)
- \value Calendar.March March (2)
- \value Calendar.April April (3)
- \value Calendar.May May (4)
- \value Calendar.June June (5)
- \value Calendar.July July (6)
- \value Calendar.August August (7)
- \value Calendar.September September (8)
- \value Calendar.October October (9)
- \value Calendar.November November (10)
- \value Calendar.December December (11)
-
- \sa Calendar
-*/
-int QQuickWeekNumberColumn::month() const
-{
- Q_D(const QQuickWeekNumberColumn);
- return d->model->month() - 1;
-}
-
-void QQuickWeekNumberColumn::setMonth(int month)
-{
- Q_D(QQuickWeekNumberColumn);
- if (month < 0 || month > 11) {
- qmlWarning(this) << "month " << month << " is out of range [0...11]";
- return;
- }
- d->model->setMonth(month + 1);
-}
-
-/*!
- \qmlproperty int Qt.labs.calendar::WeekNumberColumn::year
-
- This property holds the number of the year that the week numbers are calculated for.
-
- The value must be in the range from \c -271820 to \c 275759. The default
- value is the current year.
-*/
-int QQuickWeekNumberColumn::year() const
-{
- Q_D(const QQuickWeekNumberColumn);
- return d->model->year();
-}
-
-void QQuickWeekNumberColumn::setYear(int year)
-{
- Q_D(QQuickWeekNumberColumn);
- if (year < -271820 || year > 275759) {
- qmlWarning(this) << "year " << year << " is out of range [-271820...275759]";
- return;
- }
- d->model->setYear(year);
-}
-
-/*!
- \internal
- \qmlproperty model Qt.labs.calendar::WeekNumberColumn::source
-
- This property holds the source model that is used as a data model
- for the internal content column.
-*/
-QVariant QQuickWeekNumberColumn::source() const
-{
- Q_D(const QQuickWeekNumberColumn);
- return d->source;
-}
-
-void QQuickWeekNumberColumn::setSource(const QVariant &source)
-{
- Q_D(QQuickWeekNumberColumn);
- if (d->source != source) {
- d->source = source;
- emit sourceChanged();
- }
-}
-
-/*!
- \qmlproperty Component Qt.labs.calendar::WeekNumberColumn::delegate
-
- This property holds the item delegate that visualizes each week number.
-
- In addition to the \c index property, a list of model data roles
- are available in the context of each delegate:
- \table
- \row \li \b model.weekNumber : int \li The week number
- \endtable
-
- The following snippet presents the default implementation of the item
- delegate. It can be used as a starting point for implementing custom
- delegates.
-
- \snippet WeekNumberColumn.qml delegate
-*/
-QQmlComponent *QQuickWeekNumberColumn::delegate() const
-{
- Q_D(const QQuickWeekNumberColumn);
- return d->delegate;
-}
-
-void QQuickWeekNumberColumn::setDelegate(QQmlComponent *delegate)
-{
- Q_D(QQuickWeekNumberColumn);
- if (d->delegate != delegate) {
- d->delegate = delegate;
- emit delegateChanged();
- }
-}
-
-void QQuickWeekNumberColumn::componentComplete()
-{
- Q_D(QQuickWeekNumberColumn);
- QQuickControl::componentComplete();
- d->resizeItems();
-}
-
-void QQuickWeekNumberColumn::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
-{
- Q_D(QQuickWeekNumberColumn);
- QQuickControl::geometryChange(newGeometry, oldGeometry);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-void QQuickWeekNumberColumn::localeChange(const QLocale &newLocale, const QLocale &oldLocale)
-{
- Q_D(QQuickWeekNumberColumn);
- QQuickControl::localeChange(newLocale, oldLocale);
- d->model->setLocale(newLocale);
-}
-
-void QQuickWeekNumberColumn::paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding)
-{
- Q_D(QQuickWeekNumberColumn);
- QQuickControl::paddingChange(newPadding, oldPadding);
- if (isComponentComplete())
- d->resizeItems();
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickweeknumbercolumn_p.h b/src/imports/calendar/qquickweeknumbercolumn_p.h
deleted file mode 100644
index 6a6c337f..00000000
--- a/src/imports/calendar/qquickweeknumbercolumn_p.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKWEEKNUMBERCOLUMN_P_H
-#define QQUICKWEEKNUMBERCOLUMN_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtQuickTemplates2/private/qquickcontrol_p.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQmlComponent;
-class QQuickWeekNumberColumnPrivate;
-
-class QQuickWeekNumberColumn : public QQuickControl
-{
- Q_OBJECT
- Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
- Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL)
- Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL)
- Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
-
-public:
- explicit QQuickWeekNumberColumn(QQuickItem *parent = nullptr);
-
- int month() const;
- void setMonth(int month);
-
- int year() const;
- void setYear(int year);
-
- QVariant source() const;
- void setSource(const QVariant &source);
-
- QQmlComponent *delegate() const;
- void setDelegate(QQmlComponent *delegate);
-
-Q_SIGNALS:
- void monthChanged();
- void yearChanged();
- void sourceChanged();
- void delegateChanged();
-
-protected:
- void componentComplete() override;
- void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
- void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
- void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
-
-private:
- Q_DISABLE_COPY(QQuickWeekNumberColumn)
- Q_DECLARE_PRIVATE(QQuickWeekNumberColumn)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickWeekNumberColumn)
-
-#endif // QQUICKWEEKNUMBERCOLUMN_P_H
diff --git a/src/imports/calendar/qquickweeknumbermodel.cpp b/src/imports/calendar/qquickweeknumbermodel.cpp
deleted file mode 100644
index 28895790..00000000
--- a/src/imports/calendar/qquickweeknumbermodel.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qquickweeknumbermodel_p.h"
-
-#include <QtCore/private/qabstractitemmodel_p.h>
-#include <QtCore/qdatetime.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickWeekNumberModelPrivate : public QAbstractItemModelPrivate
-{
- Q_DECLARE_PUBLIC(QQuickWeekNumberModel)
-
-public:
- QQuickWeekNumberModelPrivate() : month(-1), year(-1), weekNumbers{}
- {
- QDate date = QDate::currentDate();
- init(date.month(), date.year(), locale);
- month = date.month();
- year = date.year();
- }
-
- void init(int month, int year, const QLocale &locale = QLocale());
- static QDate calculateFirst(int month, int year, const QLocale &locale);
-
- int month;
- int year;
- QLocale locale;
- int weekNumbers[6];
-};
-
-void QQuickWeekNumberModelPrivate::init(int m, int y, const QLocale &l)
-{
- Q_Q(QQuickWeekNumberModel);
- if (m == month && y == year && l.firstDayOfWeek() == locale.firstDayOfWeek())
- return;
-
- // The actual first (1st) day of the month.
- QDate firstDayOfMonthDate(y, m, 1);
- int difference = ((firstDayOfMonthDate.dayOfWeek() - l.firstDayOfWeek()) + 7) % 7;
- // The first day to display should never be the 1st of the month, as we want some days from
- // the previous month to be visible.
- if (difference == 0)
- difference += 7;
-
- for (int i = 0; i < 6; ++i)
- weekNumbers[i] = firstDayOfMonthDate.addDays(i * 7 - difference).weekNumber();
-
- if (q) // null at construction
- emit q->dataChanged(q->index(0, 0), q->index(5, 0));
-}
-
-QQuickWeekNumberModel::QQuickWeekNumberModel(QObject *parent) :
- QAbstractListModel(*(new QQuickWeekNumberModelPrivate), parent)
-{
-}
-
-int QQuickWeekNumberModel::month() const
-{
- Q_D(const QQuickWeekNumberModel);
- return d->month;
-}
-
-void QQuickWeekNumberModel::setMonth(int month)
-{
- Q_D(QQuickWeekNumberModel);
- if (d->month != month) {
- d->init(month, d->year, d->locale);
- d->month = month;
- emit monthChanged();
- }
-}
-
-int QQuickWeekNumberModel::year() const
-{
- Q_D(const QQuickWeekNumberModel);
- return d->year;
-}
-
-void QQuickWeekNumberModel::setYear(int year)
-{
- Q_D(QQuickWeekNumberModel);
- if (d->year != year) {
- d->init(d->month, year, d->locale);
- d->year = year;
- emit yearChanged();
- }
-}
-
-QLocale QQuickWeekNumberModel::locale() const
-{
- Q_D(const QQuickWeekNumberModel);
- return d->locale;
-}
-
-void QQuickWeekNumberModel::setLocale(const QLocale &locale)
-{
- Q_D(QQuickWeekNumberModel);
- if (d->locale != locale) {
- d->init(d->month, d->year, locale);
- d->locale = locale;
- emit localeChanged();
- }
-}
-
-int QQuickWeekNumberModel::weekNumberAt(int index) const
-{
- Q_D(const QQuickWeekNumberModel);
- if (index < 0 || index > 5)
- return -1;
- return d->weekNumbers[index];
-}
-
-int QQuickWeekNumberModel::indexOf(int weekNumber) const
-{
- Q_D(const QQuickWeekNumberModel);
- if (weekNumber < d->weekNumbers[0] || weekNumber > d->weekNumbers[5])
- return -1;
- return weekNumber - d->weekNumbers[0];
-}
-
-QVariant QQuickWeekNumberModel::data(const QModelIndex &index, int role) const
-{
- if (role == WeekNumberRole) {
- int weekNumber = weekNumberAt(index.row());
- if (weekNumber != -1)
- return weekNumber;
- }
- return QVariant();
-}
-
-int QQuickWeekNumberModel::rowCount(const QModelIndex &parent) const
-{
- if (parent.isValid())
- return 0;
- return 6;
-}
-
-QHash<int, QByteArray> QQuickWeekNumberModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[WeekNumberRole] = QByteArrayLiteral("weekNumber");
- return roles;
-}
-
-QT_END_NAMESPACE
diff --git a/src/imports/calendar/qquickweeknumbermodel_p.h b/src/imports/calendar/qquickweeknumbermodel_p.h
deleted file mode 100644
index 1c6b7ef4..00000000
--- a/src/imports/calendar/qquickweeknumbermodel_p.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QQUICKWEEKNUMBERMODEL_P_H
-#define QQUICKWEEKNUMBERMODEL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtCore/qabstractitemmodel.h>
-#include <QtCore/qlocale.h>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class QQuickWeekNumberModelPrivate;
-
-class QQuickWeekNumberModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
- Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL)
- Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
- Q_PROPERTY(int count READ rowCount CONSTANT FINAL)
-
-public:
- explicit QQuickWeekNumberModel(QObject *parent = nullptr);
-
- int month() const;
- void setMonth(int month);
-
- int year() const;
- void setYear(int year);
-
- QLocale locale() const;
- void setLocale(const QLocale &locale);
-
- Q_INVOKABLE int weekNumberAt(int index) const;
- Q_INVOKABLE int indexOf(int weekNumber) const;
-
- enum {
- WeekNumberRole = Qt::UserRole + 1
- };
-
- QHash<int, QByteArray> roleNames() const override;
- QVariant data(const QModelIndex &index, int role) const override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
-
-Q_SIGNALS:
- void monthChanged();
- void yearChanged();
- void localeChanged();
-
-private:
- Q_DISABLE_COPY(QQuickWeekNumberModel)
- Q_DECLARE_PRIVATE(QQuickWeekNumberModel)
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QQuickWeekNumberModel)
-
-#endif // QQUICKWEEKNUMBERMODEL_P_H
diff --git a/src/imports/calendar/qtlabscalendarplugin.cpp b/src/imports/calendar/qtlabscalendarplugin.cpp
deleted file mode 100644
index afeb8a40..00000000
--- a/src/imports/calendar/qtlabscalendarplugin.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Calendar module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/qqmlextensionplugin.h>
-
-#include "qquickdayofweekrow_p.h"
-#include "qquickmonthgrid_p.h"
-#include "qquickweeknumbercolumn_p.h"
-#include "qquickcalendarmodel_p.h"
-#include "qquickcalendar_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QtLabsCalendarPlugin: public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- QtLabsCalendarPlugin(QObject *parent = nullptr);
- void registerTypes(const char *uri) override;
-};
-
-QtLabsCalendarPlugin::QtLabsCalendarPlugin(QObject *parent) : QQmlExtensionPlugin(parent)
-{
-}
-
-static QObject *calendarSingleton(QQmlEngine *engine, QJSEngine *scriptEngine)
-{
- Q_UNUSED(engine);
- Q_UNUSED(scriptEngine);
- return new QQuickCalendar;
-}
-
-void QtLabsCalendarPlugin::registerTypes(const char *uri)
-{
- qmlRegisterType<QQuickDayOfWeekRow>(uri, 1, 0, "AbstractDayOfWeekRow");
- qmlRegisterType<QQuickMonthGrid>(uri, 1, 0, "AbstractMonthGrid");
- qmlRegisterType<QQuickWeekNumberColumn>(uri, 1, 0, "AbstractWeekNumberColumn");
- qmlRegisterType<QQuickCalendarModel>(uri, 1, 0, "CalendarModel");
- qmlRegisterSingletonType<QQuickCalendar>(uri, 1, 0, "Calendar", calendarSingleton);
-}
-
-QT_END_NAMESPACE
-
-#include "qtlabscalendarplugin.moc"
diff --git a/src/imports/controls/CMakeLists.txt b/src/imports/controls/CMakeLists.txt
index 626155f8..3cef4d26 100644
--- a/src/imports/controls/CMakeLists.txt
+++ b/src/imports/controls/CMakeLists.txt
@@ -71,7 +71,7 @@ qt_add_resource(qtquickcontrols2plugin "qtquickcontrols2plugin"
#### Keys ignored in scope 1:.:.:controls.pro:<TRUE>:
# IMPORT_VERSION = "2.$$QT_MINOR_VERSION"
-# OTHER_FILES = "qmldir" "$$QML_FILES" "$$PWD/snippets/*.qml" "$$PWD/src/*.qdoc" "$$PWD/src/calendar/*.qdoc" "$$PWD/src/templates/*.qdoc"
+# OTHER_FILES = "qmldir" "$$QML_FILES" "$$PWD/snippets/*.qml" "$$PWD/src/*.qdoc" "$$PWD/src/templates/*.qdoc"
# TARGETPATH = "QtQuick/Controls.2"
# _REQUIREMENTS = "qtConfig(quickcontrols2-default)"
diff --git a/src/imports/controls/doc/doc.pri b/src/imports/controls/doc/doc.pri
index f1bf7e80..4bd8bd95 100644
--- a/src/imports/controls/doc/doc.pri
+++ b/src/imports/controls/doc/doc.pri
@@ -3,5 +3,4 @@ QMAKE_DOCS = $$PWD/qtquickcontrols.qdocconf
OTHER_FILES += \
$$files($$PWD/snippets/*.qml) \
$$files($$PWD/src/*.qdoc) \
- $$files($$PWD/src/calendar/*.qdoc) \
$$files($$PWD/src/templates/*.qdoc)
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
index bfb27dcb..7f8a066d 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
@@ -224,12 +224,12 @@
\row
\li \l [QML QtQuickControls1] {Calendar}
\li \mdash
- \li \l [QML QtLabsCalendar] {MonthGrid},\br
- \l [QML QtLabsCalendar] {DayOfWeekRow},\br
- \l [QML QtLabsCalendar] {WeekNumberColumn} \br\sup {(Qt Labs Calendar)}
+ \li \l [QML QtQuickCalendar] {MonthGrid},\br
+ \l [QML QtQuickCalendar] {DayOfWeekRow},\br
+ \l [QML QtQuickCalendar] {WeekNumberColumn} \br\sup {(Qt Quick Calendar)}
\li \list
- \li \b {Qt Labs Calendar}: \c MonthGrid, \c DayOfWeek, and \c WeekNumberColumn
- are \e experimental unstyled building blocks for calendar views.
+ \li \b {Qt Quick Calendar}: \c MonthGrid, \c DayOfWeek, and \c WeekNumberColumn
+ are \e unstyled building blocks for calendar views.
\endlist
\row
\li \l [QML QtQuickControls1] {CheckBox}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
index ac306aaa..fee009e6 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -90,7 +90,7 @@
\l {Material Style}{\c QtQuick.Controls.Material},\br
\l {Universal Style}{\c QtQuick.Controls.Universal},\br
\l {Qt Quick Templates 2 QML Types}{\c QtQuick.Templates}
- \li \l {Qt Labs Calendar QML Types}{\c Qt.labs.calendar},\br
+ \li \l {Qt Quick Calendar QML Types}{\c QtQuick.Calendar},\br
\l {Qt Labs Platform QML Types}{\c Qt.labs.platform}
\row
\li 5.7
@@ -182,7 +182,7 @@
\li \l{Qt Quick}
\li \l{Qt Quick Layouts}
\li \l{Qt Quick Templates 2}
- \li \l{Qt Labs Calendar}
+ \li \l{Qt Quick Calendar}
\li \l{Qt Labs Platform}
\endlist
*/
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
index e32bded7..2345616e 100644
--- a/src/imports/imports.pro
+++ b/src/imports/imports.pro
@@ -1,7 +1,6 @@
TEMPLATE = subdirs
SUBDIRS += \
controls \
- calendar \
platform \
templates