aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/calendar/qquickcalendar.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-03 19:04:44 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-04 10:56:45 +0000
commit6eab7d10aa34b6a76cbd46a6af703d6c6fa77ca5 (patch)
tree004aa0cfa9163ed974bac982b1b879304be2446a /src/imports/calendar/qquickcalendar.cpp
parentabacbbe4d2b92ebe9e488e61906ba1d36abb3ef8 (diff)
Add Calendar singleton
Not yet super useful, as it only contains a Month enum to help with JavaScript's zero-based months. Later on, we can add various calendar related utility methods, such as calculating the next/prev month and so on. Change-Id: I7685eb931833fc0c30e2d5d4fe874d0618d054b4 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/calendar/qquickcalendar.cpp')
-rw-r--r--src/imports/calendar/qquickcalendar.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/imports/calendar/qquickcalendar.cpp b/src/imports/calendar/qquickcalendar.cpp
new file mode 100644
index 00000000..198c4527
--- /dev/null
+++ b/src/imports/calendar/qquickcalendar.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 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:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $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.
+
+ \sa MonthGrid, DayOfWeekRow, WeekNumberColumn
+*/
+
+QQuickCalendar::QQuickCalendar(QObject *parent) : QObject(parent)
+{
+}
+
+QT_END_NAMESPACE