summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-06 23:00:41 (UTC)
committer mickeyl <mickeyl>2003-05-06 23:00:41 (UTC)
commit9490e91d3876a8280f3f9a3839fddf95b957b879 (patch) (unidiff)
treeec1fdb2a2713d26785110918ce9a8d2fb47fcb20
parent1a194aafffe37127758036e80ff55ead0c0e118d (diff)
downloadopie-9490e91d3876a8280f3f9a3839fddf95b957b879.zip
opie-9490e91d3876a8280f3f9a3839fddf95b957b879.tar.gz
opie-9490e91d3876a8280f3f9a3839fddf95b957b879.tar.bz2
fix config dialog in respect to specify writing capture files
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui16
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp2
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
@@ -476,48 +476,52 @@
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>
@@ -828,26 +832,38 @@
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
@@ -220,49 +220,49 @@ void WellenreiterMainWindow::demoAddStations()
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
226QString WellenreiterMainWindow::getFileName( bool save ) 226QString 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
261void WellenreiterMainWindow::fileSaveLog() 261void 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 {