~ubuntu-branches/ubuntu/gutsy/kde4libs/gutsy

« back to all changes in this revision

Viewing changes to solid/kcm/backendchooser.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-02-21 11:00:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070221110012-6kw8khr9knv6lmg1
Tags: 3.80.3-0ubuntu1
New upstream unstable release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 2006 Kevin Ottens <ervin@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 version 2
 
6
    as published by the Free Software Foundation.
 
7
 
 
8
    This program 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
 
11
    GNU General Public License for more details.
 
12
 
 
13
    You should have received a copy of the GNU General Public License
 
14
    along with this program; if not, write to the Free Software
 
15
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
16
    02110-1301, USA.
 
17
 
 
18
*/
 
19
 
 
20
#ifndef BACKENDCHOOSER_H
 
21
#define BACKENDCHOOSER_H
 
22
 
 
23
#include "ui_backendchooser.h"
 
24
 
 
25
#include <QWidget>
 
26
#include <QHash>
 
27
#include <QString>
 
28
 
 
29
#include <kservice.h>
 
30
 
 
31
class BackendChooser : public QWidget
 
32
{
 
33
    Q_OBJECT
 
34
public:
 
35
    BackendChooser( QWidget *parent, const QString &backendType );
 
36
 
 
37
    void load();
 
38
    void save();
 
39
    void defaults();
 
40
 
 
41
private Q_SLOTS:
 
42
    void slotSelectionChanged();
 
43
    void slotUpClicked();
 
44
    void slotDownClicked();
 
45
 
 
46
Q_SIGNALS:
 
47
    void changed( bool state );
 
48
 
 
49
private:
 
50
    void loadServicesInView( const KService::List& offers );
 
51
    KService::List servicesFromView();
 
52
 
 
53
    Ui::BackendChooser m_ui;
 
54
    KService::List m_initServices;
 
55
 
 
56
    QString m_backendType;
 
57
    QHash<QString, KService::Ptr> m_services;
 
58
};
 
59
 
 
60
#endif