1
/***************************************************************************
4
* Copyright (C) 2008 Jason Stubbs <jasonbstubbs@gmail.com> *
5
* Copyright (C) 2008 Sebastian Kügler <sebas@kde.org> *
6
* Copyright (C) 2009 Marco Martin <notmart@gmail.com> *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
18
* You should have received a copy of the GNU General Public License *
19
* along with this program; if not, write to the *
20
* Free Software Foundation, Inc., *
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
22
***************************************************************************/
24
#ifndef PLASMOIDTASK_H
25
#define PLASMOIDTASK_H
27
#include "../../core/task.h"
29
#include <plasma/plasma.h>
35
class PlasmoidTask : public Task
40
PlasmoidTask(const QString &appletName, int id, QObject *parent, Plasma::Applet *host);
41
virtual ~PlasmoidTask();
44
virtual bool isEmbeddable() const;
45
virtual QString name() const;
46
virtual QString typeId() const;
47
virtual QIcon icon() const;
48
void forwardConstraintsEvent(Plasma::Constraints constraints);
49
Plasma::Applet *host() const;
52
void appletDestroyed(QObject *object);
53
void newAppletStatus(Plasma::ItemStatus status);
56
void taskDeleted(Plasma::Applet *host, const QString &typeId);
59
virtual QGraphicsWidget* createWidget(Plasma::Applet *applet);
62
void setupApplet(const QString &plugin, int id);
67
QWeakPointer<Plasma::Applet> m_applet;
68
Plasma::Applet *m_host;