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 | |||
@@ -109,3 +109,4 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
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 | ||
@@ -282,2 +283,22 @@ void WellenreiterMainWindow::fileSaveSession() | |||
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() |