-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 16 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index d85956e..7504ebc 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui | |||
@@ -468,64 +468,68 @@ | |||
468 | <property stdset="1"> | 468 | <property stdset="1"> |
469 | <name>margin</name> | 469 | <name>margin</name> |
470 | <number>5</number> | 470 | <number>5</number> |
471 | </property> | 471 | </property> |
472 | <property stdset="1"> | 472 | <property stdset="1"> |
473 | <name>spacing</name> | 473 | <name>spacing</name> |
474 | <number>3</number> | 474 | <number>3</number> |
475 | </property> | 475 | </property> |
476 | <widget row="2" column="0" rowspan="1" colspan="3" > | 476 | <widget row="2" column="0" rowspan="1" colspan="3" > |
477 | <class>ProtocolListView</class> | 477 | <class>ProtocolListView</class> |
478 | <property stdset="1"> | 478 | <property stdset="1"> |
479 | <name>name</name> | 479 | <name>name</name> |
480 | <cstring>capturePackets</cstring> | 480 | <cstring>capturePackets</cstring> |
481 | </property> | 481 | </property> |
482 | <property stdset="1"> | 482 | <property stdset="1"> |
483 | <name>sizePolicy</name> | 483 | <name>sizePolicy</name> |
484 | <sizepolicy> | 484 | <sizepolicy> |
485 | <hsizetype>7</hsizetype> | 485 | <hsizetype>7</hsizetype> |
486 | <vsizetype>7</vsizetype> | 486 | <vsizetype>7</vsizetype> |
487 | </sizepolicy> | 487 | </sizepolicy> |
488 | </property> | 488 | </property> |
489 | </widget> | 489 | </widget> |
490 | <widget row="1" column="0" rowspan="1" colspan="3" > | 490 | <widget row="1" column="0" rowspan="1" colspan="3" > |
491 | <class>QLineEdit</class> | 491 | <class>QLineEdit</class> |
492 | <property stdset="1"> | 492 | <property stdset="1"> |
493 | <name>name</name> | 493 | <name>name</name> |
494 | <cstring>captureFileName</cstring> | 494 | <cstring>captureFileName</cstring> |
495 | </property> | 495 | </property> |
496 | <property stdset="1"> | 496 | <property stdset="1"> |
497 | <name>enabled</name> | 497 | <name>enabled</name> |
498 | <bool>false</bool> | 498 | <bool>false</bool> |
499 | </property> | 499 | </property> |
500 | <property stdset="1"> | ||
501 | <name>text</name> | ||
502 | <string>/tmp/capture</string> | ||
503 | </property> | ||
500 | </widget> | 504 | </widget> |
501 | <widget row="0" column="2" > | 505 | <widget row="0" column="2" > |
502 | <class>QToolButton</class> | 506 | <class>QToolButton</class> |
503 | <property stdset="1"> | 507 | <property stdset="1"> |
504 | <name>name</name> | 508 | <name>name</name> |
505 | <cstring>getCaptureFileName</cstring> | 509 | <cstring>getCaptureFileName</cstring> |
506 | </property> | 510 | </property> |
507 | <property stdset="1"> | 511 | <property stdset="1"> |
508 | <name>enabled</name> | 512 | <name>enabled</name> |
509 | <bool>false</bool> | 513 | <bool>false</bool> |
510 | </property> | 514 | </property> |
511 | <property stdset="1"> | 515 | <property stdset="1"> |
512 | <name>text</name> | 516 | <name>text</name> |
513 | <string>Browse</string> | 517 | <string>Browse</string> |
514 | </property> | 518 | </property> |
515 | </widget> | 519 | </widget> |
516 | <spacer row="0" column="1" > | 520 | <spacer row="0" column="1" > |
517 | <property> | 521 | <property> |
518 | <name>name</name> | 522 | <name>name</name> |
519 | <cstring>Spacer2</cstring> | 523 | <cstring>Spacer2</cstring> |
520 | </property> | 524 | </property> |
521 | <property stdset="1"> | 525 | <property stdset="1"> |
522 | <name>orientation</name> | 526 | <name>orientation</name> |
523 | <enum>Horizontal</enum> | 527 | <enum>Horizontal</enum> |
524 | </property> | 528 | </property> |
525 | <property stdset="1"> | 529 | <property stdset="1"> |
526 | <name>sizeType</name> | 530 | <name>sizeType</name> |
527 | <enum>Expanding</enum> | 531 | <enum>Expanding</enum> |
528 | </property> | 532 | </property> |
529 | <property> | 533 | <property> |
530 | <name>sizeHint</name> | 534 | <name>sizeHint</name> |
531 | <size> | 535 | <size> |
@@ -820,34 +824,46 @@ | |||
820 | </customwidgets> | 824 | </customwidgets> |
821 | <images> | 825 | <images> |
822 | <image> | 826 | <image> |
823 | <name>image0</name> | 827 | <name>image0</name> |
824 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 828 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
825 | </image> | 829 | </image> |
826 | </images> | 830 | </images> |
827 | <connections> | 831 | <connections> |
828 | <connection> | 832 | <connection> |
829 | <sender>hopChannels</sender> | 833 | <sender>hopChannels</sender> |
830 | <signal>toggled(bool)</signal> | 834 | <signal>toggled(bool)</signal> |
831 | <receiver>hopInterval</receiver> | 835 | <receiver>hopInterval</receiver> |
832 | <slot>setEnabled(bool)</slot> | 836 | <slot>setEnabled(bool)</slot> |
833 | </connection> | 837 | </connection> |
834 | <connection> | 838 | <connection> |
835 | <sender>hopChannels</sender> | 839 | <sender>hopChannels</sender> |
836 | <signal>toggled(bool)</signal> | 840 | <signal>toggled(bool)</signal> |
837 | <receiver>TextLabel1</receiver> | 841 | <receiver>TextLabel1</receiver> |
838 | <slot>setEnabled(bool)</slot> | 842 | <slot>setEnabled(bool)</slot> |
839 | </connection> | 843 | </connection> |
840 | <connection> | 844 | <connection> |
841 | <sender>enableActiveScanning</sender> | 845 | <sender>enableActiveScanning</sender> |
842 | <signal>toggled(bool)</signal> | 846 | <signal>toggled(bool)</signal> |
843 | <receiver>GroupBox3</receiver> | 847 | <receiver>GroupBox3</receiver> |
844 | <slot>setEnabled(bool)</slot> | 848 | <slot>setEnabled(bool)</slot> |
845 | </connection> | 849 | </connection> |
846 | <connection> | 850 | <connection> |
847 | <sender>enableActiveScanning</sender> | 851 | <sender>enableActiveScanning</sender> |
848 | <signal>toggled(bool)</signal> | 852 | <signal>toggled(bool)</signal> |
849 | <receiver>GroupBox4</receiver> | 853 | <receiver>GroupBox4</receiver> |
850 | <slot>setEnabled(bool)</slot> | 854 | <slot>setEnabled(bool)</slot> |
851 | </connection> | 855 | </connection> |
856 | <connection> | ||
857 | <sender>writeCaptureFile</sender> | ||
858 | <signal>toggled(bool)</signal> | ||
859 | <receiver>getCaptureFileName</receiver> | ||
860 | <slot>setEnabled(bool)</slot> | ||
861 | </connection> | ||
862 | <connection> | ||
863 | <sender>writeCaptureFile</sender> | ||
864 | <signal>toggled(bool)</signal> | ||
865 | <receiver>captureFileName</receiver> | ||
866 | <slot>setEnabled(bool)</slot> | ||
867 | </connection> | ||
852 | </connections> | 868 | </connections> |
853 | </UI> | 869 | </UI> |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 39f5978..7241f7a 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -212,65 +212,65 @@ WellenreiterMainWindow::~WellenreiterMainWindow() | |||
212 | delete startIconSet; | 212 | delete startIconSet; |
213 | delete stopIconSet; | 213 | delete stopIconSet; |
214 | }; | 214 | }; |
215 | 215 | ||
216 | void WellenreiterMainWindow::demoAddStations() | 216 | void WellenreiterMainWindow::demoAddStations() |
217 | { | 217 | { |
218 | mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 ); | 218 | mw->netView()->addNewItem( "managed", "Vanille", "00:00:20:EF:A6:43", true, 6, 80 ); |
219 | mw->netView()->addNewItem( "managed", "Vanille", "00:30:6D:EF:A6:23", true, 11, 10 ); | 219 | mw->netView()->addNewItem( "managed", "Vanille", "00:30:6D:EF:A6:23", true, 11, 10 ); |
220 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:A0:F8:E7:16:22", false, 3, 10 ); | 220 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:A0:F8:E7:16:22", false, 3, 10 ); |
221 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:AA:01:E7:56:62", false, 3, 15 ); | 221 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:AA:01:E7:56:62", false, 3, 15 ); |
222 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:B0:8E:E7:56:E2", false, 3, 20 ); | 222 | mw->netView()->addNewItem( "adhoc", "ELAN", "00:B0:8E:E7:56:E2", false, 3, 20 ); |
223 | } | 223 | } |
224 | 224 | ||
225 | 225 | ||
226 | QString WellenreiterMainWindow::getFileName( bool save ) | 226 | QString WellenreiterMainWindow::getFileName( bool save ) |
227 | { | 227 | { |
228 | QMap<QString, QStringList> map; | 228 | QMap<QString, QStringList> map; |
229 | map.insert( tr("All"), QStringList() ); | 229 | map.insert( tr("All"), QStringList() ); |
230 | QStringList text; | 230 | QStringList text; |
231 | text << "text/*"; | 231 | text << "text/*"; |
232 | map.insert( tr("Text"), text ); | 232 | map.insert( tr("Text"), text ); |
233 | text << "*"; | 233 | text << "*"; |
234 | map.insert( tr("All"), text ); | 234 | map.insert( tr("All"), text ); |
235 | 235 | ||
236 | QString str; | 236 | QString str; |
237 | if ( save ) | 237 | if ( save ) |
238 | { | 238 | { |
239 | #ifdef QWS | 239 | #ifdef QWS |
240 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); | 240 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); |
241 | #else | 241 | #else |
242 | str = QFileDialog::getSaveFileName(); | 242 | str = QFileDialog::getSaveFileName(); |
243 | #endif | 243 | #endif |
244 | if ( str.isEmpty() || QFileInfo(str).isDir() ) | 244 | if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ ) |
245 | return ""; | 245 | return ""; |
246 | } | 246 | } |
247 | else | 247 | else |
248 | { | 248 | { |
249 | #ifdef QWS | 249 | #ifdef QWS |
250 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); | 250 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); |
251 | #else | 251 | #else |
252 | str = QFileDialog::getOpenFileName(); | 252 | str = QFileDialog::getOpenFileName(); |
253 | #endif | 253 | #endif |
254 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) | 254 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) |
255 | return ""; | 255 | return ""; |
256 | } | 256 | } |
257 | return str; | 257 | return str; |
258 | } | 258 | } |
259 | 259 | ||
260 | 260 | ||
261 | void WellenreiterMainWindow::fileSaveLog() | 261 | void WellenreiterMainWindow::fileSaveLog() |
262 | { | 262 | { |
263 | QString fname = getFileName( true ); | 263 | QString fname = getFileName( true ); |
264 | if ( !fname.isEmpty() ) | 264 | if ( !fname.isEmpty() ) |
265 | { | 265 | { |
266 | QFile f( fname ); | 266 | QFile f( fname ); |
267 | if ( f.open(IO_WriteOnly) ) | 267 | if ( f.open(IO_WriteOnly) ) |
268 | { | 268 | { |
269 | QTextStream t( &f ); | 269 | QTextStream t( &f ); |
270 | t << mw->logWindow()->getLog(); | 270 | t << mw->logWindow()->getLog(); |
271 | f.close(); | 271 | f.close(); |
272 | qDebug( "Saved log to file '%s'", (const char*) fname ); | 272 | qDebug( "Saved log to file '%s'", (const char*) fname ); |
273 | } | 273 | } |
274 | else | 274 | else |
275 | { | 275 | { |
276 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); | 276 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); |