Changeset View
Changeset View
Standalone View
Standalone View
resources/google-groupware/taskhandler.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright (C) 2011-2013 Daniel Vrátil <dvratil@redhat.com> | ||||
3 | 2020 Igor Pobiko <igor.poboiko@gmail.com> | ||||
4 | | ||||
5 | This program is free software: you can redistribute it and/or modify | ||||
6 | it under the terms of the GNU General Public License as published by | ||||
7 | the Free Software Foundation, either version 3 of the License, or | ||||
8 | (at your option) any later version. | ||||
9 | | ||||
10 | This program is distributed in the hope that it will be useful, | ||||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | GNU General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU General Public License | ||||
16 | along with this program. If not, see <https://www.gnu.org/licenses/>. | ||||
17 | */ | ||||
18 | | ||||
19 | #ifndef TASKHANDLER_H | ||||
20 | #define TASKHANDLER_H | ||||
21 | | ||||
22 | #include "generichandler.h" | ||||
23 | #include <QObject> | ||||
24 | | ||||
25 | | ||||
26 | class TaskHandler : public GenericHandler | ||||
27 | { | ||||
28 | public: | ||||
29 | using GenericHandler::GenericHandler; | ||||
30 | | ||||
31 | QString mimeType() override; | ||||
32 | bool canPerformTask(const Akonadi::Item &item) override; | ||||
33 | bool canPerformTask(const Akonadi::Item::List &items) override; | ||||
34 | | ||||
35 | void retrieveCollections(const Akonadi::Collection &rootCollection) override; | ||||
36 | void retrieveItems(const Akonadi::Collection &collection) override; | ||||
37 | | ||||
38 | void itemAdded(const Akonadi::Item &item, const Akonadi::Collection &collection) override; | ||||
39 | void itemChanged(const Akonadi::Item &item, const QSet< QByteArray > &partIdentifiers) override; | ||||
40 | void itemsRemoved(const Akonadi::Item::List &items) override; | ||||
41 | void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination) override; | ||||
42 | | ||||
43 | void collectionAdded(const Akonadi::Collection &collection, const Akonadi::Collection &parent) override; | ||||
44 | void collectionChanged(const Akonadi::Collection &collection) override; | ||||
45 | void collectionRemoved(const Akonadi::Collection &collection) override; | ||||
46 | private Q_SLOTS: | ||||
47 | void slotItemsRetrieved(KGAPI2::Job *job); | ||||
48 | private: | ||||
49 | void setupCollection(Akonadi::Collection &colleciton, const KGAPI2::TaskListPtr &taskList); | ||||
50 | void doRemoveTasks(const Akonadi::Item::List &items); | ||||
51 | }; | ||||
52 | | ||||
53 | #endif // TASKHANDLER_H |