~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to plasma/netbook/dataengines/searchlaunch/salengine.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright 2009 Artur Duque de Souza <asouza@kde.org>
 
3
 *
 
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 as
 
6
 *   published by the Free Software Foundation; either version 2 or
 
7
 *   (at your option) any later version.
 
8
 *
 
9
 *   This program is distributed in the hope that it will be useful,
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 *   GNU General Public License for more details
 
13
 *
 
14
 *   You should have received a copy of the GNU Library General Public
 
15
 *   License along with this program; if not, write to the
 
16
 *   Free Software Foundation, Inc.,
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
18
 */
 
19
 
 
20
#include "salengine.h"
 
21
#include "salservice.h"
 
22
 
 
23
 
 
24
SearchLaunchEngine::SearchLaunchEngine(QObject* parent, const QVariantList& args)
 
25
    : Plasma::DataEngine(parent, args)
 
26
{
 
27
    Q_UNUSED(args);
 
28
}
 
29
 
 
30
void SearchLaunchEngine::init()
 
31
{
 
32
    setData("query", QString());
 
33
}
 
34
 
 
35
Plasma::Service *SearchLaunchEngine::serviceForSource(const QString &source)
 
36
{
 
37
    if (source != "query") {
 
38
        return 0;
 
39
    }
 
40
 
 
41
    SearchLaunchService *service = new SearchLaunchService(this);
 
42
    service->setParent(this);
 
43
    return service;
 
44
}
 
45
 
 
46
K_EXPORT_PLASMA_DATAENGINE(searchlaunch, SearchLaunchEngine)
 
47
 
 
48
#include "salengine.moc"