author | mickeyl <mickeyl> | 2003-09-26 12:24:21 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-09-26 12:24:21 (UTC) |
commit | d1a11b45e805fe7771ea05944757d767c3c4c8ea (patch) (unidiff) | |
tree | f270fea2d1d05c9fc8db1d57542ef7a01870750c | |
parent | a88328daa117bdb3bd72cef6ca6e5e2b9d619a13 (diff) | |
download | opie-d1a11b45e805fe7771ea05944757d767c3c4c8ea.zip opie-d1a11b45e805fe7771ea05944757d767c3c4c8ea.tar.gz opie-d1a11b45e805fe7771ea05944757d767c3c4c8ea.tar.bz2 |
more work on persistent configuration
version bump to 1.0.1-snap
-rw-r--r-- | noncore/net/wellenreiter/README | 12 | ||||
-rw-r--r-- | noncore/net/wellenreiter/TODO | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 67 | ||||
-rw-r--r-- | noncore/net/wellenreiter/opie-wellenreiter.control | 4 |
4 files changed, 73 insertions, 11 deletions
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README index 53a337a..729d30f 100644 --- a/noncore/net/wellenreiter/README +++ b/noncore/net/wellenreiter/README | |||
@@ -1,68 +1,68 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* W e l l e n r e i t e r I I | 2 | /* W e l l e n r e i t e r I I |
3 | /* =============================== | 3 | /* =============================== |
4 | /* | 4 | /* |
5 | /* Version: 1.0-rc2 | 5 | /* Version: 1.0.2 |
6 | /************************************************************************ | 6 | /************************************************************************ |
7 | 7 | ||
8 | ---------------------------------------------------- | 8 | ---------------------------------------------------- |
9 | Release Notes for Wellenreiter II / July 2003 | 9 | Release Notes for Wellenreiter II / October 2003 |
10 | ---------------------------------------------------- | 10 | ---------------------------------------------------- |
11 | 11 | ||
12 | ===================== | 12 | ===================== |
13 | = Supported Devices | 13 | = Supported Devices |
14 | ===================== | 14 | ===================== |
15 | 15 | ||
16 | - HERMES chipset [ orinoco or hostap ], e.g. Lucent/Agere cards, ... | 16 | - HERMES chipset [ orinoco or hostap ], e.g. Lucent/Agere cards, ... |
17 | - PRISM2 chipset [ orinoco or hostap ], e.g. D-Link, Buffallo, ... | 17 | - PRISM2 chipset [ orinoco or hostap ], e.g. D-Link, Buffallo, ... |
18 | - SYMBOL/SPECTRUM chipset [ orinoco ], e.g. Symbol Spectrum 24, Socket Lowpower CF, ... | 18 | - SYMBOL/SPECTRUM chipset [ orinoco ], e.g. Symbol Spectrum 24, Socket Lowpower CF, ... |
19 | - CISCO chipset | 19 | - CISCO chipset |
20 | - wlan-ng supported chipsets | 20 | - WLAN-NG supported chipsets, e.g. D-Link USB cards |
21 | 21 | ||
22 | ===================== | 22 | ===================== |
23 | = Build | 23 | = Build |
24 | ===================== | 24 | ===================== |
25 | 25 | ||
26 | To compile a standalone Wellenreiter II for X11, you need Qt3 and the development | 26 | To compile a standalone Wellenreiter II for X11, you need Qt3 and the development |
27 | packages for Qt3, e.g. libqt3-devel. | 27 | packages for Qt3, e.g. libqt3-devel. |
28 | 28 | ||
29 | * Set $QTDIR to the appropriate directory (e.g. /usr/lib/qt3) | 29 | * Set $QTDIR to the appropriate directory (e.g. /usr/lib/qt3) |
30 | * './build make' | 30 | * './build make' |
31 | * as root, './build install' | 31 | * as root, './build install' |
32 | * Wellenreiter will be installed in /usr/local | 32 | * Wellenreiter will be installed in /usr/local (sorry, no relocation possible yet) |
33 | 33 | ||
34 | ===================== | 34 | ===================== |
35 | = Precompiled Binaries | 35 | = Precompiled Binaries |
36 | ===================== | 36 | ===================== |
37 | 37 | ||
38 | Precompiled binaries are available for the PDA-Version. | 38 | Precompiled binaries are available for the PDA-Version. |
39 | Get them from http://opie.net.wox.org/wellenreiter/ | 39 | Get them from http://opie.net.wox.org/wellenreiter/ |
40 | Sorry, RPMS are not yet available but will follow soon. | 40 | Sorry, no RPMS available. Volunteers? |
41 | 41 | ||
42 | ===================== | 42 | ===================== |
43 | = Run | 43 | = Run |
44 | ===================== | 44 | ===================== |
45 | 45 | ||
46 | * Configure your device by pressing the configure toolbutton (to the right) | 46 | * Configure your device by pressing the configure toolbutton (to the right) |
47 | * Start Sniffing by pressing the execute toolbutton which will be enabled, | 47 | * Start Sniffing by pressing the execute toolbutton which will be enabled, |
48 | if your device has been properly configured. | 48 | if your device has been properly configured. |
49 | 49 | ||
50 | ===================== | 50 | ===================== |
51 | = Credits = | 51 | = Credits = |
52 | ===================== | 52 | ===================== |
53 | 53 | ||
54 | Wellenreiter II is (C) 2002-2003 M-M-M | 54 | Wellenreiter II is (C) 2002-2003 M-M-M |
55 | 55 | ||
56 | Michael Lauer <mickeyl@handhelds.org> | ||
56 | Max Moser <max@remote-exploit.org> | 57 | Max Moser <max@remote-exploit.org> |
57 | Martin J. Muench <mjm@remote-exploit.org> | 58 | Martin J. Muench <mjm@remote-exploit.org> |
58 | Michael Lauer <mickeyl@handhelds.org> | ||
59 | 59 | ||
60 | ===================== | 60 | ===================== |
61 | = Links = | 61 | = Links = |
62 | ===================== | 62 | ===================== |
63 | 63 | ||
64 | Wellenreiter: http://www.wellenreiter.net | 64 | Wellenreiter: http://www.wellenreiter.net |
65 | Wellenreiter/Opie: http://opie.net.wox.org/wellenreiter | 65 | Wellenreiter/Opie: http://opie.net.wox.org/wellenreiter |
66 | Opie Project: http://opie.handhelds.org | 66 | Opie Project: http://opie.handhelds.org |
67 | OpenZaurus Project: http://openzaurus.org | 67 | OpenZaurus Project: http://openzaurus.org |
68 | 68 | ||
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO index 983d160..a1d5bee 100644 --- a/noncore/net/wellenreiter/TODO +++ b/noncore/net/wellenreiter/TODO | |||
@@ -1,5 +1,4 @@ | |||
1 | - save configuration settings | 1 | - save configuration settings |
2 | - GPS | ||
3 | - beep over headphone / customizable | 2 | - beep over headphone / customizable |
4 | - autoshow new nets - maybe in other color or more contrast | 3 | - autoshow new nets - maybe in other color or more contrast |
5 | 4 | ||
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index d255c6a..84d4c63 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -1,241 +1,304 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "mainwindow.h" | 18 | #include "mainwindow.h" |
19 | 19 | ||
20 | /* QT */ | 20 | /* QT */ |
21 | #include <qapplication.h> | 21 | #include <qapplication.h> |
22 | #include <qcheckbox.h> | 22 | #include <qcheckbox.h> |
23 | #include <qcombobox.h> | 23 | #include <qcombobox.h> |
24 | #include <qfile.h> | 24 | #include <qfile.h> |
25 | #include <qlineedit.h> | 25 | #include <qlineedit.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qmap.h> | 27 | #include <qmap.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
30 | #include <qspinbox.h> | 30 | #include <qspinbox.h> |
31 | #include <qtextstream.h> | 31 | #include <qtextstream.h> |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/onetwork.h> | 34 | #include <opie2/onetwork.h> |
35 | #include <opie2/oapplication.h> | ||
36 | #include <opie2/oconfig.h> | ||
35 | 37 | ||
36 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; | 38 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; |
37 | 39 | ||
38 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) | 40 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) |
39 | :WellenreiterConfigBase( parent, name, true, f ) | 41 | :WellenreiterConfigBase( parent, name, true, f ) |
40 | { | 42 | { |
41 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; | 43 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; |
42 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; | 44 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; |
43 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; | 45 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; |
44 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; | 46 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; |
45 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; | 47 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; |
46 | _devicetype[ "<file>" ] = DEVTYPE_FILE; | 48 | _devicetype[ "<file>" ] = DEVTYPE_FILE; |
47 | 49 | ||
48 | // gather possible interface names from ONetwork | 50 | // gather possible interface names from ONetwork |
49 | ONetwork* net = ONetwork::instance(); | 51 | ONetwork* net = ONetwork::instance(); |
50 | ONetwork::InterfaceIterator it = net->iterator(); | 52 | ONetwork::InterfaceIterator it = net->iterator(); |
51 | while ( it.current() ) | 53 | while ( it.current() ) |
52 | { | 54 | { |
53 | if ( it.current()->isWireless() ) | 55 | if ( it.current()->isWireless() ) |
54 | interfaceName->insertItem( it.current()->name() ); | 56 | interfaceName->insertItem( it.current()->name() ); |
55 | ++it; | 57 | ++it; |
56 | } | 58 | } |
57 | 59 | ||
58 | if ( !load() ) // no configuration present | 60 | if ( !load() ) // no configuration present |
59 | { | 61 | { |
60 | // try to guess device type | 62 | // try to guess device type |
61 | QFile m( "/proc/modules" ); | 63 | QFile m( "/proc/modules" ); |
62 | if ( m.open( IO_ReadOnly ) ) | 64 | if ( m.open( IO_ReadOnly ) ) |
63 | { | 65 | { |
64 | int devicetype(0); | 66 | int devicetype(0); |
65 | QString line; | 67 | QString line; |
66 | QTextStream modules( &m ); | 68 | QTextStream modules( &m ); |
67 | while( !modules.atEnd() && !devicetype ) | 69 | while( !modules.atEnd() && !devicetype ) |
68 | { | 70 | { |
69 | modules >> line; | 71 | modules >> line; |
70 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; | 72 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; |
71 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; | 73 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; |
72 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; | 74 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; |
73 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; | 75 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; |
74 | } | 76 | } |
75 | if ( devicetype ) | 77 | if ( devicetype ) |
76 | { | 78 | { |
77 | deviceType->setCurrentItem( devicetype ); | 79 | deviceType->setCurrentItem( devicetype ); |
78 | _guess = devicetype; | 80 | _guess = devicetype; |
79 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); | 81 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); |
80 | } | 82 | } |
81 | } | 83 | } |
82 | } | 84 | } |
83 | 85 | ||
84 | #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here | 86 | #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here |
85 | QPushButton* okButton = new QPushButton( "ok", this ); | 87 | QPushButton* okButton = new QPushButton( "ok", this ); |
86 | okButton->show(); | 88 | okButton->show(); |
87 | WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui | 89 | WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui |
88 | connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); | 90 | connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); |
89 | #endif | 91 | #endif |
90 | 92 | ||
91 | WellenreiterConfigWindow::_instance = this; | 93 | WellenreiterConfigWindow::_instance = this; |
92 | 94 | ||
93 | connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); | 95 | connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); |
94 | connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) ); | 96 | connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) ); |
95 | 97 | ||
96 | // make the checkbox 'channelAll' control all other channels | 98 | // make the checkbox 'channelAll' control all other channels |
97 | connect( channelAll, SIGNAL( stateChanged(int) ), this, SLOT( channelAllClicked(int) ) ); | 99 | connect( channelAll, SIGNAL( stateChanged(int) ), this, SLOT( channelAllClicked(int) ) ); |
98 | }; | 100 | }; |
99 | 101 | ||
100 | 102 | ||
101 | WellenreiterConfigWindow::~WellenreiterConfigWindow() | 103 | WellenreiterConfigWindow::~WellenreiterConfigWindow() |
102 | { | 104 | { |
103 | save(); | 105 | save(); |
104 | } | 106 | } |
105 | 107 | ||
106 | 108 | ||
107 | int WellenreiterConfigWindow::driverType() const | 109 | int WellenreiterConfigWindow::driverType() const |
108 | { | 110 | { |
109 | QString name = deviceType->currentText(); | 111 | QString name = deviceType->currentText(); |
110 | if ( _devicetype.contains( name ) ) | 112 | if ( _devicetype.contains( name ) ) |
111 | { | 113 | { |
112 | return _devicetype[name]; | 114 | return _devicetype[name]; |
113 | } | 115 | } |
114 | else | 116 | else |
115 | { | 117 | { |
116 | return 0; | 118 | return 0; |
117 | } | 119 | } |
118 | }; | 120 | }; |
119 | 121 | ||
120 | 122 | ||
121 | int WellenreiterConfigWindow::hoppingInterval() const | 123 | int WellenreiterConfigWindow::hoppingInterval() const |
122 | { | 124 | { |
123 | return hopInterval->cleanText().toInt(); | 125 | return hopInterval->cleanText().toInt(); |
124 | } | 126 | } |
125 | 127 | ||
126 | 128 | ||
127 | bool WellenreiterConfigWindow::usePrismHeader() const | 129 | bool WellenreiterConfigWindow::usePrismHeader() const |
128 | { | 130 | { |
129 | return prismHeader->isOn(); | 131 | return prismHeader->isChecked(); |
130 | } | 132 | } |
131 | 133 | ||
132 | 134 | ||
133 | bool WellenreiterConfigWindow::isChannelChecked( int channel ) const | 135 | bool WellenreiterConfigWindow::isChannelChecked( int channel ) const |
134 | { | 136 | { |
135 | switch ( channel ) | 137 | switch ( channel ) |
136 | { | 138 | { |
137 | case 1: return channel1->isOn(); | 139 | case 1: return channel1->isOn(); |
138 | case 2: return channel2->isOn(); | 140 | case 2: return channel2->isOn(); |
139 | case 3: return channel3->isOn(); | 141 | case 3: return channel3->isOn(); |
140 | case 4: return channel4->isOn(); | 142 | case 4: return channel4->isOn(); |
141 | case 5: return channel5->isOn(); | 143 | case 5: return channel5->isOn(); |
142 | case 6: return channel6->isOn(); | 144 | case 6: return channel6->isOn(); |
143 | case 7: return channel7->isOn(); | 145 | case 7: return channel7->isOn(); |
144 | case 8: return channel8->isOn(); | 146 | case 8: return channel8->isOn(); |
145 | case 9: return channel9->isOn(); | 147 | case 9: return channel9->isOn(); |
146 | case 10: return channel10->isOn(); | 148 | case 10: return channel10->isOn(); |
147 | case 11: return channel11->isOn(); | 149 | case 11: return channel11->isOn(); |
148 | case 12: return channel12->isOn(); | 150 | case 12: return channel12->isOn(); |
149 | case 13: return channel13->isOn(); | 151 | case 13: return channel13->isOn(); |
150 | case 14: return channel14->isOn(); | 152 | case 14: return channel14->isOn(); |
151 | } | 153 | } |
152 | } | 154 | } |
153 | 155 | ||
154 | 156 | ||
155 | void WellenreiterConfigWindow::changedDeviceType(int t) | 157 | void WellenreiterConfigWindow::changedDeviceType(int t) |
156 | { | 158 | { |
157 | if ( t != DEVTYPE_FILE ) return; | 159 | if ( t != DEVTYPE_FILE ) return; |
158 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); | 160 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); |
159 | if ( !name.isEmpty() && QFile::exists( name ) ) | 161 | if ( !name.isEmpty() && QFile::exists( name ) ) |
160 | { | 162 | { |
161 | interfaceName->insertItem( name ); | 163 | interfaceName->insertItem( name ); |
162 | interfaceName->setCurrentItem( interfaceName->count()-1 ); | 164 | interfaceName->setCurrentItem( interfaceName->count()-1 ); |
163 | } | 165 | } |
164 | else | 166 | else |
165 | { | 167 | { |
166 | deviceType->setCurrentItem( _guess ); | 168 | deviceType->setCurrentItem( _guess ); |
167 | } | 169 | } |
168 | 170 | ||
169 | } | 171 | } |
170 | 172 | ||
171 | 173 | ||
172 | void WellenreiterConfigWindow::getCaptureFileNameClicked() | 174 | void WellenreiterConfigWindow::getCaptureFileNameClicked() |
173 | { | 175 | { |
174 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); | 176 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true); |
175 | qDebug( "name = %s", (const char*) name ); | 177 | qDebug( "name = %s", (const char*) name ); |
176 | if ( !name.isEmpty() ) | 178 | if ( !name.isEmpty() ) |
177 | { | 179 | { |
178 | captureFileName->setText( name ); | 180 | captureFileName->setText( name ); |
179 | } | 181 | } |
180 | } | 182 | } |
181 | 183 | ||
182 | 184 | ||
183 | void WellenreiterConfigWindow::channelAllClicked(int state) | 185 | void WellenreiterConfigWindow::channelAllClicked(int state) |
184 | { | 186 | { |
185 | bool b = state; | 187 | bool b = state; |
186 | channel1->setChecked( b ); | 188 | channel1->setChecked( b ); |
187 | channel2->setChecked( b ); | 189 | channel2->setChecked( b ); |
188 | channel3->setChecked( b ); | 190 | channel3->setChecked( b ); |
189 | channel4->setChecked( b ); | 191 | channel4->setChecked( b ); |
190 | channel5->setChecked( b ); | 192 | channel5->setChecked( b ); |
191 | channel6->setChecked( b ); | 193 | channel6->setChecked( b ); |
192 | channel7->setChecked( b ); | 194 | channel7->setChecked( b ); |
193 | channel8->setChecked( b ); | 195 | channel8->setChecked( b ); |
194 | channel9->setChecked( b ); | 196 | channel9->setChecked( b ); |
195 | channel10->setChecked( b ); | 197 | channel10->setChecked( b ); |
196 | channel11->setChecked( b ); | 198 | channel11->setChecked( b ); |
197 | channel12->setChecked( b ); | 199 | channel12->setChecked( b ); |
198 | channel13->setChecked( b ); | 200 | channel13->setChecked( b ); |
199 | channel14->setChecked( b ); | 201 | channel14->setChecked( b ); |
200 | } | 202 | } |
201 | 203 | ||
202 | 204 | ||
203 | bool WellenreiterConfigWindow::useGPS() const | 205 | bool WellenreiterConfigWindow::useGPS() const |
204 | { | 206 | { |
205 | return enableGPS->isChecked(); | 207 | return enableGPS->isChecked(); |
206 | } | 208 | } |
207 | 209 | ||
208 | 210 | ||
209 | const QString WellenreiterConfigWindow::gpsHost() const | 211 | const QString WellenreiterConfigWindow::gpsHost() const |
210 | { | 212 | { |
211 | return useGPS() ? gpsdHost->currentText() : QString::null; | 213 | return useGPS() ? gpsdHost->currentText() : QString::null; |
212 | } | 214 | } |
213 | 215 | ||
214 | 216 | ||
215 | int WellenreiterConfigWindow::gpsPort() const | 217 | int WellenreiterConfigWindow::gpsPort() const |
216 | { | 218 | { |
217 | bool ok; | 219 | bool ok; |
218 | return useGPS() ? gpsdPort->value() : -1; | 220 | return useGPS() ? gpsdPort->value() : -1; |
219 | } | 221 | } |
220 | 222 | ||
221 | 223 | ||
222 | bool WellenreiterConfigWindow::load() | 224 | bool WellenreiterConfigWindow::load() |
223 | { | 225 | { |
224 | #ifdef Q_WS_X11 | 226 | #ifdef Q_WS_X11 |
225 | #warning Persistent Configuration not yet implemented for standalone X11 build | 227 | #warning Persistent Configuration not yet implemented for standalone X11 build |
226 | return false; | 228 | return false; |
227 | #else | 229 | #else |
228 | qDebug( "loading configuration settings..." ); | 230 | qDebug( "loading configuration settings..." ); |
229 | return true; | 231 | |
232 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | ||
233 | |||
234 | OConfig* c = oApp->config(); | ||
235 | |||
236 | c->setGroup( "Interface" ); | ||
237 | //interfaceName->setCurrentText( c->readEntry( "name" ) ); | ||
238 | //deviceType->setCurrentText( c->readEntry( "type", "<select>" ) ); | ||
239 | prismHeader->setChecked( c->readBoolEntry( "prism", false ) ); | ||
240 | hopChannels->setChecked( c->readBoolEntry( "hop", true ) ); | ||
241 | hopInterval->setValue( c->readNumEntry( "interval", 100 ) ); | ||
242 | adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); | ||
243 | |||
244 | c->setGroup( "Capture" ); | ||
245 | captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); | ||
246 | |||
247 | c->setGroup( "UI" ); | ||
248 | lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) ); | ||
249 | openTree->setChecked( c->readBoolEntry( "openTree", true ) ); | ||
250 | disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); | ||
251 | |||
252 | c->setGroup( "GPS" ); | ||
253 | enableGPS->setChecked( c->readBoolEntry( "use", false ) ); | ||
254 | #if QT_VERSION < 300 | ||
255 | gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); | ||
256 | gpsdHost->setCurrentItem( 0 ); | ||
257 | #else | ||
258 | gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); | ||
259 | #endif | ||
260 | gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); | ||
261 | startGPS->setChecked( c->readBoolEntry( "start", false ) ); | ||
262 | commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); | ||
263 | |||
264 | return false; // false = perform autodetection; true = use config settings | ||
230 | #endif | 265 | #endif |
231 | } | 266 | } |
232 | 267 | ||
233 | 268 | ||
234 | void WellenreiterConfigWindow::save() | 269 | void WellenreiterConfigWindow::save() |
235 | { | 270 | { |
236 | #ifdef Q_WS_X11 | 271 | #ifdef Q_WS_X11 |
237 | #warning Persistent Configuration not yet implemented for standalone X11 build | 272 | #warning Persistent Configuration not yet implemented for standalone X11 build |
238 | #else | 273 | #else |
239 | qDebug( "saving configuration settings..." ); | 274 | qDebug( "saving configuration settings..." ); |
275 | |||
276 | /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ | ||
277 | |||
278 | OConfig* c = oApp->config(); | ||
279 | |||
280 | c->setGroup( "Interface" ); | ||
281 | c->writeEntry( "name", interfaceName->currentText() ); | ||
282 | c->writeEntry( "type", deviceType->currentText() ); | ||
283 | c->writeEntry( "prism", prismHeader->isChecked() ); | ||
284 | c->writeEntry( "hop", hopChannels->isChecked() ); | ||
285 | c->writeEntry( "interval", hopInterval->value() ); | ||
286 | c->writeEntry( "adaptive", adaptiveHopping->isChecked() ); | ||
287 | |||
288 | c->setGroup( "Capture" ); | ||
289 | c->writeEntry( "filename", captureFileName->text() ); | ||
290 | |||
291 | c->setGroup( "UI" ); | ||
292 | c->writeEntry( "lookupVendor", lookupVendor->isChecked() ); | ||
293 | c->writeEntry( "openTree", openTree->isChecked() ); | ||
294 | c->writeEntry( "disablePM", disablePM->isChecked() ); | ||
295 | |||
296 | c->setGroup( "GPS" ); | ||
297 | c->writeEntry( "use", enableGPS->isChecked() ); | ||
298 | c->writeEntry( "host", gpsdHost->currentText() ); | ||
299 | c->writeEntry( "port", gpsdPort->value() ); | ||
300 | c->writeEntry( "start", startGPS->isChecked() ); | ||
301 | c->writeEntry( "command", commandGPS->text() ); | ||
302 | |||
240 | #endif | 303 | #endif |
241 | } | 304 | } |
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control index 95729e3..2cb0d2d 100644 --- a/noncore/net/wellenreiter/opie-wellenreiter.control +++ b/noncore/net/wellenreiter/opie-wellenreiter.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-wellenreiter | 1 | Package: opie-wellenreiter |
2 | Files: plugins/application/libwellenreiter.so* bin/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop | 2 | Files: plugins/application/libwellenreiter.so* bin/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org> | 5 | Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: 0.9.9-$SUB_VERSION | 7 | Version: 1.0.1-$SUB_VERSION |
8 | Depends: task-opie-minimal, libpcap0 (0.7.2), libopie2 (1.8.1) | 8 | Depends: libqpe, libpcap0 (0.7.2), libopie2 (1.8.1) |
9 | Description: A WaveLAN Network Monitor | 9 | Description: A WaveLAN Network Monitor |
10 | A WaveLAN Network Monitor/Sniffer for the Opie Environment. | 10 | A WaveLAN Network Monitor/Sniffer for the Opie Environment. |