Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index d4988af..8e0164f 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -12,15 +12,15 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "configwindow.h" | 16 | #include "configwindow.h" |
17 | #include "logwindow.h" | 17 | #include "logwindow.h" |
18 | #include "hexwindow.h" | ||
18 | #include "mainwindow.h" | 19 | #include "mainwindow.h" |
19 | #include "wellenreiter.h" | 20 | #include "wellenreiter.h" |
20 | |||
21 | #include "scanlist.h" | 21 | #include "scanlist.h" |
22 | 22 | ||
23 | #include <qcombobox.h> | 23 | #include <qcombobox.h> |
24 | #include <qdatastream.h> | 24 | #include <qdatastream.h> |
25 | #include <qfile.h> | 25 | #include <qfile.h> |
26 | #include <qfileinfo.h> | 26 | #include <qfileinfo.h> |
@@ -111,12 +111,13 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n | |||
111 | 111 | ||
112 | QPopupMenu* fileLoad = new QPopupMenu( mb ); | 112 | QPopupMenu* fileLoad = new QPopupMenu( mb ); |
113 | fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); | 113 | fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); |
114 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); | 114 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); |
115 | 115 | ||
116 | QPopupMenu* file = new QPopupMenu( mb ); | 116 | QPopupMenu* file = new QPopupMenu( mb ); |
117 | file->insertItem( "&New", this, SLOT( fileNew() ) ); | ||
117 | id = file->insertItem( "&Load", fileLoad ); | 118 | id = file->insertItem( "&Load", fileLoad ); |
118 | file->insertItem( "&Save", fileSave ); | 119 | file->insertItem( "&Save", fileSave ); |
119 | file->insertSeparator(); | 120 | file->insertSeparator(); |
120 | file->insertItem( "&Exit", qApp, SLOT( quit() ) ); | 121 | file->insertItem( "&Exit", qApp, SLOT( quit() ) ); |
121 | 122 | ||
122 | QPopupMenu* view = new QPopupMenu( mb ); | 123 | QPopupMenu* view = new QPopupMenu( mb ); |
@@ -296,12 +297,19 @@ void WellenreiterMainWindow::fileLoadSession() | |||
296 | { | 297 | { |
297 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); | 298 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); |
298 | } | 299 | } |
299 | } | 300 | } |
300 | } | 301 | } |
301 | 302 | ||
303 | void WellenreiterMainWindow::fileNew() | ||
304 | { | ||
305 | mw->netView()->clear(); | ||
306 | mw->logWindow()->clear(); | ||
307 | mw->hexWindow()->clear(); | ||
308 | } | ||
309 | |||
302 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) | 310 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) |
303 | { | 311 | { |
304 | if ( mw->isDaemonRunning() ) | 312 | if ( mw->isDaemonRunning() ) |
305 | { | 313 | { |
306 | QMessageBox::warning( this, "Wellenreiter/Opie", "Sniffing in progress!\nPlease stop sniffing before closing." ); | 314 | QMessageBox::warning( this, "Wellenreiter/Opie", "Sniffing in progress!\nPlease stop sniffing before closing." ); |
307 | e->ignore(); | 315 | e->ignore(); |