~ubuntu-branches/ubuntu/trusty/kdebluetooth/trusty

« back to all changes in this revision

Viewing changes to src/inputwizard/wizarddialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2009-09-18 22:54:49 UTC
  • mfrom: (1.2.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090918225449-3iiojjiklo7sfoer
Tags: 1:0.4~beta1b-0ubuntu1
* New upstream beta release:
  - basically a bugfix release
* Fixed kblueplugd for binary name

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 *  KBluetooth4 - KDE4 Bluetooth Framework
4
 
 *
5
 
 *  Copyright (C) 2008  Tom Patzig <tpatzig@suse.de>
6
 
 *
7
 
 *  This file is part of kbluetooth4.
8
 
 *
9
 
 *  kbluetooth4 is free software; you can redistribute it and/or modify
10
 
 *  it under the terms of the GNU General Public License as published by
11
 
 *  the Free Software Foundation; either version 2 of the License, or
12
 
 *  (at your option) any later version.
13
 
 *
14
 
 *  kbluetooth4 is distributed in the hope that it will be useful,
15
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 *  GNU General Public License for more details.
18
 
 *
19
 
 *  You should have received a copy of the GNU General Public License
20
 
 *  along with kbluetooth4; if not, write to the Free Software
21
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
 
 *
23
 
*/
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2008  Tom Patzig <tpatzig@suse.de>                      *
 
3
 *   Copyright (C) 2008  Alex Fiestas <alex@eyeos.org>                     *
 
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         *
 
12
 *   GNU General Public License for more details.                          *
 
13
 *                                                                         *
 
14
 *   You should have received a copy of the GNU General Public License     *
 
15
 *   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
 ***************************************************************************/
24
19
 
25
20
#ifndef WIZARDDIALOG_H
26
21
#define WIZARDDIALOG_H
27
22
 
 
23
#include "wizardpage.h"
 
24
 
 
25
#include <QWizard>
 
26
#include <QListWidget>
 
27
#include <QLabel>
 
28
#include <QVBoxLayout>
 
29
 
28
30
#include <KConfig>
29
 
#include <KConfigGroup>
30
 
#include <KIcon>
31
 
#include <QtGui>
32
 
#include <QWizard>
33
 
 
34
31
#include <kjob.h>
35
 
 
36
32
#include <solid/control/bluetoothmanager.h>
37
33
#include <solid/control/bluetoothinterface.h>
38
34
#include <solid/control/bluetoothinputdevice.h>
39
35
 
40
 
#include "wizardpage.h"
41
 
 
42
 
 
43
36
class BTWizard :   public QWizard
44
37
{
45
38
Q_OBJECT
46
39
 
47
40
public:
48
 
        BTWizard(QObject* parent = 0);
 
41
        BTWizard(QApplication* parent = 0);
49
42
        ~BTWizard();
50
43
 
51
 
 
52
44
private:
53
45
        const Solid::Control::BluetoothManager& btmanager;
54
 
        QObject* m_parent;
 
46
        QApplication* m_parent;
55
47
        Solid::Control::BluetoothInterface* iface;
56
 
        Solid::Control::BluetoothRemoteDeviceList devList;
57
 
        Solid::Control::BluetoothRemoteDevice* remoteDev;
 
48
        Solid::Control::BluetoothRemoteDeviceList devList;
 
49
        Solid::Control::BluetoothRemoteDevice* remoteDev;
58
50
        WizardPage* introPage;
59
51
        QLabel* introLabel;
60
52
        QVBoxLayout* introLayout;
61
53
 
62
 
        WizardPage* servicePage;
63
 
        QLabel* serviceLabel;
64
 
        QRadioButton* serviceRadioButton1;
65
 
        QRadioButton* serviceRadioButton2;
66
 
        QVBoxLayout* serviceLayout;
67
 
 
68
 
        WizardPage* devicePage;
69
 
        QLabel* deviceLabel;
70
 
        QLabel* deviceLabel1;
71
 
        QLabel* deviceLabel2;
72
 
        QLabel* deviceLabel3;
73
 
        QLabel* deviceLabel4;
74
 
        QLabel* deviceLabel5;
75
 
        QListWidget* deviceWidget;
76
 
        QPushButton* deviceButton;
77
 
        QComboBox* deviceComboBox;
78
 
        QVBoxLayout* deviceLayout;
79
 
        QHBoxLayout* deviceLayout1;
80
 
        QHBoxLayout* deviceLayout2;
 
54
        WizardPage* discoveryPage;
 
55
        QLabel* discoveryLabel;
 
56
        QLabel* discoveryLabel1;
 
57
        QLabel* discoveryLabel2;
 
58
        QLabel* discoveryLabel3;
 
59
        QLabel* discoveryLabel4;
 
60
        QLabel* discoveryLabel5;
 
61
        QListWidget* discoveryWidget;
 
62
        QPushButton* discoveryButton;
 
63
        QVBoxLayout* discoveryLayout;
 
64
        QHBoxLayout* discoveryLayout1;
81
65
 
82
66
        WizardPage* connPage;
83
67
        QLabel* connLabel;
88
72
        QLabel* connLabel5;
89
73
        QVBoxLayout* connLayout;
90
74
        
91
 
        WizardPage* finalPage;
92
 
        QLabel* finalLabel;
93
 
        QVBoxLayout* finalLayout;
 
75
        WizardPage* finalPage;
 
76
        QLabel* finalLabel;
 
77
        QVBoxLayout* finalLayout;
94
78
 
95
79
        WizardPage* createIntroPage();
96
 
        WizardPage* createSelectServicePage();
97
 
        WizardPage* createSelectDevicePage();
 
80
        WizardPage* createDiscoveryPage();
98
81
        WizardPage* createConnectionPage();
99
82
        WizardPage* createFinalPage();
100
83
 
101
84
        QString finalDev;
102
85
        QMap<QString, QMap< QString,QVariant > > macMap;
103
86
        
104
 
        QListWidgetItem* item;
105
 
 
106
87
        QString service;
107
88
 
108
 
        QPixmap flashPixmap;
109
 
        QPixmap normalPixmap;
110
 
        QTimer* logoTimer;
 
89
        QPixmap flashPixmap;
 
90
        QPixmap normalPixmap;
 
91
        QTimer* logoTimer;
111
92
 
112
93
//      QEventLoop m_loop;
113
94
//      int m_error;
116
97
//      void createBonding();
117
98
//      void createInputDev();
118
99
        
119
 
        void filterList(const QString&, const QString&);
120
 
        void checkInputCapability(const QString&);
121
 
        void connectToDevice();
 
100
        void addDeviceFound(const QString&, const QMap< QString,QVariant >&);
 
101
        void removeDeviceDisappeared(const QString&);
 
102
        void checkInputCapability(const QString&);
 
103
        void connectToDevice();
122
104
 
123
105
private slots:
124
106
        void slotCancel();
125
107
        void slotNext();        
126
108
        void slotSearch();
127
 
        void slotRemoteDeviceFound(const QString&, const QMap< QString,QVariant > &);
128
 
        void slotRemoteDeviceCreated(const QString&);
 
109
        void slotDeviceFound(const QString&, const QMap< QString,QVariant > &);
 
110
        void slotDeviceDisappeared(const QString&);
 
111
        void slotDeviceCreated(const QString&);
129
112
        void slotFinish();
130
113
 
131
114
//      void connectJob(KJob*);
134
117
//      void slotResult(KJob*);
135
118
 
136
119
        void slotDeviceConnected();
137
 
        void changeFilterView(const QString&);
138
120
        void slotDeviceSelectionChanged();
139
121
 
140
 
        void slotDevicePropertyChanged(const QString&, const QVariant&);
141
 
 
142
 
        void setFlashingLogo();
143
 
        void setNormalLogo();
144
 
        
145
 
 
 
122
        void slotDevicePropertyChanged(const QString&, const QVariant&);
 
123
 
 
124
        void setFlashingLogo();
 
125
        void setNormalLogo();
146
126
};
147
 
 
148
 
 
149
127
#endif