author | mickeyl <mickeyl> | 2003-05-06 23:00:41 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-06 23:00:41 (UTC) |
commit | 9490e91d3876a8280f3f9a3839fddf95b957b879 (patch) (unidiff) | |
tree | ec1fdb2a2713d26785110918ce9a8d2fb47fcb20 | |
parent | 1a194aafffe37127758036e80ff55ead0c0e118d (diff) | |
download | opie-9490e91d3876a8280f3f9a3839fddf95b957b879.zip opie-9490e91d3876a8280f3f9a3839fddf95b957b879.tar.gz opie-9490e91d3876a8280f3f9a3839fddf95b957b879.tar.bz2 |
fix config dialog in respect to specify writing capture files
-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 | |||
@@ -484,32 +484,36 @@ | |||
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> |
@@ -836,18 +840,30 @@ | |||
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 | |||
@@ -228,33 +228,33 @@ QString WellenreiterMainWindow::getFileName( bool save ) | |||
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 | ||