~ubuntu-branches/ubuntu/oneiric/knetworkmanager/oneiric

« back to all changes in this revision

Viewing changes to knetworkmanager/src/knetworkmanager-dialogfab.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-07-14 14:05:44 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080714140544-yjhxgrdwartk3kx7
Tags: 1:0.7svn830754-0ubuntu1
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *
3
 
 * knetworkmanager.h - A NetworkManager frontend for KDE 
4
 
 *
5
 
 * Copyright (C) 2005, 2006 Novell, Inc.
6
 
 *
7
 
 * Author: Timo Hoenig     <thoenig@suse.de>, <thoenig@nouse.net>
8
 
 *         Will Stephenson <wstephenson@suse.de>, <wstephenson@kde.org>
9
 
 *
10
 
 * This program is free software; you can redistribute it and/or modify
11
 
 * it under the terms of the GNU General Public License as published by
12
 
 * the Free Software Foundation; either version 2 of the License, or
13
 
 * (at your option) any later version.
14
 
 *
15
 
 * This program is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
19
 
 * 
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with this program; if not, write to the Free Software
22
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
 
 *
24
 
 **************************************************************************/
25
 
 
26
 
#ifndef KNETWORKMANAGER_DIALOGFAB_H
27
 
#define KNETWORKMANAGER_DIALOGFAB_H
28
 
 
29
 
#include <kdialogbase.h>
30
 
 
31
 
#include "knetworkmanager.h"
32
 
 
33
 
class NetworkChoiceWidget;
34
 
class NetworkLabelWidget;
35
 
class CryptoWidget;
36
 
class DeviceStore;
37
 
 
38
 
class WirelessDialog : public KDialogBase
39
 
{
40
 
        Q_OBJECT
41
 
 
42
 
        public:
43
 
          WirelessDialog  (QWidget * parent = 0, const char *name = 0, bool modal = FALSE, WFlags fl = 0, KNetworkManager* ctx = NULL);
44
 
          virtual ~WirelessDialog ();
45
 
 
46
 
        protected slots:
47
 
          void slotChangeSecretEchoMode  (bool);
48
 
          void slotEncryptionToggled     (bool);
49
 
          void leditSecret_textChanged   (const QString &);
50
 
          void comboEncryption_activated (int);
51
 
        
52
 
          /* WEP */
53
 
          void groupWEPAdvanced_toggled      (bool);
54
 
          void comboAuthentication_activated (int);
55
 
 
56
 
          /* WPA Personal */
57
 
          void groupWPAAdvanced_toggled   (bool);
58
 
          void comboWPAProtocol_activated (int);
59
 
          void radioButtonWPA1_toggled    (bool);
60
 
          void radioButtonWPA2_toggled    (bool);
61
 
 
62
 
          /* WPA Enterprise */
63
 
          void comboWPAEAPProtocol_activated (int);
64
 
          void groupWPAEAPAdvanced_toggled (bool);
65
 
          void EAPrbWPA1_toggled (bool);
66
 
          void EAPrbWPA2_toggled (bool);
67
 
          void EAPcomboMethod_activated (int);
68
 
          void EAPcomboPhaseTwo_activated (int);
69
 
          void EAPleditIdentity_textChanged (const QString &);
70
 
          void EAPleditPassword_textChanged (const QString &);
71
 
          void EAPleditAnonIdentity_textChanged (const QString &);
72
 
          void EAPurlClient_textChanged (const QString &);
73
 
          void EAPurlCA_textChanged (const QString &);
74
 
          void EAPurlPrivate_textChanged (const QString &);
75
 
          void EAPleditPrivatePassword_textChanged (const QString &);
76
 
          void EAPcbShow_toggled (bool);
77
 
 
78
 
        protected:
79
 
          void connectCryptoWidget (void);
80
 
          virtual void updateModel (void);
81
 
          
82
 
          QMap<int, Encryption*> _encryptionMap;
83
 
          int _id_disabled;
84
 
          int _id_wep_passphrase;
85
 
          int _id_wep_hex;
86
 
          int _id_wep_ascii;
87
 
          int _id_wpa_wpa2personal;
88
 
          int _id_wpa_wpa2enterprise;
89
 
 
90
 
          int _id_wpa_personal_auto;
91
 
          int _id_wpa_personal_tkip;
92
 
          int _id_wpa_personal_ccmp;
93
 
 
94
 
          int _id_wpa_eap_auto;
95
 
          int _id_wpa_eap_tkip;
96
 
          int _id_wpa_eap_ccmp;
97
 
 
98
 
          Device*  _dev;
99
 
          Network* _net;
100
 
 
101
 
          KNetworkManager* _ctx;
102
 
 
103
 
          CryptoWidget* cryptoWidget;
104
 
};
105
 
 
106
 
 
107
 
class AcquirePasswordDialog : public WirelessDialog
108
 
{
109
 
        Q_OBJECT
110
 
 
111
 
        public:
112
 
          AcquirePasswordDialog (QWidget * parent = 0, const char *name = 0,
113
 
                                 bool modal = false, WFlags fl = 0,
114
 
                                 KNetworkManager* ctx = NULL,
115
 
                                 QString obj_path = NULL, QString net_path = NULL,
116
 
                                 QString essid = NULL, QString message = QString::null);
117
 
        
118
 
          virtual ~AcquirePasswordDialog ();
119
 
 
120
 
        signals:
121
 
          void destroyActivationStage (void);
122
 
          void sendPassphrase         (Network*);
123
 
          void sendPassphraseError    (void);
124
 
 
125
 
        protected slots:
126
 
          void slotDeviceStoreChanged(DeviceStore *);
127
 
          void comboEncryptionFill (void);
128
 
          void slotOk();
129
 
          void invalidateSecretMap    (void);
130
 
          
131
 
        protected:  
132
 
          void configureCryptoWidget();
133
 
          
134
 
          QString _obj_path;
135
 
          QString _net_path;
136
 
          QString _essid;
137
 
};
138
 
 
139
 
/**
140
 
 * This is the dialog that shows when you 'Connect to other wireless network' 
141
 
 */
142
 
class NewWirelessNetworkDialog : public WirelessDialog
143
 
{
144
 
        Q_OBJECT
145
 
 
146
 
        public:
147
 
          NewWirelessNetworkDialog  (QWidget * parent = 0,
148
 
                                     const char *name = "newnetworkdialog",
149
 
                                     bool modal = FALSE, WFlags fl = 0,
150
 
                                     KNetworkManager* ctx = NULL);
151
 
          virtual ~NewWirelessNetworkDialog ();
152
 
 
153
 
        signals:
154
 
          void activateNetwork (Network*, Device*); 
155
 
 
156
 
        protected:
157
 
          void comboDeviceFill (void);
158
 
          void comboEncryptionFill (void);
159
 
          virtual void updateModel();
160
 
 
161
 
          QMap<int, Device*> _deviceMap;
162
 
 
163
 
        protected slots:
164
 
          void leditEssid_textChanged    (const QString &);
165
 
 
166
 
          void slotOk();
167
 
        private:
168
 
          NetworkChoiceWidget* netWidget;
169
 
};
170
 
 
171
 
#endif /* KNETWORKMANAGER_DIALOGFAB_H */