Commit 671b6947 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

Expose the jobs and models to qml, and simplify plugin to only exposing

parent 11c397c9
include_directories(${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/..)
add_library(kaccountsdeclarativeplugin SHARED kaccountsdeclarativeplugin.cpp
../jobs/createaccount.cpp
../jobs/accountservicetoggle.cpp
../lib/uipluginsmanager.cpp)
add_library(kaccountsdeclarativeplugin SHARED kaccountsdeclarativeplugin.cpp)
target_link_libraries(kaccountsdeclarativeplugin Qt5::Qml
KF5::I18n
......
/*************************************************************************************
* Copyright (C) 2015 by Aleix Pol <aleixpol@kde.org> *
* Copyright (C) 2020 by Dan Leinir Turthra Jensen <admin@leinir.dk> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -17,12 +18,18 @@
*************************************************************************************/
#include "kaccountsdeclarativeplugin.h"
#include "../jobs/createaccount.h"
#include "../jobs/accountservicetoggle.h"
#include "../jobs/createaccountjob.h"
#include "../jobs/accountservicetogglejob.h"
#include "../jobs/removeaccountjob.h"
#include "accountsmodel.h"
#include "servicesmodel.h"
#include <qqml.h>
void KAccountsDeclarativePlugin::registerTypes(const char* uri)
{
qmlRegisterType<CreateAccount>(uri, 1, 0, "CreateAccount");
qmlRegisterType<AccountServiceToggle>(uri, 1, 1, "AccountServiceToggle");
qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccount");
qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggle");
qmlRegisterType<RemoveAccountJob>(uri, 1, 2, "RemoveAccount");
qmlRegisterType<AccountsModel>(uri, 1, 2, "AccountsModel");
qmlRegisterType<ServicesModel>(uri, 1, 2, "ServicesModel");
}
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