diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d8580108..21e0bb1bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,6 @@ set(plasma_LIB_SRCS containment.cpp containmentactions.cpp containmentactionspluginsconfig.cpp - context.cpp corona.cpp datacontainer.cpp dataengine.cpp @@ -290,7 +289,6 @@ set(plasma_LIB_INCLUDES containment.h containmentactions.h containmentactionspluginsconfig.h - context.h corona.h datacontainer.h dataengine.h diff --git a/context.cpp b/context.cpp deleted file mode 100644 index 3bf15b439..000000000 --- a/context.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2008 by Aaron Seigo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "context.h" - -namespace Plasma -{ - -class ContextPrivate -{ -public: - QString activityId; - QString activityName; -}; - -Context::Context(QObject *parent) - : QObject(parent), - d(new ContextPrivate) -{ - //TODO: look up activity in Nepomuk - //except we can't, because that code is in kdebase. -} - -Context::~Context() -{ - delete d; -} - -void Context::createActivity(const QString &name) -{ - Q_UNUSED(name); -} - -QStringList Context::listActivities() const -{ - return QStringList(); -} - -void Context::setCurrentActivity(const QString &name) -{ - if (d->activityName == name || name.isEmpty()) { - return; - } - - d->activityName = name; - emit activityChanged(this); - emit changed(this); -} - -QString Context::currentActivity() const -{ - return d->activityName; -} - -void Context::setCurrentActivityId(const QString &id) -{ - if (d->activityId == id) { - return; - } - - d->activityId = id; - emit changed(this); -} - -QString Context::currentActivityId() const -{ - return d->activityId; -} - -} // namespace Plasma - -#include "context.moc" - diff --git a/context.h b/context.h deleted file mode 100644 index b963a999d..000000000 --- a/context.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2008 by Aaron Seigo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef PLASMA_CONTEXT_H -#define PLASMA_CONTEXT_H - -#include -#include - -#include "plasma_export.h" - -namespace Plasma -{ - -class ContextPrivate; - -class PLASMA_EXPORT Context : public QObject -{ - Q_OBJECT - -public: - explicit Context(QObject *parent = 0); - ~Context(); - - //don't use these two - void createActivity(const QString &name); - QStringList listActivities() const; - - //activity name - void setCurrentActivity(const QString &name); - QString currentActivity() const; - - //activity id - void setCurrentActivityId(const QString &id); - QString currentActivityId() const; - - //TODO: location - -Q_SIGNALS: - void changed(Plasma::Context *context); - void activityChanged(Plasma::Context *context); - void locationChanged(Plasma::Context *context); - -private: - ContextPrivate * const d; -}; - -} // namespace Plasma - -#endif // multiple inclusion guard -