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

« back to all changes in this revision

Viewing changes to plasma/generic/dataengines/metadata/metadata_engine.h

  • 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 (C) 2009 Anne-Marie Mahfouf <annma@kde.org>
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, 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 GNU
 
12
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public License
 
15
 * along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc.,
 
17
 * 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#ifndef METADATA_ENGINE_H_
 
22
#define METADATA_ENGINE_H_
 
23
 
 
24
#include <Plasma/DataEngine>
 
25
 
 
26
 
 
27
class MetaDataEngine: public Plasma::DataEngine
 
28
{
 
29
    Q_OBJECT
 
30
 
 
31
public:
 
32
    MetaDataEngine(QObject* parent, const QVariantList& args);
 
33
    ~MetaDataEngine();
 
34
 
 
35
protected:
 
36
    void init();
 
37
    bool sourceRequestEvent(const QString& name);
 
38
 
 
39
protected slots:
 
40
    bool updateSourceEvent(const QString& source);
 
41
 
 
42
private:
 
43
    /**
 
44
     * Converts the meta key \a key to a readable format into \a text.
 
45
     * Returns true, if the string \a key represents a meta information
 
46
     * that should be shown. If false is returned, \a text is not modified.
 
47
     */
 
48
    bool convertMetaInfo(const QString& key, QString& text) const;
 
49
 
 
50
};
 
51
 
 
52
#endif /* METADATA_ENGINE_H_ */