~ubuntu-branches/ubuntu/gutsy/kdebase-workspace/gutsy-backports

« back to all changes in this revision

Viewing changes to plasma/engineexplorer/engineexplorer.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-09-05 20:45:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070905204514-632hhspl0nvrc84i
Tags: upstream-3.93.0
ImportĀ upstreamĀ versionĀ 3.93.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright 2007 Aaron Seigo <aseigo@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
 
6
 *   published by the Free Software Foundation; either version 2,
 
7
 *   or (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
#ifndef ENGINEEXPLORER_H
 
21
#define ENGINEEXPLORER_H
 
22
 
 
23
class QStandardItemModel;
 
24
class QStandardItem;
 
25
 
 
26
#include "plasma/dataengine.h"
 
27
 
 
28
#include "ui_engineexplorer.h"
 
29
 
 
30
namespace Plasma
 
31
{
 
32
    class DataEngineManager;
 
33
    class DataEngine;
 
34
} // namespace Plasma
 
35
 
 
36
class EngineExplorer : public KDialog, public Ui::EngineExplorer
 
37
{
 
38
    Q_OBJECT
 
39
 
 
40
    public:
 
41
        explicit EngineExplorer(QWidget *parent = 0);
 
42
        ~EngineExplorer();
 
43
 
 
44
    public slots:
 
45
        void updated(const QString& source, const Plasma::DataEngine::Data& data);
 
46
 
 
47
    private slots:
 
48
        void showEngine(const QString& engine);
 
49
        void addSource(const QString& source);
 
50
        void removeSource(const QString& source);
 
51
        void requestSource();
 
52
 
 
53
    private:
 
54
        void listEngines();
 
55
        QString convertToString(const QVariant &value) const;
 
56
        void showData(QStandardItem* parent, Plasma::DataEngine::Data data);
 
57
        void updateTitle();
 
58
 
 
59
        Plasma::DataEngineManager* m_engineManager;
 
60
        QStandardItemModel* m_dataModel;
 
61
        QString m_engineName;
 
62
        Plasma::DataEngine* m_engine;
 
63
        int m_sourceCount;
 
64
};
 
65
 
 
66
#endif // multiple inclusion guard
 
67