summaryrefslogtreecommitdiff
Side-by-side diff
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 @@
<widget row="2" column="0" rowspan="1" colspan="3" >
<class>ProtocolListView</class>
<property stdset="1">
<name>name</name>
<cstring>capturePackets</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
</sizepolicy>
</property>
</widget>
<widget row="1" column="0" rowspan="1" colspan="3" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>captureFileName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
+ <property stdset="1">
+ <name>text</name>
+ <string>/tmp/capture</string>
+ </property>
</widget>
<widget row="0" column="2" >
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>getCaptureFileName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Browse</string>
</property>
</widget>
<spacer row="0" column="1" >
<property>
<name>name</name>
<cstring>Spacer2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
@@ -828,26 +832,38 @@
<connection>
<sender>hopChannels</sender>
<signal>toggled(bool)</signal>
<receiver>hopInterval</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>hopChannels</sender>
<signal>toggled(bool)</signal>
<receiver>TextLabel1</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableActiveScanning</sender>
<signal>toggled(bool)</signal>
<receiver>GroupBox3</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableActiveScanning</sender>
<signal>toggled(bool)</signal>
<receiver>GroupBox4</receiver>
<slot>setEnabled(bool)</slot>
</connection>
+ <connection>
+ <sender>writeCaptureFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>getCaptureFileName</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>writeCaptureFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>captureFileName</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
</connections>
</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()
mw->netView()->addNewItem( "adhoc", "ELAN", "00:A0:F8:E7:16:22", false, 3, 10 );
mw->netView()->addNewItem( "adhoc", "ELAN", "00:AA:01:E7:56:62", false, 3, 15 );
mw->netView()->addNewItem( "adhoc", "ELAN", "00:B0:8E:E7:56:E2", false, 3, 20 );
}
QString WellenreiterMainWindow::getFileName( bool save )
{
QMap<QString, QStringList> map;
map.insert( tr("All"), QStringList() );
QStringList text;
text << "text/*";
map.insert( tr("Text"), text );
text << "*";
map.insert( tr("All"), text );
QString str;
if ( save )
{
#ifdef QWS
str = OFileDialog::getSaveFileName( 2, "/", QString::null, map );
#else
str = QFileDialog::getSaveFileName();
#endif
- if ( str.isEmpty() || QFileInfo(str).isDir() )
+ if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ )
return "";
}
else
{
#ifdef QWS
str = OFileDialog::getOpenFileName( 2, "/", QString::null, map );
#else
str = QFileDialog::getOpenFileName();
#endif
if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() )
return "";
}
return str;
}
void WellenreiterMainWindow::fileSaveLog()
{
QString fname = getFileName( true );
if ( !fname.isEmpty() )
{
QFile f( fname );
if ( f.open(IO_WriteOnly) )
{