~ubuntu-branches/debian/sid/knetworkmanager/sid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2006-09-28 11:47:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060928114700-fbiktmk2woj1jww4
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

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 groupWPAEAPAdvanced_toggled (bool);
 
64
          void EAPrbWPA1_toggled (bool);
 
65
          void EAPrbWPA2_toggled (bool);
 
66
          void EAPcomboMethod_activated (int);
 
67
          void EAPleditIdentity_textChanged (const QString &);
 
68
          void EAPleditPassword_textChanged (const QString &);
 
69
          void EAPleditAnonIdentity_textChanged (const QString &);
 
70
          void EAPurlClient_textChanged (const QString &);
 
71
          void EAPurlCA_textChanged (const QString &);
 
72
          void EAPurlPrivate_textChanged (const QString &);
 
73
          void EAPleditPrivatePassword_textChanged (const QString &);
 
74
          void EAPcbShow_toggled (bool);
 
75
 
 
76
        protected:
 
77
          void connectCryptoWidget (void);
 
78
          virtual void updateModel (void);
 
79
          
 
80
          QMap<int, Encryption*> _encryptionMap;
 
81
          int _id_disabled;
 
82
          int _id_wep_passphrase;
 
83
          int _id_wep_hex;
 
84
          int _id_wep_ascii;
 
85
          int _id_wpa_wpa2personal;
 
86
          int _id_wpa_wpa2enterprise;
 
87
 
 
88
          int _id_wpa_personal_auto;
 
89
          int _id_wpa_personal_tkip;
 
90
          int _id_wpa_personal_ccmp;
 
91
 
 
92
          Device*  _dev;
 
93
          Network* _net;
 
94
 
 
95
          KNetworkManager* _ctx;
 
96
 
 
97
          CryptoWidget* cryptoWidget;
 
98
};
 
99
 
 
100
 
 
101
class AcquirePasswordDialog : public WirelessDialog
 
102
{
 
103
        Q_OBJECT
 
104
 
 
105
        public:
 
106
          AcquirePasswordDialog (QWidget * parent = 0, const char *name = 0,
 
107
                                 bool modal = false, WFlags fl = 0,
 
108
                                 KNetworkManager* ctx = NULL,
 
109
                                 QString obj_path = NULL, QString net_path = NULL,
 
110
                                 QString essid = NULL);
 
111
        
 
112
          virtual ~AcquirePasswordDialog ();
 
113
 
 
114
        signals:
 
115
          void destroyActivationStage (void);
 
116
          void sendPassphrase         (Network*);
 
117
          void sendPassphraseError    (void);
 
118
 
 
119
        protected slots:
 
120
          void slotDeviceStoreChanged(DeviceStore *);
 
121
          void comboEncryptionFill (void);
 
122
          void slotOk();
 
123
          void invalidateSecretMap    (void);
 
124
          
 
125
        protected:  
 
126
          void configureCryptoWidget();
 
127
          
 
128
          QString _obj_path;
 
129
          QString _net_path;
 
130
          QString _essid;
 
131
};
 
132
 
 
133
/**
 
134
 * This is the dialog that shows when you 'Connect to other wireless network' 
 
135
 */
 
136
class NewWirelessNetworkDialog : public WirelessDialog
 
137
{
 
138
        Q_OBJECT
 
139
 
 
140
        public:
 
141
          NewWirelessNetworkDialog  (QWidget * parent = 0,
 
142
                                     const char *name = "newnetworkdialog",
 
143
                                     bool modal = FALSE, WFlags fl = 0,
 
144
                                     KNetworkManager* ctx = NULL);
 
145
          virtual ~NewWirelessNetworkDialog ();
 
146
 
 
147
        signals:
 
148
          void activateNetwork (Network*, Device*); 
 
149
 
 
150
        protected:
 
151
          void comboDeviceFill (void);
 
152
          void comboEncryptionFill (void);
 
153
          virtual void updateModel();
 
154
 
 
155
          QMap<int, Device*> _deviceMap;
 
156
 
 
157
        protected slots:
 
158
          void leditEssid_textChanged    (const QString &);
 
159
 
 
160
          void slotOk();
 
161
        private:
 
162
          NetworkChoiceWidget* netWidget;
 
163
};
 
164
 
 
165
#endif /* KNETWORKMANAGER_DIALOGFAB_H */