Plasma
tasksengine.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TASKSENGINE_H
00020 #define TASKSENGINE_H
00021
00022
00023 #include <Plasma/DataEngine>
00024 #include <Plasma/Service>
00025
00026
00027 #include <taskmanager/taskmanager.h>
00028 using TaskManager::StartupPtr;
00029 using TaskManager::TaskPtr;
00030
00045 class TasksEngine : public Plasma::DataEngine
00046 {
00047
00048 Q_OBJECT
00049
00050 public:
00051 TasksEngine(QObject *parent, const QVariantList &args);
00052 ~TasksEngine();
00053 Plasma::Service *serviceForSource(const QString &name);
00054
00055 protected:
00056 static const QString getStartupName(StartupPtr startup);
00057 static const QString getTaskName(TaskPtr task);
00058 virtual void init();
00059
00060 private slots:
00061 void startupAdded(StartupPtr startup);
00062 void startupRemoved(StartupPtr startup);
00063 void taskAdded(TaskPtr task);
00064 void taskRemoved(TaskPtr task);
00065
00066 private:
00067 friend class TaskSource;
00068 void addStartup(StartupPtr startup);
00069 void addTask(TaskPtr task);
00070 };
00071
00072 #endif // TASKSENGINE_H