2
* Copyright (C) 2010 Rafael Fernández López <ereslibre@kde.org>
3
* Copyright (C) 2010 UFO Coders <info@ufocoders.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* General Public License for more details.
15
* You should have received a copy of the GNU Library General Public License
16
* along with this library; see the file COPYING.LIB. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
21
#ifndef _BLUEDEVILADAPTERS_H
22
#define _BLUEDEVILADAPTERS_H
24
#include <QtGui/QGroupBox>
38
class AdapterSettings;
44
typedef BlueDevil::Adapter Adapter;
52
enum DiscoverOptions {
58
AdapterSettings(Adapter *adapter, KCModule *parent);
59
virtual ~AdapterSettings();
61
bool isModified() const;
65
DiscoverOptions discoverOptions() const;
66
quint32 discoverTime() const;
71
void visibilityChanged();
72
void slotSettingsChanged();
75
void settingsChanged(bool changed);
81
QRadioButton *m_hidden;
83
QRadioButton *m_alwaysVisible;
84
bool m_alwaysVisibleOrig;
85
QRadioButton *m_temporaryVisible;
86
bool m_temporaryVisibleOrig;
87
QSlider *m_discoverTime;
88
QLabel *m_discoverTimeLabel;
89
QWidget *m_discoverTimeWidget;
90
int m_discoverTimeOrig;
94
QFormLayout *m_layout;
97
class KCMBlueDevilAdapters
103
KCMBlueDevilAdapters(QWidget *parent, const QVariantList&);
104
virtual ~KCMBlueDevilAdapters();
106
virtual void defaults();
110
void updateAdapters();
111
void defaultAdapterChanged(Adapter *adapter);
112
void adapterDiscoverableChanged();
113
void generateNoAdaptersMessage();
114
void updateInformationState();
115
void adapterConfigurationChanged(bool modified);
118
void fillAdaptersInformation();
121
QVBoxLayout *m_layout;
122
QMap<Adapter*, AdapterSettings*> m_adapterSettingsMap;
123
QWidget *m_noAdaptersMessage;
125
SystemCheck *m_systemCheck;