Changeset View
Changeset View
Standalone View
Standalone View
src/declarative/kaccountsdeclarativeplugin.cpp
1 | /************************************************************************************* | 1 | /************************************************************************************* | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2015 by Aleix Pol <aleixpol@kde.org> * | 2 | * Copyright (C) 2015 by Aleix Pol <aleixpol@kde.org> * | ||
3 | * Copyright (C) 2020 by Dan Leinir Turthra Jensen <admin@leinir.dk> * | ||||
3 | * * | 4 | * * | ||
4 | * This program is free software; you can redistribute it and/or * | 5 | * This program is free software; you can redistribute it and/or * | ||
5 | * modify it under the terms of the GNU General Public License * | 6 | * modify it under the terms of the GNU General Public License * | ||
6 | * as published by the Free Software Foundation; either version 2 * | 7 | * as published by the Free Software Foundation; either version 2 * | ||
7 | * of the License, or (at your option) any later version. * | 8 | * of the License, or (at your option) any later version. * | ||
8 | * * | 9 | * * | ||
9 | * This program is distributed in the hope that it will be useful, * | 10 | * This program is distributed in the hope that it will be useful, * | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
12 | * GNU General Public License for more details. * | 13 | * GNU General Public License for more details. * | ||
13 | * * | 14 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 15 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the Free Software * | 16 | * along with this program; if not, write to the Free Software * | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | ||
17 | *************************************************************************************/ | 18 | *************************************************************************************/ | ||
18 | 19 | | |||
19 | #include "kaccountsdeclarativeplugin.h" | 20 | #include "kaccountsdeclarativeplugin.h" | ||
20 | #include "createaccountjob.h" | 21 | #include "createaccountjob.h" | ||
21 | #include "accountservicetogglejob.h" | 22 | #include "accountservicetogglejob.h" | ||
23 | #include "removeaccountjob.h" | ||||
24 | #include "accountsmodel.h" | ||||
25 | #include "servicesmodel.h" | ||||
22 | #include <qqml.h> | 26 | #include <qqml.h> | ||
23 | 27 | | |||
24 | void KAccountsDeclarativePlugin::registerTypes(const char* uri) | 28 | void KAccountsDeclarativePlugin::registerTypes(const char* uri) | ||
25 | { | 29 | { | ||
30 | qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccount"); | ||||
31 | qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggle"); | ||||
32 | qmlRegisterType<RemoveAccountJob>(uri, 1, 2, "RemoveAccount"); | ||||
33 | qmlRegisterType<AccountsModel>(uri, 1, 2, "AccountsModel"); | ||||
34 | qmlRegisterType<ServicesModel>(uri, 1, 2, "ServicesModel"); | ||||
26 | qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccountJob"); | 35 | qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccountJob"); | ||
27 | qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggleJob"); | 36 | qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggleJob"); | ||
28 | } | 37 | } |