Commit 0764f0a9 authored by Nicolas Fella's avatar Nicolas Fella Committed by Dimitris Kardarakos

Remove QML plugin

parent eb4aeb4a
Pipeline #6208 passed with stage
in 5 minutes and 1 second
......@@ -5,15 +5,19 @@ endif()
set(calindori_SRCS
main.cpp
calindoriconfig.cpp
todosmodel.cpp
localcalendar.cpp
eventmodel.cpp
eventcontroller.cpp
todocontroller.cpp
incidencealarmsmodel.cpp
)
qt5_add_resources(RESOURCES resources.qrc)
# Plugin directory
add_subdirectory(plugins)
add_executable(calindori ${calindori_SRCS} ${RESOURCES})
target_link_libraries(calindori Qt5::Core Qt5::Qml Qt5::Quick Qt5::Test Qt5::Svg KF5::ConfigCore KF5::Plasma KF5::I18n)
target_link_libraries(calindori Qt5::Core Qt5::Qml Qt5::Quick Qt5::Test Qt5::Svg KF5::ConfigCore KF5::Plasma KF5::I18n KF5::CalendarCore)
install(TARGETS calindori ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -23,13 +23,29 @@
#include <QUrl>
#include <KLocalizedContext>
#include "calindoriconfig.h"
#include "todosmodel.h"
#include "localcalendar.h"
#include "eventmodel.h"
#include "eventcontroller.h"
#include "todocontroller.h"
#include "incidencealarmsmodel.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QCoreApplication::setOrganizationDomain("kde.org");
QCoreApplication::setApplicationName("calindori");
qmlRegisterType<CalindoriConfig>("org.kde.phone.calindori", 0, 1, "Config");
qmlRegisterType<TodosModel>("org.kde.phone.calindori", 0, 1, "TodosModel");
qmlRegisterType<LocalCalendar>("org.kde.phone.calindori", 0, 1, "LocalCalendar");
qmlRegisterType<EventModel>("org.kde.phone.calindori", 0, 1, "EventModel");
qmlRegisterType<EventController>("org.kde.phone.calindori",0,1,"EventController");
qmlRegisterType<TodoController>("org.kde.phone.calindori",0,1,"TodoController");
qmlRegisterType<IncidenceAlarmsModel>("org.kde.phone.calindori",0,1,"IncidenceAlarmsModel");
QQmlApplicationEngine engine;
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
......
set(qmlplugin_SRCS
qmlplugin.cpp
calindoriconfig.cpp
todosmodel.cpp
localcalendar.cpp
eventmodel.cpp
eventcontroller.cpp
todocontroller.cpp
incidencealarmsmodel.cpp
)
add_library (calindoriqmlplugin SHARED ${qmlplugin_SRCS})
target_link_libraries (calindoriqmlplugin
Qt5::Core
Qt5::Qml
Qt5::Quick
KF5::ConfigCore
KF5::CalendarCore
KF5::I18n
)
install (TARGETS calindoriqmlplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/phone/calindori)
install (FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/phone/calindori)
module org.kde.phone.calindori
plugin calindoriqmlplugin
/*
* Copyright (C) 2018 Dimitris Kardarakos
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "qmlplugin.h"
#include "calindoriconfig.h"
#include "localcalendar.h"
#include "todosmodel.h"
#include "eventmodel.h"
#include "eventcontroller.h"
#include "incidencealarmsmodel.h"
#include "todocontroller.h"
#include <QQmlEngine>
#include <QtQml/qqml.h>
void QmlPlugins::registerTypes(const char *uri)
{
qmlRegisterType<CalindoriConfig>(uri, 0, 1, "Config");
qmlRegisterType<TodosModel>(uri, 0, 1, "TodosModel");
qmlRegisterType<LocalCalendar>(uri, 0, 1, "LocalCalendar");
qmlRegisterType<EventModel>(uri, 0, 1, "EventModel");
qmlRegisterType<EventController>(uri,0,1,"EventController");
qmlRegisterType<TodoController>(uri,0,1,"TodoController");
qmlRegisterType<IncidenceAlarmsModel>(uri,0,1,"IncidenceAlarmsModel");
}
/*
* Copyright (C) 2018 Dimitris Kardarakos
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _QML_PLUGIN_H
#define _QML_PLUGIN_H
#include <QQmlExtensionPlugin>
class QmlPlugins : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment