2
* Copyright 2008 Alain Boyer <alainboyer@gmail.com>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License version 2 as
6
* published by the Free Software Foundation
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details
13
* You should have received a copy of the GNU Library General Public
14
* License along with this program; if not, write to the
15
* Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#include <Plasma/DataContainer>
26
#include <taskmanager/taskmanager.h>
27
using TaskManager::StartupPtr;
28
using TaskManager::TaskPtr;
33
* This custom DataContainer represents a task or startup task as a unique source.
34
* It holds a shared pointer to the task or startup task and is responsible for setting
35
* and updating the data exposed by the source.
37
class TaskSource : public Plasma::DataContainer
43
TaskSource(StartupPtr startup, QObject *parent);
44
TaskSource(TaskPtr task, QObject *parent);
48
Plasma::Service *createService();
53
void updateStartup(::TaskManager::TaskChanges startupChanges);
54
void updateTask(::TaskManager::TaskChanges taskChanges);
55
void updateDesktop(int desktop);
56
void updateActivity();
59
friend class TasksEngine;
67
#endif // TASKSOURCE_H