aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/calendar/qquickcalendar_p.h
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_p.h
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_p.h')
-rw-r--r--src/imports/calendar/qquickcalendar_p.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/imports/calendar/qquickcalendar_p.h b/src/imports/calendar/qquickcalendar_p.h
new file mode 100644
index 00000000..569be1d6
--- /dev/null
+++ b/src/imports/calendar/qquickcalendar_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#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>
+
+QT_BEGIN_NAMESPACE
+
+class QQuickCalendar : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit QQuickCalendar(QObject *parent = Q_NULLPTR);
+
+ enum Month {
+ January,
+ February,
+ March,
+ April,
+ May,
+ June,
+ July,
+ August,
+ September,
+ October,
+ November,
+ December
+ };
+ Q_ENUM(Month)
+};
+
+Q_DECLARE_TYPEINFO(QQuickCalendar, Q_COMPLEX_TYPE);
+
+QT_END_NAMESPACE
+
+#endif // QQUICKCALENDAR_P_H