Port KProgressBar's to QProgressBar's.
[kdenetwork.git] / wifi / kwifimanager.h
blobb35c9e73293b17a04ce080921a0a5011fa62333b
1 /***************************************************************************
2 kwifimanager.h - a graphical interface for wireless LAN cards
3 -------------------
4 begin : Sam Apr 7 11:44:20 CEST 2001
5 copyright : (C) 2001 by Stefan Winter
6 email : mail@stefan-winter.de
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #ifndef KWIFIMANAGER_H
19 #define KWIFIMANAGER_H
21 #ifdef HAVE_CONFIG_H
22 #include <config.h>
23 #endif
25 // include files for Qt
26 class QLabel;
27 class QTimer;
28 class QPixmap;
29 class QPushButton;
30 class QStringList;
31 class QWidget;
32 class QTabWidget;
34 // include files for KDE
35 #include <kmainwindow.h>
36 class KSystemTray;
37 class KToggleAction;
38 class KProcess;
40 // application specific includes
41 #include "interface_wireless.h"
42 class Statistics;
43 class NetworkScanning;
44 class Led;
46 #include "ui_config_behaviour.h"
47 #include "ui_config_appearance.h"
49 extern QStringList usedInterfacesList ( );
51 enum speedlevels
52 { AUTO, M1, M2, M55, M11 };
53 enum packetmode
54 { UNI, MULTI, BOTH };
55 enum cryptomodes
56 { OPEN, RESTRICTED };
58 struct configuration_data
60 QString net_name[5];
61 QString disp_name[5];
62 bool managed[5];
63 bool crypto_enabled[5];
64 int active_crypto_key[5];
65 QString active_key_string[5];
66 QString crypto1[5], crypto2[5], crypto3[5], crypto4[5];
67 bool crypto_is_string1[5], crypto_is_string2[5], crypto_is_string3[5], crypto_is_string4[5];
68 cryptomodes crypto_mode[5];
69 bool pm_enabled[5];
70 int sleep_time[5];
71 QString sleep_time_string[5];
72 int wake_time[5];
73 QString wake_time_string[5];
74 speedlevels bitrate[5];
75 packetmode packet[5];
78 class KWiFiManagerApp:public KMainWindow
80 Q_OBJECT public:
81 KWiFiManagerApp ( QWidget * parent = 0, const char *name = 0 );
82 ~KWiFiManagerApp ( );
83 QString interface ( ) const
85 return device ? device->get_interface_name ( ) : QString::null;
87 public:
88 bool startDocked ( )
90 return m_startDocked;
92 static QPixmap * NO_CARD;
93 static QPixmap * AD_HOC;
94 static QPixmap * ALL_ALONE;
95 static QPixmap * AP_CONNECT;
96 static QPixmap * STRENGTHPIC[6];
97 static QString strengthClassName[6];
98 static QStringList APs;
99 public slots:
100 void slotFileQuit ( );
101 void slotStartConfigEditor ( );
102 void slotChangeWindowCaption ( QString interface );
103 void slotLogESSID ( QString essid );
104 void slotTXPowerChanged ( );
105 void showSettings ( );
106 void loadSettings ( );
107 virtual bool queryClose ( );
108 virtual bool queryExit ( );
109 virtual void readProperties ( KConfig * );
110 virtual void saveProperties ( KConfig * );
111 private:
112 void initActions ( );
113 void initView ( );
114 QWidget *view;
115 QWidget *appearance_container;
116 Ui::Appearance appearance_ui;
117 QWidget *behaviour_container;
118 Ui::Behaviour behaviour_ui;
119 Statistics *statistik;
120 QGridLayout *zentrallayout;
121 KToggleAction *fileDisableRadio;
122 KToggleAction *settingsAcousticScanning;
123 KSystemTray *trayicon;
124 void initAccessPointDatabase ( );
125 Interface_wireless *device;
126 Led *led;
127 KProcess *disablePower;
128 bool m_startDocked;
129 bool m_shuttingDown;
130 QStringList* empty;
131 QTabWidget* iface_tabs;
134 #endif /* KWIFIMANAGER_H */