Calendar: merge C++ lib to the QML plugin
Change-Id: I7eeb0335fd88002c85f93136fc71dfb394788421 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
This commit is contained in:
parent
58605b099b
commit
6eca2e4238
|
@ -1,14 +0,0 @@
|
||||||
TARGET = QtQuickCalendar
|
|
||||||
MODULE = quickcalendar2
|
|
||||||
CONFIG += internal_module
|
|
||||||
|
|
||||||
QT += quick
|
|
||||||
QT += core-private gui-private qml-private quick-private quickcontrols2-private
|
|
||||||
|
|
||||||
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/qtquickcalendarglobal_p.h
|
|
||||||
|
|
||||||
include(calendar.pri)
|
|
||||||
load(qt_module)
|
|
|
@ -1,67 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Contact: http://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the Qt Quick 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 QTQUICKCALENDARGLOBAL_P_H
|
|
||||||
#define QTQUICKCALENDARGLOBAL_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/qglobal.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
#ifndef QT_STATIC
|
|
||||||
# if defined(QT_BUILD_QUICKCALENDAR2_LIB)
|
|
||||||
# define Q_QUICKCALENDAR_EXPORT Q_DECL_EXPORT
|
|
||||||
# else
|
|
||||||
# define Q_QUICKCALENDAR_EXPORT Q_DECL_IMPORT
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define Q_QUICKCALENDAR_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // QTQUICKCALENDARGLOBAL_P_H
|
|
|
@ -1,4 +1,7 @@
|
||||||
INCLUDEPATH += $$PWD
|
QML_FILES = \
|
||||||
|
CalendarView.qml \
|
||||||
|
DayOfWeekRow.qml \
|
||||||
|
WeekNumberColumn.qml
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
$$PWD/qquickcalendarmodel_p.h \
|
$$PWD/qquickcalendarmodel_p.h \
|
|
@ -3,18 +3,19 @@ TARGETPATH = QtQuick/Calendar.2
|
||||||
IMPORT_VERSION = 2.0
|
IMPORT_VERSION = 2.0
|
||||||
|
|
||||||
QT += qml quick
|
QT += qml quick
|
||||||
QT += core-private gui-private qml-private quick-private quickcontrols2-private quickcalendar2-private
|
QT += core-private gui-private qml-private quick-private quickcontrols2-private
|
||||||
|
|
||||||
|
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
qmldir
|
qmldir
|
||||||
|
|
||||||
QML_FILES = \
|
|
||||||
CalendarView.qml \
|
|
||||||
DayOfWeekRow.qml \
|
|
||||||
WeekNumberColumn.qml
|
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
$$PWD/qtquickcalendar2plugin.cpp
|
$$PWD/qtquickcalendar2plugin.cpp
|
||||||
|
|
||||||
|
include(calendar.pri)
|
||||||
|
|
||||||
CONFIG += no_cxx_module
|
CONFIG += no_cxx_module
|
||||||
load(qml_plugin)
|
load(qml_plugin)
|
||||||
|
|
|
@ -51,13 +51,12 @@
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
#include <QtCore/qdatetime.h>
|
#include <QtCore/qdatetime.h>
|
||||||
#include <QtQml/qqmlparserstatus.h>
|
#include <QtQml/qqmlparserstatus.h>
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QQuickCalendarModelPrivate;
|
class QQuickCalendarModelPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickCalendarModel : public QAbstractListModel, public QQmlParserStatus
|
class QQuickCalendarModel : public QAbstractListModel, public QQmlParserStatus
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QQmlParserStatus)
|
Q_INTERFACES(QQmlParserStatus)
|
|
@ -48,7 +48,6 @@
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
#include <QtQuickControls/private/qquickcontrol_p.h>
|
#include <QtQuickControls/private/qquickcontrol_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -56,7 +55,7 @@ QT_BEGIN_NAMESPACE
|
||||||
class QQmlComponent;
|
class QQmlComponent;
|
||||||
class QQuickCalendarViewPrivate;
|
class QQuickCalendarViewPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickCalendarView : public QQuickControl
|
class QQuickCalendarView : public QQuickControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
|
@ -50,13 +50,12 @@
|
||||||
|
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
#include <QtCore/qlocale.h>
|
#include <QtCore/qlocale.h>
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QQuickDayOfWeekModelPrivate;
|
class QQuickDayOfWeekModelPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickDayOfWeekModel : public QAbstractListModel
|
class QQuickDayOfWeekModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
|
Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
|
|
@ -48,7 +48,6 @@
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
#include <QtQuickControls/private/qquickcontrol_p.h>
|
#include <QtQuickControls/private/qquickcontrol_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -56,7 +55,7 @@ QT_BEGIN_NAMESPACE
|
||||||
class QQmlComponent;
|
class QQmlComponent;
|
||||||
class QQuickDayOfWeekRowPrivate;
|
class QQuickDayOfWeekRowPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickDayOfWeekRow : public QQuickControl
|
class QQuickDayOfWeekRow : public QQuickControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
|
Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL)
|
|
@ -51,13 +51,12 @@
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
#include <QtCore/qdatetime.h>
|
#include <QtCore/qdatetime.h>
|
||||||
#include <QtCore/qlocale.h>
|
#include <QtCore/qlocale.h>
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QQuickMonthModelPrivate;
|
class QQuickMonthModelPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickMonthModel : public QAbstractListModel
|
class QQuickMonthModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
|
@ -48,7 +48,6 @@
|
||||||
// We mean it.
|
// We mean it.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
#include <QtQuickControls/private/qquickcontrol_p.h>
|
#include <QtQuickControls/private/qquickcontrol_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -56,7 +55,7 @@ QT_BEGIN_NAMESPACE
|
||||||
class QQmlComponent;
|
class QQmlComponent;
|
||||||
class QQuickWeekNumberColumnPrivate;
|
class QQuickWeekNumberColumnPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickWeekNumberColumn : public QQuickControl
|
class QQuickWeekNumberColumn : public QQuickControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
|
@ -50,13 +50,12 @@
|
||||||
|
|
||||||
#include <QtCore/qabstractitemmodel.h>
|
#include <QtCore/qabstractitemmodel.h>
|
||||||
#include <QtCore/qlocale.h>
|
#include <QtCore/qlocale.h>
|
||||||
#include <QtQuickCalendar/private/qtquickcalendarglobal_p.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QQuickWeekNumberModelPrivate;
|
class QQuickWeekNumberModelPrivate;
|
||||||
|
|
||||||
class Q_QUICKCALENDAR_EXPORT QQuickWeekNumberModel : public QAbstractListModel
|
class QQuickWeekNumberModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL)
|
|
@ -36,13 +36,13 @@
|
||||||
|
|
||||||
#include <QtQml/qqmlextensionplugin.h>
|
#include <QtQml/qqmlextensionplugin.h>
|
||||||
|
|
||||||
#include <QtQuickCalendar/private/qquickcalendarview_p.h>
|
#include "qquickcalendarview_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickdayofweekrow_p.h>
|
#include "qquickdayofweekrow_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickweeknumbercolumn_p.h>
|
#include "qquickweeknumbercolumn_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickcalendarmodel_p.h>
|
#include "qquickcalendarmodel_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickdayofweekmodel_p.h>
|
#include "qquickdayofweekmodel_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickmonthmodel_p.h>
|
#include "qquickmonthmodel_p.h"
|
||||||
#include <QtQuickCalendar/private/qquickweeknumbermodel_p.h>
|
#include "qquickweeknumbermodel_p.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
controls \
|
controls \
|
||||||
calendar \
|
|
||||||
extras \
|
extras \
|
||||||
imports
|
imports
|
||||||
|
|
||||||
calendar.depends = controls
|
|
||||||
extras.depends = controls
|
extras.depends = controls
|
||||||
imports.depends = controls calendar extras
|
imports.depends = controls extras
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
%modules = ( # path to module name map
|
%modules = ( # path to module name map
|
||||||
"QtQuickControls" => "$basedir/src/controls",
|
"QtQuickControls" => "$basedir/src/controls",
|
||||||
"QtQuickCalendar" => "$basedir/src/calendar",
|
|
||||||
"QtQuickExtras" => "$basedir/src/extras",
|
"QtQuickExtras" => "$basedir/src/extras",
|
||||||
);
|
);
|
||||||
%moduleheaders = ( # restrict the module headers to those found in relative path
|
%moduleheaders = ( # restrict the module headers to those found in relative path
|
||||||
|
|
Loading…
Reference in New Issue