author | mickeyl <mickeyl> | 2002-12-10 01:24:42 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-10 01:24:42 (UTC) |
commit | 448426777d9e35826898791d03b4bc71335427ff (patch) (side-by-side diff) | |
tree | dfc55fb0b22ea22e4b873da8b4329dc31f15ad8b /noncore/net/wellenreiter/gui | |
parent | 8641065755bbb1e2ff96e7fb964d4b0cd91c65b6 (diff) | |
download | opie-448426777d9e35826898791d03b4bc71335427ff.zip opie-448426777d9e35826898791d03b4bc71335427ff.tar.gz opie-448426777d9e35826898791d03b4bc71335427ff.tar.bz2 |
towards an alpha version
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/configbase.ui | 307 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gui.pro | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 24 |
3 files changed, 325 insertions, 8 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui new file mode 100644 index 0000000..8f38252 --- a/dev/null +++ b/noncore/net/wellenreiter/gui/configbase.ui @@ -0,0 +1,307 @@ +<!DOCTYPE UI><UI> +<class>Form1</class> +<widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Form1</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>226</width> + <height>300</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>Form1</string> + </property> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>11</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QGroupBox</class> + <property stdset="1"> + <name>name</name> + <cstring>GroupBox1</cstring> + </property> + <property stdset="1"> + <name>title</name> + <string>Sniffer Options</string> + </property> + <grid> + <property stdset="1"> + <name>margin</name> + <number>11</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="0" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout1</cstring> + </property> + <grid> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="2" column="0" > + <class>QSpinBox</class> + <property stdset="1"> + <name>name</name> + <cstring>hopInterval</cstring> + </property> + <property stdset="1"> + <name>suffix</name> + <string> ms</string> + </property> + <property stdset="1"> + <name>maxValue</name> + <number>2000</number> + </property> + <property stdset="1"> + <name>minValue</name> + <number>100</number> + </property> + <property stdset="1"> + <name>lineStep</name> + <number>100</number> + </property> + </widget> + <widget row="2" column="1" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Hop Interval</string> + </property> + </widget> + <widget row="0" column="0" > + <class>QComboBox</class> + <item> + <property> + <name>text</name> + <string><select></string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>eth0</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>eth1</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>wlan0</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>wlan1</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>wifi0</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>wifi1</string> + </property> + </item> + <property stdset="1"> + <name>name</name> + <cstring>interfaceName</cstring> + </property> + </widget> + <widget row="0" column="1" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Interface Name</string> + </property> + </widget> + <widget row="1" column="0" > + <class>QComboBox</class> + <item> + <property> + <name>text</name> + <string><select></string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>cisco</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>orinoco</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>prism</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string><manual></string> + </property> + </item> + <property stdset="1"> + <name>name</name> + <cstring>deviceType</cstring> + </property> + </widget> + <widget row="1" column="1" > + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Device Type</string> + </property> + </widget> + </grid> + </widget> + </grid> + </widget> + <widget> + <class>QGroupBox</class> + <property stdset="1"> + <name>name</name> + <cstring>GroupBox8</cstring> + </property> + <property stdset="1"> + <name>title</name> + <string>Advanced Options</string> + </property> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>additionalInfo</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>11</x> + <y>19</y> + <width>147</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Gather Additional Info</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>activeScanning</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>11</x> + <y>44</y> + <width>175</width> + <height>19</height> + </rect> + </property> + <property stdset="1"> + <name>text</name> + <string>Active Scanning (caution!)</string> + </property> + </widget> + </widget> + <widget> + <class>QGroupBox</class> + <property stdset="1"> + <name>name</name> + <cstring>GroupBox3</cstring> + </property> + <property stdset="1"> + <name>title</name> + <string>GUI Options</string> + </property> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>11</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>groupNetworks</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Group Detected Networks</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>enableActivity</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Enable Activity Display</string> + </property> + </widget> + </vbox> + </widget> + </vbox> +</widget> +</UI> diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index 8f14bc1..a047433 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro @@ -4,8 +4,8 @@ CONFIG = qt warn_on debug #CONFIG = qt warn_on release HEADERS = wellenreiterbase.h wellenreiter.h scanlistitem.h scanlist.h logwindow.h hexwindow.h SOURCES = main.cpp wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp INCLUDEPATH += $(OPIEDIR)/include ../daemon DEPENDPATH += $(OPIEDIR)/include ../daemon LIBS += -lqpe -lopie -lwellenreiter -INTERFACES = wellenreitertemplate.ui +INTERFACES = configbase.ui TARGET = wellenreiter diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 6d62fa8..3453d18 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -17,13 +17,15 @@ #include <qpushbutton.h> // Standard #include <assert.h> +#include <errno.h> #include <unistd.h> +#include <string.h> #include <sys/types.h> // Local #include "wellenreiter.h" #include "scanlistitem.h" @@ -128,29 +130,37 @@ bool Wellenreiter::hasMessage() FD_ZERO( &rfds ); FD_SET( daemon_fd, &rfds ); struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 10; int result = select( daemon_fd+1, &rfds, NULL, NULL, &tv ); - return FD_ISSET( daemon_fd, &rfds ); + + if ( result == 0 ) + { + return false; + } + else if ( result == -1 ) + { + qDebug( "selected returned: %s", strerror( errno ) ); + return false; + } + else + return true; //FD_ISSET( daemon_fd, &rfds ); gibbet 'eh nur einen Deskriptor } void Wellenreiter::timerEvent( QTimerEvent* e ) { qDebug( "checking for message..." ); - - int result = hasMessage(); - qDebug( "hasMessage() returned %d", result ); - - if ( result ) + if ( hasMessage() ) { + qDebug( "got message" ); handleMessage(); } else { - qDebug( "no message :(" ); + qDebug( "no message..." ); } } void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) { // FIXME: this code belongs in customized QListView, not into this class |