author | mickeyl <mickeyl> | 2003-04-05 23:08:46 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-05 23:08:46 (UTC) |
commit | b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5 (patch) (unidiff) | |
tree | 68c5a0c5da88fff94582d2e6a072d8e9bbeaaf30 /noncore/net/wellenreiter/gui/mainwindow.cpp | |
parent | 6a949f685bd3fb50f810ad603eaafdb57720077c (diff) | |
download | opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.zip opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.tar.gz opie-b7682f160fafe69bfd47dcfb1c88f2ac2b1afaf5.tar.bz2 |
- correct beacon bug (off-by-one)
- display hex dump per packet in hex window
- allow saving hex window contents
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 8e0164f..69d2b3a 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -107,7 +107,8 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
107 | 107 | ||
108 | QPopupMenu* fileSave = new QPopupMenu( mb ); | 108 | QPopupMenu* fileSave = new QPopupMenu( mb ); |
109 | fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); | 109 | fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); |
110 | fileSave->insertItem( "&Log...", this, SLOT( fileSaveLog() ) ); | 110 | fileSave->insertItem( "&Text Log...", this, SLOT( fileSaveLog() ) ); |
111 | fileSave->insertItem( "&Hex Log...", this, SLOT( fileSaveHex() ) ); | ||
111 | 112 | ||
112 | QPopupMenu* fileLoad = new QPopupMenu( mb ); | 113 | QPopupMenu* fileLoad = new QPopupMenu( mb ); |
113 | fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); | 114 | fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); |
@@ -280,6 +281,26 @@ void WellenreiterMainWindow::fileSaveSession() | |||
280 | } | 281 | } |
281 | } | 282 | } |
282 | 283 | ||
284 | void WellenreiterMainWindow::fileSaveHex() | ||
285 | { | ||
286 | QString fname = getFileName( true ); | ||
287 | if ( !fname.isEmpty() ) | ||
288 | { | ||
289 | QFile f( fname ); | ||
290 | if ( f.open(IO_WriteOnly) ) | ||
291 | { | ||
292 | QTextStream t( &f ); | ||
293 | t << mw->hexWindow()->getLog(); | ||
294 | f.close(); | ||
295 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); | ||
296 | } | ||
297 | else | ||
298 | { | ||
299 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); | ||
300 | } | ||
301 | } | ||
302 | } | ||
303 | |||
283 | void WellenreiterMainWindow::fileLoadSession() | 304 | void WellenreiterMainWindow::fileLoadSession() |
284 | { | 305 | { |
285 | QString fname = getFileName( false ); | 306 | QString fname = getFileName( false ); |