not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / solid / kcm / backendchooser.h
blob502d242de1408400e4f946f470460e234bf6787e
1 /* This file is part of the KDE project
2 Copyright (C) 2006 Kevin Ottens <ervin@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 as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
21 #ifndef BACKENDCHOOSER_H
22 #define BACKENDCHOOSER_H
24 #include "ui_backendchooser.h"
26 #include <QWidget>
27 #include <QHash>
28 #include <QString>
30 #include <kservice.h>
32 class BackendChooser : public QWidget
34 Q_OBJECT
35 public:
36 BackendChooser(QWidget *parent, const QString &backendType);
38 void load();
39 void save();
40 void defaults();
42 private Q_SLOTS:
43 void slotSelectionChanged();
44 void slotUpClicked();
45 void slotDownClicked();
47 Q_SIGNALS:
48 void changed(bool state);
50 private:
51 void loadServicesInView(const KService::List &offers);
52 KService::List servicesFromView();
54 Ui::BackendChooser m_ui;
55 KService::List m_initServices;
57 QString m_backendType;
58 QHash<QString, KService::Ptr> m_services;
61 #endif