2
* Copyright (c) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License version 2 as published by the Free Software Foundation.
8
* This library 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 GNU
11
* Library General Public License for more details.
13
* You should have received a copy of the GNU Library General Public License
14
* along with this library; see the file COPYING.LIB. If not, write to
15
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
* Boston, MA 02110-1301, USA.
19
#include "controller.h"
20
#include "consumer_p.h"
21
#include "manager_p.h"
27
namespace KActivities {
29
class ControllerPrivate: public QObject {
31
ControllerPrivate(Controller * parent)
40
Controller::Controller(QObject * parent)
41
: Consumer(parent), d(new ControllerPrivate(this))
45
Controller::~Controller()
50
void Controller::setActivityName(const QString & id, const QString & name)
52
Manager::self()->SetActivityName(id, name);
55
void Controller::setActivityIcon(const QString & id, const QString & icon)
57
Manager::self()->SetActivityIcon(id, icon);
60
bool Controller::setCurrentActivity(const QString & id)
62
return Manager::self()->SetCurrentActivity(id);
65
QString Controller::addActivity(const QString & name)
67
return Manager::self()->AddActivity(name);
70
void Controller::removeActivity(const QString & id)
72
Manager::self()->RemoveActivity(id);
75
void Controller::stopActivity(const QString & id)
77
Manager::self()->StopActivity(id);
80
void Controller::startActivity(const QString & id)
82
Manager::self()->StartActivity(id);
85
} // namespace KActivities
87
#include "controller.moc"