5#include "infinitecalendarviewmodel.h"
6#include "hourlyincidencemodel.h"
7#include "incidenceoccurrencemodel.h"
8#include "timezonelistmodel.h"
11#include "calendarmanager.h"
12#include "incidencewrapper.h"
15#include "collection.h"
16#include "collectioncomboboxmodel.h"
21#include <akonadi_version.h>
22#include <Akonadi/Collection>
23#include <Akonadi/AgentFilterProxyModel>
25void MauiCalendarPlugin::registerTypes(
const char *uri)
27 Q_ASSERT(uri ==
QByteArray(
"org.mauikit.calendar"));
29 qmlRegisterType<IncidenceWrapper>(uri, 1, 0,
"IncidenceWrapper");
31 qmlRegisterType<MultiDayIncidenceModel>(uri, 1, 0,
"MultiDayIncidenceModel");
32 qmlRegisterType<IncidenceOccurrenceModel>(uri, 1, 0,
"IncidenceOccurrenceModel");
35 qmlRegisterType<HourlyIncidenceModel>(uri, 1, 0,
"HourlyIncidenceModel");
36 qmlRegisterType<TimeZoneListModel>(uri, 1, 0,
"TimeZoneListModel");
37 qmlRegisterType<MonthModel>(uri, 1, 0,
"MonthModel");
38 qmlRegisterType<InfiniteCalendarViewModel>(uri, 1, 0,
"InfiniteCalendarViewModel");
40 qmlRegisterSingletonType<CalendarManager>(uri, 1, 0,
"CalendarManager", [](
QQmlEngine *engine,
QJSEngine *scriptEngine) ->
QObject * {
41 Q_UNUSED(scriptEngine)
42 auto cal = CalendarManager::instance();
47 qmlRegisterSingletonType<Filter>(uri, 1, 0,
"Filter", [](
QQmlEngine *engine,
QJSEngine *scriptEngine) {
49 Q_UNUSED(scriptEngine)
54 qmlRegisterSingletonType<Akonadi::Quick::MimeTypes>(uri, 1, 0,
"MimeTypes", [](
QQmlEngine *engine,
QJSEngine *scriptEngine) {
56 Q_UNUSED(scriptEngine)
57 return new Akonadi::Quick::MimeTypes;
60 qmlRegisterType<Akonadi::Quick::CollectionComboBoxModel>(uri, 1, 0,
"CollectionComboBoxModel");
62 qmlRegisterUncreatableType<Akonadi::Quick::Collection>(uri, 1, 0,
"Collection", QStringLiteral(
"It's just an enum"));
63 qRegisterMetaType<Akonadi::ETMCalendar::Ptr>();
64 qRegisterMetaType<QAbstractProxyModel *>(
"QAbstractProxyModel*");
65 qRegisterMetaType<Akonadi::AgentFilterProxyModel *>();
68 qmlRegisterSingletonType(resolveFileUrl(QStringLiteral(
"KalendarUiUtils.qml")), uri, 1, 0,
"KalendarUiUtils");
70 qmlRegisterType(resolveFileUrl(QStringLiteral(
"DayLabelsBar.qml")), uri, 1, 0,
"DayLabelsBar");
71 qmlRegisterType(resolveFileUrl(QStringLiteral(
"MonthView.qml")), uri, 1, 0,
"MonthView");
72 qmlRegisterType(resolveFileUrl(QStringLiteral(
"YearView.qml")), uri, 1, 0,
"YearView");
74 qmlRegisterType(resolveFileUrl(QStringLiteral(
"EventPage.qml")), uri, 1, 0,
"EventPage");
76 qmlRegisterType(resolveFileUrl(QStringLiteral(
"DayGridView.qml")), uri, 1, 0,
"DayGridView");
77 qmlRegisterType(resolveFileUrl(QStringLiteral(
"HourlyView.qml")), uri, 1, 0,
"HourlyView");
79 qmlRegisterType(resolveFileUrl(QStringLiteral(
"DateComboBox.qml")), uri, 1, 0,
"DateComboBox");
80 qmlRegisterType(resolveFileUrl(QStringLiteral(
"TimeComboBox.qml")), uri, 1, 0,
"TimeComboBox");
82 qmlRegisterType(resolveFileUrl(QStringLiteral(
"TimePicker.qml")), uri, 1, 0,
"TimePicker");
83 qmlRegisterType(resolveFileUrl(QStringLiteral(
"DatePicker.qml")), uri, 1, 0,
"DatePicker");
85 qmlRegisterType(resolveFileUrl(QStringLiteral(
"MonthsGrid.qml")), uri, 1, 0,
"MonthsGrid");
86 qmlRegisterType(resolveFileUrl(QStringLiteral(
"DaysGrid.qml")), uri, 1, 0,
"DaysGrid");
87 qmlRegisterType(resolveFileUrl(QStringLiteral(
"YearsGrid.qml")), uri, 1, 0,
"YearsGrid");
91#include "moc_plugin.cpp"
void setObjectOwnership(QObject *object, ObjectOwnership ownership)