summaryrefslogtreecommitdiff
path: root/noncore/net
Unidiff
Diffstat (limited to 'noncore/net') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui310
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.h1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp15
4 files changed, 229 insertions, 113 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui
index 3ece270..ba4de32 100644
--- a/noncore/net/wellenreiter/gui/configbase.ui
+++ b/noncore/net/wellenreiter/gui/configbase.ui
@@ -13,4 +13,4 @@
13 <y>0</y> 13 <y>0</y>
14 <width>220</width> 14 <width>236</width>
15 <height>306</height> 15 <height>342</height>
16 </rect> 16 </rect>
@@ -27,6 +27,6 @@
27 </property> 27 </property>
28 <vbox> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>6</number>
32 </property> 32 </property>
@@ -34,5 +34,5 @@
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>1</number> 35 <number>5</number>
36 </property> 36 </property>
37 <widget> 37 <widget row="0" column="0" rowspan="1" colspan="3" >
38 <class>QLayoutWidget</class> 38 <class>QLayoutWidget</class>
@@ -85,21 +85,3 @@
85 </widget> 85 </widget>
86 <widget> 86 <widget row="1" column="0" rowspan="1" colspan="2" >
87 <class>QLayoutWidget</class>
88 <property stdset="1">
89 <name>name</name>
90 <cstring>Layout7</cstring>
91 </property>
92 <property>
93 <name>layoutSpacing</name>
94 </property>
95 <grid>
96 <property stdset="1">
97 <name>margin</name>
98 <number>0</number>
99 </property>
100 <property stdset="1">
101 <name>spacing</name>
102 <number>2</number>
103 </property>
104 <widget row="0" column="0" >
105 <class>QComboBox</class> 87 <class>QComboBox</class>
@@ -118,18 +100,3 @@
118 </widget> 100 </widget>
119 <widget row="4" column="0" rowspan="1" colspan="2" > 101 <widget row="2" column="0" rowspan="1" colspan="2" >
120 <class>QCheckBox</class>
121 <property stdset="1">
122 <name>name</name>
123 <cstring>activeScanning</cstring>
124 </property>
125 <property stdset="1">
126 <name>enabled</name>
127 <bool>false</bool>
128 </property>
129 <property stdset="1">
130 <name>text</name>
131 <string>Active Scanning (caution!)</string>
132 </property>
133 </widget>
134 <widget row="1" column="0" >
135 <class>QComboBox</class> 102 <class>QComboBox</class>
@@ -191,17 +158,2 @@
191 <widget row="3" column="0" rowspan="1" colspan="2" > 158 <widget row="3" column="0" rowspan="1" colspan="2" >
192 <class>QCheckBox</class>
193 <property stdset="1">
194 <name>name</name>
195 <cstring>additionalInfo</cstring>
196 </property>
197 <property stdset="1">
198 <name>enabled</name>
199 <bool>false</bool>
200 </property>
201 <property stdset="1">
202 <name>text</name>
203 <string>Gather Additional Info</string>
204 </property>
205 </widget>
206 <widget row="2" column="0" >
207 <class>QSpinBox</class> 159 <class>QSpinBox</class>
@@ -236,3 +188,3 @@
236 </widget> 188 </widget>
237 <widget row="2" column="1" > 189 <widget row="3" column="2" >
238 <class>QLabel</class> 190 <class>QLabel</class>
@@ -251,3 +203,3 @@
251 </widget> 203 </widget>
252 <widget row="1" column="1" > 204 <widget row="2" column="2" >
253 <class>QLabel</class> 205 <class>QLabel</class>
@@ -266,3 +218,3 @@
266 </widget> 218 </widget>
267 <widget row="0" column="1" > 219 <widget row="1" column="2" >
268 <class>QLabel</class> 220 <class>QLabel</class>
@@ -281,23 +233,3 @@
281 </widget> 233 </widget>
282 </grid> 234 <widget row="5" column="0" >
283 </widget>
284 <widget>
285 <class>QLayoutWidget</class>
286 <property stdset="1">
287 <name>name</name>
288 <cstring>Layout6</cstring>
289 </property>
290 <property>
291 <name>layoutSpacing</name>
292 </property>
293 <hbox>
294 <property stdset="1">
295 <name>margin</name>
296 <number>0</number>
297 </property>
298 <property stdset="1">
299 <name>spacing</name>
300 <number>2</number>
301 </property>
302 <widget>
303 <class>QLabel</class> 235 <class>QLabel</class>
@@ -305,10 +237,3 @@
305 <name>name</name> 237 <name>name</name>
306 <cstring>TextLabel3_2_2</cstring> 238 <cstring>TextLabel1_5</cstring>
307 </property>
308 <property stdset="1">
309 <name>sizePolicy</name>
310 <sizepolicy>
311 <hsizetype>4</hsizetype>
312 <vsizetype>1</vsizetype>
313 </sizepolicy>
314 </property> 239 </property>
@@ -316,23 +241,10 @@
316 <name>text</name> 241 <name>text</name>
317 <string>GUI</string> 242 <string>Fake MAC:</string>
318 </property>
319 </widget>
320 <widget>
321 <class>Line</class>
322 <property stdset="1">
323 <name>name</name>
324 <cstring>Line9_2</cstring>
325 </property>
326 <property stdset="1">
327 <name>orientation</name>
328 <enum>Horizontal</enum>
329 </property> 243 </property>
330 </widget> 244 </widget>
331 </hbox> 245 <widget row="5" column="1" rowspan="1" colspan="2" >
332 </widget> 246 <class>QLineEdit</class>
333 <widget>
334 <class>QCheckBox</class>
335 <property stdset="1"> 247 <property stdset="1">
336 <name>name</name> 248 <name>name</name>
337 <cstring>groupNetworks</cstring> 249 <cstring>MAC</cstring>
338 </property> 250 </property>
@@ -344,6 +256,6 @@
344 <name>text</name> 256 <name>text</name>
345 <string>Group Detected Networks</string> 257 <string>44:44:44:44:44:44</string>
346 </property> 258 </property>
347 </widget> 259 </widget>
348 <widget> 260 <widget row="4" column="0" rowspan="1" colspan="3" >
349 <class>QCheckBox</class> 261 <class>QCheckBox</class>
@@ -351,3 +263,3 @@
351 <name>name</name> 263 <name>name</name>
352 <cstring>enableActivity</cstring> 264 <cstring>activeScanning</cstring>
353 </property> 265 </property>
@@ -359,6 +271,6 @@
359 <name>text</name> 271 <name>text</name>
360 <string>Enable Activity Display</string> 272 <string>Active Scanning (caution!)</string>
361 </property> 273 </property>
362 </widget> 274 </widget>
363 <widget> 275 <widget row="10" column="0" rowspan="1" colspan="3" >
364 <class>QLayoutWidget</class> 276 <class>QLayoutWidget</class>
@@ -463,4 +375,180 @@
463 </widget> 375 </widget>
464 </vbox> 376 <widget row="8" column="0" rowspan="1" colspan="3" >
377 <class>QLayoutWidget</class>
378 <property stdset="1">
379 <name>name</name>
380 <cstring>Layout7</cstring>
381 </property>
382 <hbox>
383 <property stdset="1">
384 <name>margin</name>
385 <number>0</number>
386 </property>
387 <property stdset="1">
388 <name>spacing</name>
389 <number>6</number>
390 </property>
391 <widget>
392 <class>QCheckBox</class>
393 <property stdset="1">
394 <name>name</name>
395 <cstring>writeCaptureFile</cstring>
396 </property>
397 <property stdset="1">
398 <name>enabled</name>
399 <bool>true</bool>
400 </property>
401 <property stdset="1">
402 <name>text</name>
403 <string>Write Capture File</string>
404 </property>
405 </widget>
406 <widget>
407 <class>QToolButton</class>
408 <property stdset="1">
409 <name>name</name>
410 <cstring>getCaptureFileName</cstring>
411 </property>
412 <property stdset="1">
413 <name>enabled</name>
414 <bool>false</bool>
415 </property>
416 <property stdset="1">
417 <name>text</name>
418 <string>...</string>
419 </property>
420 </widget>
421 </hbox>
422 </widget>
423 <widget row="7" column="0" rowspan="1" colspan="3" >
424 <class>QLayoutWidget</class>
425 <property stdset="1">
426 <name>name</name>
427 <cstring>Layout6</cstring>
428 </property>
429 <property>
430 <name>layoutSpacing</name>
431 </property>
432 <hbox>
433 <property stdset="1">
434 <name>margin</name>
435 <number>0</number>
436 </property>
437 <property stdset="1">
438 <name>spacing</name>
439 <number>2</number>
440 </property>
441 <widget>
442 <class>QLabel</class>
443 <property stdset="1">
444 <name>name</name>
445 <cstring>TextLabel3_2_2</cstring>
446 </property>
447 <property stdset="1">
448 <name>sizePolicy</name>
449 <sizepolicy>
450 <hsizetype>4</hsizetype>
451 <vsizetype>1</vsizetype>
452 </sizepolicy>
453 </property>
454 <property stdset="1">
455 <name>text</name>
456 <string>GUI</string>
457 </property>
458 </widget>
459 <widget>
460 <class>Line</class>
461 <property stdset="1">
462 <name>name</name>
463 <cstring>Line9_2</cstring>
464 </property>
465 <property stdset="1">
466 <name>orientation</name>
467 <enum>Horizontal</enum>
468 </property>
469 </widget>
470 </hbox>
471 </widget>
472 <spacer row="6" column="2" >
473 <property>
474 <name>name</name>
475 <cstring>Spacer1</cstring>
476 </property>
477 <property stdset="1">
478 <name>orientation</name>
479 <enum>Vertical</enum>
480 </property>
481 <property stdset="1">
482 <name>sizeType</name>
483 <enum>Expanding</enum>
484 </property>
485 <property>
486 <name>sizeHint</name>
487 <size>
488 <width>20</width>
489 <height>20</height>
490 </size>
491 </property>
492 </spacer>
493 <widget row="9" column="0" rowspan="1" colspan="3" >
494 <class>QLayoutWidget</class>
495 <property stdset="1">
496 <name>name</name>
497 <cstring>Layout7</cstring>
498 </property>
499 <hbox>
500 <property stdset="1">
501 <name>margin</name>
502 <number>0</number>
503 </property>
504 <property stdset="1">
505 <name>spacing</name>
506 <number>6</number>
507 </property>
508 <widget>
509 <class>QLabel</class>
510 <property stdset="1">
511 <name>name</name>
512 <cstring>TextLabel1_4</cstring>
513 </property>
514 <property stdset="1">
515 <name>text</name>
516 <string>CaptureFile:</string>
517 </property>
518 </widget>
519 <widget>
520 <class>QLineEdit</class>
521 <property stdset="1">
522 <name>name</name>
523 <cstring>captureFileName</cstring>
524 </property>
525 <property stdset="1">
526 <name>enabled</name>
527 <bool>false</bool>
528 </property>
529 </widget>
530 </hbox>
531 </widget>
532 </grid>
465</widget> 533</widget>
534<connections>
535 <connection>
536 <sender>writeCaptureFile</sender>
537 <signal>toggled(bool)</signal>
538 <receiver>getCaptureFileName</receiver>
539 <slot>setEnabled(bool)</slot>
540 </connection>
541 <connection>
542 <sender>activeScanning</sender>
543 <signal>toggled(bool)</signal>
544 <receiver>MAC</receiver>
545 <slot>setEnabled(bool)</slot>
546 </connection>
547 <connection>
548 <sender>writeCaptureFile</sender>
549 <signal>toggled(bool)</signal>
550 <receiver>captureFileName</receiver>
551 <slot>setEnabled(bool)</slot>
552 </connection>
553</connections>
466</UI> 554</UI>
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 4aca526..716618e 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -23,2 +23,3 @@
23#include <qfile.h> 23#include <qfile.h>
24#include <qlineedit.h>
24#include <qlayout.h> 25#include <qlayout.h>
@@ -26,2 +27,3 @@
26#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qtoolbutton.h>
27#include <qspinbox.h> 29#include <qspinbox.h>
@@ -87,2 +89,3 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
87 connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); 89 connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) );
90 connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) );
88}; 91};
@@ -114,3 +117,3 @@ void WellenreiterConfigWindow::changedDeviceType(int t)
114 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); 117 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false);
115 if ( !name.isNull() && QFile::exists( name ) ) 118 if ( !name.isEmpty() && QFile::exists( name ) )
116 { 119 {
@@ -126 +129,12 @@ void WellenreiterConfigWindow::changedDeviceType(int t)
126 129
130
131void WellenreiterConfigWindow::getCaptureFileNameClicked()
132{
133 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true);
134 qDebug( "name = %s", (const char*) name );
135 if ( !name.isEmpty() )
136 {
137 captureFileName->setText( name );
138 }
139}
140
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h
index 7df1a80..c7c70a6 100644
--- a/noncore/net/wellenreiter/gui/configwindow.h
+++ b/noncore/net/wellenreiter/gui/configwindow.h
@@ -47,2 +47,3 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase
47 void changedDeviceType(int); 47 void changedDeviceType(int);
48 void getCaptureFileNameClicked();
48 49
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 5c10c3b..be2a86e 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -32,5 +32,7 @@ using namespace Opie;
32 32
33#include <qcheckbox.h>
34#include <qcombobox.h>
33#include <qpushbutton.h> 35#include <qpushbutton.h>
36#include <qlineedit.h>
34#include <qmessagebox.h> 37#include <qmessagebox.h>
35#include <qcombobox.h>
36#include <qspinbox.h> 38#include <qspinbox.h>
@@ -322,5 +324,16 @@ void Wellenreiter::startClicked()
322 if ( cardtype != DEVTYPE_FILE ) 324 if ( cardtype != DEVTYPE_FILE )
325 {
326 if ( configwindow->writeCaptureFile->isEnabled() )
327 {
328 pcap->open( interface, configwindow->captureFileName->text() );
329 }
330 else
331 {
323 pcap->open( interface ); 332 pcap->open( interface );
333 }
334 }
324 else 335 else
336 {
325 pcap->open( QFile( interface ) ); 337 pcap->open( QFile( interface ) );
338 }
326 339