diff options
Diffstat (limited to 'examples/quickcontrols/eventcalendar/sqleventdatabase.h')
-rw-r--r-- | examples/quickcontrols/eventcalendar/sqleventdatabase.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/quickcontrols/eventcalendar/sqleventdatabase.h b/examples/quickcontrols/eventcalendar/sqleventdatabase.h new file mode 100644 index 0000000000..aa59bfb6b1 --- /dev/null +++ b/examples/quickcontrols/eventcalendar/sqleventdatabase.h @@ -0,0 +1,28 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#ifndef SQLEVENTDATABASE_H +#define SQLEVENTDATABASE_H + +#include <QObject> +#include <QtQml> +#include <QVector> + +#include "event.h" + +class SqlEventDatabase : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(EventDatabase) + QML_UNCREATABLE("EventDatabase should not be created in QML") + +public: + SqlEventDatabase(); + + QVector<Event> eventsForDate(const QDate &date); + +private: + static void createConnection(); +}; + +#endif // SQLEVENTDATABASE_H |