author | mickeyl <mickeyl> | 2003-03-30 02:08:00 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 02:08:00 (UTC) |
commit | 21a9eae2190754c6a807ae47f6aad80aa4f53728 (patch) (unidiff) | |
tree | d56760049ee7f48b7aa7ee8c7ea3eaf0b7e5d803 /noncore/net | |
parent | d11a0154e2d9732854c9a3d598857bc20f359849 (diff) | |
download | opie-21a9eae2190754c6a807ae47f6aad80aa4f53728.zip opie-21a9eae2190754c6a807ae47f6aad80aa4f53728.tar.gz opie-21a9eae2190754c6a807ae47f6aad80aa4f53728.tar.bz2 |
- add file->new
-rw-r--r-- | noncore/net/wellenreiter/gui/gui.pro | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/hexwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/hexwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/logwindow.cpp | 5 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/logwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 4 |
8 files changed, 26 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index 200bfc1..505d376 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro | |||
@@ -22,13 +22,13 @@ SOURCES = main.cpp \ | |||
22 | hexwindow.cpp \ | 22 | hexwindow.cpp \ |
23 | configwindow.cpp \ | 23 | configwindow.cpp \ |
24 | manufacturers.cpp | 24 | manufacturers.cpp |
25 | 25 | ||
26 | INCLUDEPATH += $(OPIEDIR)/include | 26 | INCLUDEPATH += $(OPIEDIR)/include |
27 | DEPENDPATH += $(OPIEDIR)/include | 27 | DEPENDPATH += $(OPIEDIR)/include |
28 | LIBS += -L. -lwellenreiter -lopiecore2 -lopieui2 -lopienet2 | 28 | LIBS += -lopiecore2 -lopieui2 -lopienet2 |
29 | INTERFACES = configbase.ui | 29 | INTERFACES = configbase.ui |
30 | TARGET = wellenreiter | 30 | TARGET = wellenreiter |
31 | 31 | ||
32 | !contains( platform, x11 ) { | 32 | !contains( platform, x11 ) { |
33 | message( qws ) | 33 | message( qws ) |
34 | include ( $(OPIEDIR)/include.pro ) | 34 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/net/wellenreiter/gui/hexwindow.cpp b/noncore/net/wellenreiter/gui/hexwindow.cpp index 91aa6f7..a3022f4 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.cpp +++ b/noncore/net/wellenreiter/gui/hexwindow.cpp | |||
@@ -29,7 +29,11 @@ void MHexWindow::log( QString text ) | |||
29 | { | 29 | { |
30 | 30 | ||
31 | ledit->append( text ); | 31 | ledit->append( text ); |
32 | 32 | ||
33 | }; | 33 | }; |
34 | 34 | ||
35 | void MHexWindow::clear() | ||
36 | { | ||
37 | ledit->clear(); | ||
38 | } | ||
35 | 39 | ||
diff --git a/noncore/net/wellenreiter/gui/hexwindow.h b/noncore/net/wellenreiter/gui/hexwindow.h index eec1be0..2618b8c 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.h +++ b/noncore/net/wellenreiter/gui/hexwindow.h | |||
@@ -25,12 +25,13 @@ class MHexWindow: public QVBox | |||
25 | { | 25 | { |
26 | 26 | ||
27 | public: | 27 | public: |
28 | MHexWindow( QWidget * parent = 0, const char * name = "MHexWindow", WFlags f = 0 ); | 28 | MHexWindow( QWidget * parent = 0, const char * name = "MHexWindow", WFlags f = 0 ); |
29 | 29 | ||
30 | void log( QString text ); | 30 | void log( QString text ); |
31 | void clear(); | ||
31 | 32 | ||
32 | protected: | 33 | protected: |
33 | QMultiLineEdit* ledit; | 34 | QMultiLineEdit* ledit; |
34 | 35 | ||
35 | }; | 36 | }; |
36 | 37 | ||
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index f132f56..55e2ccb 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp | |||
@@ -33,10 +33,15 @@ void MLogWindow::log( QString text ) | |||
33 | line.sprintf( "[%s] %s", (const char*) time.toString(), (const char*) text ); | 33 | line.sprintf( "[%s] %s", (const char*) time.toString(), (const char*) text ); |
34 | ledit->append( line ); | 34 | ledit->append( line ); |
35 | qDebug( line ); | 35 | qDebug( line ); |
36 | 36 | ||
37 | } | 37 | } |
38 | 38 | ||
39 | void MLogWindow::clear() | ||
40 | { | ||
41 | ledit->clear(); | ||
42 | } | ||
43 | |||
39 | const QString MLogWindow::getLog() const | 44 | const QString MLogWindow::getLog() const |
40 | { | 45 | { |
41 | return ledit->text(); | 46 | return ledit->text(); |
42 | } | 47 | } |
diff --git a/noncore/net/wellenreiter/gui/logwindow.h b/noncore/net/wellenreiter/gui/logwindow.h index 253defa..6e0fe50 100644 --- a/noncore/net/wellenreiter/gui/logwindow.h +++ b/noncore/net/wellenreiter/gui/logwindow.h | |||
@@ -26,12 +26,13 @@ class MLogWindow: public QVBox | |||
26 | 26 | ||
27 | public: | 27 | public: |
28 | MLogWindow( QWidget * parent = 0, const char * name = "MLogWindow", WFlags f = 0 ); | 28 | MLogWindow( QWidget * parent = 0, const char * name = "MLogWindow", WFlags f = 0 ); |
29 | 29 | ||
30 | void log( QString text ); | 30 | void log( QString text ); |
31 | const QString getLog() const; | 31 | const QString getLog() const; |
32 | void clear(); | ||
32 | 33 | ||
33 | protected: | 34 | protected: |
34 | QMultiLineEdit* ledit; | 35 | QMultiLineEdit* ledit; |
35 | 36 | ||
36 | }; | 37 | }; |
37 | 38 | ||
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(); |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h index 850a343..e06a60c 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.h +++ b/noncore/net/wellenreiter/gui/mainwindow.h | |||
@@ -52,9 +52,10 @@ class WellenreiterMainWindow: public QMainWindow | |||
52 | public slots: | 52 | public slots: |
53 | void showConfigure(); | 53 | void showConfigure(); |
54 | void demoAddStations(); | 54 | void demoAddStations(); |
55 | void fileSaveLog(); | 55 | void fileSaveLog(); |
56 | void fileSaveSession(); | 56 | void fileSaveSession(); |
57 | void fileLoadSession(); | 57 | void fileLoadSession(); |
58 | void fileNew(); | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | #endif | 61 | #endif |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index 3ec4021..ff73dd4 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h | |||
@@ -25,25 +25,29 @@ using namespace Opie; | |||
25 | 25 | ||
26 | class QTimerEvent; | 26 | class QTimerEvent; |
27 | class QPixmap; | 27 | class QPixmap; |
28 | class OPacket; | 28 | class OPacket; |
29 | class OPacketCapturer; | 29 | class OPacketCapturer; |
30 | class OWirelessNetworkInterface; | 30 | class OWirelessNetworkInterface; |
31 | |||
31 | class ManufacturerDB; | 32 | class ManufacturerDB; |
32 | class WellenreiterConfigWindow; | 33 | class WellenreiterConfigWindow; |
34 | class MLogWindow; | ||
35 | class MHexWindow; | ||
33 | 36 | ||
34 | class Wellenreiter : public WellenreiterBase { | 37 | class Wellenreiter : public WellenreiterBase { |
35 | Q_OBJECT | 38 | Q_OBJECT |
36 | 39 | ||
37 | public: | 40 | public: |
38 | Wellenreiter( QWidget* parent = 0 ); | 41 | Wellenreiter( QWidget* parent = 0 ); |
39 | ~Wellenreiter(); | 42 | ~Wellenreiter(); |
40 | 43 | ||
41 | void setConfigWindow( WellenreiterConfigWindow* cw ); | 44 | void setConfigWindow( WellenreiterConfigWindow* cw ); |
42 | MScanListView* netView() const { return netview; }; | 45 | MScanListView* netView() const { return netview; }; |
43 | MLogWindow* logWindow() const { return logwindow; }; | 46 | MLogWindow* logWindow() const { return logwindow; }; |
47 | MHexWindow* hexWindow() const { return hexwindow; }; | ||
44 | bool isDaemonRunning() const { return sniffing; }; | 48 | bool isDaemonRunning() const { return sniffing; }; |
45 | 49 | ||
46 | public slots: | 50 | public slots: |
47 | void receivePacket(OPacket*); | 51 | void receivePacket(OPacket*); |
48 | void startStopClicked(); | 52 | void startStopClicked(); |
49 | 53 | ||