Changeset View
Changeset View
Standalone View
Standalone View
src/lib/removeaccountjob.h
- This file was copied from src/declarative/kaccountsdeclarativeplugin.cpp.
1 | /************************************************************************************* | 1 | /************************************************************************************* | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2015 by Aleix Pol <aleixpol@kde.org> * | 2 | * Copyright (C) 2020 by Dan Leinir Turthra Jensen <admin@leinir.dk> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or * | 4 | * This program is free software; you can redistribute it and/or * | ||
5 | * modify it under the terms of the GNU General Public License * | 5 | * modify it under the terms of the GNU General Public License * | ||
6 | * as published by the Free Software Foundation; either version 2 * | 6 | * as published by the Free Software Foundation; either version 2 * | ||
7 | * of the License, or (at your option) any later version. * | 7 | * of the License, or (at your option) any later version. * | ||
8 | * * | 8 | * * | ||
9 | * This program is distributed in the hope that it will be useful, * | 9 | * This program is distributed in the hope that it will be useful, * | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
12 | * GNU General Public License for more details. * | 12 | * GNU General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the Free Software * | 15 | * along with this program; if not, write to the Free Software * | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * | ||
17 | *************************************************************************************/ | 17 | *************************************************************************************/ | ||
18 | 18 | | |||
19 | #include "kaccountsdeclarativeplugin.h" | 19 | #ifndef REMOVEACCOUNT_H | ||
20 | #include "createaccountjob.h" | 20 | #define REMOVEACCOUNT_H | ||
21 | #include "accountservicetogglejob.h" | | |||
22 | #include <qqml.h> | | |||
23 | 21 | | |||
24 | void KAccountsDeclarativePlugin::registerTypes(const char* uri) | 22 | #include "kaccounts_export.h" | ||
23 | | ||||
24 | #include <kjob.h> | ||||
25 | | ||||
26 | #include <QString> | ||||
27 | | ||||
28 | class KACCOUNTS_EXPORT RemoveAccountJob : public KJob | ||||
25 | { | 29 | { | ||
26 | qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccountJob"); | 30 | Q_OBJECT | ||
27 | qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggleJob"); | 31 | Q_PROPERTY(QString accountId READ accountId WRITE setAccountId NOTIFY accountIdChanged) | ||
28 | } | 32 | public: | ||
33 | explicit RemoveAccountJob(QObject* parent = nullptr); | ||||
34 | virtual ~RemoveAccountJob(); | ||||
35 | | ||||
36 | void start() override; | ||||
37 | | ||||
38 | QString accountId() const; | ||||
39 | void setAccountId(const QString& accountId); | ||||
40 | Q_SIGNAL void accountIdChanged(); | ||||
41 | private: | ||||
42 | class Private; | ||||
43 | Private* d; | ||||
44 | }; | ||||
45 | #endif//REMOVEACCOUNT_H |