author | mickeyl <mickeyl> | 2004-03-05 21:39:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-05 21:39:40 (UTC) |
commit | a12943ccab6b39dda5cf8561efb10eeec856f13e (patch) (unidiff) | |
tree | b22cd5c74bd4daad201eea5e485ea9856471d1f2 | |
parent | 8851dc992ab535bde6cb417cafc44658953f495d (diff) | |
download | opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.zip opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.tar.gz opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.tar.bz2 |
change copyright notice
28 files changed, 175 insertions, 53 deletions
diff --git a/noncore/net/wellenreiter/ChangeLog b/noncore/net/wellenreiter/ChangeLog index 6c2e52b..fdc8aa7 100644 --- a/noncore/net/wellenreiter/ChangeLog +++ b/noncore/net/wellenreiter/ChangeLog | |||
@@ -1,81 +1,83 @@ | |||
1 | 2004-??-?? Michael Lauer <mickey@Vanille.de> | 1 | 2004-??-?? Michael Lauer <mickey@Vanille.de> |
2 | 2 | ||
3 | * Added sanity check isPresent(interface) before starting the engine. | ||
4 | * Added a View submenu. Added actions to expand and collapse all items. | ||
3 | * Switched to a (hopefully) more reliable method reading from gpsd. | 5 | * Switched to a (hopefully) more reliable method reading from gpsd. |
4 | * Added parsing of named ProbeRequests. Display only-probed-yet SSIDs in a different network color. | 6 | * Added parsing of named ProbeRequests. Display only-probed-yet SSIDs in a different network color. |
5 | * Rewrote the simple actions on new {Network, Client, Station}. Besides playing a sound or | 7 | * Rewrote the simple actions on new {Network, Client, Station}. Besides playing a sound or |
6 | blinking a LED, a user customizable script can now be executed, if something has been | 8 | blinking a LED, a user customizable script can now be executed, if something has been |
7 | detected. This opens up many possibilities, i.e. a qcop to qpegps or exec'ing flite (speech). | 9 | detected. This opens up many possibilities, i.e. a qcop to qpegps or exec'ing flite (speech). |
8 | * Added decloaking of cloaked ESSIDs (length != 0, but essid[0] == \0). | 10 | * Added decloaking of cloaked ESSIDs (length != 0, but essid[0] == \0). |
9 | * Hided the 'Parse' Tab in the configuration window. Not functional now and may come later | 11 | * Hided the 'Parse' Tab in the configuration window. Not functional now and may come later |
10 | * Added parsing of control frames. Display stations sending them SSID "<unknown>" for now. | 12 | * Added parsing of control frames. Display stations sending them SSID "<unknown>" for now. |
11 | * Added command line option "-nocheck" to skip non-root and dhcp tests. | 13 | * Added command line option "-nocheck" to skip non-root and dhcp tests. |
12 | * Improved the speed reading the manufacturer list. | 14 | * Improved the speed of and user feedback during reading the manufacturer list. |
13 | * GPS coordinates are now presented in the DMS (as opposed to decimal) format. | 15 | * GPS coordinates are now presented in the DMS (as opposed to decimal) format. |
14 | 16 | ||
15 | 2003-12-18 Michael Lauer <mickey@Vanille.de> | 17 | 2003-12-18 Michael Lauer <mickey@Vanille.de> |
16 | 18 | ||
17 | * Released as Version 1.0.2 (Development Snapshot) | 19 | * Released as Version 1.0.2 (Development Snapshot) |
18 | * Added automatic uploading of capture files to "The Capture Dump" site at | 20 | * Added automatic uploading of capture files to "The Capture Dump" site at |
19 | http://www.Vanille.de/projects/capturedump.spy | 21 | http://www.Vanille.de/projects/capturedump.spy |
20 | * Initial reading of the manufacturer database happens now in background | 22 | * Initial reading of the manufacturer database happens now in background |
21 | * Removed deprecated setMonitorMode() API ==> Use setMode( "monitor" ) now. | 23 | * Removed deprecated setMonitorMode() API ==> Use setMode( "monitor" ) now. |
22 | The monitor mode now tries to use the standard IW_MODE_MONITOR first. If that | 24 | The monitor mode now tries to use the standard IW_MODE_MONITOR first. If that |
23 | doesn't work, it falls back to using the proprietary iwpriv commands | 25 | doesn't work, it falls back to using the proprietary iwpriv commands |
24 | 26 | ||
25 | 2003-11-30 Michael Lauer <mickey@Vanille.de> | 27 | 2003-11-30 Michael Lauer <mickey@Vanille.de> |
26 | 28 | ||
27 | * Released as Version 1.0.1 (Development Snapshot) | 29 | * Released as Version 1.0.1 (Development Snapshot) |
28 | * Fixed ARP decoding for wired networks. | 30 | * Fixed ARP decoding for wired networks. |
29 | Interestingly, 802.11 encapsulates these in IP packets, while wired ethernet just tags the type_of_protocol. | 31 | Interestingly, 802.11 encapsulates these in IP packets, while wired ethernet just tags the type_of_protocol. |
30 | * Added reading GPS data from a gps daemon. | 32 | * Added reading GPS data from a gps daemon. |
31 | * Started preparations for utilizing Wellenreiter II in wired networks. | 33 | * Started preparations for utilizing Wellenreiter II in wired networks. |
32 | * Implemented persistant configuration interface and retriggerable auto detection. | 34 | * Implemented persistant configuration interface and retriggerable auto detection. |
33 | * Added QCOP interface for talking to opie-networksettings. | 35 | * Added QCOP interface for talking to opie-networksettings. |
34 | * Added parsing of DHCP packets and detecting DHCP servers. | 36 | * Added parsing of DHCP packets and detecting DHCP servers. |
35 | * Overhauled the configuration window and started with the customizable event system. | 37 | * Overhauled the configuration window and started with the customizable event system. |
36 | * Added disabling the screensaver. | 38 | * Added disabling the screensaver. |
37 | * Added automatic opening and scrolling to the network tree if a new station appears. | 39 | * Added automatic opening and scrolling to the network tree if a new station appears. |
38 | 40 | ||
39 | 2003-05-10 Michael Lauer <mickey@Vanille.de> | 41 | 2003-05-10 Michael Lauer <mickey@Vanille.de> |
40 | 42 | ||
41 | * Released as Version 1.0 (Stable) | 43 | * Released as Version 1.0 (Stable) |
42 | * Added restarting the dhcp client if having killed it before. | 44 | * Added restarting the dhcp client if having killed it before. |
43 | * Decouple dump files from live capture to shift control over 'what' is dumped to applications. | 45 | * Decouple dump files from live capture to shift control over 'what' is dumped to applications. |
44 | 46 | ||
45 | 2003-05-05 Michael Lauer <mickey@Vanille.de> | 47 | 2003-05-05 Michael Lauer <mickey@Vanille.de> |
46 | 48 | ||
47 | * Released as Version 1.0-RC1 (Release Candidate) | 49 | * Released as Version 1.0-RC1 (Release Candidate) |
48 | * Fixed rare segfaults while sniffing and operating the GUI simultaenously. | 50 | * Fixed rare segfaults while sniffing and operating the GUI simultaenously. |
49 | * Parse more data packets and detect more participating stations. | 51 | * Parse more data packets and detect more participating stations. |
50 | * Added live graph window showing the signal strength on all channels. | 52 | * Added live graph window showing the signal strength on all channels. |
51 | * Added parsing ARP packets and identifying IP addresses of participating stations. | 53 | * Added parsing ARP packets and identifying IP addresses of participating stations. |
52 | * Added parsing with optionally enabled PRISM headers (signal strength). | 54 | * Added parsing with optionally enabled PRISM headers (signal strength). |
53 | 55 | ||
54 | 2003-04-12 Michael Lauer <mickey@Vanille.de> | 56 | 2003-04-12 Michael Lauer <mickey@Vanille.de> |
55 | 57 | ||
56 | * Released as Version 1.0 (Beta) | 58 | * Released as Version 1.0 (Beta) |
57 | * GUI enhancements in the Menubar and the Toolbar. | 59 | * GUI enhancements in the Menubar and the Toolbar. |
58 | * Improved keyboard handling. | 60 | * Improved keyboard handling. |
59 | * Added sanity checks for running Wellenreiter II as non-root or with dhcp clients in the background. | 61 | * Added sanity checks for running Wellenreiter II as non-root or with dhcp clients in the background. |
60 | * Add writing and replaying of libpcap compatible capture files. | 62 | * Add writing and replaying of libpcap compatible capture files. |
61 | 63 | ||
62 | 2003-04-08 Michael Lauer <mickey@Vanille.de> | 64 | 2003-04-08 Michael Lauer <mickey@Vanille.de> |
63 | 65 | ||
64 | * Released as Version 0.2 (Alpha) | 66 | * Released as Version 0.2 (Alpha) |
65 | * Closed memory leak in packet capturer. | 67 | * Closed memory leak in packet capturer. |
66 | * Fixed client stations appearing under essid as access points. | 68 | * Fixed client stations appearing under essid as access points. |
67 | * Fixed false WEP reporting in some cases. | 69 | * Fixed false WEP reporting in some cases. |
68 | * Started with inspecting data packages. | 70 | * Started with inspecting data packages. |
69 | * Add detecting associated client stations in infrastructural networks (if they transmit data). | 71 | * Add detecting associated client stations in infrastructural networks (if they transmit data). |
70 | * Worked around buggy hostap drivers writing past fixed-length-structures on arm. | 72 | * Worked around buggy hostap drivers writing past fixed-length-structures on arm. |
71 | * Added dynamic checking of available private ioctls. | 73 | * Added dynamic checking of available private ioctls. |
72 | * Added a saveable hex window for packet dissection. | 74 | * Added a saveable hex window for packet dissection. |
73 | 75 | ||
74 | 2003-03-30 Michael Lauer <mickey@Vanille.de> | 76 | 2003-03-30 Michael Lauer <mickey@Vanille.de> |
75 | 77 | ||
76 | * Released as Version 0.1 (Alpha) | 78 | * Released as Version 0.1 (Alpha) |
77 | 79 | ||
78 | 2003-03-25 Michael Lauer <mickey@Vanille.de> | 80 | 2003-03-25 Michael Lauer <mickey@Vanille.de> |
79 | 81 | ||
80 | * Rewrote Wellenreiter II from scratch - including the sniffing engine. | 82 | * Rewrote Wellenreiter II from scratch - including the sniffing engine. |
81 | * Beacon inspection works and finds ad-hoc networks and managed networks. | 83 | * Beacon inspection works and finds ad-hoc networks and managed networks. |
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO index 01e731f..f3fd205 100644 --- a/noncore/net/wellenreiter/TODO +++ b/noncore/net/wellenreiter/TODO | |||
@@ -1,62 +1,60 @@ | |||
1 | /************************************************************************ | 1 | /************************************************************************ |
2 | /* W e l l e n r e i t e r I I | 2 | /* W e l l e n r e i t e r I I |
3 | /* =============================== | 3 | /* =============================== |
4 | /* | 4 | /* |
5 | /* Version: 1.0.2 | 5 | /* Version: 1.0.2 |
6 | /************************************************************************ | 6 | /************************************************************************ |
7 | 7 | ||
8 | ---------------------------------------------------- | 8 | ---------------------------------------------------- |
9 | Ideas as of Wellenreiter II / December 2003 | 9 | Ideas as of Wellenreiter II / December 2003 |
10 | ---------------------------------------------------- | 10 | ---------------------------------------------------- |
11 | 11 | ||
12 | -------- | 12 | -------- |
13 | ENGINE | 13 | ENGINE |
14 | -------- | 14 | -------- |
15 | 15 | ||
16 | - enable multiple packet sources | 16 | - enable multiple packet sources |
17 | - infrared | 17 | - infrared |
18 | - bluetooth | 18 | - bluetooth |
19 | - usb? | 19 | - usb? |
20 | 20 | ||
21 | - define packet structure in a metalanguage and generate | 21 | - define packet structure in a metalanguage and generate |
22 | the actual parsing code (hmmm) | 22 | the actual parsing code (hmmm) |
23 | 23 | ||
24 | - pester the ethereal folks to settle for an application independant | 24 | - pester the ethereal folks to settle for an application independant |
25 | packet dissection framework... (unlikely) | 25 | packet dissection framework... (unlikely) |
26 | 26 | ||
27 | - adaptive hopping scheme ! | 27 | - adaptive hopping scheme ! |
28 | 28 | ||
29 | - gather interface capabilities | 29 | - gather interface capabilities |
30 | 30 | ||
31 | - enable sniffing in wired networks | 31 | - enable sniffing in wired networks |
32 | 32 | ||
33 | - fix autodetection (interface name) | 33 | - fix autodetection (interface name) |
34 | 34 | ||
35 | --------- | 35 | --------- |
36 | UI | 36 | UI |
37 | --------- | 37 | --------- |
38 | 38 | ||
39 | - display interface capabilities (or rewrite networksettings?) | 39 | - display interface capabilities (or rewrite networksettings?) |
40 | 40 | ||
41 | - distinguish wireless bridges (WDS traffic) | 41 | - distinguish wireless bridges (WDS traffic) |
42 | 42 | ||
43 | - expand/collapse all | ||
44 | |||
45 | - add configuration for scrollback buffer in hex window and log window | 43 | - add configuration for scrollback buffer in hex window and log window |
46 | 44 | ||
47 | - revamp hex window, make it more sophisticated than just a QMultiLineEdit | 45 | - revamp hex window, make it more sophisticated than just a QMultiLineEdit |
48 | - tree view | 46 | - tree view |
49 | 47 | ||
50 | - beep over headphone / customizable | 48 | - beep over headphone / customizable |
51 | 49 | ||
52 | - count/display number of wireless networks / APs since last start/stop | 50 | - count/display number of wireless networks / APs since last start/stop |
53 | 51 | ||
54 | --------- | 52 | --------- |
55 | FILES | 53 | FILES |
56 | --------- | 54 | --------- |
57 | 55 | ||
58 | - write kismet-like .network format and format to be importable into AutoRoute | 56 | - write kismet-like .network format and format to be importable into AutoRoute |
59 | 57 | ||
60 | - implement beacon stripping (the first beacon is enough to detect a | 58 | - implement beacon stripping (the first beacon is enough to detect a |
61 | new network - further beacons just blow up the capture file) | 59 | new network - further beacons just blow up the capture file) |
62 | 60 | ||
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index 469effe..113e783 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui | |||
@@ -1,1510 +1,1602 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>WellenreiterConfigBase</class> | 2 | <class>WellenreiterConfigBase</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QDialog</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>WellenreiterConfigBase</cstring> | 7 | <cstring>WellenreiterConfigBase</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>250</width> | 14 | <width>246</width> |
15 | <height>371</height> | 15 | <height>371</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>Wellenreiter II COnfiguration Dialog</string> | 20 | <string>Wellenreiter II COnfiguration Dialog</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <grid> | 28 | <grid> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>2</number> | 31 | <number>2</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>3</number> | 35 | <number>3</number> |
36 | </property> | 36 | </property> |
37 | <widget row="0" column="0" > | 37 | <widget row="0" column="0" > |
38 | <class>QTabWidget</class> | 38 | <class>QTabWidget</class> |
39 | <property stdset="1"> | 39 | <property stdset="1"> |
40 | <name>name</name> | 40 | <name>name</name> |
41 | <cstring>tab</cstring> | 41 | <cstring>tab</cstring> |
42 | </property> | 42 | </property> |
43 | <property> | 43 | <property> |
44 | <name>layoutMargin</name> | 44 | <name>layoutMargin</name> |
45 | </property> | 45 | </property> |
46 | <property> | 46 | <property> |
47 | <name>layoutSpacing</name> | 47 | <name>layoutSpacing</name> |
48 | </property> | 48 | </property> |
49 | <property> | ||
50 | <name>whatsThis</name> | ||
51 | <string></string> | ||
52 | </property> | ||
49 | <widget> | 53 | <widget> |
50 | <class>QWidget</class> | 54 | <class>QWidget</class> |
51 | <property stdset="1"> | 55 | <property stdset="1"> |
52 | <name>name</name> | 56 | <name>name</name> |
53 | <cstring>tab</cstring> | 57 | <cstring>tab</cstring> |
54 | </property> | 58 | </property> |
55 | <attribute> | 59 | <attribute> |
56 | <name>title</name> | 60 | <name>title</name> |
57 | <string>Interface</string> | 61 | <string>Interface</string> |
58 | </attribute> | 62 | </attribute> |
59 | <vbox> | 63 | <vbox> |
60 | <property stdset="1"> | 64 | <property stdset="1"> |
61 | <name>margin</name> | 65 | <name>margin</name> |
62 | <number>6</number> | 66 | <number>6</number> |
63 | </property> | 67 | </property> |
64 | <property stdset="1"> | 68 | <property stdset="1"> |
65 | <name>spacing</name> | 69 | <name>spacing</name> |
66 | <number>6</number> | 70 | <number>6</number> |
67 | </property> | 71 | </property> |
68 | <widget> | 72 | <widget> |
69 | <class>QLayoutWidget</class> | 73 | <class>QLayoutWidget</class> |
70 | <property stdset="1"> | 74 | <property stdset="1"> |
71 | <name>name</name> | 75 | <name>name</name> |
72 | <cstring>Layout7</cstring> | 76 | <cstring>Layout7</cstring> |
73 | </property> | 77 | </property> |
74 | <grid> | 78 | <grid> |
75 | <property stdset="1"> | 79 | <property stdset="1"> |
76 | <name>margin</name> | 80 | <name>margin</name> |
77 | <number>0</number> | 81 | <number>0</number> |
78 | </property> | 82 | </property> |
79 | <property stdset="1"> | 83 | <property stdset="1"> |
80 | <name>spacing</name> | 84 | <name>spacing</name> |
81 | <number>6</number> | 85 | <number>6</number> |
82 | </property> | 86 | </property> |
83 | <widget row="1" column="1" > | 87 | <widget row="1" column="1" > |
84 | <class>QComboBox</class> | 88 | <class>QComboBox</class> |
85 | <item> | 89 | <item> |
86 | <property> | 90 | <property> |
87 | <name>text</name> | 91 | <name>text</name> |
88 | <string><select></string> | 92 | <string><select></string> |
89 | </property> | 93 | </property> |
90 | </item> | 94 | </item> |
91 | <item> | 95 | <item> |
92 | <property> | 96 | <property> |
93 | <name>text</name> | 97 | <name>text</name> |
94 | <string>cisco</string> | 98 | <string>cisco</string> |
95 | </property> | 99 | </property> |
96 | </item> | 100 | </item> |
97 | <item> | 101 | <item> |
98 | <property> | 102 | <property> |
99 | <name>text</name> | 103 | <name>text</name> |
100 | <string>wlan-ng</string> | 104 | <string>wlan-ng</string> |
101 | </property> | 105 | </property> |
102 | </item> | 106 | </item> |
103 | <item> | 107 | <item> |
104 | <property> | 108 | <property> |
105 | <name>text</name> | 109 | <name>text</name> |
106 | <string>hostap</string> | 110 | <string>hostap</string> |
107 | </property> | 111 | </property> |
108 | </item> | 112 | </item> |
109 | <item> | 113 | <item> |
110 | <property> | 114 | <property> |
111 | <name>text</name> | 115 | <name>text</name> |
112 | <string>orinoco</string> | 116 | <string>orinoco</string> |
113 | </property> | 117 | </property> |
114 | </item> | 118 | </item> |
115 | <item> | 119 | <item> |
116 | <property> | 120 | <property> |
117 | <name>text</name> | 121 | <name>text</name> |
118 | <string><manual></string> | 122 | <string><manual></string> |
119 | </property> | 123 | </property> |
120 | </item> | 124 | </item> |
121 | <item> | 125 | <item> |
122 | <property> | 126 | <property> |
123 | <name>text</name> | 127 | <name>text</name> |
124 | <string><file></string> | 128 | <string><file></string> |
125 | </property> | 129 | </property> |
126 | </item> | 130 | </item> |
127 | <property stdset="1"> | 131 | <property stdset="1"> |
128 | <name>name</name> | 132 | <name>name</name> |
129 | <cstring>deviceType</cstring> | 133 | <cstring>deviceType</cstring> |
130 | </property> | 134 | </property> |
131 | <property stdset="1"> | 135 | <property stdset="1"> |
132 | <name>enabled</name> | 136 | <name>enabled</name> |
133 | <bool>true</bool> | 137 | <bool>true</bool> |
134 | </property> | 138 | </property> |
135 | <property stdset="1"> | 139 | <property stdset="1"> |
136 | <name>sizePolicy</name> | 140 | <name>sizePolicy</name> |
137 | <sizepolicy> | 141 | <sizepolicy> |
138 | <hsizetype>7</hsizetype> | 142 | <hsizetype>7</hsizetype> |
139 | <vsizetype>0</vsizetype> | 143 | <vsizetype>0</vsizetype> |
140 | </sizepolicy> | 144 | </sizepolicy> |
141 | </property> | 145 | </property> |
142 | <property> | 146 | <property> |
143 | <name>whatsThis</name> | 147 | <name>whatsThis</name> |
144 | <string>Choose the type of driver used for sniffing.</string> | 148 | <string>Choose the type of driver used for sniffing.</string> |
145 | </property> | 149 | </property> |
146 | </widget> | 150 | </widget> |
147 | <widget row="1" column="0" > | 151 | <widget row="1" column="0" > |
148 | <class>QLabel</class> | 152 | <class>QLabel</class> |
149 | <property stdset="1"> | 153 | <property stdset="1"> |
150 | <name>name</name> | 154 | <name>name</name> |
151 | <cstring>TextLabel2_3</cstring> | 155 | <cstring>TextLabel2_3</cstring> |
152 | </property> | 156 | </property> |
153 | <property stdset="1"> | 157 | <property stdset="1"> |
154 | <name>enabled</name> | 158 | <name>enabled</name> |
155 | <bool>true</bool> | 159 | <bool>true</bool> |
156 | </property> | 160 | </property> |
157 | <property stdset="1"> | 161 | <property stdset="1"> |
158 | <name>text</name> | 162 | <name>text</name> |
159 | <string>Driver:</string> | 163 | <string>Driver:</string> |
160 | </property> | 164 | </property> |
161 | </widget> | 165 | </widget> |
162 | <widget row="0" column="1" > | 166 | <widget row="0" column="1" > |
163 | <class>QComboBox</class> | 167 | <class>QComboBox</class> |
164 | <property stdset="1"> | 168 | <property stdset="1"> |
165 | <name>name</name> | 169 | <name>name</name> |
166 | <cstring>interfaceName</cstring> | 170 | <cstring>interfaceName</cstring> |
167 | </property> | 171 | </property> |
168 | <property stdset="1"> | 172 | <property stdset="1"> |
169 | <name>enabled</name> | 173 | <name>enabled</name> |
170 | <bool>true</bool> | 174 | <bool>true</bool> |
171 | </property> | 175 | </property> |
172 | <property stdset="1"> | 176 | <property stdset="1"> |
173 | <name>sizePolicy</name> | 177 | <name>sizePolicy</name> |
174 | <sizepolicy> | 178 | <sizepolicy> |
175 | <hsizetype>7</hsizetype> | 179 | <hsizetype>7</hsizetype> |
176 | <vsizetype>0</vsizetype> | 180 | <vsizetype>0</vsizetype> |
177 | </sizepolicy> | 181 | </sizepolicy> |
178 | </property> | 182 | </property> |
179 | <property stdset="1"> | 183 | <property stdset="1"> |
180 | <name>editable</name> | 184 | <name>editable</name> |
181 | <bool>false</bool> | 185 | <bool>false</bool> |
182 | </property> | 186 | </property> |
183 | <property> | 187 | <property> |
184 | <name>whatsThis</name> | 188 | <name>whatsThis</name> |
185 | <string>Choose the interface used for sniffing.</string> | 189 | <string>Choose the interface used for sniffing.</string> |
186 | </property> | 190 | </property> |
187 | </widget> | 191 | </widget> |
188 | <widget row="0" column="0" > | 192 | <widget row="0" column="0" > |
189 | <class>QLabel</class> | 193 | <class>QLabel</class> |
190 | <property stdset="1"> | 194 | <property stdset="1"> |
191 | <name>name</name> | 195 | <name>name</name> |
192 | <cstring>TextLabel1_2</cstring> | 196 | <cstring>TextLabel1_2</cstring> |
193 | </property> | 197 | </property> |
194 | <property stdset="1"> | 198 | <property stdset="1"> |
195 | <name>enabled</name> | 199 | <name>enabled</name> |
196 | <bool>true</bool> | 200 | <bool>true</bool> |
197 | </property> | 201 | </property> |
198 | <property stdset="1"> | 202 | <property stdset="1"> |
199 | <name>text</name> | 203 | <name>text</name> |
200 | <string>Name:</string> | 204 | <string>Name:</string> |
201 | </property> | 205 | </property> |
202 | </widget> | 206 | </widget> |
203 | </grid> | 207 | </grid> |
204 | </widget> | 208 | </widget> |
205 | <widget> | 209 | <widget> |
206 | <class>QLayoutWidget</class> | 210 | <class>QLayoutWidget</class> |
207 | <property stdset="1"> | 211 | <property stdset="1"> |
208 | <name>name</name> | 212 | <name>name</name> |
209 | <cstring>Layout5</cstring> | 213 | <cstring>Layout5</cstring> |
210 | </property> | 214 | </property> |
211 | <hbox> | 215 | <hbox> |
212 | <property stdset="1"> | 216 | <property stdset="1"> |
213 | <name>margin</name> | 217 | <name>margin</name> |
214 | <number>0</number> | 218 | <number>0</number> |
215 | </property> | 219 | </property> |
216 | <property stdset="1"> | 220 | <property stdset="1"> |
217 | <name>spacing</name> | 221 | <name>spacing</name> |
218 | <number>6</number> | 222 | <number>6</number> |
219 | </property> | 223 | </property> |
220 | <widget> | 224 | <widget> |
221 | <class>QPushButton</class> | 225 | <class>QPushButton</class> |
222 | <property stdset="1"> | 226 | <property stdset="1"> |
223 | <name>name</name> | 227 | <name>name</name> |
224 | <cstring>autodetect</cstring> | 228 | <cstring>autodetect</cstring> |
225 | </property> | 229 | </property> |
226 | <property stdset="1"> | 230 | <property stdset="1"> |
227 | <name>text</name> | 231 | <name>text</name> |
228 | <string>Perform Autodetection</string> | 232 | <string>Perform Autodetection</string> |
229 | </property> | 233 | </property> |
234 | <property> | ||
235 | <name>whatsThis</name> | ||
236 | <string>Retrigger the autodetection algorithm</string> | ||
237 | </property> | ||
230 | </widget> | 238 | </widget> |
231 | </hbox> | 239 | </hbox> |
232 | </widget> | 240 | </widget> |
233 | <widget> | 241 | <widget> |
234 | <class>QCheckBox</class> | 242 | <class>QCheckBox</class> |
235 | <property stdset="1"> | 243 | <property stdset="1"> |
236 | <name>name</name> | 244 | <name>name</name> |
237 | <cstring>prismHeader</cstring> | 245 | <cstring>prismHeader</cstring> |
238 | </property> | 246 | </property> |
239 | <property stdset="1"> | 247 | <property stdset="1"> |
240 | <name>text</name> | 248 | <name>text</name> |
241 | <string>Use additional PRISM header</string> | 249 | <string>Use additional PRISM header</string> |
242 | </property> | 250 | </property> |
251 | <property> | ||
252 | <name>whatsThis</name> | ||
253 | <string>Use additional PRISM headers, if available.</string> | ||
254 | </property> | ||
243 | </widget> | 255 | </widget> |
244 | <spacer> | 256 | <spacer> |
245 | <property> | 257 | <property> |
246 | <name>name</name> | 258 | <name>name</name> |
247 | <cstring>Spacer4</cstring> | 259 | <cstring>Spacer4</cstring> |
248 | </property> | 260 | </property> |
249 | <property stdset="1"> | 261 | <property stdset="1"> |
250 | <name>orientation</name> | 262 | <name>orientation</name> |
251 | <enum>Vertical</enum> | 263 | <enum>Vertical</enum> |
252 | </property> | 264 | </property> |
253 | <property stdset="1"> | 265 | <property stdset="1"> |
254 | <name>sizeType</name> | 266 | <name>sizeType</name> |
255 | <enum>Expanding</enum> | 267 | <enum>Expanding</enum> |
256 | </property> | 268 | </property> |
257 | <property> | 269 | <property> |
258 | <name>sizeHint</name> | 270 | <name>sizeHint</name> |
259 | <size> | 271 | <size> |
260 | <width>20</width> | 272 | <width>20</width> |
261 | <height>20</height> | 273 | <height>20</height> |
262 | </size> | 274 | </size> |
263 | </property> | 275 | </property> |
264 | </spacer> | 276 | </spacer> |
265 | <widget> | 277 | <widget> |
266 | <class>QLayoutWidget</class> | 278 | <class>QLayoutWidget</class> |
267 | <property stdset="1"> | 279 | <property stdset="1"> |
268 | <name>name</name> | 280 | <name>name</name> |
269 | <cstring>Layout6</cstring> | 281 | <cstring>Layout6</cstring> |
270 | </property> | 282 | </property> |
271 | <hbox> | 283 | <hbox> |
272 | <property stdset="1"> | 284 | <property stdset="1"> |
273 | <name>margin</name> | 285 | <name>margin</name> |
274 | <number>0</number> | 286 | <number>0</number> |
275 | </property> | 287 | </property> |
276 | <property stdset="1"> | 288 | <property stdset="1"> |
277 | <name>spacing</name> | 289 | <name>spacing</name> |
278 | <number>6</number> | 290 | <number>6</number> |
279 | </property> | 291 | </property> |
280 | <widget> | 292 | <widget> |
281 | <class>QCheckBox</class> | 293 | <class>QCheckBox</class> |
282 | <property stdset="1"> | 294 | <property stdset="1"> |
283 | <name>name</name> | 295 | <name>name</name> |
284 | <cstring>hopChannels</cstring> | 296 | <cstring>hopChannels</cstring> |
285 | </property> | 297 | </property> |
286 | <property stdset="1"> | 298 | <property stdset="1"> |
287 | <name>text</name> | 299 | <name>text</name> |
288 | <string>Hop Channels</string> | 300 | <string>Hop Channels</string> |
289 | </property> | 301 | </property> |
290 | <property stdset="1"> | 302 | <property stdset="1"> |
291 | <name>checked</name> | 303 | <name>checked</name> |
292 | <bool>true</bool> | 304 | <bool>true</bool> |
293 | </property> | 305 | </property> |
306 | <property> | ||
307 | <name>whatsThis</name> | ||
308 | <string>Check this, if you want to start a channel hopper.</string> | ||
309 | </property> | ||
294 | </widget> | 310 | </widget> |
295 | <widget> | 311 | <widget> |
296 | <class>QLabel</class> | 312 | <class>QLabel</class> |
297 | <property stdset="1"> | 313 | <property stdset="1"> |
298 | <name>name</name> | 314 | <name>name</name> |
299 | <cstring>TextLabel1</cstring> | 315 | <cstring>TextLabel1</cstring> |
300 | </property> | 316 | </property> |
301 | <property stdset="1"> | 317 | <property stdset="1"> |
302 | <name>text</name> | 318 | <name>text</name> |
303 | <string>every</string> | 319 | <string>every</string> |
304 | </property> | 320 | </property> |
305 | </widget> | 321 | </widget> |
306 | <widget> | 322 | <widget> |
307 | <class>QSpinBox</class> | 323 | <class>QSpinBox</class> |
308 | <property stdset="1"> | 324 | <property stdset="1"> |
309 | <name>name</name> | 325 | <name>name</name> |
310 | <cstring>hopInterval</cstring> | 326 | <cstring>hopInterval</cstring> |
311 | </property> | 327 | </property> |
312 | <property stdset="1"> | 328 | <property stdset="1"> |
313 | <name>enabled</name> | 329 | <name>enabled</name> |
314 | <bool>true</bool> | 330 | <bool>true</bool> |
315 | </property> | 331 | </property> |
316 | <property stdset="1"> | 332 | <property stdset="1"> |
317 | <name>suffix</name> | 333 | <name>suffix</name> |
318 | <string> ms</string> | 334 | <string> ms</string> |
319 | </property> | 335 | </property> |
320 | <property stdset="1"> | 336 | <property stdset="1"> |
321 | <name>maxValue</name> | 337 | <name>maxValue</name> |
322 | <number>2000</number> | 338 | <number>2000</number> |
323 | </property> | 339 | </property> |
324 | <property stdset="1"> | 340 | <property stdset="1"> |
325 | <name>minValue</name> | 341 | <name>minValue</name> |
326 | <number>100</number> | 342 | <number>100</number> |
327 | </property> | 343 | </property> |
328 | <property stdset="1"> | 344 | <property stdset="1"> |
329 | <name>lineStep</name> | 345 | <name>lineStep</name> |
330 | <number>100</number> | 346 | <number>100</number> |
331 | </property> | 347 | </property> |
332 | <property stdset="1"> | 348 | <property stdset="1"> |
333 | <name>value</name> | 349 | <name>value</name> |
334 | <number>1000</number> | 350 | <number>1000</number> |
335 | </property> | 351 | </property> |
336 | <property> | 352 | <property> |
337 | <name>whatsThis</name> | 353 | <name>whatsThis</name> |
338 | <string>Choose the channel hop interval.</string> | 354 | <string>Choose the channel hop interval.</string> |
339 | </property> | 355 | </property> |
340 | </widget> | 356 | </widget> |
341 | </hbox> | 357 | </hbox> |
342 | </widget> | 358 | </widget> |
343 | <widget> | 359 | <widget> |
344 | <class>QCheckBox</class> | 360 | <class>QCheckBox</class> |
345 | <property stdset="1"> | 361 | <property stdset="1"> |
346 | <name>name</name> | 362 | <name>name</name> |
347 | <cstring>adaptiveHopping</cstring> | 363 | <cstring>adaptiveHopping</cstring> |
348 | </property> | 364 | </property> |
349 | <property stdset="1"> | 365 | <property stdset="1"> |
350 | <name>enabled</name> | 366 | <name>enabled</name> |
351 | <bool>false</bool> | 367 | <bool>false</bool> |
352 | </property> | 368 | </property> |
353 | <property stdset="1"> | 369 | <property stdset="1"> |
354 | <name>text</name> | 370 | <name>text</name> |
355 | <string>Use Adaptive(TM) Hop Scheme</string> | 371 | <string>Use Adaptive(TM) Hop Scheme</string> |
356 | </property> | 372 | </property> |
373 | <property> | ||
374 | <name>whatsThis</name> | ||
375 | <string>An adaptive hopping interval dynamically changes the channel hopping parameters to listen longer on channels where traffic comes in.</string> | ||
376 | </property> | ||
357 | </widget> | 377 | </widget> |
358 | <widget> | 378 | <widget> |
359 | <class>QGroupBox</class> | 379 | <class>QGroupBox</class> |
360 | <property stdset="1"> | 380 | <property stdset="1"> |
361 | <name>name</name> | 381 | <name>name</name> |
362 | <cstring>GroupBox1</cstring> | 382 | <cstring>GroupBox1</cstring> |
363 | </property> | 383 | </property> |
364 | <property stdset="1"> | 384 | <property stdset="1"> |
365 | <name>enabled</name> | 385 | <name>enabled</name> |
366 | <bool>false</bool> | 386 | <bool>false</bool> |
367 | </property> | 387 | </property> |
368 | <property stdset="1"> | 388 | <property stdset="1"> |
369 | <name>title</name> | 389 | <name>title</name> |
370 | <string>Scan on channel</string> | 390 | <string>Scan on channel</string> |
371 | </property> | 391 | </property> |
372 | <property> | 392 | <property> |
373 | <name>layoutMargin</name> | 393 | <name>layoutMargin</name> |
374 | </property> | 394 | </property> |
375 | <property> | 395 | <property> |
376 | <name>layoutSpacing</name> | 396 | <name>layoutSpacing</name> |
377 | </property> | 397 | </property> |
398 | <property> | ||
399 | <name>whatsThis</name> | ||
400 | <string>Check the channels which should be included in the channel hopping scheme. Note that due to the 802.11 channel overlay scheme you may receive data on neighbour channels of channels, even if they're not checked here.</string> | ||
401 | </property> | ||
378 | <grid> | 402 | <grid> |
379 | <property stdset="1"> | 403 | <property stdset="1"> |
380 | <name>margin</name> | 404 | <name>margin</name> |
381 | <number>4</number> | 405 | <number>4</number> |
382 | </property> | 406 | </property> |
383 | <property stdset="1"> | 407 | <property stdset="1"> |
384 | <name>spacing</name> | 408 | <name>spacing</name> |
385 | <number>2</number> | 409 | <number>2</number> |
386 | </property> | 410 | </property> |
387 | <widget row="1" column="1" > | 411 | <widget row="1" column="1" > |
388 | <class>QCheckBox</class> | 412 | <class>QCheckBox</class> |
389 | <property stdset="1"> | 413 | <property stdset="1"> |
390 | <name>name</name> | 414 | <name>name</name> |
391 | <cstring>channel6</cstring> | 415 | <cstring>channel6</cstring> |
392 | </property> | 416 | </property> |
393 | <property stdset="1"> | 417 | <property stdset="1"> |
394 | <name>text</name> | 418 | <name>text</name> |
395 | <string>6</string> | 419 | <string>6</string> |
396 | </property> | 420 | </property> |
397 | </widget> | 421 | </widget> |
398 | <widget row="1" column="3" > | 422 | <widget row="1" column="3" > |
399 | <class>QCheckBox</class> | 423 | <class>QCheckBox</class> |
400 | <property stdset="1"> | 424 | <property stdset="1"> |
401 | <name>name</name> | 425 | <name>name</name> |
402 | <cstring>channel8</cstring> | 426 | <cstring>channel8</cstring> |
403 | </property> | 427 | </property> |
404 | <property stdset="1"> | 428 | <property stdset="1"> |
405 | <name>text</name> | 429 | <name>text</name> |
406 | <string>8</string> | 430 | <string>8</string> |
407 | </property> | 431 | </property> |
408 | </widget> | 432 | </widget> |
409 | <widget row="0" column="2" > | 433 | <widget row="0" column="2" > |
410 | <class>QCheckBox</class> | 434 | <class>QCheckBox</class> |
411 | <property stdset="1"> | 435 | <property stdset="1"> |
412 | <name>name</name> | 436 | <name>name</name> |
413 | <cstring>channel2</cstring> | 437 | <cstring>channel2</cstring> |
414 | </property> | 438 | </property> |
415 | <property stdset="1"> | 439 | <property stdset="1"> |
416 | <name>text</name> | 440 | <name>text</name> |
417 | <string>2</string> | 441 | <string>2</string> |
418 | </property> | 442 | </property> |
419 | </widget> | 443 | </widget> |
420 | <widget row="1" column="4" > | 444 | <widget row="1" column="4" > |
421 | <class>QCheckBox</class> | 445 | <class>QCheckBox</class> |
422 | <property stdset="1"> | 446 | <property stdset="1"> |
423 | <name>name</name> | 447 | <name>name</name> |
424 | <cstring>channel9</cstring> | 448 | <cstring>channel9</cstring> |
425 | </property> | 449 | </property> |
426 | <property stdset="1"> | 450 | <property stdset="1"> |
427 | <name>text</name> | 451 | <name>text</name> |
428 | <string>9</string> | 452 | <string>9</string> |
429 | </property> | 453 | </property> |
430 | </widget> | 454 | </widget> |
431 | <widget row="0" column="1" > | 455 | <widget row="0" column="1" > |
432 | <class>QCheckBox</class> | 456 | <class>QCheckBox</class> |
433 | <property stdset="1"> | 457 | <property stdset="1"> |
434 | <name>name</name> | 458 | <name>name</name> |
435 | <cstring>channel1</cstring> | 459 | <cstring>channel1</cstring> |
436 | </property> | 460 | </property> |
437 | <property stdset="1"> | 461 | <property stdset="1"> |
438 | <name>text</name> | 462 | <name>text</name> |
439 | <string>1</string> | 463 | <string>1</string> |
440 | </property> | 464 | </property> |
441 | </widget> | 465 | </widget> |
442 | <widget row="0" column="0" > | 466 | <widget row="0" column="0" > |
443 | <class>QCheckBox</class> | 467 | <class>QCheckBox</class> |
444 | <property stdset="1"> | 468 | <property stdset="1"> |
445 | <name>name</name> | 469 | <name>name</name> |
446 | <cstring>channelAll</cstring> | 470 | <cstring>channelAll</cstring> |
447 | </property> | 471 | </property> |
448 | <property stdset="1"> | 472 | <property stdset="1"> |
449 | <name>text</name> | 473 | <name>text</name> |
450 | <string>All</string> | 474 | <string>All</string> |
451 | </property> | 475 | </property> |
452 | </widget> | 476 | </widget> |
453 | <widget row="2" column="1" > | 477 | <widget row="2" column="1" > |
454 | <class>QCheckBox</class> | 478 | <class>QCheckBox</class> |
455 | <property stdset="1"> | 479 | <property stdset="1"> |
456 | <name>name</name> | 480 | <name>name</name> |
457 | <cstring>channel11</cstring> | 481 | <cstring>channel11</cstring> |
458 | </property> | 482 | </property> |
459 | <property stdset="1"> | 483 | <property stdset="1"> |
460 | <name>text</name> | 484 | <name>text</name> |
461 | <string>11</string> | 485 | <string>11</string> |
462 | </property> | 486 | </property> |
463 | </widget> | 487 | </widget> |
464 | <widget row="2" column="0" > | 488 | <widget row="2" column="0" > |
465 | <class>QCheckBox</class> | 489 | <class>QCheckBox</class> |
466 | <property stdset="1"> | 490 | <property stdset="1"> |
467 | <name>name</name> | 491 | <name>name</name> |
468 | <cstring>channel10</cstring> | 492 | <cstring>channel10</cstring> |
469 | </property> | 493 | </property> |
470 | <property stdset="1"> | 494 | <property stdset="1"> |
471 | <name>text</name> | 495 | <name>text</name> |
472 | <string>10</string> | 496 | <string>10</string> |
473 | </property> | 497 | </property> |
474 | </widget> | 498 | </widget> |
475 | <widget row="1" column="2" > | 499 | <widget row="1" column="2" > |
476 | <class>QCheckBox</class> | 500 | <class>QCheckBox</class> |
477 | <property stdset="1"> | 501 | <property stdset="1"> |
478 | <name>name</name> | 502 | <name>name</name> |
479 | <cstring>channel7</cstring> | 503 | <cstring>channel7</cstring> |
480 | </property> | 504 | </property> |
481 | <property stdset="1"> | 505 | <property stdset="1"> |
482 | <name>text</name> | 506 | <name>text</name> |
483 | <string>7</string> | 507 | <string>7</string> |
484 | </property> | 508 | </property> |
485 | </widget> | 509 | </widget> |
486 | <widget row="0" column="3" > | 510 | <widget row="0" column="3" > |
487 | <class>QCheckBox</class> | 511 | <class>QCheckBox</class> |
488 | <property stdset="1"> | 512 | <property stdset="1"> |
489 | <name>name</name> | 513 | <name>name</name> |
490 | <cstring>channel3</cstring> | 514 | <cstring>channel3</cstring> |
491 | </property> | 515 | </property> |
492 | <property stdset="1"> | 516 | <property stdset="1"> |
493 | <name>text</name> | 517 | <name>text</name> |
494 | <string>3</string> | 518 | <string>3</string> |
495 | </property> | 519 | </property> |
496 | </widget> | 520 | </widget> |
497 | <widget row="1" column="0" > | 521 | <widget row="1" column="0" > |
498 | <class>QCheckBox</class> | 522 | <class>QCheckBox</class> |
499 | <property stdset="1"> | 523 | <property stdset="1"> |
500 | <name>name</name> | 524 | <name>name</name> |
501 | <cstring>channel5</cstring> | 525 | <cstring>channel5</cstring> |
502 | </property> | 526 | </property> |
503 | <property stdset="1"> | 527 | <property stdset="1"> |
504 | <name>text</name> | 528 | <name>text</name> |
505 | <string>5</string> | 529 | <string>5</string> |
506 | </property> | 530 | </property> |
507 | </widget> | 531 | </widget> |
508 | <widget row="0" column="4" > | 532 | <widget row="0" column="4" > |
509 | <class>QCheckBox</class> | 533 | <class>QCheckBox</class> |
510 | <property stdset="1"> | 534 | <property stdset="1"> |
511 | <name>name</name> | 535 | <name>name</name> |
512 | <cstring>channel4</cstring> | 536 | <cstring>channel4</cstring> |
513 | </property> | 537 | </property> |
514 | <property stdset="1"> | 538 | <property stdset="1"> |
515 | <name>text</name> | 539 | <name>text</name> |
516 | <string>4</string> | 540 | <string>4</string> |
517 | </property> | 541 | </property> |
518 | </widget> | 542 | </widget> |
519 | <widget row="2" column="2" > | 543 | <widget row="2" column="2" > |
520 | <class>QCheckBox</class> | 544 | <class>QCheckBox</class> |
521 | <property stdset="1"> | 545 | <property stdset="1"> |
522 | <name>name</name> | 546 | <name>name</name> |
523 | <cstring>channel12</cstring> | 547 | <cstring>channel12</cstring> |
524 | </property> | 548 | </property> |
525 | <property stdset="1"> | 549 | <property stdset="1"> |
526 | <name>text</name> | 550 | <name>text</name> |
527 | <string>12</string> | 551 | <string>12</string> |
528 | </property> | 552 | </property> |
529 | </widget> | 553 | </widget> |
530 | <widget row="2" column="3" > | 554 | <widget row="2" column="3" > |
531 | <class>QCheckBox</class> | 555 | <class>QCheckBox</class> |
532 | <property stdset="1"> | 556 | <property stdset="1"> |
533 | <name>name</name> | 557 | <name>name</name> |
534 | <cstring>channel13</cstring> | 558 | <cstring>channel13</cstring> |
535 | </property> | 559 | </property> |
536 | <property stdset="1"> | 560 | <property stdset="1"> |
537 | <name>text</name> | 561 | <name>text</name> |
538 | <string>13</string> | 562 | <string>13</string> |
539 | </property> | 563 | </property> |
540 | </widget> | 564 | </widget> |
541 | <widget row="2" column="4" > | 565 | <widget row="2" column="4" > |
542 | <class>QCheckBox</class> | 566 | <class>QCheckBox</class> |
543 | <property stdset="1"> | 567 | <property stdset="1"> |
544 | <name>name</name> | 568 | <name>name</name> |
545 | <cstring>channel14</cstring> | 569 | <cstring>channel14</cstring> |
546 | </property> | 570 | </property> |
547 | <property stdset="1"> | 571 | <property stdset="1"> |
548 | <name>text</name> | 572 | <name>text</name> |
549 | <string>14</string> | 573 | <string>14</string> |
550 | </property> | 574 | </property> |
551 | </widget> | 575 | </widget> |
552 | </grid> | 576 | </grid> |
553 | </widget> | 577 | </widget> |
554 | </vbox> | 578 | </vbox> |
555 | </widget> | 579 | </widget> |
556 | <widget> | 580 | <widget> |
557 | <class>QWidget</class> | 581 | <class>QWidget</class> |
558 | <property stdset="1"> | 582 | <property stdset="1"> |
559 | <name>name</name> | 583 | <name>name</name> |
560 | <cstring>tab</cstring> | 584 | <cstring>tab</cstring> |
561 | </property> | 585 | </property> |
562 | <attribute> | 586 | <attribute> |
563 | <name>title</name> | 587 | <name>title</name> |
564 | <string>Capture</string> | 588 | <string>Capture</string> |
565 | </attribute> | 589 | </attribute> |
566 | <grid> | 590 | <grid> |
567 | <property stdset="1"> | 591 | <property stdset="1"> |
568 | <name>margin</name> | 592 | <name>margin</name> |
569 | <number>5</number> | 593 | <number>5</number> |
570 | </property> | 594 | </property> |
571 | <property stdset="1"> | 595 | <property stdset="1"> |
572 | <name>spacing</name> | 596 | <name>spacing</name> |
573 | <number>3</number> | 597 | <number>3</number> |
574 | </property> | 598 | </property> |
575 | <widget row="2" column="0" rowspan="1" colspan="3" > | 599 | <widget row="2" column="0" rowspan="1" colspan="3" > |
576 | <class>ProtocolListView</class> | 600 | <class>ProtocolListView</class> |
577 | <property stdset="1"> | 601 | <property stdset="1"> |
578 | <name>name</name> | 602 | <name>name</name> |
579 | <cstring>capturePackets</cstring> | 603 | <cstring>capturePackets</cstring> |
580 | </property> | 604 | </property> |
581 | <property stdset="1"> | 605 | <property stdset="1"> |
582 | <name>enabled</name> | 606 | <name>enabled</name> |
583 | <bool>false</bool> | 607 | <bool>false</bool> |
584 | </property> | 608 | </property> |
585 | <property stdset="1"> | 609 | <property stdset="1"> |
586 | <name>sizePolicy</name> | 610 | <name>sizePolicy</name> |
587 | <sizepolicy> | 611 | <sizepolicy> |
588 | <hsizetype>7</hsizetype> | 612 | <hsizetype>7</hsizetype> |
589 | <vsizetype>7</vsizetype> | 613 | <vsizetype>7</vsizetype> |
590 | </sizepolicy> | 614 | </sizepolicy> |
591 | </property> | 615 | </property> |
592 | </widget> | 616 | </widget> |
593 | <widget row="1" column="0" rowspan="1" colspan="3" > | 617 | <widget row="1" column="0" rowspan="1" colspan="3" > |
594 | <class>QLineEdit</class> | 618 | <class>QLineEdit</class> |
595 | <property stdset="1"> | 619 | <property stdset="1"> |
596 | <name>name</name> | 620 | <name>name</name> |
597 | <cstring>captureFileName</cstring> | 621 | <cstring>captureFileName</cstring> |
598 | </property> | 622 | </property> |
599 | <property stdset="1"> | 623 | <property stdset="1"> |
600 | <name>enabled</name> | 624 | <name>enabled</name> |
601 | <bool>false</bool> | 625 | <bool>false</bool> |
602 | </property> | 626 | </property> |
603 | <property stdset="1"> | 627 | <property stdset="1"> |
604 | <name>text</name> | 628 | <name>text</name> |
605 | <string>/tmp/capture</string> | 629 | <string>/tmp/capture</string> |
606 | </property> | 630 | </property> |
631 | <property> | ||
632 | <name>whatsThis</name> | ||
633 | <string>Configure the name of the capture file.</string> | ||
634 | </property> | ||
607 | </widget> | 635 | </widget> |
608 | <widget row="0" column="2" > | 636 | <widget row="0" column="2" > |
609 | <class>QToolButton</class> | 637 | <class>QToolButton</class> |
610 | <property stdset="1"> | 638 | <property stdset="1"> |
611 | <name>name</name> | 639 | <name>name</name> |
612 | <cstring>getCaptureFileName</cstring> | 640 | <cstring>getCaptureFileName</cstring> |
613 | </property> | 641 | </property> |
614 | <property stdset="1"> | 642 | <property stdset="1"> |
615 | <name>enabled</name> | 643 | <name>enabled</name> |
616 | <bool>false</bool> | 644 | <bool>false</bool> |
617 | </property> | 645 | </property> |
618 | <property stdset="1"> | 646 | <property stdset="1"> |
619 | <name>text</name> | 647 | <name>text</name> |
620 | <string>Browse</string> | 648 | <string>Browse</string> |
621 | </property> | 649 | </property> |
650 | <property> | ||
651 | <name>whatsThis</name> | ||
652 | <string>Click to open a file requester to choose a capture file name.</string> | ||
653 | </property> | ||
622 | </widget> | 654 | </widget> |
623 | <spacer row="0" column="1" > | 655 | <spacer row="0" column="1" > |
624 | <property> | 656 | <property> |
625 | <name>name</name> | 657 | <name>name</name> |
626 | <cstring>Spacer2</cstring> | 658 | <cstring>Spacer2</cstring> |
627 | </property> | 659 | </property> |
628 | <property stdset="1"> | 660 | <property stdset="1"> |
629 | <name>orientation</name> | 661 | <name>orientation</name> |
630 | <enum>Horizontal</enum> | 662 | <enum>Horizontal</enum> |
631 | </property> | 663 | </property> |
632 | <property stdset="1"> | 664 | <property stdset="1"> |
633 | <name>sizeType</name> | 665 | <name>sizeType</name> |
634 | <enum>Expanding</enum> | 666 | <enum>Expanding</enum> |
635 | </property> | 667 | </property> |
636 | <property> | 668 | <property> |
637 | <name>sizeHint</name> | 669 | <name>sizeHint</name> |
638 | <size> | 670 | <size> |
639 | <width>20</width> | 671 | <width>20</width> |
640 | <height>20</height> | 672 | <height>20</height> |
641 | </size> | 673 | </size> |
642 | </property> | 674 | </property> |
643 | </spacer> | 675 | </spacer> |
644 | <widget row="0" column="0" > | 676 | <widget row="0" column="0" > |
645 | <class>QCheckBox</class> | 677 | <class>QCheckBox</class> |
646 | <property stdset="1"> | 678 | <property stdset="1"> |
647 | <name>name</name> | 679 | <name>name</name> |
648 | <cstring>writeCaptureFile</cstring> | 680 | <cstring>writeCaptureFile</cstring> |
649 | </property> | 681 | </property> |
650 | <property stdset="1"> | 682 | <property stdset="1"> |
651 | <name>enabled</name> | 683 | <name>enabled</name> |
652 | <bool>true</bool> | 684 | <bool>true</bool> |
653 | </property> | 685 | </property> |
654 | <property stdset="1"> | 686 | <property stdset="1"> |
655 | <name>text</name> | 687 | <name>text</name> |
656 | <string>Write Capture Files To</string> | 688 | <string>Write Capture Files To</string> |
657 | </property> | 689 | </property> |
690 | <property> | ||
691 | <name>whatsThis</name> | ||
692 | <string>Check this to write an ethereal compatible capture file.</string> | ||
693 | </property> | ||
658 | </widget> | 694 | </widget> |
659 | </grid> | 695 | </grid> |
660 | </widget> | 696 | </widget> |
661 | <widget> | 697 | <widget> |
662 | <class>QWidget</class> | 698 | <class>QWidget</class> |
663 | <property stdset="1"> | 699 | <property stdset="1"> |
664 | <name>name</name> | 700 | <name>name</name> |
665 | <cstring>tab</cstring> | 701 | <cstring>tab</cstring> |
666 | </property> | 702 | </property> |
667 | <attribute> | 703 | <attribute> |
668 | <name>title</name> | 704 | <name>title</name> |
669 | <string>Parse</string> | 705 | <string>Parse</string> |
670 | </attribute> | 706 | </attribute> |
671 | <grid> | 707 | <grid> |
672 | <property stdset="1"> | 708 | <property stdset="1"> |
673 | <name>margin</name> | 709 | <name>margin</name> |
674 | <number>5</number> | 710 | <number>5</number> |
675 | </property> | 711 | </property> |
676 | <property stdset="1"> | 712 | <property stdset="1"> |
677 | <name>spacing</name> | 713 | <name>spacing</name> |
678 | <number>3</number> | 714 | <number>3</number> |
679 | </property> | 715 | </property> |
680 | <widget row="0" column="0" > | 716 | <widget row="0" column="0" > |
681 | <class>ProtocolListView</class> | 717 | <class>ProtocolListView</class> |
682 | <property stdset="1"> | 718 | <property stdset="1"> |
683 | <name>name</name> | 719 | <name>name</name> |
684 | <cstring>parsePackets</cstring> | 720 | <cstring>parsePackets</cstring> |
685 | </property> | 721 | </property> |
686 | <property stdset="1"> | 722 | <property stdset="1"> |
687 | <name>sizePolicy</name> | 723 | <name>sizePolicy</name> |
688 | <sizepolicy> | 724 | <sizepolicy> |
689 | <hsizetype>7</hsizetype> | 725 | <hsizetype>7</hsizetype> |
690 | <vsizetype>7</vsizetype> | 726 | <vsizetype>7</vsizetype> |
691 | </sizepolicy> | 727 | </sizepolicy> |
692 | </property> | 728 | </property> |
693 | </widget> | 729 | </widget> |
694 | </grid> | 730 | </grid> |
695 | </widget> | 731 | </widget> |
696 | <widget> | 732 | <widget> |
697 | <class>QWidget</class> | 733 | <class>QWidget</class> |
698 | <property stdset="1"> | 734 | <property stdset="1"> |
699 | <name>name</name> | 735 | <name>name</name> |
700 | <cstring>tab</cstring> | 736 | <cstring>tab</cstring> |
701 | </property> | 737 | </property> |
702 | <attribute> | 738 | <attribute> |
703 | <name>title</name> | 739 | <name>title</name> |
704 | <string>UI</string> | 740 | <string>UI</string> |
705 | </attribute> | 741 | </attribute> |
706 | <vbox> | 742 | <vbox> |
707 | <property stdset="1"> | 743 | <property stdset="1"> |
708 | <name>margin</name> | 744 | <name>margin</name> |
709 | <number>5</number> | 745 | <number>5</number> |
710 | </property> | 746 | </property> |
711 | <property stdset="1"> | 747 | <property stdset="1"> |
712 | <name>spacing</name> | 748 | <name>spacing</name> |
713 | <number>3</number> | 749 | <number>3</number> |
714 | </property> | 750 | </property> |
715 | <widget> | 751 | <widget> |
716 | <class>QCheckBox</class> | 752 | <class>QCheckBox</class> |
717 | <property stdset="1"> | 753 | <property stdset="1"> |
718 | <name>name</name> | 754 | <name>name</name> |
719 | <cstring>lookupVendor</cstring> | 755 | <cstring>lookupVendor</cstring> |
720 | </property> | 756 | </property> |
721 | <property stdset="1"> | 757 | <property stdset="1"> |
722 | <name>text</name> | 758 | <name>text</name> |
723 | <string>Lookup MAC vendor names</string> | 759 | <string>Lookup MAC vendor names</string> |
724 | </property> | 760 | </property> |
761 | <property> | ||
762 | <name>whatsThis</name> | ||
763 | <string>Check this to lookup MAC vendor names.</string> | ||
764 | </property> | ||
725 | </widget> | 765 | </widget> |
726 | <widget> | 766 | <widget> |
727 | <class>QCheckBox</class> | 767 | <class>QCheckBox</class> |
728 | <property stdset="1"> | 768 | <property stdset="1"> |
729 | <name>name</name> | 769 | <name>name</name> |
730 | <cstring>openTree</cstring> | 770 | <cstring>openTree</cstring> |
731 | </property> | 771 | </property> |
732 | <property stdset="1"> | 772 | <property stdset="1"> |
733 | <name>text</name> | 773 | <name>text</name> |
734 | <string>Open Tree On New Station</string> | 774 | <string>Open Tree On New Station</string> |
735 | </property> | 775 | </property> |
776 | <property> | ||
777 | <name>whatsThis</name> | ||
778 | <string>Check this to automatically make a tree visible when a new station is detected.</string> | ||
779 | </property> | ||
736 | </widget> | 780 | </widget> |
737 | <widget> | 781 | <widget> |
738 | <class>QCheckBox</class> | 782 | <class>QCheckBox</class> |
739 | <property stdset="1"> | 783 | <property stdset="1"> |
740 | <name>name</name> | 784 | <name>name</name> |
741 | <cstring>disablePM</cstring> | 785 | <cstring>disablePM</cstring> |
742 | </property> | 786 | </property> |
743 | <property stdset="1"> | 787 | <property stdset="1"> |
744 | <name>text</name> | 788 | <name>text</name> |
745 | <string>Disable Power Management</string> | 789 | <string>Disable Power Management</string> |
746 | </property> | 790 | </property> |
791 | <property> | ||
792 | <name>whatsThis</name> | ||
793 | <string>Check this to disable power management while scanning.</string> | ||
794 | </property> | ||
747 | </widget> | 795 | </widget> |
748 | <spacer> | 796 | <spacer> |
749 | <property> | 797 | <property> |
750 | <name>name</name> | 798 | <name>name</name> |
751 | <cstring>Spacer3</cstring> | 799 | <cstring>Spacer3</cstring> |
752 | </property> | 800 | </property> |
753 | <property stdset="1"> | 801 | <property stdset="1"> |
754 | <name>orientation</name> | 802 | <name>orientation</name> |
755 | <enum>Vertical</enum> | 803 | <enum>Vertical</enum> |
756 | </property> | 804 | </property> |
757 | <property stdset="1"> | 805 | <property stdset="1"> |
758 | <name>sizeType</name> | 806 | <name>sizeType</name> |
759 | <enum>Expanding</enum> | 807 | <enum>Expanding</enum> |
760 | </property> | 808 | </property> |
761 | <property> | 809 | <property> |
762 | <name>sizeHint</name> | 810 | <name>sizeHint</name> |
763 | <size> | 811 | <size> |
764 | <width>20</width> | 812 | <width>20</width> |
765 | <height>20</height> | 813 | <height>20</height> |
766 | </size> | 814 | </size> |
767 | </property> | 815 | </property> |
768 | </spacer> | 816 | </spacer> |
769 | <widget> | 817 | <widget> |
770 | <class>QGroupBox</class> | 818 | <class>QGroupBox</class> |
771 | <property stdset="1"> | 819 | <property stdset="1"> |
772 | <name>name</name> | 820 | <name>name</name> |
773 | <cstring>GroupBox4_2</cstring> | 821 | <cstring>GroupBox4_2</cstring> |
774 | </property> | 822 | </property> |
775 | <property stdset="1"> | 823 | <property stdset="1"> |
776 | <name>enabled</name> | 824 | <name>enabled</name> |
777 | <bool>true</bool> | 825 | <bool>true</bool> |
778 | </property> | 826 | </property> |
779 | <property stdset="1"> | 827 | <property stdset="1"> |
780 | <name>title</name> | 828 | <name>title</name> |
781 | <string>Action on detecting a new</string> | 829 | <string>Action on detecting a new</string> |
782 | </property> | 830 | </property> |
783 | <property> | 831 | <property> |
784 | <name>layoutMargin</name> | 832 | <name>layoutMargin</name> |
785 | </property> | 833 | </property> |
786 | <property> | 834 | <property> |
787 | <name>layoutSpacing</name> | 835 | <name>layoutSpacing</name> |
788 | </property> | 836 | </property> |
789 | <grid> | 837 | <grid> |
790 | <property stdset="1"> | 838 | <property stdset="1"> |
791 | <name>margin</name> | 839 | <name>margin</name> |
792 | <number>3</number> | 840 | <number>3</number> |
793 | </property> | 841 | </property> |
794 | <property stdset="1"> | 842 | <property stdset="1"> |
795 | <name>spacing</name> | 843 | <name>spacing</name> |
796 | <number>0</number> | 844 | <number>0</number> |
797 | </property> | 845 | </property> |
798 | <widget row="0" column="0" > | 846 | <widget row="0" column="0" > |
799 | <class>QLayoutWidget</class> | 847 | <class>QLayoutWidget</class> |
800 | <property stdset="1"> | 848 | <property stdset="1"> |
801 | <name>name</name> | 849 | <name>name</name> |
802 | <cstring>Layout6</cstring> | 850 | <cstring>Layout6</cstring> |
803 | </property> | 851 | </property> |
804 | <property> | 852 | <property> |
805 | <name>layoutMargin</name> | 853 | <name>layoutMargin</name> |
806 | </property> | 854 | </property> |
807 | <property> | 855 | <property> |
808 | <name>layoutSpacing</name> | 856 | <name>layoutSpacing</name> |
809 | </property> | 857 | </property> |
810 | <grid> | 858 | <grid> |
811 | <property stdset="1"> | 859 | <property stdset="1"> |
812 | <name>margin</name> | 860 | <name>margin</name> |
813 | <number>2</number> | 861 | <number>2</number> |
814 | </property> | 862 | </property> |
815 | <property stdset="1"> | 863 | <property stdset="1"> |
816 | <name>spacing</name> | 864 | <name>spacing</name> |
817 | <number>2</number> | 865 | <number>2</number> |
818 | </property> | 866 | </property> |
819 | <widget row="4" column="0" > | 867 | <widget row="4" column="0" > |
820 | <class>QLabel</class> | 868 | <class>QLabel</class> |
821 | <property stdset="1"> | 869 | <property stdset="1"> |
822 | <name>name</name> | 870 | <name>name</name> |
823 | <cstring>TextLabel3</cstring> | 871 | <cstring>TextLabel3</cstring> |
824 | </property> | 872 | </property> |
825 | <property stdset="1"> | 873 | <property stdset="1"> |
826 | <name>text</name> | 874 | <name>text</name> |
827 | <string>Wired Station:</string> | 875 | <string>Wired Station:</string> |
828 | </property> | 876 | </property> |
829 | </widget> | 877 | </widget> |
830 | <widget row="0" column="0" > | 878 | <widget row="0" column="0" > |
831 | <class>QLabel</class> | 879 | <class>QLabel</class> |
832 | <property stdset="1"> | 880 | <property stdset="1"> |
833 | <name>name</name> | 881 | <name>name</name> |
834 | <cstring>TextLabel1_3</cstring> | 882 | <cstring>TextLabel1_3</cstring> |
835 | </property> | 883 | </property> |
836 | <property stdset="1"> | 884 | <property stdset="1"> |
837 | <name>text</name> | 885 | <name>text</name> |
838 | <string>Network:</string> | 886 | <string>Network:</string> |
839 | </property> | 887 | </property> |
840 | </widget> | 888 | </widget> |
841 | <widget row="2" column="1" > | 889 | <widget row="2" column="1" > |
842 | <class>QComboBox</class> | 890 | <class>QComboBox</class> |
843 | <item> | 891 | <item> |
844 | <property> | 892 | <property> |
845 | <name>text</name> | 893 | <name>text</name> |
846 | <string><Ignore></string> | 894 | <string><Ignore></string> |
847 | </property> | 895 | </property> |
848 | </item> | 896 | </item> |
849 | <item> | 897 | <item> |
850 | <property> | 898 | <property> |
851 | <name>text</name> | 899 | <name>text</name> |
852 | <string>Play Alarm</string> | 900 | <string>Play Alarm</string> |
853 | </property> | 901 | </property> |
854 | </item> | 902 | </item> |
855 | <item> | 903 | <item> |
856 | <property> | 904 | <property> |
857 | <name>text</name> | 905 | <name>text</name> |
858 | <string>Play Click</string> | 906 | <string>Play Click</string> |
859 | </property> | 907 | </property> |
860 | </item> | 908 | </item> |
861 | <item> | 909 | <item> |
862 | <property> | 910 | <property> |
863 | <name>text</name> | 911 | <name>text</name> |
864 | <string>Blink LED</string> | 912 | <string>Blink LED</string> |
865 | </property> | 913 | </property> |
866 | </item> | 914 | </item> |
867 | <item> | 915 | <item> |
868 | <property> | 916 | <property> |
869 | <name>text</name> | 917 | <name>text</name> |
870 | <string>Run Script</string> | 918 | <string>Run Script</string> |
871 | </property> | 919 | </property> |
872 | </item> | 920 | </item> |
873 | <property stdset="1"> | 921 | <property stdset="1"> |
874 | <name>name</name> | 922 | <name>name</name> |
875 | <cstring>newClientAction</cstring> | 923 | <cstring>newClientAction</cstring> |
876 | </property> | 924 | </property> |
877 | <property stdset="1"> | 925 | <property stdset="1"> |
878 | <name>sizePolicy</name> | 926 | <name>sizePolicy</name> |
879 | <sizepolicy> | 927 | <sizepolicy> |
880 | <hsizetype>7</hsizetype> | 928 | <hsizetype>7</hsizetype> |
881 | <vsizetype>0</vsizetype> | 929 | <vsizetype>0</vsizetype> |
882 | </sizepolicy> | 930 | </sizepolicy> |
883 | </property> | 931 | </property> |
932 | <property> | ||
933 | <name>whatsThis</name> | ||
934 | <string>Choose an action to perform when a new wireless station is detected.</string> | ||
935 | </property> | ||
884 | </widget> | 936 | </widget> |
885 | <widget row="3" column="0" rowspan="1" colspan="2" > | 937 | <widget row="3" column="0" rowspan="1" colspan="2" > |
886 | <class>QLineEdit</class> | 938 | <class>QLineEdit</class> |
887 | <property stdset="1"> | 939 | <property stdset="1"> |
888 | <name>name</name> | 940 | <name>name</name> |
889 | <cstring>newClientScript</cstring> | 941 | <cstring>newClientScript</cstring> |
890 | </property> | 942 | </property> |
891 | <property stdset="1"> | 943 | <property stdset="1"> |
892 | <name>enabled</name> | 944 | <name>enabled</name> |
893 | <bool>true</bool> | 945 | <bool>true</bool> |
894 | </property> | 946 | </property> |
947 | <property> | ||
948 | <name>whatsThis</name> | ||
949 | <string>The command line to execute when a script action is performed.</string> | ||
950 | </property> | ||
895 | </widget> | 951 | </widget> |
896 | <widget row="2" column="0" > | 952 | <widget row="2" column="0" > |
897 | <class>QLabel</class> | 953 | <class>QLabel</class> |
898 | <property stdset="1"> | 954 | <property stdset="1"> |
899 | <name>name</name> | 955 | <name>name</name> |
900 | <cstring>TextLabel2</cstring> | 956 | <cstring>TextLabel2</cstring> |
901 | </property> | 957 | </property> |
902 | <property stdset="1"> | 958 | <property stdset="1"> |
903 | <name>text</name> | 959 | <name>text</name> |
904 | <string>Wireless Station:</string> | 960 | <string>Wireless Station:</string> |
905 | </property> | 961 | </property> |
906 | </widget> | 962 | </widget> |
907 | <widget row="4" column="1" > | 963 | <widget row="4" column="1" > |
908 | <class>QComboBox</class> | 964 | <class>QComboBox</class> |
909 | <item> | 965 | <item> |
910 | <property> | 966 | <property> |
911 | <name>text</name> | 967 | <name>text</name> |
912 | <string><Ignore></string> | 968 | <string><Ignore></string> |
913 | </property> | 969 | </property> |
914 | </item> | 970 | </item> |
915 | <item> | 971 | <item> |
916 | <property> | 972 | <property> |
917 | <name>text</name> | 973 | <name>text</name> |
918 | <string>Play Alarm</string> | 974 | <string>Play Alarm</string> |
919 | </property> | 975 | </property> |
920 | </item> | 976 | </item> |
921 | <item> | 977 | <item> |
922 | <property> | 978 | <property> |
923 | <name>text</name> | 979 | <name>text</name> |
924 | <string>Play Click</string> | 980 | <string>Play Click</string> |
925 | </property> | 981 | </property> |
926 | </item> | 982 | </item> |
927 | <item> | 983 | <item> |
928 | <property> | 984 | <property> |
929 | <name>text</name> | 985 | <name>text</name> |
930 | <string>Blink LED</string> | 986 | <string>Blink LED</string> |
931 | </property> | 987 | </property> |
932 | </item> | 988 | </item> |
933 | <item> | 989 | <item> |
934 | <property> | 990 | <property> |
935 | <name>text</name> | 991 | <name>text</name> |
936 | <string>Run Script</string> | 992 | <string>Run Script</string> |
937 | </property> | 993 | </property> |
938 | </item> | 994 | </item> |
939 | <property stdset="1"> | 995 | <property stdset="1"> |
940 | <name>name</name> | 996 | <name>name</name> |
941 | <cstring>newStationAction</cstring> | 997 | <cstring>newStationAction</cstring> |
942 | </property> | 998 | </property> |
943 | <property stdset="1"> | 999 | <property stdset="1"> |
944 | <name>sizePolicy</name> | 1000 | <name>sizePolicy</name> |
945 | <sizepolicy> | 1001 | <sizepolicy> |
946 | <hsizetype>7</hsizetype> | 1002 | <hsizetype>7</hsizetype> |
947 | <vsizetype>0</vsizetype> | 1003 | <vsizetype>0</vsizetype> |
948 | </sizepolicy> | 1004 | </sizepolicy> |
949 | </property> | 1005 | </property> |
1006 | <property> | ||
1007 | <name>whatsThis</name> | ||
1008 | <string>Choose the action to perform when a new wired station is detected.</string> | ||
1009 | </property> | ||
950 | </widget> | 1010 | </widget> |
951 | <widget row="0" column="1" > | 1011 | <widget row="0" column="1" > |
952 | <class>QComboBox</class> | 1012 | <class>QComboBox</class> |
953 | <item> | 1013 | <item> |
954 | <property> | 1014 | <property> |
955 | <name>text</name> | 1015 | <name>text</name> |
956 | <string><Ignore></string> | 1016 | <string><Ignore></string> |
957 | </property> | 1017 | </property> |
958 | </item> | 1018 | </item> |
959 | <item> | 1019 | <item> |
960 | <property> | 1020 | <property> |
961 | <name>text</name> | 1021 | <name>text</name> |
962 | <string>Play Alarm</string> | 1022 | <string>Play Alarm</string> |
963 | </property> | 1023 | </property> |
964 | </item> | 1024 | </item> |
965 | <item> | 1025 | <item> |
966 | <property> | 1026 | <property> |
967 | <name>text</name> | 1027 | <name>text</name> |
968 | <string>Play Click</string> | 1028 | <string>Play Click</string> |
969 | </property> | 1029 | </property> |
970 | </item> | 1030 | </item> |
971 | <item> | 1031 | <item> |
972 | <property> | 1032 | <property> |
973 | <name>text</name> | 1033 | <name>text</name> |
974 | <string>Blink LED</string> | 1034 | <string>Blink LED</string> |
975 | </property> | 1035 | </property> |
976 | </item> | 1036 | </item> |
977 | <item> | 1037 | <item> |
978 | <property> | 1038 | <property> |
979 | <name>text</name> | 1039 | <name>text</name> |
980 | <string>Run Script</string> | 1040 | <string>Run Script</string> |
981 | </property> | 1041 | </property> |
982 | </item> | 1042 | </item> |
983 | <property stdset="1"> | 1043 | <property stdset="1"> |
984 | <name>name</name> | 1044 | <name>name</name> |
985 | <cstring>newNetworkAction</cstring> | 1045 | <cstring>newNetworkAction</cstring> |
986 | </property> | 1046 | </property> |
987 | <property stdset="1"> | 1047 | <property stdset="1"> |
988 | <name>sizePolicy</name> | 1048 | <name>sizePolicy</name> |
989 | <sizepolicy> | 1049 | <sizepolicy> |
990 | <hsizetype>7</hsizetype> | 1050 | <hsizetype>7</hsizetype> |
991 | <vsizetype>0</vsizetype> | 1051 | <vsizetype>0</vsizetype> |
992 | </sizepolicy> | 1052 | </sizepolicy> |
993 | </property> | 1053 | </property> |
994 | <property stdset="1"> | 1054 | <property stdset="1"> |
995 | <name>editable</name> | 1055 | <name>editable</name> |
996 | <bool>false</bool> | 1056 | <bool>false</bool> |
997 | </property> | 1057 | </property> |
1058 | <property> | ||
1059 | <name>whatsThis</name> | ||
1060 | <string>Choose an action to perform when a new network is detected.</string> | ||
1061 | </property> | ||
998 | </widget> | 1062 | </widget> |
999 | <widget row="1" column="0" rowspan="1" colspan="2" > | 1063 | <widget row="1" column="0" rowspan="1" colspan="2" > |
1000 | <class>QLineEdit</class> | 1064 | <class>QLineEdit</class> |
1001 | <property stdset="1"> | 1065 | <property stdset="1"> |
1002 | <name>name</name> | 1066 | <name>name</name> |
1003 | <cstring>newNetworkScript</cstring> | 1067 | <cstring>newNetworkScript</cstring> |
1004 | </property> | 1068 | </property> |
1005 | <property stdset="1"> | 1069 | <property stdset="1"> |
1006 | <name>enabled</name> | 1070 | <name>enabled</name> |
1007 | <bool>true</bool> | 1071 | <bool>true</bool> |
1008 | </property> | 1072 | </property> |
1073 | <property> | ||
1074 | <name>whatsThis</name> | ||
1075 | <string>The command line to execute when a script action is performed.</string> | ||
1076 | </property> | ||
1009 | </widget> | 1077 | </widget> |
1010 | <widget row="5" column="0" rowspan="1" colspan="2" > | 1078 | <widget row="5" column="0" rowspan="1" colspan="2" > |
1011 | <class>QLineEdit</class> | 1079 | <class>QLineEdit</class> |
1012 | <property stdset="1"> | 1080 | <property stdset="1"> |
1013 | <name>name</name> | 1081 | <name>name</name> |
1014 | <cstring>newStationScript</cstring> | 1082 | <cstring>newStationScript</cstring> |
1015 | </property> | 1083 | </property> |
1016 | <property stdset="1"> | 1084 | <property stdset="1"> |
1017 | <name>enabled</name> | 1085 | <name>enabled</name> |
1018 | <bool>true</bool> | 1086 | <bool>true</bool> |
1019 | </property> | 1087 | </property> |
1088 | <property> | ||
1089 | <name>whatsThis</name> | ||
1090 | <string>Choose an action to perform when a new wireless station is detected.</string> | ||
1091 | </property> | ||
1020 | </widget> | 1092 | </widget> |
1021 | </grid> | 1093 | </grid> |
1022 | </widget> | 1094 | </widget> |
1023 | </grid> | 1095 | </grid> |
1024 | </widget> | 1096 | </widget> |
1025 | </vbox> | 1097 | </vbox> |
1026 | </widget> | 1098 | </widget> |
1027 | <widget> | 1099 | <widget> |
1028 | <class>QWidget</class> | 1100 | <class>QWidget</class> |
1029 | <property stdset="1"> | 1101 | <property stdset="1"> |
1030 | <name>name</name> | 1102 | <name>name</name> |
1031 | <cstring>tab</cstring> | 1103 | <cstring>tab</cstring> |
1032 | </property> | 1104 | </property> |
1033 | <attribute> | 1105 | <attribute> |
1034 | <name>title</name> | 1106 | <name>title</name> |
1035 | <string>Intrusion</string> | 1107 | <string>Intrusion</string> |
1036 | </attribute> | 1108 | </attribute> |
1037 | <grid> | 1109 | <grid> |
1038 | <property stdset="1"> | 1110 | <property stdset="1"> |
1039 | <name>margin</name> | 1111 | <name>margin</name> |
1040 | <number>6</number> | 1112 | <number>6</number> |
1041 | </property> | 1113 | </property> |
1042 | <property stdset="1"> | 1114 | <property stdset="1"> |
1043 | <name>spacing</name> | 1115 | <name>spacing</name> |
1044 | <number>6</number> | 1116 | <number>6</number> |
1045 | </property> | 1117 | </property> |
1046 | <widget row="1" column="0" > | 1118 | <widget row="1" column="0" > |
1047 | <class>QGroupBox</class> | 1119 | <class>QGroupBox</class> |
1048 | <property stdset="1"> | 1120 | <property stdset="1"> |
1049 | <name>name</name> | 1121 | <name>name</name> |
1050 | <cstring>GroupBox3</cstring> | 1122 | <cstring>GroupBox3</cstring> |
1051 | </property> | 1123 | </property> |
1052 | <property stdset="1"> | 1124 | <property stdset="1"> |
1053 | <name>enabled</name> | 1125 | <name>enabled</name> |
1054 | <bool>false</bool> | 1126 | <bool>false</bool> |
1055 | </property> | 1127 | </property> |
1056 | <property stdset="1"> | 1128 | <property stdset="1"> |
1057 | <name>title</name> | 1129 | <name>title</name> |
1058 | <string>Link Level</string> | 1130 | <string>Link Level</string> |
1059 | </property> | 1131 | </property> |
1060 | <grid> | 1132 | <grid> |
1061 | <property stdset="1"> | 1133 | <property stdset="1"> |
1062 | <name>margin</name> | 1134 | <name>margin</name> |
1063 | <number>11</number> | 1135 | <number>11</number> |
1064 | </property> | 1136 | </property> |
1065 | <property stdset="1"> | 1137 | <property stdset="1"> |
1066 | <name>spacing</name> | 1138 | <name>spacing</name> |
1067 | <number>6</number> | 1139 | <number>6</number> |
1068 | </property> | 1140 | </property> |
1069 | <widget row="0" column="0" > | 1141 | <widget row="0" column="0" > |
1070 | <class>QLabel</class> | 1142 | <class>QLabel</class> |
1071 | <property stdset="1"> | 1143 | <property stdset="1"> |
1072 | <name>name</name> | 1144 | <name>name</name> |
1073 | <cstring>TextLabel1_5</cstring> | 1145 | <cstring>TextLabel1_5</cstring> |
1074 | </property> | 1146 | </property> |
1075 | <property stdset="1"> | 1147 | <property stdset="1"> |
1076 | <name>text</name> | 1148 | <name>text</name> |
1077 | <string>Fake Mac:</string> | 1149 | <string>Fake Mac:</string> |
1078 | </property> | 1150 | </property> |
1079 | </widget> | 1151 | </widget> |
1080 | <widget row="1" column="0" rowspan="1" colspan="2" > | 1152 | <widget row="1" column="0" rowspan="1" colspan="2" > |
1081 | <class>QCheckBox</class> | 1153 | <class>QCheckBox</class> |
1082 | <property stdset="1"> | 1154 | <property stdset="1"> |
1083 | <name>name</name> | 1155 | <name>name</name> |
1084 | <cstring>sendProbeRequests</cstring> | 1156 | <cstring>sendProbeRequests</cstring> |
1085 | </property> | 1157 | </property> |
1086 | <property stdset="1"> | 1158 | <property stdset="1"> |
1087 | <name>text</name> | 1159 | <name>text</name> |
1088 | <string>Send proble requests</string> | 1160 | <string>Send proble requests</string> |
1089 | </property> | 1161 | </property> |
1090 | </widget> | 1162 | </widget> |
1091 | <widget row="0" column="1" > | 1163 | <widget row="0" column="1" > |
1092 | <class>QComboBox</class> | 1164 | <class>QComboBox</class> |
1093 | <item> | 1165 | <item> |
1094 | <property> | 1166 | <property> |
1095 | <name>text</name> | 1167 | <name>text</name> |
1096 | <string><automatic></string> | 1168 | <string><automatic></string> |
1097 | </property> | 1169 | </property> |
1098 | </item> | 1170 | </item> |
1099 | <item> | 1171 | <item> |
1100 | <property> | 1172 | <property> |
1101 | <name>text</name> | 1173 | <name>text</name> |
1102 | <string>44:44:44:44:44:44</string> | 1174 | <string>44:44:44:44:44:44</string> |
1103 | </property> | 1175 | </property> |
1104 | </item> | 1176 | </item> |
1105 | <property stdset="1"> | 1177 | <property stdset="1"> |
1106 | <name>name</name> | 1178 | <name>name</name> |
1107 | <cstring>fakeMac</cstring> | 1179 | <cstring>fakeMac</cstring> |
1108 | </property> | 1180 | </property> |
1109 | <property stdset="1"> | 1181 | <property stdset="1"> |
1110 | <name>sizePolicy</name> | 1182 | <name>sizePolicy</name> |
1111 | <sizepolicy> | 1183 | <sizepolicy> |
1112 | <hsizetype>7</hsizetype> | 1184 | <hsizetype>7</hsizetype> |
1113 | <vsizetype>0</vsizetype> | 1185 | <vsizetype>0</vsizetype> |
1114 | </sizepolicy> | 1186 | </sizepolicy> |
1115 | </property> | 1187 | </property> |
1116 | <property stdset="1"> | 1188 | <property stdset="1"> |
1117 | <name>editable</name> | 1189 | <name>editable</name> |
1118 | <bool>true</bool> | 1190 | <bool>true</bool> |
1119 | </property> | 1191 | </property> |
1120 | <property stdset="1"> | 1192 | <property stdset="1"> |
1121 | <name>currentItem</name> | 1193 | <name>currentItem</name> |
1122 | <number>1</number> | 1194 | <number>1</number> |
1123 | </property> | 1195 | </property> |
1124 | <property stdset="1"> | 1196 | <property stdset="1"> |
1125 | <name>autoCompletion</name> | 1197 | <name>autoCompletion</name> |
1126 | <bool>true</bool> | 1198 | <bool>true</bool> |
1127 | </property> | 1199 | </property> |
1128 | </widget> | 1200 | </widget> |
1129 | <widget row="2" column="0" rowspan="1" colspan="2" > | 1201 | <widget row="2" column="0" rowspan="1" colspan="2" > |
1130 | <class>QCheckBox</class> | 1202 | <class>QCheckBox</class> |
1131 | <property stdset="1"> | 1203 | <property stdset="1"> |
1132 | <name>name</name> | 1204 | <name>name</name> |
1133 | <cstring>tryToAuthenticate</cstring> | 1205 | <cstring>tryToAuthenticate</cstring> |
1134 | </property> | 1206 | </property> |
1135 | <property stdset="1"> | 1207 | <property stdset="1"> |
1136 | <name>text</name> | 1208 | <name>text</name> |
1137 | <string>Try to authenticate</string> | 1209 | <string>Try to authenticate</string> |
1138 | </property> | 1210 | </property> |
1139 | </widget> | 1211 | </widget> |
1140 | </grid> | 1212 | </grid> |
1141 | </widget> | 1213 | </widget> |
1142 | <widget row="0" column="0" > | 1214 | <widget row="0" column="0" > |
1143 | <class>QCheckBox</class> | 1215 | <class>QCheckBox</class> |
1144 | <property stdset="1"> | 1216 | <property stdset="1"> |
1145 | <name>name</name> | 1217 | <name>name</name> |
1146 | <cstring>enableActiveScanning</cstring> | 1218 | <cstring>enableActiveScanning</cstring> |
1147 | </property> | 1219 | </property> |
1148 | <property stdset="1"> | 1220 | <property stdset="1"> |
1149 | <name>enabled</name> | 1221 | <name>enabled</name> |
1150 | <bool>false</bool> | 1222 | <bool>false</bool> |
1151 | </property> | 1223 | </property> |
1152 | <property stdset="1"> | 1224 | <property stdset="1"> |
1153 | <name>text</name> | 1225 | <name>text</name> |
1154 | <string>Enable active scanning</string> | 1226 | <string>Enable active scanning</string> |
1155 | </property> | 1227 | </property> |
1156 | </widget> | 1228 | </widget> |
1157 | <widget row="2" column="0" > | 1229 | <widget row="2" column="0" > |
1158 | <class>QGroupBox</class> | 1230 | <class>QGroupBox</class> |
1159 | <property stdset="1"> | 1231 | <property stdset="1"> |
1160 | <name>name</name> | 1232 | <name>name</name> |
1161 | <cstring>GroupBox4</cstring> | 1233 | <cstring>GroupBox4</cstring> |
1162 | </property> | 1234 | </property> |
1163 | <property stdset="1"> | 1235 | <property stdset="1"> |
1164 | <name>enabled</name> | 1236 | <name>enabled</name> |
1165 | <bool>false</bool> | 1237 | <bool>false</bool> |
1166 | </property> | 1238 | </property> |
1167 | <property stdset="1"> | 1239 | <property stdset="1"> |
1168 | <name>title</name> | 1240 | <name>title</name> |
1169 | <string>IP Level</string> | 1241 | <string>IP Level</string> |
1170 | </property> | 1242 | </property> |
1171 | <grid> | 1243 | <grid> |
1172 | <property stdset="1"> | 1244 | <property stdset="1"> |
1173 | <name>margin</name> | 1245 | <name>margin</name> |
1174 | <number>11</number> | 1246 | <number>11</number> |
1175 | </property> | 1247 | </property> |
1176 | <property stdset="1"> | 1248 | <property stdset="1"> |
1177 | <name>spacing</name> | 1249 | <name>spacing</name> |
1178 | <number>6</number> | 1250 | <number>6</number> |
1179 | </property> | 1251 | </property> |
1180 | <widget row="1" column="0" rowspan="1" colspan="2" > | 1252 | <widget row="1" column="0" rowspan="1" colspan="2" > |
1181 | <class>QCheckBox</class> | 1253 | <class>QCheckBox</class> |
1182 | <property stdset="1"> | 1254 | <property stdset="1"> |
1183 | <name>name</name> | 1255 | <name>name</name> |
1184 | <cstring>CheckBox24</cstring> | 1256 | <cstring>CheckBox24</cstring> |
1185 | </property> | 1257 | </property> |
1186 | <property stdset="1"> | 1258 | <property stdset="1"> |
1187 | <name>text</name> | 1259 | <name>text</name> |
1188 | <string>Request DHCP Address</string> | 1260 | <string>Request DHCP Address</string> |
1189 | </property> | 1261 | </property> |
1190 | </widget> | 1262 | </widget> |
1191 | <widget row="0" column="0" > | 1263 | <widget row="0" column="0" > |
1192 | <class>QLabel</class> | 1264 | <class>QLabel</class> |
1193 | <property stdset="1"> | 1265 | <property stdset="1"> |
1194 | <name>name</name> | 1266 | <name>name</name> |
1195 | <cstring>TextLabel1_5_2</cstring> | 1267 | <cstring>TextLabel1_5_2</cstring> |
1196 | </property> | 1268 | </property> |
1197 | <property stdset="1"> | 1269 | <property stdset="1"> |
1198 | <name>text</name> | 1270 | <name>text</name> |
1199 | <string>Fake IP:</string> | 1271 | <string>Fake IP:</string> |
1200 | </property> | 1272 | </property> |
1201 | </widget> | 1273 | </widget> |
1202 | <widget row="0" column="1" > | 1274 | <widget row="0" column="1" > |
1203 | <class>QComboBox</class> | 1275 | <class>QComboBox</class> |
1204 | <item> | 1276 | <item> |
1205 | <property> | 1277 | <property> |
1206 | <name>text</name> | 1278 | <name>text</name> |
1207 | <string>192.168.125.1</string> | 1279 | <string>192.168.125.1</string> |
1208 | </property> | 1280 | </property> |
1209 | </item> | 1281 | </item> |
1210 | <item> | 1282 | <item> |
1211 | <property> | 1283 | <property> |
1212 | <name>text</name> | 1284 | <name>text</name> |
1213 | <string><automatic></string> | 1285 | <string><automatic></string> |
1214 | </property> | 1286 | </property> |
1215 | </item> | 1287 | </item> |
1216 | <property stdset="1"> | 1288 | <property stdset="1"> |
1217 | <name>name</name> | 1289 | <name>name</name> |
1218 | <cstring>fakeIP</cstring> | 1290 | <cstring>fakeIP</cstring> |
1219 | </property> | 1291 | </property> |
1220 | <property stdset="1"> | 1292 | <property stdset="1"> |
1221 | <name>sizePolicy</name> | 1293 | <name>sizePolicy</name> |
1222 | <sizepolicy> | 1294 | <sizepolicy> |
1223 | <hsizetype>7</hsizetype> | 1295 | <hsizetype>7</hsizetype> |
1224 | <vsizetype>0</vsizetype> | 1296 | <vsizetype>0</vsizetype> |
1225 | </sizepolicy> | 1297 | </sizepolicy> |
1226 | </property> | 1298 | </property> |
1227 | <property stdset="1"> | 1299 | <property stdset="1"> |
1228 | <name>editable</name> | 1300 | <name>editable</name> |
1229 | <bool>true</bool> | 1301 | <bool>true</bool> |
1230 | </property> | 1302 | </property> |
1231 | <property stdset="1"> | 1303 | <property stdset="1"> |
1232 | <name>currentItem</name> | 1304 | <name>currentItem</name> |
1233 | <number>0</number> | 1305 | <number>0</number> |
1234 | </property> | 1306 | </property> |
1235 | </widget> | 1307 | </widget> |
1236 | </grid> | 1308 | </grid> |
1237 | </widget> | 1309 | </widget> |
1238 | </grid> | 1310 | </grid> |
1239 | </widget> | 1311 | </widget> |
1240 | <widget> | 1312 | <widget> |
1241 | <class>QWidget</class> | 1313 | <class>QWidget</class> |
1242 | <property stdset="1"> | 1314 | <property stdset="1"> |
1243 | <name>name</name> | 1315 | <name>name</name> |
1244 | <cstring>tab</cstring> | 1316 | <cstring>tab</cstring> |
1245 | </property> | 1317 | </property> |
1246 | <attribute> | 1318 | <attribute> |
1247 | <name>title</name> | 1319 | <name>title</name> |
1248 | <string>GPS</string> | 1320 | <string>GPS</string> |
1249 | </attribute> | 1321 | </attribute> |
1250 | <grid> | 1322 | <grid> |
1251 | <property stdset="1"> | 1323 | <property stdset="1"> |
1252 | <name>margin</name> | 1324 | <name>margin</name> |
1253 | <number>5</number> | 1325 | <number>5</number> |
1254 | </property> | 1326 | </property> |
1255 | <property stdset="1"> | 1327 | <property stdset="1"> |
1256 | <name>spacing</name> | 1328 | <name>spacing</name> |
1257 | <number>4</number> | 1329 | <number>4</number> |
1258 | </property> | 1330 | </property> |
1259 | <widget row="0" column="0" > | 1331 | <widget row="0" column="0" > |
1260 | <class>QLayoutWidget</class> | 1332 | <class>QLayoutWidget</class> |
1261 | <property stdset="1"> | 1333 | <property stdset="1"> |
1262 | <name>name</name> | 1334 | <name>name</name> |
1263 | <cstring>Layout6</cstring> | 1335 | <cstring>Layout6</cstring> |
1264 | </property> | 1336 | </property> |
1265 | <vbox> | 1337 | <vbox> |
1266 | <property stdset="1"> | 1338 | <property stdset="1"> |
1267 | <name>margin</name> | 1339 | <name>margin</name> |
1268 | <number>0</number> | 1340 | <number>0</number> |
1269 | </property> | 1341 | </property> |
1270 | <property stdset="1"> | 1342 | <property stdset="1"> |
1271 | <name>spacing</name> | 1343 | <name>spacing</name> |
1272 | <number>6</number> | 1344 | <number>6</number> |
1273 | </property> | 1345 | </property> |
1274 | <widget> | 1346 | <widget> |
1275 | <class>QCheckBox</class> | 1347 | <class>QCheckBox</class> |
1276 | <property stdset="1"> | 1348 | <property stdset="1"> |
1277 | <name>name</name> | 1349 | <name>name</name> |
1278 | <cstring>enableGPS</cstring> | 1350 | <cstring>enableGPS</cstring> |
1279 | </property> | 1351 | </property> |
1280 | <property stdset="1"> | 1352 | <property stdset="1"> |
1281 | <name>text</name> | 1353 | <name>text</name> |
1282 | <string>Enable GPS logging w/ gpsd</string> | 1354 | <string>Enable GPS logging w/ gpsd</string> |
1283 | </property> | 1355 | </property> |
1356 | <property> | ||
1357 | <name>whatsThis</name> | ||
1358 | <string>Check this to log GPS coordinates.</string> | ||
1359 | </property> | ||
1284 | </widget> | 1360 | </widget> |
1285 | <widget> | 1361 | <widget> |
1286 | <class>QLayoutWidget</class> | 1362 | <class>QLayoutWidget</class> |
1287 | <property stdset="1"> | 1363 | <property stdset="1"> |
1288 | <name>name</name> | 1364 | <name>name</name> |
1289 | <cstring>Layout1</cstring> | 1365 | <cstring>Layout1</cstring> |
1290 | </property> | 1366 | </property> |
1291 | <hbox> | 1367 | <hbox> |
1292 | <property stdset="1"> | 1368 | <property stdset="1"> |
1293 | <name>margin</name> | 1369 | <name>margin</name> |
1294 | <number>0</number> | 1370 | <number>0</number> |
1295 | </property> | 1371 | </property> |
1296 | <property stdset="1"> | 1372 | <property stdset="1"> |
1297 | <name>spacing</name> | 1373 | <name>spacing</name> |
1298 | <number>6</number> | 1374 | <number>6</number> |
1299 | </property> | 1375 | </property> |
1300 | <widget> | 1376 | <widget> |
1301 | <class>QLabel</class> | 1377 | <class>QLabel</class> |
1302 | <property stdset="1"> | 1378 | <property stdset="1"> |
1303 | <name>name</name> | 1379 | <name>name</name> |
1304 | <cstring>TextLabel1_4</cstring> | 1380 | <cstring>TextLabel1_4</cstring> |
1305 | </property> | 1381 | </property> |
1306 | <property stdset="1"> | 1382 | <property stdset="1"> |
1307 | <name>text</name> | 1383 | <name>text</name> |
1308 | <string>Host</string> | 1384 | <string>Host</string> |
1309 | </property> | 1385 | </property> |
1310 | </widget> | 1386 | </widget> |
1311 | <widget> | 1387 | <widget> |
1312 | <class>QComboBox</class> | 1388 | <class>QComboBox</class> |
1313 | <item> | 1389 | <item> |
1314 | <property> | 1390 | <property> |
1315 | <name>text</name> | 1391 | <name>text</name> |
1316 | <string>localhost</string> | 1392 | <string>localhost</string> |
1317 | </property> | 1393 | </property> |
1318 | </item> | 1394 | </item> |
1319 | <property stdset="1"> | 1395 | <property stdset="1"> |
1320 | <name>name</name> | 1396 | <name>name</name> |
1321 | <cstring>gpsdHost</cstring> | 1397 | <cstring>gpsdHost</cstring> |
1322 | </property> | 1398 | </property> |
1323 | <property stdset="1"> | 1399 | <property stdset="1"> |
1324 | <name>enabled</name> | 1400 | <name>enabled</name> |
1325 | <bool>false</bool> | 1401 | <bool>false</bool> |
1326 | </property> | 1402 | </property> |
1327 | <property stdset="1"> | 1403 | <property stdset="1"> |
1328 | <name>editable</name> | 1404 | <name>editable</name> |
1329 | <bool>true</bool> | 1405 | <bool>true</bool> |
1330 | </property> | 1406 | </property> |
1331 | <property stdset="1"> | 1407 | <property stdset="1"> |
1332 | <name>currentItem</name> | 1408 | <name>currentItem</name> |
1333 | <number>0</number> | 1409 | <number>0</number> |
1334 | </property> | 1410 | </property> |
1411 | <property> | ||
1412 | <name>whatsThis</name> | ||
1413 | <string>Hostadress where the gps daemon listens on.</string> | ||
1414 | </property> | ||
1335 | </widget> | 1415 | </widget> |
1336 | <widget> | 1416 | <widget> |
1337 | <class>QLabel</class> | 1417 | <class>QLabel</class> |
1338 | <property stdset="1"> | 1418 | <property stdset="1"> |
1339 | <name>name</name> | 1419 | <name>name</name> |
1340 | <cstring>TextLabel2_2</cstring> | 1420 | <cstring>TextLabel2_2</cstring> |
1341 | </property> | 1421 | </property> |
1342 | <property stdset="1"> | 1422 | <property stdset="1"> |
1343 | <name>text</name> | 1423 | <name>text</name> |
1344 | <string>:</string> | 1424 | <string>:</string> |
1345 | </property> | 1425 | </property> |
1346 | </widget> | 1426 | </widget> |
1347 | <widget> | 1427 | <widget> |
1348 | <class>QSpinBox</class> | 1428 | <class>QSpinBox</class> |
1349 | <property stdset="1"> | 1429 | <property stdset="1"> |
1350 | <name>name</name> | 1430 | <name>name</name> |
1351 | <cstring>gpsdPort</cstring> | 1431 | <cstring>gpsdPort</cstring> |
1352 | </property> | 1432 | </property> |
1353 | <property stdset="1"> | 1433 | <property stdset="1"> |
1354 | <name>enabled</name> | 1434 | <name>enabled</name> |
1355 | <bool>false</bool> | 1435 | <bool>false</bool> |
1356 | </property> | 1436 | </property> |
1357 | <property stdset="1"> | 1437 | <property stdset="1"> |
1358 | <name>maxValue</name> | 1438 | <name>maxValue</name> |
1359 | <number>65535</number> | 1439 | <number>65535</number> |
1360 | </property> | 1440 | </property> |
1361 | <property stdset="1"> | 1441 | <property stdset="1"> |
1362 | <name>minValue</name> | 1442 | <name>minValue</name> |
1363 | <number>1024</number> | 1443 | <number>1024</number> |
1364 | </property> | 1444 | </property> |
1365 | <property stdset="1"> | 1445 | <property stdset="1"> |
1366 | <name>value</name> | 1446 | <name>value</name> |
1367 | <number>2947</number> | 1447 | <number>2947</number> |
1368 | </property> | 1448 | </property> |
1449 | <property> | ||
1450 | <name>whatsThis</name> | ||
1451 | <string>Port number where the gps daemon listens on.</string> | ||
1452 | </property> | ||
1369 | </widget> | 1453 | </widget> |
1370 | </hbox> | 1454 | </hbox> |
1371 | </widget> | 1455 | </widget> |
1372 | <widget> | 1456 | <widget> |
1373 | <class>QCheckBox</class> | 1457 | <class>QCheckBox</class> |
1374 | <property stdset="1"> | 1458 | <property stdset="1"> |
1375 | <name>name</name> | 1459 | <name>name</name> |
1376 | <cstring>startGPS</cstring> | 1460 | <cstring>startGPS</cstring> |
1377 | </property> | 1461 | </property> |
1378 | <property stdset="1"> | 1462 | <property stdset="1"> |
1379 | <name>text</name> | 1463 | <name>text</name> |
1380 | <string>Start gpsd on localhost</string> | 1464 | <string>Start gpsd on localhost</string> |
1381 | </property> | 1465 | </property> |
1466 | <property> | ||
1467 | <name>whatsThis</name> | ||
1468 | <string>Check to start the GPS daemon on localhost.</string> | ||
1469 | </property> | ||
1382 | </widget> | 1470 | </widget> |
1383 | <widget> | 1471 | <widget> |
1384 | <class>QLineEdit</class> | 1472 | <class>QLineEdit</class> |
1385 | <property stdset="1"> | 1473 | <property stdset="1"> |
1386 | <name>name</name> | 1474 | <name>name</name> |
1387 | <cstring>commandGPS</cstring> | 1475 | <cstring>commandGPS</cstring> |
1388 | </property> | 1476 | </property> |
1389 | <property stdset="1"> | 1477 | <property stdset="1"> |
1390 | <name>enabled</name> | 1478 | <name>enabled</name> |
1391 | <bool>false</bool> | 1479 | <bool>false</bool> |
1392 | </property> | 1480 | </property> |
1393 | <property stdset="1"> | 1481 | <property stdset="1"> |
1394 | <name>text</name> | 1482 | <name>text</name> |
1395 | <string>gpsd -p /dev/ttyS3 -s 4800</string> | 1483 | <string>gpsd -p /dev/ttyS3 -s 4800</string> |
1396 | </property> | 1484 | </property> |
1485 | <property> | ||
1486 | <name>whatsThis</name> | ||
1487 | <string>Command line to start the gps daemon.</string> | ||
1488 | </property> | ||
1397 | </widget> | 1489 | </widget> |
1398 | <spacer> | 1490 | <spacer> |
1399 | <property> | 1491 | <property> |
1400 | <name>name</name> | 1492 | <name>name</name> |
1401 | <cstring>Spacer4_2</cstring> | 1493 | <cstring>Spacer4_2</cstring> |
1402 | </property> | 1494 | </property> |
1403 | <property stdset="1"> | 1495 | <property stdset="1"> |
1404 | <name>orientation</name> | 1496 | <name>orientation</name> |
1405 | <enum>Vertical</enum> | 1497 | <enum>Vertical</enum> |
1406 | </property> | 1498 | </property> |
1407 | <property stdset="1"> | 1499 | <property stdset="1"> |
1408 | <name>sizeType</name> | 1500 | <name>sizeType</name> |
1409 | <enum>Expanding</enum> | 1501 | <enum>Expanding</enum> |
1410 | </property> | 1502 | </property> |
1411 | <property> | 1503 | <property> |
1412 | <name>sizeHint</name> | 1504 | <name>sizeHint</name> |
1413 | <size> | 1505 | <size> |
1414 | <width>20</width> | 1506 | <width>20</width> |
1415 | <height>20</height> | 1507 | <height>20</height> |
1416 | </size> | 1508 | </size> |
1417 | </property> | 1509 | </property> |
1418 | </spacer> | 1510 | </spacer> |
1419 | </vbox> | 1511 | </vbox> |
1420 | </widget> | 1512 | </widget> |
1421 | </grid> | 1513 | </grid> |
1422 | </widget> | 1514 | </widget> |
1423 | </widget> | 1515 | </widget> |
1424 | </grid> | 1516 | </grid> |
1425 | </widget> | 1517 | </widget> |
1426 | <customwidgets> | 1518 | <customwidgets> |
1427 | <customwidget> | 1519 | <customwidget> |
1428 | <class>ProtocolListView</class> | 1520 | <class>ProtocolListView</class> |
1429 | <header location="local">protolistview.h</header> | 1521 | <header location="local">protolistview.h</header> |
1430 | <sizehint> | 1522 | <sizehint> |
1431 | <width>100</width> | 1523 | <width>100</width> |
1432 | <height>100</height> | 1524 | <height>100</height> |
1433 | </sizehint> | 1525 | </sizehint> |
1434 | <container>0</container> | 1526 | <container>0</container> |
1435 | <sizepolicy> | 1527 | <sizepolicy> |
1436 | <hordata>3</hordata> | 1528 | <hordata>3</hordata> |
1437 | <verdata>3</verdata> | 1529 | <verdata>3</verdata> |
1438 | </sizepolicy> | 1530 | </sizepolicy> |
1439 | <pixmap>image0</pixmap> | 1531 | <pixmap>image0</pixmap> |
1440 | </customwidget> | 1532 | </customwidget> |
1441 | </customwidgets> | 1533 | </customwidgets> |
1442 | <images> | 1534 | <images> |
1443 | <image> | 1535 | <image> |
1444 | <name>image0</name> | 1536 | <name>image0</name> |
1445 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 1537 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
1446 | </image> | 1538 | </image> |
1447 | </images> | 1539 | </images> |
1448 | <connections> | 1540 | <connections> |
1449 | <connection> | 1541 | <connection> |
1450 | <sender>hopChannels</sender> | 1542 | <sender>hopChannels</sender> |
1451 | <signal>toggled(bool)</signal> | 1543 | <signal>toggled(bool)</signal> |
1452 | <receiver>hopInterval</receiver> | 1544 | <receiver>hopInterval</receiver> |
1453 | <slot>setEnabled(bool)</slot> | 1545 | <slot>setEnabled(bool)</slot> |
1454 | </connection> | 1546 | </connection> |
1455 | <connection> | 1547 | <connection> |
1456 | <sender>hopChannels</sender> | 1548 | <sender>hopChannels</sender> |
1457 | <signal>toggled(bool)</signal> | 1549 | <signal>toggled(bool)</signal> |
1458 | <receiver>TextLabel1</receiver> | 1550 | <receiver>TextLabel1</receiver> |
1459 | <slot>setEnabled(bool)</slot> | 1551 | <slot>setEnabled(bool)</slot> |
1460 | </connection> | 1552 | </connection> |
1461 | <connection> | 1553 | <connection> |
1462 | <sender>enableActiveScanning</sender> | 1554 | <sender>enableActiveScanning</sender> |
1463 | <signal>toggled(bool)</signal> | 1555 | <signal>toggled(bool)</signal> |
1464 | <receiver>GroupBox3</receiver> | 1556 | <receiver>GroupBox3</receiver> |
1465 | <slot>setEnabled(bool)</slot> | 1557 | <slot>setEnabled(bool)</slot> |
1466 | </connection> | 1558 | </connection> |
1467 | <connection> | 1559 | <connection> |
1468 | <sender>enableActiveScanning</sender> | 1560 | <sender>enableActiveScanning</sender> |
1469 | <signal>toggled(bool)</signal> | 1561 | <signal>toggled(bool)</signal> |
1470 | <receiver>GroupBox4</receiver> | 1562 | <receiver>GroupBox4</receiver> |
1471 | <slot>setEnabled(bool)</slot> | 1563 | <slot>setEnabled(bool)</slot> |
1472 | </connection> | 1564 | </connection> |
1473 | <connection> | 1565 | <connection> |
1474 | <sender>writeCaptureFile</sender> | 1566 | <sender>writeCaptureFile</sender> |
1475 | <signal>toggled(bool)</signal> | 1567 | <signal>toggled(bool)</signal> |
1476 | <receiver>getCaptureFileName</receiver> | 1568 | <receiver>getCaptureFileName</receiver> |
1477 | <slot>setEnabled(bool)</slot> | 1569 | <slot>setEnabled(bool)</slot> |
1478 | </connection> | 1570 | </connection> |
1479 | <connection> | 1571 | <connection> |
1480 | <sender>writeCaptureFile</sender> | 1572 | <sender>writeCaptureFile</sender> |
1481 | <signal>toggled(bool)</signal> | 1573 | <signal>toggled(bool)</signal> |
1482 | <receiver>captureFileName</receiver> | 1574 | <receiver>captureFileName</receiver> |
1483 | <slot>setEnabled(bool)</slot> | 1575 | <slot>setEnabled(bool)</slot> |
1484 | </connection> | 1576 | </connection> |
1485 | <connection> | 1577 | <connection> |
1486 | <sender>writeCaptureFile</sender> | 1578 | <sender>writeCaptureFile</sender> |
1487 | <signal>toggled(bool)</signal> | 1579 | <signal>toggled(bool)</signal> |
1488 | <receiver>capturePackets</receiver> | 1580 | <receiver>capturePackets</receiver> |
1489 | <slot>setEnabled(bool)</slot> | 1581 | <slot>setEnabled(bool)</slot> |
1490 | </connection> | 1582 | </connection> |
1491 | <connection> | 1583 | <connection> |
1492 | <sender>enableGPS</sender> | 1584 | <sender>enableGPS</sender> |
1493 | <signal>toggled(bool)</signal> | 1585 | <signal>toggled(bool)</signal> |
1494 | <receiver>gpsdHost</receiver> | 1586 | <receiver>gpsdHost</receiver> |
1495 | <slot>setEnabled(bool)</slot> | 1587 | <slot>setEnabled(bool)</slot> |
1496 | </connection> | 1588 | </connection> |
1497 | <connection> | 1589 | <connection> |
1498 | <sender>enableGPS</sender> | 1590 | <sender>enableGPS</sender> |
1499 | <signal>toggled(bool)</signal> | 1591 | <signal>toggled(bool)</signal> |
1500 | <receiver>gpsdPort</receiver> | 1592 | <receiver>gpsdPort</receiver> |
1501 | <slot>setEnabled(bool)</slot> | 1593 | <slot>setEnabled(bool)</slot> |
1502 | </connection> | 1594 | </connection> |
1503 | <connection> | 1595 | <connection> |
1504 | <sender>startGPS</sender> | 1596 | <sender>startGPS</sender> |
1505 | <signal>toggled(bool)</signal> | 1597 | <signal>toggled(bool)</signal> |
1506 | <receiver>commandGPS</receiver> | 1598 | <receiver>commandGPS</receiver> |
1507 | <slot>setEnabled(bool)</slot> | 1599 | <slot>setEnabled(bool)</slot> |
1508 | </connection> | 1600 | </connection> |
1509 | </connections> | 1601 | </connections> |
1510 | </UI> | 1602 | </UI> |
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index 48fe89c..95b03d0 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp | |||
@@ -1,196 +1,196 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "mainwindow.h" | 18 | #include "mainwindow.h" |
19 | 19 | ||
20 | /* OPIE */ | 20 | /* OPIE */ |
21 | #include <opie2/onetwork.h> | 21 | #include <opie2/onetwork.h> |
22 | #ifdef QWS | 22 | #ifdef QWS |
23 | #include <opie2/oapplication.h> | 23 | #include <opie2/oapplication.h> |
24 | #include <opie2/oconfig.h> | 24 | #include <opie2/oconfig.h> |
25 | #include <opie2/odevice.h> | 25 | #include <opie2/odevice.h> |
26 | using namespace Opie; | 26 | using namespace Opie; |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | /* QT */ | 29 | /* QT */ |
30 | #include <qapplication.h> | 30 | #include <qapplication.h> |
31 | #include <qcheckbox.h> | 31 | #include <qcheckbox.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qlineedit.h> | 34 | #include <qlineedit.h> |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qmap.h> | 36 | #include <qmap.h> |
37 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
38 | #include <qtabwidget.h> | 38 | #include <qtabwidget.h> |
39 | #include <qtoolbutton.h> | 39 | #include <qtoolbutton.h> |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #include <qtextstream.h> | 41 | #include <qtextstream.h> |
42 | 42 | ||
43 | /* POSIX */ | 43 | /* POSIX */ |
44 | #include <assert.h> | 44 | #include <assert.h> |
45 | 45 | ||
46 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; | 46 | WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; |
47 | 47 | ||
48 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) | 48 | WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) |
49 | :WellenreiterConfigBase( parent, name, true, f ) | 49 | :WellenreiterConfigBase( parent, name, true, f ) |
50 | { | 50 | { |
51 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; | 51 | _devicetype[ "cisco" ] = DEVTYPE_CISCO; |
52 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; | 52 | _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; |
53 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; | 53 | _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; |
54 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; | 54 | _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; |
55 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; | 55 | _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; |
56 | _devicetype[ "<file>" ] = DEVTYPE_FILE; | 56 | _devicetype[ "<file>" ] = DEVTYPE_FILE; |
57 | 57 | ||
58 | // gather possible interface names from ONetwork | 58 | // gather possible interface names from ONetwork |
59 | ONetwork* net = ONetwork::instance(); | 59 | ONetwork* net = ONetwork::instance(); |
60 | ONetwork::InterfaceIterator it = net->iterator(); | 60 | ONetwork::InterfaceIterator it = net->iterator(); |
61 | while ( it.current() ) | 61 | while ( it.current() ) |
62 | { | 62 | { |
63 | if ( it.current()->isWireless() ) | 63 | if ( it.current()->isWireless() ) |
64 | interfaceName->insertItem( it.current()->name() ); | 64 | interfaceName->insertItem( it.current()->name() ); |
65 | ++it; | 65 | ++it; |
66 | } | 66 | } |
67 | 67 | ||
68 | load(); | 68 | load(); |
69 | 69 | ||
70 | #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here | 70 | #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here |
71 | QPushButton* okButton = new QPushButton( "ok", this ); | 71 | QPushButton* okButton = new QPushButton( "ok", this ); |
72 | okButton->show(); | 72 | okButton->show(); |
73 | WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui | 73 | WellenreiterConfigBaseLayout->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui |
74 | connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); | 74 | connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | WellenreiterConfigWindow::_instance = this; | 77 | WellenreiterConfigWindow::_instance = this; |
78 | 78 | ||
79 | connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); | 79 | connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); |
80 | connect( newNetworkAction, SIGNAL( activated(int) ), this, SLOT( changedNetworkAction(int) ) ); | 80 | connect( newNetworkAction, SIGNAL( activated(int) ), this, SLOT( changedNetworkAction(int) ) ); |
81 | connect( newClientAction, SIGNAL( activated(int) ), this, SLOT( changedClientAction(int) ) ); | 81 | connect( newClientAction, SIGNAL( activated(int) ), this, SLOT( changedClientAction(int) ) ); |
82 | connect( newStationAction, SIGNAL( activated(int) ), this, SLOT( changedStationAction(int) ) ); | 82 | connect( newStationAction, SIGNAL( activated(int) ), this, SLOT( changedStationAction(int) ) ); |
83 | connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) ); | 83 | connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) ); |
84 | 84 | ||
85 | // make the checkbox 'channelAll' control all other channels | 85 | // make the checkbox 'channelAll' control all other channels |
86 | connect( channelAll, SIGNAL( stateChanged(int) ), this, SLOT( channelAllClicked(int) ) ); | 86 | connect( channelAll, SIGNAL( stateChanged(int) ), this, SLOT( channelAllClicked(int) ) ); |
87 | 87 | ||
88 | connect( autodetect, SIGNAL( clicked() ), this, SLOT( performAutodetection() ) ); | 88 | connect( autodetect, SIGNAL( clicked() ), this, SLOT( performAutodetection() ) ); |
89 | 89 | ||
90 | // hide tab4 (parse) until Wellenreiter 1.2 | 90 | // hide tab4 (parse) until Wellenreiter 1.2 |
91 | tab->removePage( tab_4 ); | 91 | tab->removePage( tab_4 ); |
92 | }; | 92 | }; |
93 | 93 | ||
94 | 94 | ||
95 | void WellenreiterConfigWindow::accept() | 95 | void WellenreiterConfigWindow::accept() |
96 | { | 96 | { |
97 | save(); | 97 | save(); |
98 | QDialog::accept(); | 98 | QDialog::accept(); |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | WellenreiterConfigWindow::~WellenreiterConfigWindow() | 102 | WellenreiterConfigWindow::~WellenreiterConfigWindow() |
103 | { | 103 | { |
104 | } | 104 | } |
105 | 105 | ||
106 | 106 | ||
107 | void WellenreiterConfigWindow::performAutodetection() | 107 | void WellenreiterConfigWindow::performAutodetection() |
108 | { | 108 | { |
109 | //TODO: insert modal splash screen here | 109 | //TODO: insert modal splash screen here |
110 | // and sleep a second, so that it looks | 110 | // and sleep a second, so that it looks |
111 | // like we're actually doing something fancy... ;-) | 111 | // like we're actually doing something fancy... ;-) |
112 | 112 | ||
113 | qDebug( "WellenreiterConfigWindow::performAutodetection()" ); | 113 | qDebug( "WellenreiterConfigWindow::performAutodetection()" ); |
114 | 114 | ||
115 | // try to guess device type | 115 | // try to guess device type |
116 | QFile m( "/proc/modules" ); | 116 | QFile m( "/proc/modules" ); |
117 | if ( m.open( IO_ReadOnly ) ) | 117 | if ( m.open( IO_ReadOnly ) ) |
118 | { | 118 | { |
119 | int devicetype(0); | 119 | int devicetype(0); |
120 | QString line; | 120 | QString line; |
121 | QTextStream modules( &m ); | 121 | QTextStream modules( &m ); |
122 | while( !modules.atEnd() && !devicetype ) | 122 | while( !modules.atEnd() && !devicetype ) |
123 | { | 123 | { |
124 | modules >> line; | 124 | modules >> line; |
125 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; | 125 | if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO; |
126 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; | 126 | else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP; |
127 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; | 127 | else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG; |
128 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; | 128 | else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO; |
129 | } | 129 | } |
130 | if ( devicetype ) | 130 | if ( devicetype ) |
131 | { | 131 | { |
132 | deviceType->setCurrentItem( devicetype ); | 132 | deviceType->setCurrentItem( devicetype ); |
133 | _guess = devicetype; | 133 | _guess = devicetype; |
134 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); | 134 | qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); |
135 | } | 135 | } |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | 139 | ||
140 | int WellenreiterConfigWindow::driverType() const | 140 | int WellenreiterConfigWindow::driverType() const |
141 | { | 141 | { |
142 | QString name = deviceType->currentText(); | 142 | QString name = deviceType->currentText(); |
143 | if ( _devicetype.contains( name ) ) | 143 | if ( _devicetype.contains( name ) ) |
144 | { | 144 | { |
145 | return _devicetype[name]; | 145 | return _devicetype[name]; |
146 | } | 146 | } |
147 | else | 147 | else |
148 | { | 148 | { |
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | }; | 151 | }; |
152 | 152 | ||
153 | 153 | ||
154 | int WellenreiterConfigWindow::hoppingInterval() const | 154 | int WellenreiterConfigWindow::hoppingInterval() const |
155 | { | 155 | { |
156 | return hopInterval->cleanText().toInt(); | 156 | return hopInterval->cleanText().toInt(); |
157 | } | 157 | } |
158 | 158 | ||
159 | 159 | ||
160 | bool WellenreiterConfigWindow::usePrismHeader() const | 160 | bool WellenreiterConfigWindow::usePrismHeader() const |
161 | { | 161 | { |
162 | return prismHeader->isChecked(); | 162 | return prismHeader->isChecked(); |
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | bool WellenreiterConfigWindow::isChannelChecked( int channel ) const | 166 | bool WellenreiterConfigWindow::isChannelChecked( int channel ) const |
167 | { | 167 | { |
168 | switch ( channel ) | 168 | switch ( channel ) |
169 | { | 169 | { |
170 | case 1: return channel1->isOn(); | 170 | case 1: return channel1->isOn(); |
171 | case 2: return channel2->isOn(); | 171 | case 2: return channel2->isOn(); |
172 | case 3: return channel3->isOn(); | 172 | case 3: return channel3->isOn(); |
173 | case 4: return channel4->isOn(); | 173 | case 4: return channel4->isOn(); |
174 | case 5: return channel5->isOn(); | 174 | case 5: return channel5->isOn(); |
175 | case 6: return channel6->isOn(); | 175 | case 6: return channel6->isOn(); |
176 | case 7: return channel7->isOn(); | 176 | case 7: return channel7->isOn(); |
177 | case 8: return channel8->isOn(); | 177 | case 8: return channel8->isOn(); |
178 | case 9: return channel9->isOn(); | 178 | case 9: return channel9->isOn(); |
179 | case 10: return channel10->isOn(); | 179 | case 10: return channel10->isOn(); |
180 | case 11: return channel11->isOn(); | 180 | case 11: return channel11->isOn(); |
181 | case 12: return channel12->isOn(); | 181 | case 12: return channel12->isOn(); |
182 | case 13: return channel13->isOn(); | 182 | case 13: return channel13->isOn(); |
183 | case 14: return channel14->isOn(); | 183 | case 14: return channel14->isOn(); |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | 187 | ||
188 | void WellenreiterConfigWindow::changedDeviceType(int t) | 188 | void WellenreiterConfigWindow::changedDeviceType(int t) |
189 | { | 189 | { |
190 | if ( t != DEVTYPE_FILE ) return; | 190 | if ( t != DEVTYPE_FILE ) return; |
191 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); | 191 | QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); |
192 | if ( !name.isEmpty() && QFile::exists( name ) ) | 192 | if ( !name.isEmpty() && QFile::exists( name ) ) |
193 | { | 193 | { |
194 | interfaceName->insertItem( name ); | 194 | interfaceName->insertItem( name ); |
195 | interfaceName->setCurrentItem( interfaceName->count()-1 ); | 195 | interfaceName->setCurrentItem( interfaceName->count()-1 ); |
196 | } | 196 | } |
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h index d31d1e8..0a5b3bd 100644 --- a/noncore/net/wellenreiter/gui/configwindow.h +++ b/noncore/net/wellenreiter/gui/configwindow.h | |||
@@ -1,82 +1,82 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef WELLENREITERCONFIGWINDOW_H | 16 | #ifndef WELLENREITERCONFIGWINDOW_H |
17 | #define WELLENREITERCONFIGWINDOW_H | 17 | #define WELLENREITERCONFIGWINDOW_H |
18 | 18 | ||
19 | #include "configbase.h" | 19 | #include "configbase.h" |
20 | #include "gps.h" | 20 | #include "gps.h" |
21 | 21 | ||
22 | /* QT */ | 22 | /* QT */ |
23 | #include <qmap.h> | 23 | #include <qmap.h> |
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qstring.h> | 25 | #include <qstring.h> |
26 | 26 | ||
27 | const int DEVTYPE_SELECT = 0; | 27 | const int DEVTYPE_SELECT = 0; |
28 | const int DEVTYPE_CISCO = 1; | 28 | const int DEVTYPE_CISCO = 1; |
29 | const int DEVTYPE_WLAN_NG = 2; | 29 | const int DEVTYPE_WLAN_NG = 2; |
30 | const int DEVTYPE_HOSTAP = 3; | 30 | const int DEVTYPE_HOSTAP = 3; |
31 | const int DEVTYPE_ORINOCO = 4; | 31 | const int DEVTYPE_ORINOCO = 4; |
32 | const int DEVTYPE_MANUAL = 5; | 32 | const int DEVTYPE_MANUAL = 5; |
33 | const int DEVTYPE_FILE = 6; | 33 | const int DEVTYPE_FILE = 6; |
34 | 34 | ||
35 | class WellenreiterConfigWindow; | 35 | class WellenreiterConfigWindow; |
36 | 36 | ||
37 | class WellenreiterConfigWindow : public WellenreiterConfigBase | 37 | class WellenreiterConfigWindow : public WellenreiterConfigBase |
38 | { | 38 | { |
39 | Q_OBJECT | 39 | Q_OBJECT |
40 | 40 | ||
41 | public: | 41 | public: |
42 | WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 ); | 42 | WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 ); |
43 | ~WellenreiterConfigWindow(); | 43 | ~WellenreiterConfigWindow(); |
44 | 44 | ||
45 | int driverType() const; | 45 | int driverType() const; |
46 | const QString soundOnNetwork() const { return "";/*netSound->currentText();*/ }; | 46 | const QString soundOnNetwork() const { return "";/*netSound->currentText();*/ }; |
47 | const QString soundOnBeacon() const { return "";/*beaconSound->currentText();*/ }; | 47 | const QString soundOnBeacon() const { return "";/*beaconSound->currentText();*/ }; |
48 | static WellenreiterConfigWindow* instance() { return _instance; }; | 48 | static WellenreiterConfigWindow* instance() { return _instance; }; |
49 | 49 | ||
50 | int hoppingInterval() const; | 50 | int hoppingInterval() const; |
51 | bool usePrismHeader() const; | 51 | bool usePrismHeader() const; |
52 | bool isChannelChecked( int ) const; | 52 | bool isChannelChecked( int ) const; |
53 | 53 | ||
54 | bool useGPS() const; | 54 | bool useGPS() const; |
55 | const QString gpsHost() const; | 55 | const QString gpsHost() const; |
56 | int gpsPort() const; | 56 | int gpsPort() const; |
57 | 57 | ||
58 | void save(); | 58 | void save(); |
59 | void load(); | 59 | void load(); |
60 | 60 | ||
61 | public slots: | 61 | public slots: |
62 | void changedDeviceType(int); | 62 | void changedDeviceType(int); |
63 | void changedNetworkAction(int t); | 63 | void changedNetworkAction(int t); |
64 | void changedClientAction(int t); | 64 | void changedClientAction(int t); |
65 | void changedStationAction(int t); | 65 | void changedStationAction(int t); |
66 | void getCaptureFileNameClicked(); | 66 | void getCaptureFileNameClicked(); |
67 | void performAutodetection(); | 67 | void performAutodetection(); |
68 | void channelAllClicked(int); | 68 | void channelAllClicked(int); |
69 | void performAction( const QString&, const QString&, const QString&, bool, int, int /* , const GpsLocation& */ ); | 69 | void performAction( const QString&, const QString&, const QString&, bool, int, int /* , const GpsLocation& */ ); |
70 | 70 | ||
71 | protected slots: | 71 | protected slots: |
72 | void synchronizeActionsAndScripts(); | 72 | void synchronizeActionsAndScripts(); |
73 | virtual void accept(); | 73 | virtual void accept(); |
74 | 74 | ||
75 | protected: | 75 | protected: |
76 | QMap<QString, int> _devicetype; | 76 | QMap<QString, int> _devicetype; |
77 | static WellenreiterConfigWindow* _instance; | 77 | static WellenreiterConfigWindow* _instance; |
78 | int _guess; | 78 | int _guess; |
79 | 79 | ||
80 | }; | 80 | }; |
81 | 81 | ||
82 | #endif | 82 | #endif |
diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index b845aa1..a47b4ec 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp | |||
@@ -1,127 +1,127 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "gps.h" | 16 | #include "gps.h" |
17 | 17 | ||
18 | /* QT */ | 18 | /* QT */ |
19 | #include <qtextstream.h> | 19 | #include <qtextstream.h> |
20 | 20 | ||
21 | /* STD */ | 21 | /* STD */ |
22 | #include <stdlib.h> | 22 | #include <stdlib.h> |
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | 24 | ||
25 | GPS::GPS( QObject* parent, const char * name ) | 25 | GPS::GPS( QObject* parent, const char * name ) |
26 | :QObject( parent, name ) | 26 | :QObject( parent, name ) |
27 | { | 27 | { |
28 | qDebug( "GPS::GPS()" ); | 28 | qDebug( "GPS::GPS()" ); |
29 | _socket = new QSocket( this, "gpsd commsock" ); | 29 | _socket = new QSocket( this, "gpsd commsock" ); |
30 | } | 30 | } |
31 | 31 | ||
32 | 32 | ||
33 | GPS::~GPS() | 33 | GPS::~GPS() |
34 | { | 34 | { |
35 | qDebug( "GPS::~GPS()" ); | 35 | qDebug( "GPS::~GPS()" ); |
36 | } | 36 | } |
37 | 37 | ||
38 | 38 | ||
39 | bool GPS::open( const QString& host, int port ) | 39 | bool GPS::open( const QString& host, int port ) |
40 | { | 40 | { |
41 | _socket->connectToHost( host, port ); | 41 | _socket->connectToHost( host, port ); |
42 | } | 42 | } |
43 | 43 | ||
44 | 44 | ||
45 | GpsLocation GPS::position() const | 45 | GpsLocation GPS::position() const |
46 | { | 46 | { |
47 | char buf[256]; | 47 | char buf[256]; |
48 | double lat = -111.0; | 48 | double lat = -111.0; |
49 | double lon = -111.0; | 49 | double lon = -111.0; |
50 | 50 | ||
51 | int result = _socket->writeBlock( "p\r\n", 3 ); | 51 | int result = _socket->writeBlock( "p\r\n", 3 ); |
52 | _socket->flush(); | 52 | _socket->flush(); |
53 | if ( result ) | 53 | if ( result ) |
54 | { | 54 | { |
55 | int numAvail = _socket->bytesAvailable(); | 55 | int numAvail = _socket->bytesAvailable(); |
56 | qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); | 56 | qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail ); |
57 | if ( numAvail ) | 57 | if ( numAvail ) |
58 | { | 58 | { |
59 | int numRead = _socket->readBlock( &buf[0], sizeof buf ); | 59 | int numRead = _socket->readBlock( &buf[0], sizeof buf ); |
60 | int numScan = ::sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); | 60 | int numScan = ::sscanf( &buf[0], "GPSD,P=%lg %lg", &lat, &lon); |
61 | 61 | ||
62 | if ( numRead < 7 || numScan != 2 ) | 62 | if ( numRead < 7 || numScan != 2 ) |
63 | { | 63 | { |
64 | qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); | 64 | qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] ); |
65 | return GpsLocation( -111, -111 ); | 65 | return GpsLocation( -111, -111 ); |
66 | } | 66 | } |
67 | else | 67 | else |
68 | { | 68 | { |
69 | return GpsLocation( lat, lon ); | 69 | return GpsLocation( lat, lon ); |
70 | } | 70 | } |
71 | } | 71 | } |
72 | } | 72 | } |
73 | return GpsLocation( -111, -111 ); | 73 | return GpsLocation( -111, -111 ); |
74 | } | 74 | } |
75 | 75 | ||
76 | 76 | ||
77 | QString GpsLocation::dmsPosition() const | 77 | QString GpsLocation::dmsPosition() const |
78 | { | 78 | { |
79 | if ( _latitude == -111 || _longitude == -111 ) | 79 | if ( _latitude == -111 || _longitude == -111 ) |
80 | return "N/A"; | 80 | return "N/A"; |
81 | if ( _latitude == 0.0 && _longitude == 0.0 ) | 81 | if ( _latitude == 0.0 && _longitude == 0.0 ) |
82 | return "NULL"; | 82 | return "NULL"; |
83 | 83 | ||
84 | /* compute latitude */ | 84 | /* compute latitude */ |
85 | 85 | ||
86 | QString dms = "N"; | 86 | QString dms = "N"; |
87 | if ( _latitude >= 0 ) dms.append( "+" ); | 87 | if ( _latitude >= 0 ) dms.append( "+" ); |
88 | 88 | ||
89 | int trunc = int( _latitude ); | 89 | int trunc = int( _latitude ); |
90 | float rest = _latitude - trunc; | 90 | float rest = _latitude - trunc; |
91 | 91 | ||
92 | float minf = rest * 60; | 92 | float minf = rest * 60; |
93 | int minutes = int( minf ); | 93 | int minutes = int( minf ); |
94 | 94 | ||
95 | rest = minf - minutes; | 95 | rest = minf - minutes; |
96 | int seconds = int( rest * 60 ); | 96 | int seconds = int( rest * 60 ); |
97 | 97 | ||
98 | dms.append( QString::number( trunc ) ); | 98 | dms.append( QString::number( trunc ) ); |
99 | dms.append( "° " ); | 99 | dms.append( "° " ); |
100 | dms.append( QString::number( ::abs( minutes ) ) ); | 100 | dms.append( QString::number( ::abs( minutes ) ) ); |
101 | dms.append( "' " ); | 101 | dms.append( "' " ); |
102 | dms.append( QString::number( ::abs( seconds ) ) ); | 102 | dms.append( QString::number( ::abs( seconds ) ) ); |
103 | dms.append( "'' " ); | 103 | dms.append( "'' " ); |
104 | 104 | ||
105 | /* compute longitude */ | 105 | /* compute longitude */ |
106 | 106 | ||
107 | dms.append( " | W" ); | 107 | dms.append( " | W" ); |
108 | if ( _longitude > 0 ) dms.append( "+" ); | 108 | if ( _longitude > 0 ) dms.append( "+" ); |
109 | 109 | ||
110 | trunc = int( _longitude ); | 110 | trunc = int( _longitude ); |
111 | rest = _longitude - trunc; | 111 | rest = _longitude - trunc; |
112 | 112 | ||
113 | minf = rest * 60; | 113 | minf = rest * 60; |
114 | minutes = int( minf ); | 114 | minutes = int( minf ); |
115 | 115 | ||
116 | rest = minf - minutes; | 116 | rest = minf - minutes; |
117 | seconds = int( rest * 60 ); | 117 | seconds = int( rest * 60 ); |
118 | 118 | ||
119 | dms.append( QString::number( trunc ) ); | 119 | dms.append( QString::number( trunc ) ); |
120 | dms.append( "° " ); | 120 | dms.append( "° " ); |
121 | dms.append( QString::number( ::abs( minutes ) ) ); | 121 | dms.append( QString::number( ::abs( minutes ) ) ); |
122 | dms.append( "' " ); | 122 | dms.append( "' " ); |
123 | dms.append( QString::number( ::abs( seconds ) ) ); | 123 | dms.append( QString::number( ::abs( seconds ) ) ); |
124 | dms.append( "'' " ); | 124 | dms.append( "'' " ); |
125 | 125 | ||
126 | return dms; | 126 | return dms; |
127 | } | 127 | } |
diff --git a/noncore/net/wellenreiter/gui/gps.h b/noncore/net/wellenreiter/gui/gps.h index cfe1cdb..5629fec 100644 --- a/noncore/net/wellenreiter/gui/gps.h +++ b/noncore/net/wellenreiter/gui/gps.h | |||
@@ -1,51 +1,51 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef GPS_H | 16 | #ifndef GPS_H |
17 | #define GPS_H | 17 | #define GPS_H |
18 | 18 | ||
19 | #include <qobject.h> | 19 | #include <qobject.h> |
20 | #include <qsocket.h> | 20 | #include <qsocket.h> |
21 | 21 | ||
22 | class GpsLocation | 22 | class GpsLocation |
23 | { | 23 | { |
24 | public: | 24 | public: |
25 | GpsLocation( const float& lat, const float& lon ) : _latitude(lat), _longitude(lon) {}; | 25 | GpsLocation( const float& lat, const float& lon ) : _latitude(lat), _longitude(lon) {}; |
26 | ~GpsLocation() {}; | 26 | ~GpsLocation() {}; |
27 | float latitude() const { return _latitude; }; | 27 | float latitude() const { return _latitude; }; |
28 | float longitude() const { return _longitude; }; | 28 | float longitude() const { return _longitude; }; |
29 | QString dmsPosition() const; | 29 | QString dmsPosition() const; |
30 | private: | 30 | private: |
31 | float _latitude; | 31 | float _latitude; |
32 | float _longitude; | 32 | float _longitude; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | 35 | ||
36 | class GPS : public QObject | 36 | class GPS : public QObject |
37 | { | 37 | { |
38 | Q_OBJECT | 38 | Q_OBJECT |
39 | 39 | ||
40 | public: | 40 | public: |
41 | GPS( QObject* parent = 0, const char * name = "GPS" ); | 41 | GPS( QObject* parent = 0, const char * name = "GPS" ); |
42 | ~GPS(); | 42 | ~GPS(); |
43 | 43 | ||
44 | bool open( const QString& host = "localhost", int port = 2947 ); | 44 | bool open( const QString& host = "localhost", int port = 2947 ); |
45 | GpsLocation position() const; | 45 | GpsLocation position() const; |
46 | 46 | ||
47 | private: | 47 | private: |
48 | QSocket* _socket; | 48 | QSocket* _socket; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | #endif // GPS_H | 51 | #endif // GPS_H |
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp index b116b91..b4174d3 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.cpp +++ b/noncore/net/wellenreiter/gui/graphwindow.cpp | |||
@@ -1,187 +1,187 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "graphwindow.h" | 16 | #include "graphwindow.h" |
17 | 17 | ||
18 | #include <qpainter.h> | 18 | #include <qpainter.h> |
19 | #include <qpixmap.h> | 19 | #include <qpixmap.h> |
20 | #include <qtimer.h> | 20 | #include <qtimer.h> |
21 | 21 | ||
22 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) | 22 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) |
23 | :QWidget( parent, name,f ), _channels( channels ) | 23 | :QWidget( parent, name,f ), _channels( channels ) |
24 | { | 24 | { |
25 | _values = new int[_channels]; | 25 | _values = new int[_channels]; |
26 | _dirty = new bool[_channels]; | 26 | _dirty = new bool[_channels]; |
27 | for ( int i = 0; i < channels; ++i ) | 27 | for ( int i = 0; i < channels; ++i ) |
28 | { _values[i] = 0; | 28 | { _values[i] = 0; |
29 | _dirty[i] = true; | 29 | _dirty[i] = true; |
30 | } | 30 | } |
31 | 31 | ||
32 | // we draw everything on our own | 32 | // we draw everything on our own |
33 | setBackgroundMode( QWidget::NoBackground ); | 33 | setBackgroundMode( QWidget::NoBackground ); |
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | void MFrequencySpectrum::drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ) | 37 | void MFrequencySpectrum::drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ) |
38 | { | 38 | { |
39 | p->setPen( c.light() ); | 39 | p->setPen( c.light() ); |
40 | p->drawLine( x, y, x+width-1, y ); | 40 | p->drawLine( x, y, x+width-1, y ); |
41 | } | 41 | } |
42 | 42 | ||
43 | 43 | ||
44 | void MFrequencySpectrum::drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ) | 44 | void MFrequencySpectrum::drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ) |
45 | { | 45 | { |
46 | p->setPen( c.dark() ); | 46 | p->setPen( c.dark() ); |
47 | p->drawLine( x, y, x+width-1, y ); | 47 | p->drawLine( x, y, x+width-1, y ); |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) | 51 | void MFrequencySpectrum::drawLine( QPainter* p, int x, int y, int width, const QColor& c ) |
52 | { | 52 | { |
53 | p->setPen( c.light() ); | 53 | p->setPen( c.light() ); |
54 | p->drawPoint( x++, y ); | 54 | p->drawPoint( x++, y ); |
55 | p->setPen( c ); | 55 | p->setPen( c ); |
56 | p->drawLine( x, y, x+width-2, y ); | 56 | p->drawLine( x, y, x+width-2, y ); |
57 | p->setPen( c.dark() ); | 57 | p->setPen( c.dark() ); |
58 | p->drawPoint( x+width-1, y ); | 58 | p->drawPoint( x+width-1, y ); |
59 | } | 59 | } |
60 | 60 | ||
61 | 61 | ||
62 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) | 62 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ) |
63 | { | 63 | { |
64 | int h1 = 133; int h2 = 0; | 64 | int h1 = 133; int h2 = 0; |
65 | int s1 = 200; int s2 = 255; | 65 | int s1 = 200; int s2 = 255; |
66 | int v1 = 140; int v2 = 255; | 66 | int v1 = 140; int v2 = 255; |
67 | 67 | ||
68 | /*int h1 = 196; int h2 = 194; | 68 | /*int h1 = 196; int h2 = 194; |
69 | int s1 = 85; int s2 = 15; | 69 | int s1 = 85; int s2 = 15; |
70 | int v1 = 95; int v2 = 237;*/ | 70 | int v1 = 95; int v2 = 237;*/ |
71 | 71 | ||
72 | QColor c( 120, 60, 200 ); | 72 | QColor c( 120, 60, 200 ); |
73 | for ( int i = 0; i < height; ++i ) | 73 | for ( int i = 0; i < height; ++i ) |
74 | { | 74 | { |
75 | int h = (h2-h1)*i/maxheight + h1; | 75 | int h = (h2-h1)*i/maxheight + h1; |
76 | int s = (s2-s1)*i/maxheight + s1; | 76 | int s = (s2-s1)*i/maxheight + s1; |
77 | int v = (v2-v1)*i/maxheight + v1; | 77 | int v = (v2-v1)*i/maxheight + v1; |
78 | if ( i == 0 ) | 78 | if ( i == 0 ) |
79 | drawBottomLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | 79 | drawBottomLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); |
80 | else if ( i == height-1 ) | 80 | else if ( i == height-1 ) |
81 | drawTopLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | 81 | drawTopLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); |
82 | else | 82 | else |
83 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); | 83 | drawLine( p, x, y-i, width, QColor( h,s,v, QColor::Hsv ) ); |
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||
88 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) | 88 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) |
89 | { | 89 | { |
90 | QPixmap pm( size() ); | 90 | QPixmap pm( size() ); |
91 | QPainter p; | 91 | QPainter p; |
92 | p.begin( &pm ); | 92 | p.begin( &pm ); |
93 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); | 93 | p.drawTiledPixmap( 0, 0, size().width(), size().height(), QPixmap( (const char**) &background ) ); |
94 | 94 | ||
95 | int xmargin = 5; | 95 | int xmargin = 5; |
96 | int ymargin = 2; | 96 | int ymargin = 2; |
97 | int y = size().height() - 2 * ymargin; | 97 | int y = size().height() - 2 * ymargin; |
98 | int x = 0; | 98 | int x = 0; |
99 | int width = ( size().width() - 2 * xmargin ) / _channels; | 99 | int width = ( size().width() - 2 * xmargin ) / _channels; |
100 | 100 | ||
101 | for ( int i = 0; i < _channels; ++i ) | 101 | for ( int i = 0; i < _channels; ++i ) |
102 | { | 102 | { |
103 | if ( _dirty[i] ) | 103 | if ( _dirty[i] ) |
104 | { | 104 | { |
105 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); | 105 | drawBar( &p, xmargin + x, y - ymargin, width-3, _values[i]*y/100, y ); |
106 | _dirty[i] = false; | 106 | _dirty[i] = false; |
107 | } | 107 | } |
108 | x+= width; | 108 | x+= width; |
109 | } | 109 | } |
110 | 110 | ||
111 | p.end(); | 111 | p.end(); |
112 | bitBlt( this, 0, 0, &pm ); | 112 | bitBlt( this, 0, 0, &pm ); |
113 | } | 113 | } |
114 | 114 | ||
115 | 115 | ||
116 | void MFrequencySpectrum::mousePressEvent( QMouseEvent* e ) | 116 | void MFrequencySpectrum::mousePressEvent( QMouseEvent* e ) |
117 | { | 117 | { |
118 | int xmargin = 5; | 118 | int xmargin = 5; |
119 | int ymargin = 2; | 119 | int ymargin = 2; |
120 | int y = size().height() - 2 * ymargin; | 120 | int y = size().height() - 2 * ymargin; |
121 | int x = 0; | 121 | int x = 0; |
122 | int width = ( size().width() - 2 * xmargin ) / _channels; | 122 | int width = ( size().width() - 2 * xmargin ) / _channels; |
123 | 123 | ||
124 | QPoint pos = e->pos(); | 124 | QPoint pos = e->pos(); |
125 | int channel = ( pos.x()-xmargin ) / width; | 125 | int channel = ( pos.x()-xmargin ) / width; |
126 | int height = 100 - ( pos.y()-ymargin )*100/y; | 126 | int height = 100 - ( pos.y()-ymargin )*100/y; |
127 | if ( channel < 15 ) _values[channel] = height; | 127 | if ( channel < 15 ) _values[channel] = height; |
128 | 128 | ||
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
132 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) | 132 | Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) |
133 | :QFrame( parent, name, f ), _channels( channels ) | 133 | :QFrame( parent, name, f ), _channels( channels ) |
134 | { | 134 | { |
135 | setLineWidth( 2 ); | 135 | setLineWidth( 2 ); |
136 | setFrameStyle( Panel + Sunken ); | 136 | setFrameStyle( Panel + Sunken ); |
137 | setFixedHeight( 16 ); | 137 | setFixedHeight( 16 ); |
138 | 138 | ||
139 | } | 139 | } |
140 | 140 | ||
141 | 141 | ||
142 | void Legende::drawContents( QPainter* p ) | 142 | void Legende::drawContents( QPainter* p ) |
143 | { | 143 | { |
144 | int xmargin = 5; | 144 | int xmargin = 5; |
145 | int ymargin = 2; | 145 | int ymargin = 2; |
146 | int x = 0; | 146 | int x = 0; |
147 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; | 147 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; |
148 | 148 | ||
149 | for ( int i = 0; i < _channels; ++i ) | 149 | for ( int i = 0; i < _channels; ++i ) |
150 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); | 150 | p->drawText( xmargin + (width*i), 12, QString().sprintf( "%02d", i+1 ) ); |
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) | 154 | MGraphWindow::MGraphWindow( QWidget* parent, const char* name, WFlags f ) |
155 | :QVBox( parent, name, f ) | 155 | :QVBox( parent, name, f ) |
156 | { | 156 | { |
157 | spectrum = new MFrequencySpectrum( 14, this ); | 157 | spectrum = new MFrequencySpectrum( 14, this ); |
158 | legende = new Legende( 14, this ); | 158 | legende = new Legende( 14, this ); |
159 | startTimer( 50 ); | 159 | startTimer( 50 ); |
160 | }; | 160 | }; |
161 | 161 | ||
162 | 162 | ||
163 | void MGraphWindow::testGraph() | 163 | void MGraphWindow::testGraph() |
164 | { | 164 | { |
165 | static int i = 0; | 165 | static int i = 0; |
166 | spectrum->setValue( i++, 100 ); | 166 | spectrum->setValue( i++, 100 ); |
167 | if ( i == 14 ) i = 0; | 167 | if ( i == 14 ) i = 0; |
168 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); | 168 | QTimer::singleShot( 2000, this, SLOT( testGraph() ) ); |
169 | 169 | ||
170 | } | 170 | } |
171 | 171 | ||
172 | 172 | ||
173 | void MGraphWindow::timerEvent( QTimerEvent* e ) | 173 | void MGraphWindow::timerEvent( QTimerEvent* e ) |
174 | { | 174 | { |
175 | for ( int i = 0; i < 14; i++ ) | 175 | for ( int i = 0; i < 14; i++ ) |
176 | { | 176 | { |
177 | spectrum->decrease( i, 1 ); | 177 | spectrum->decrease( i, 1 ); |
178 | } | 178 | } |
179 | spectrum->repaint(); | 179 | spectrum->repaint(); |
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
183 | void MGraphWindow::traffic( int channel, int signal ) | 183 | void MGraphWindow::traffic( int channel, int signal ) |
184 | { | 184 | { |
185 | spectrum->setValue( channel-1, signal ); | 185 | spectrum->setValue( channel-1, signal ); |
186 | } | 186 | } |
187 | 187 | ||
diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h index 1e00ae7..fafcab1 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.h +++ b/noncore/net/wellenreiter/gui/graphwindow.h | |||
@@ -1,121 +1,121 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef GRAPHWINDOW_H | 16 | #ifndef GRAPHWINDOW_H |
17 | #define GRAPHWINDOW_H | 17 | #define GRAPHWINDOW_H |
18 | 18 | ||
19 | #include <qwidget.h> | 19 | #include <qwidget.h> |
20 | #include <qvbox.h> | 20 | #include <qvbox.h> |
21 | 21 | ||
22 | class MFrequencySpectrum : public QWidget | 22 | class MFrequencySpectrum : public QWidget |
23 | { | 23 | { |
24 | public: | 24 | public: |
25 | MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); | 25 | MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); |
26 | int value( int channel ) const { return _values[channel]; }; | 26 | int value( int channel ) const { return _values[channel]; }; |
27 | void setValue( int channel, int value ) | 27 | void setValue( int channel, int value ) |
28 | { | 28 | { |
29 | if ( value > _values[channel] ) | 29 | if ( value > _values[channel] ) |
30 | { | 30 | { |
31 | _values[channel] = value; | 31 | _values[channel] = value; |
32 | _dirty[channel] = true; | 32 | _dirty[channel] = true; |
33 | } | 33 | } |
34 | }; | 34 | }; |
35 | void decrease( int channel, int amount ) | 35 | void decrease( int channel, int amount ) |
36 | { | 36 | { |
37 | if ( _values[channel] >= amount ) | 37 | if ( _values[channel] >= amount ) |
38 | { | 38 | { |
39 | _values[channel] -= amount; | 39 | _values[channel] -= amount; |
40 | _dirty[channel] = true; | 40 | _dirty[channel] = true; |
41 | } | 41 | } |
42 | }; | 42 | }; |
43 | 43 | ||
44 | protected: | 44 | protected: |
45 | virtual void paintEvent( QPaintEvent* ); | 45 | virtual void paintEvent( QPaintEvent* ); |
46 | virtual void mousePressEvent( QMouseEvent* ); | 46 | virtual void mousePressEvent( QMouseEvent* ); |
47 | 47 | ||
48 | void drawLine( QPainter* p, int x, int y, int width, const QColor& c ); | 48 | void drawLine( QPainter* p, int x, int y, int width, const QColor& c ); |
49 | void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ); | 49 | void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ); |
50 | void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ); | 50 | void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ); |
51 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ); | 51 | void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ); |
52 | 52 | ||
53 | private: | 53 | private: |
54 | int _channels; | 54 | int _channels; |
55 | int* _values; | 55 | int* _values; |
56 | bool* _dirty; | 56 | bool* _dirty; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | 59 | ||
60 | class Legende : public QFrame | 60 | class Legende : public QFrame |
61 | { | 61 | { |
62 | public: | 62 | public: |
63 | Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 ); | 63 | Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 ); |
64 | 64 | ||
65 | protected: | 65 | protected: |
66 | virtual void drawContents( QPainter* ); | 66 | virtual void drawContents( QPainter* ); |
67 | 67 | ||
68 | private: | 68 | private: |
69 | int _channels; | 69 | int _channels; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | 72 | ||
73 | class MGraphWindow : public QVBox | 73 | class MGraphWindow : public QVBox |
74 | { | 74 | { |
75 | Q_OBJECT | 75 | Q_OBJECT |
76 | 76 | ||
77 | public: | 77 | public: |
78 | MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 ); | 78 | MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 ); |
79 | void traffic( int channel, int signal ); | 79 | void traffic( int channel, int signal ); |
80 | 80 | ||
81 | protected: | 81 | protected: |
82 | virtual void timerEvent( QTimerEvent* e ); | 82 | virtual void timerEvent( QTimerEvent* e ); |
83 | 83 | ||
84 | protected slots: | 84 | protected slots: |
85 | virtual void testGraph(); | 85 | virtual void testGraph(); |
86 | 86 | ||
87 | protected: | 87 | protected: |
88 | MFrequencySpectrum* spectrum; | 88 | MFrequencySpectrum* spectrum; |
89 | Legende* legende; | 89 | Legende* legende; |
90 | 90 | ||
91 | }; | 91 | }; |
92 | 92 | ||
93 | /* XPM */ | 93 | /* XPM */ |
94 | static char * background[] = { | 94 | static char * background[] = { |
95 | "16 16 6 1", | 95 | "16 16 6 1", |
96 | " c None", | 96 | " c None", |
97 | ".c #52676E", | 97 | ".c #52676E", |
98 | "+c #3F545B", | 98 | "+c #3F545B", |
99 | "@c #394E56", | 99 | "@c #394E56", |
100 | "#c #2F454C", | 100 | "#c #2F454C", |
101 | "$c #364B52", | 101 | "$c #364B52", |
102 | ".+++++++++++++++", | 102 | ".+++++++++++++++", |
103 | "@###############", | 103 | "@###############", |
104 | "+$$$$$$$$$$$$$$$", | 104 | "+$$$$$$$$$$$$$$$", |
105 | "@###############", | 105 | "@###############", |
106 | "+$$$$$$$$$$$$$$$", | 106 | "+$$$$$$$$$$$$$$$", |
107 | "@###############", | 107 | "@###############", |
108 | "+$$$$$$$$$$$$$$$", | 108 | "+$$$$$$$$$$$$$$$", |
109 | "@###############", | 109 | "@###############", |
110 | "+$$$$$$$$$$$$$$$", | 110 | "+$$$$$$$$$$$$$$$", |
111 | "@###############", | 111 | "@###############", |
112 | "+$$$$$$$$$$$$$$$", | 112 | "+$$$$$$$$$$$$$$$", |
113 | "@###############", | 113 | "@###############", |
114 | "+$$$$$$$$$$$$$$$", | 114 | "+$$$$$$$$$$$$$$$", |
115 | "@###############", | 115 | "@###############", |
116 | "+$$$$$$$$$$$$$$$", | 116 | "+$$$$$$$$$$$$$$$", |
117 | "@###############"}; | 117 | "@###############"}; |
118 | 118 | ||
119 | 119 | ||
120 | #endif | 120 | #endif |
121 | 121 | ||
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index 7957d4c..cfb9873 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro | |||
@@ -1,47 +1,49 @@ | |||
1 | DESTDIR = $(OPIEDIR)/bin | 1 | DESTDIR = $(OPIEDIR)/bin |
2 | TEMPLATE = app | 2 | TEMPLATE = app |
3 | CONFIG = qt warn_on debug | 3 | CONFIG = qt warn_on debug |
4 | 4 | ||
5 | HEADERS = wellenreiterbase.h \ | 5 | HEADERS = wellenreiterbase.h \ |
6 | mainwindow.h \ | 6 | mainwindow.h \ |
7 | wellenreiter.h \ | 7 | wellenreiter.h \ |
8 | scanlist.h \ | 8 | scanlist.h \ |
9 | logwindow.h \ | 9 | logwindow.h \ |
10 | hexwindow.h \ | 10 | hexwindow.h \ |
11 | statwindow.h \ | 11 | statwindow.h \ |
12 | configwindow.h \ | 12 | configwindow.h \ |
13 | graphwindow.h \ | 13 | graphwindow.h \ |
14 | packetview.h \ | ||
14 | protolistview.h \ | 15 | protolistview.h \ |
15 | gps.h | 16 | gps.h |
16 | 17 | ||
17 | SOURCES = main.cpp \ | 18 | SOURCES = main.cpp \ |
18 | mainwindow.cpp \ | 19 | mainwindow.cpp \ |
19 | wellenreiterbase.cpp \ | 20 | wellenreiterbase.cpp \ |
20 | wellenreiter.cpp \ | 21 | wellenreiter.cpp \ |
21 | scanlist.cpp \ | 22 | scanlist.cpp \ |
22 | logwindow.cpp \ | 23 | logwindow.cpp \ |
23 | hexwindow.cpp \ | 24 | hexwindow.cpp \ |
24 | statwindow.cpp \ | 25 | statwindow.cpp \ |
25 | configwindow.cpp \ | 26 | configwindow.cpp \ |
26 | graphwindow.cpp \ | 27 | graphwindow.cpp \ |
28 | packetview.cpp \ | ||
27 | protolistview.cpp \ | 29 | protolistview.cpp \ |
28 | gps.cpp | 30 | gps.cpp |
29 | 31 | ||
30 | INCLUDEPATH += $(OPIEDIR)/include | 32 | INCLUDEPATH += $(OPIEDIR)/include |
31 | DEPENDPATH += $(OPIEDIR)/include | 33 | DEPENDPATH += $(OPIEDIR)/include |
32 | INTERFACES = configbase.ui | 34 | INTERFACES = configbase.ui |
33 | TARGET = wellenreiter | 35 | TARGET = wellenreiter |
34 | 36 | ||
35 | !contains( platform, x11 ) { | 37 | !contains( platform, x11 ) { |
36 | message( qws ) | 38 | message( qws ) |
37 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
38 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 | 40 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 |
39 | } | 41 | } |
40 | 42 | ||
41 | contains( platform, x11 ) { | 43 | contains( platform, x11 ) { |
42 | LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter | 44 | LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter |
43 | SOURCES += resource.cpp | 45 | SOURCES += resource.cpp |
44 | HEADERS += resource.h | 46 | HEADERS += resource.h |
45 | DESTDIR = $(OPIEDIR)/output/bin | 47 | DESTDIR = $(OPIEDIR)/output/bin |
46 | } | 48 | } |
47 | 49 | ||
diff --git a/noncore/net/wellenreiter/gui/hexwindow.cpp b/noncore/net/wellenreiter/gui/hexwindow.cpp index 2f011ca..cbf3217 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.cpp +++ b/noncore/net/wellenreiter/gui/hexwindow.cpp | |||
@@ -1,44 +1,44 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "hexwindow.h" | 16 | #include "hexwindow.h" |
17 | #include <qmultilineedit.h> | 17 | #include <qmultilineedit.h> |
18 | 18 | ||
19 | MHexWindow::MHexWindow( QWidget * parent, const char * name, WFlags f ) | 19 | MHexWindow::MHexWindow( QWidget * parent, const char * name, WFlags f ) |
20 | :QVBox( parent, name, f ) | 20 | :QVBox( parent, name, f ) |
21 | { | 21 | { |
22 | ledit = new QMultiLineEdit( this ); | 22 | ledit = new QMultiLineEdit( this ); |
23 | ledit->setFont( QFont( "fixed", 10 ) ); | 23 | ledit->setFont( QFont( "fixed", 10 ) ); |
24 | ledit->setReadOnly( true ); | 24 | ledit->setReadOnly( true ); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | void MHexWindow::log( const QString& text ) | 27 | void MHexWindow::log( const QString& text ) |
28 | { | 28 | { |
29 | int col; | 29 | int col; |
30 | int row; | 30 | int row; |
31 | ledit->getCursorPosition( &col, &row ); | 31 | ledit->getCursorPosition( &col, &row ); |
32 | ledit->insertAt( text, col, row ); | 32 | ledit->insertAt( text, col, row ); |
33 | }; | 33 | }; |
34 | 34 | ||
35 | const QString MHexWindow::getLog() const | 35 | const QString MHexWindow::getLog() const |
36 | { | 36 | { |
37 | return ledit->text(); | 37 | return ledit->text(); |
38 | } | 38 | } |
39 | 39 | ||
40 | void MHexWindow::clear() | 40 | void MHexWindow::clear() |
41 | { | 41 | { |
42 | ledit->clear(); | 42 | ledit->clear(); |
43 | } | 43 | } |
44 | 44 | ||
diff --git a/noncore/net/wellenreiter/gui/hexwindow.h b/noncore/net/wellenreiter/gui/hexwindow.h index 3d4ec0f..71c6f25 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.h +++ b/noncore/net/wellenreiter/gui/hexwindow.h | |||
@@ -1,40 +1,40 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef HEXWINDOW_H | 16 | #ifndef HEXWINDOW_H |
17 | #define HEXWINDOW_H | 17 | #define HEXWINDOW_H |
18 | 18 | ||
19 | #include <qvbox.h> | 19 | #include <qvbox.h> |
20 | 20 | ||
21 | class QString; | 21 | class QString; |
22 | class QMultiLineEdit; | 22 | class QMultiLineEdit; |
23 | 23 | ||
24 | class MHexWindow: public QVBox | 24 | 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( const QString& text ); | 30 | void log( const QString& text ); |
31 | const QString getLog() const; | 31 | const QString getLog() const; |
32 | void clear(); | 32 | void clear(); |
33 | 33 | ||
34 | protected: | 34 | protected: |
35 | QMultiLineEdit* ledit; | 35 | QMultiLineEdit* ledit; |
36 | 36 | ||
37 | }; | 37 | }; |
38 | 38 | ||
39 | #endif | 39 | #endif |
40 | 40 | ||
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index 6078fa2..1c72cf4 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp | |||
@@ -1,54 +1,54 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "logwindow.h" | 16 | #include "logwindow.h" |
17 | #include <qmultilineedit.h> | 17 | #include <qmultilineedit.h> |
18 | #include <qdatetime.h> | 18 | #include <qdatetime.h> |
19 | 19 | ||
20 | MLogWindow* MLogWindow::_instance; | 20 | MLogWindow* MLogWindow::_instance; |
21 | 21 | ||
22 | MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) | 22 | MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) |
23 | :QVBox( parent, name, f ) | 23 | :QVBox( parent, name, f ) |
24 | { | 24 | { |
25 | ledit = new QMultiLineEdit( this ); | 25 | ledit = new QMultiLineEdit( this ); |
26 | ledit->setReadOnly( true ); | 26 | ledit->setReadOnly( true ); |
27 | 27 | ||
28 | MLogWindow::_instance = this; | 28 | MLogWindow::_instance = this; |
29 | } | 29 | } |
30 | 30 | ||
31 | 31 | ||
32 | void MLogWindow::log( QString text ) | 32 | void MLogWindow::log( QString text ) |
33 | { | 33 | { |
34 | QTime time = QTime::currentTime(); | 34 | QTime time = QTime::currentTime(); |
35 | QString line; | 35 | QString line; |
36 | line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text ); | 36 | line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text ); |
37 | int col; | 37 | int col; |
38 | int row; | 38 | int row; |
39 | ledit->getCursorPosition( &col, &row ); | 39 | ledit->getCursorPosition( &col, &row ); |
40 | ledit->insertAt( line, col, row ); | 40 | ledit->insertAt( line, col, row ); |
41 | qDebug( line ); | 41 | qDebug( line ); |
42 | } | 42 | } |
43 | 43 | ||
44 | 44 | ||
45 | void MLogWindow::clear() | 45 | void MLogWindow::clear() |
46 | { | 46 | { |
47 | ledit->clear(); | 47 | ledit->clear(); |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | const QString MLogWindow::getLog() const | 51 | const QString MLogWindow::getLog() const |
52 | { | 52 | { |
53 | return ledit->text(); | 53 | return ledit->text(); |
54 | } | 54 | } |
diff --git a/noncore/net/wellenreiter/gui/logwindow.h b/noncore/net/wellenreiter/gui/logwindow.h index da8c274..7877003 100644 --- a/noncore/net/wellenreiter/gui/logwindow.h +++ b/noncore/net/wellenreiter/gui/logwindow.h | |||
@@ -1,45 +1,45 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef LOGWINDOW_H | 16 | #ifndef LOGWINDOW_H |
17 | #define LOGWINDOW_H | 17 | #define LOGWINDOW_H |
18 | 18 | ||
19 | #include <qvbox.h> | 19 | #include <qvbox.h> |
20 | 20 | ||
21 | class QString; | 21 | class QString; |
22 | class QMultiLineEdit; | 22 | class QMultiLineEdit; |
23 | 23 | ||
24 | class MLogWindow: public QVBox | 24 | class MLogWindow: public QVBox |
25 | { | 25 | { |
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 | void clear(); |
33 | 33 | ||
34 | static MLogWindow* logwindow() { return MLogWindow::_instance; }; | 34 | static MLogWindow* logwindow() { return MLogWindow::_instance; }; |
35 | 35 | ||
36 | protected: | 36 | protected: |
37 | QMultiLineEdit* ledit; | 37 | QMultiLineEdit* ledit; |
38 | 38 | ||
39 | private: | 39 | private: |
40 | static MLogWindow* _instance; | 40 | static MLogWindow* _instance; |
41 | 41 | ||
42 | }; | 42 | }; |
43 | 43 | ||
44 | #endif | 44 | #endif |
45 | 45 | ||
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 8ef62e9..be7a528 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp | |||
@@ -1,109 +1,109 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "mainwindow.h" | 16 | #include "mainwindow.h" |
17 | #ifdef QWS | 17 | #ifdef QWS |
18 | #include <opie2/oapplication.h> | 18 | #include <opie2/oapplication.h> |
19 | #include <opie2/oprocess.h> | 19 | #include <opie2/oprocess.h> |
20 | #else | 20 | #else |
21 | #include <qapplication.h> | 21 | #include <qapplication.h> |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #include <qmessagebox.h> | 24 | #include <qmessagebox.h> |
25 | #include <qstringlist.h> | 25 | #include <qstringlist.h> |
26 | 26 | ||
27 | #include <errno.h> | 27 | #include <errno.h> |
28 | #include <signal.h> | 28 | #include <signal.h> |
29 | #include <string.h> | 29 | #include <string.h> |
30 | #include <unistd.h> | 30 | #include <unistd.h> |
31 | 31 | ||
32 | int main( int argc, char **argv ) | 32 | int main( int argc, char **argv ) |
33 | { | 33 | { |
34 | #ifdef QWS | 34 | #ifdef QWS |
35 | OApplication a( argc, argv, "Wellenreiter II" ); | 35 | OApplication a( argc, argv, "Wellenreiter II" ); |
36 | #else | 36 | #else |
37 | QApplication a( argc, argv ); | 37 | QApplication a( argc, argv ); |
38 | #endif | 38 | #endif |
39 | WellenreiterMainWindow* w = new WellenreiterMainWindow(); | 39 | WellenreiterMainWindow* w = new WellenreiterMainWindow(); |
40 | #ifdef QWS | 40 | #ifdef QWS |
41 | a.showMainWidget( w ); | 41 | a.showMainWidget( w ); |
42 | #else | 42 | #else |
43 | a.setMainWidget( w ); | 43 | a.setMainWidget( w ); |
44 | w->setCaption( "Wellenreiter II" ); | 44 | w->setCaption( "Wellenreiter II" ); |
45 | w->show(); | 45 | w->show(); |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | a.processEvents(); // show the window before doing the safety checks | 48 | a.processEvents(); // show the window before doing the safety checks |
49 | int result = -1; | 49 | int result = -1; |
50 | static int killed = false; | 50 | static int killed = false; |
51 | 51 | ||
52 | bool check = true; | 52 | bool check = true; |
53 | for ( int i = 1; i < argc; ++i ) | 53 | for ( int i = 1; i < argc; ++i ) |
54 | { | 54 | { |
55 | if ( !strcmp( "-nocheck", argv[i] ) ) | 55 | if ( !strcmp( "-nocheck", argv[i] ) ) |
56 | { | 56 | { |
57 | qDebug( "-nocheck found" ); | 57 | qDebug( "-nocheck found" ); |
58 | check = false; | 58 | check = false; |
59 | break; | 59 | break; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | if ( check ) | 63 | if ( check ) |
64 | { | 64 | { |
65 | // root check | 65 | // root check |
66 | if ( getuid() ) | 66 | if ( getuid() ) |
67 | { | 67 | { |
68 | qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); | 68 | qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); |
69 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" | 69 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" |
70 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), | 70 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), |
71 | QMessageBox::Yes, QMessageBox::No ); | 71 | QMessageBox::Yes, QMessageBox::No ); |
72 | if ( result == QMessageBox::No ) return -1; | 72 | if ( result == QMessageBox::No ) return -1; |
73 | } | 73 | } |
74 | 74 | ||
75 | int dhcpid = OProcess::processPID( "dhcpc" ); | 75 | int dhcpid = OProcess::processPID( "dhcpc" ); |
76 | 76 | ||
77 | if ( dhcpid ) | 77 | if ( dhcpid ) |
78 | { | 78 | { |
79 | result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "You have a dhcp client running.\n" | 79 | result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "You have a dhcp client running.\n" |
80 | "(PID = %1)\nThis can severly limit scanning!\nShould I kill it for you?" ).arg( dhcpid ), | 80 | "(PID = %1)\nThis can severly limit scanning!\nShould I kill it for you?" ).arg( dhcpid ), |
81 | QMessageBox::Yes, QMessageBox::No ); | 81 | QMessageBox::Yes, QMessageBox::No ); |
82 | if ( result == QMessageBox::Yes ) | 82 | if ( result == QMessageBox::Yes ) |
83 | { | 83 | { |
84 | if ( -1 == ::kill( dhcpid, SIGTERM ) ) | 84 | if ( -1 == ::kill( dhcpid, SIGTERM ) ) |
85 | qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); | 85 | qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); |
86 | else | 86 | else |
87 | killed = true; | 87 | killed = true; |
88 | } | 88 | } |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | a.exec(); | 92 | a.exec(); |
93 | 93 | ||
94 | if ( check ) | 94 | if ( check ) |
95 | { | 95 | { |
96 | 96 | ||
97 | if ( killed ) | 97 | if ( killed ) |
98 | { | 98 | { |
99 | result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "Restart your dhcp client?" ), QMessageBox::Yes, QMessageBox::No ); | 99 | result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "Restart your dhcp client?" ), QMessageBox::Yes, QMessageBox::No ); |
100 | if ( result == QMessageBox::Yes ) | 100 | if ( result == QMessageBox::Yes ) |
101 | { | 101 | { |
102 | ::system( QString().sprintf( "dhclient &; udhcpcd &; dhcpcd &" ) ); | 102 | ::system( QString().sprintf( "dhclient &; udhcpcd &; dhcpcd &" ) ); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | delete w; | 106 | delete w; |
107 | } | 107 | } |
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 95a8294..6f57a7f 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -1,335 +1,343 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "gps.h" | 17 | #include "gps.h" |
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | #include "hexwindow.h" | 19 | #include "hexwindow.h" |
20 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
21 | #include "wellenreiter.h" | 21 | #include "wellenreiter.h" |
22 | #include "scanlist.h" | 22 | #include "scanlist.h" |
23 | 23 | ||
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qdatastream.h> | 25 | #include <qdatastream.h> |
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | #include <qfileinfo.h> | 27 | #include <qfileinfo.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qiconset.h> | 31 | #include <qiconset.h> |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qstatusbar.h> | 36 | #include <qstatusbar.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qtextstream.h> | 38 | #include <qtextstream.h> |
39 | #include <qtoolbutton.h> | 39 | #include <qtoolbutton.h> |
40 | #include <qwhatsthis.h> | ||
40 | 41 | ||
41 | #ifdef QWS | 42 | #ifdef QWS |
42 | #include <qpe/resource.h> | 43 | #include <qpe/resource.h> |
43 | #include <opie2/ofiledialog.h> | 44 | #include <opie2/ofiledialog.h> |
44 | using namespace Opie; | 45 | using namespace Opie; |
45 | #else | 46 | #else |
46 | #include "resource.h" | 47 | #include "resource.h" |
47 | #include <qapplication.h> | 48 | #include <qapplication.h> |
48 | #include <qfiledialog.h> | 49 | #include <qfiledialog.h> |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | #include <unistd.h> | 52 | #include <unistd.h> |
52 | 53 | ||
53 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) | 54 | WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) |
54 | :QMainWindow( parent, name, f ) | 55 | :QMainWindow( parent, name, f ) |
55 | { | 56 | { |
56 | cw = new WellenreiterConfigWindow( this ); | 57 | cw = new WellenreiterConfigWindow( this ); |
57 | mw = new Wellenreiter( this ); | 58 | mw = new Wellenreiter( this ); |
58 | mw->setConfigWindow( cw ); | 59 | mw->setConfigWindow( cw ); |
59 | setCentralWidget( mw ); | 60 | setCentralWidget( mw ); |
60 | 61 | ||
61 | // setup application icon | 62 | // setup application icon |
62 | 63 | ||
63 | #ifndef QWS | ||
64 | setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); | 64 | setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); |
65 | #ifndef QWS | ||
65 | setIconText( "Wellenreiter/X11" ); | 66 | setIconText( "Wellenreiter/X11" ); |
66 | #endif | 67 | #endif |
67 | 68 | ||
68 | // setup tool buttons | 69 | // setup tool buttons |
69 | 70 | ||
70 | startButton = new QToolButton( 0 ); | 71 | startButton = new QToolButton( 0 ); |
72 | QWhatsThis::add( startButton, tr( "Click here to start scanning." ) ); | ||
71 | #ifdef QWS | 73 | #ifdef QWS |
72 | startButton->setAutoRaise( true ); | 74 | startButton->setAutoRaise( true ); |
73 | #endif | 75 | #endif |
74 | startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); | 76 | startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); |
75 | startButton->setEnabled( false ); | 77 | startButton->setEnabled( false ); |
76 | connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); | 78 | connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); |
77 | 79 | ||
78 | stopButton = new QToolButton( 0 ); | 80 | stopButton = new QToolButton( 0 ); |
81 | QWhatsThis::add( stopButton, tr( "Click here to stop scanning." ) ); | ||
79 | #ifdef QWS | 82 | #ifdef QWS |
80 | stopButton->setAutoRaise( true ); | 83 | stopButton->setAutoRaise( true ); |
81 | #endif | 84 | #endif |
82 | stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); | 85 | stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); |
83 | stopButton->setEnabled( false ); | 86 | stopButton->setEnabled( false ); |
84 | connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); | 87 | connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); |
85 | 88 | ||
86 | QToolButton* d = new QToolButton( 0 ); | 89 | QToolButton* d = new QToolButton( 0 ); |
90 | QWhatsThis::add( d, tr( "Click here to open the configure dialog." ) ), | ||
87 | #ifdef QWS | 91 | #ifdef QWS |
88 | d->setAutoRaise( true ); | 92 | d->setAutoRaise( true ); |
89 | #endif | 93 | #endif |
90 | d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); | 94 | d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); |
91 | connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); | 95 | connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); |
92 | 96 | ||
93 | uploadButton = new QToolButton( 0 ); | 97 | uploadButton = new QToolButton( 0 ); |
98 | QWhatsThis::add( uploadButton, tr( "Click here to upload a capture session." ) ); | ||
94 | #ifdef QWS | 99 | #ifdef QWS |
95 | uploadButton->setAutoRaise( true ); | 100 | uploadButton->setAutoRaise( true ); |
96 | #endif | 101 | #endif |
97 | uploadButton->setIconSet( Resource::loadIconSet( "up" ) ); | 102 | uploadButton->setIconSet( Resource::loadIconSet( "up" ) ); |
98 | uploadButton->setEnabled( false ); | 103 | uploadButton->setEnabled( false ); |
99 | //uploadButton->setEnabled( true ); // DEBUGGING | 104 | //uploadButton->setEnabled( true ); // DEBUGGING |
100 | connect( uploadButton, SIGNAL( clicked() ), this, SLOT( uploadSession() ) ); | 105 | connect( uploadButton, SIGNAL( clicked() ), this, SLOT( uploadSession() ) ); |
101 | 106 | ||
102 | // setup menu bar | 107 | // setup menu bar |
103 | 108 | ||
104 | int id; | 109 | int id; |
105 | 110 | ||
106 | QMenuBar* mb = menuBar(); | 111 | QMenuBar* mb = menuBar(); |
107 | 112 | ||
108 | QPopupMenu* fileSave = new QPopupMenu( mb ); | 113 | QPopupMenu* fileSave = new QPopupMenu( mb ); |
109 | fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); | 114 | fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); |
110 | fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); | 115 | fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); |
111 | fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); | 116 | fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); |
112 | 117 | ||
113 | QPopupMenu* fileLoad = new QPopupMenu( mb ); | 118 | QPopupMenu* fileLoad = new QPopupMenu( mb ); |
114 | fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); | 119 | fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); |
115 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); | 120 | //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); |
116 | 121 | ||
117 | QPopupMenu* file = new QPopupMenu( mb ); | 122 | QPopupMenu* file = new QPopupMenu( mb ); |
118 | file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); | 123 | file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); |
119 | id = file->insertItem( tr( "&Load" ), fileLoad ); | 124 | id = file->insertItem( tr( "&Load" ), fileLoad ); |
120 | file->insertItem( tr( "&Save" ), fileSave ); | 125 | file->insertItem( tr( "&Save" ), fileSave ); |
121 | file->insertSeparator(); | 126 | file->insertSeparator(); |
122 | uploadID = file->insertItem( tr( "&Upload Session" ), this, SLOT( uploadSession() ) ); | 127 | uploadID = file->insertItem( tr( "&Upload Session" ), this, SLOT( uploadSession() ) ); |
123 | file->insertSeparator(); | 128 | file->insertSeparator(); |
124 | file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); | 129 | file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); |
125 | 130 | ||
126 | QPopupMenu* view = new QPopupMenu( mb ); | ||
127 | view->insertItem( tr( "&Configure..." ) ); | ||
128 | |||
129 | QPopupMenu* sniffer = new QPopupMenu( mb ); | 131 | QPopupMenu* sniffer = new QPopupMenu( mb ); |
130 | sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); | 132 | sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); |
131 | sniffer->insertSeparator(); | 133 | sniffer->insertSeparator(); |
132 | startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); | 134 | startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); |
133 | sniffer->setItemEnabled( startID, false ); | 135 | sniffer->setItemEnabled( startID, false ); |
134 | stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); | 136 | stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); |
135 | sniffer->setItemEnabled( stopID, false ); | 137 | sniffer->setItemEnabled( stopID, false ); |
136 | 138 | ||
139 | QPopupMenu* view = new QPopupMenu( mb ); | ||
140 | view->insertItem( tr( "&Expand All" ), this, SLOT( viewExpandAll() ) ); | ||
141 | view->insertItem( tr( "&Collapse All" ), this, SLOT( viewCollapseAll() ) ); | ||
142 | |||
137 | QPopupMenu* demo = new QPopupMenu( mb ); | 143 | QPopupMenu* demo = new QPopupMenu( mb ); |
138 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); | 144 | demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); |
139 | //demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); | 145 | //demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); |
140 | 146 | ||
141 | id = mb->insertItem( tr( "&File" ), file ); | 147 | id = mb->insertItem( tr( "&File" ), file ); |
142 | //id = mb->insertItem( tr( "&View" ), view ); | 148 | |
149 | id = mb->insertItem( tr( "&View" ), view ); | ||
143 | //mb->setItemEnabled( id, false ); | 150 | //mb->setItemEnabled( id, false ); |
151 | |||
144 | id = mb->insertItem( tr( "&Sniffer" ), sniffer ); | 152 | id = mb->insertItem( tr( "&Sniffer" ), sniffer ); |
145 | 153 | ||
146 | id = mb->insertItem( tr( "&Demo" ), demo ); | 154 | id = mb->insertItem( tr( "&Demo" ), demo ); |
147 | mb->setItemEnabled( id, true ); | 155 | mb->setItemEnabled( id, true ); |
148 | mb->setItemEnabled( uploadID, false ); | 156 | mb->setItemEnabled( uploadID, false ); |
149 | 157 | ||
150 | #ifdef QWS | 158 | #ifdef QWS |
151 | mb->insertItem( startButton ); | 159 | mb->insertItem( startButton ); |
152 | mb->insertItem( stopButton ); | 160 | mb->insertItem( stopButton ); |
153 | mb->insertItem( uploadButton ); | 161 | mb->insertItem( uploadButton ); |
154 | mb->insertItem( d ); | 162 | mb->insertItem( d ); |
155 | #else // Qt3 changed the insertion order. It's now totally random :( | 163 | #else // Qt3 changed the insertion order. It's now totally random :( |
156 | mb->insertItem( d ); | 164 | mb->insertItem( d ); |
157 | mb->insertItem( uploadButton ); | 165 | mb->insertItem( uploadButton ); |
158 | mb->insertItem( stopButton ); | 166 | mb->insertItem( stopButton ); |
159 | mb->insertItem( startButton ); | 167 | mb->insertItem( startButton ); |
160 | #endif | 168 | #endif |
161 | 169 | ||
162 | updateToolButtonState(); | 170 | updateToolButtonState(); |
163 | 171 | ||
164 | // setup status bar (for now only on X11) | 172 | // setup status bar (for now only on X11) |
165 | 173 | ||
166 | #ifndef QWS | 174 | #ifndef QWS |
167 | statusBar()->message( tr( "Ready." ) ); | 175 | statusBar()->message( tr( "Ready." ) ); |
168 | #endif | 176 | #endif |
169 | 177 | ||
170 | connect( mw, SIGNAL( startedSniffing() ), this, SLOT( changedSniffingState() ) ); | 178 | connect( mw, SIGNAL( startedSniffing() ), this, SLOT( changedSniffingState() ) ); |
171 | connect( mw, SIGNAL( stoppedSniffing() ), this, SLOT( changedSniffingState() ) ); | 179 | connect( mw, SIGNAL( stoppedSniffing() ), this, SLOT( changedSniffingState() ) ); |
172 | }; | 180 | }; |
173 | 181 | ||
174 | 182 | ||
175 | 183 | ||
176 | void WellenreiterMainWindow::showConfigure() | 184 | void WellenreiterMainWindow::showConfigure() |
177 | { | 185 | { |
178 | qDebug( "show configure..." ); | 186 | qDebug( "show configure..." ); |
179 | cw->setCaption( tr( "Configure" ) ); | 187 | cw->setCaption( tr( "Configure" ) ); |
180 | int result = QPEApplication::execDialog( cw ); | 188 | int result = QPEApplication::execDialog( cw ); |
181 | 189 | ||
182 | if ( result ) updateToolButtonState(); | 190 | if ( result ) updateToolButtonState(); |
183 | } | 191 | } |
184 | 192 | ||
185 | 193 | ||
186 | void WellenreiterMainWindow::updateToolButtonState() | 194 | void WellenreiterMainWindow::updateToolButtonState() |
187 | { | 195 | { |
188 | const QString& interface = cw->interfaceName->currentText(); | 196 | const QString& interface = cw->interfaceName->currentText(); |
189 | const int cardtype = cw->driverType(); | 197 | const int cardtype = cw->driverType(); |
190 | 198 | ||
191 | if ( ( interface != "<select>" ) && ( cardtype != 0 ) ) | 199 | if ( ( interface != "<select>" ) && ( cardtype != 0 ) ) |
192 | { | 200 | { |
193 | startButton->setEnabled( true ); | 201 | startButton->setEnabled( true ); |
194 | menuBar()->setItemEnabled( startID, true ); | 202 | menuBar()->setItemEnabled( startID, true ); |
195 | } | 203 | } |
196 | else | 204 | else |
197 | { | 205 | { |
198 | startButton->setEnabled( false ); | 206 | startButton->setEnabled( false ); |
199 | menuBar()->setItemEnabled( startID, false ); | 207 | menuBar()->setItemEnabled( startID, false ); |
200 | } | 208 | } |
201 | } | 209 | } |
202 | 210 | ||
203 | 211 | ||
204 | void WellenreiterMainWindow::changedSniffingState() | 212 | void WellenreiterMainWindow::changedSniffingState() |
205 | { | 213 | { |
206 | startButton->setEnabled( !mw->sniffing ); | 214 | startButton->setEnabled( !mw->sniffing ); |
207 | menuBar()->setItemEnabled( startID, !mw->sniffing ); | 215 | menuBar()->setItemEnabled( startID, !mw->sniffing ); |
208 | stopButton->setEnabled( mw->sniffing ); | 216 | stopButton->setEnabled( mw->sniffing ); |
209 | menuBar()->setItemEnabled( stopID, mw->sniffing ); | 217 | menuBar()->setItemEnabled( stopID, mw->sniffing ); |
210 | 218 | ||
211 | if ( !mw->sniffing ) | 219 | if ( !mw->sniffing ) |
212 | { | 220 | { |
213 | menuBar()->setItemEnabled( uploadID, true ); | 221 | menuBar()->setItemEnabled( uploadID, true ); |
214 | uploadButton->setEnabled( true ); | 222 | uploadButton->setEnabled( true ); |
215 | } | 223 | } |
216 | } | 224 | } |
217 | 225 | ||
218 | 226 | ||
219 | WellenreiterMainWindow::~WellenreiterMainWindow() | 227 | WellenreiterMainWindow::~WellenreiterMainWindow() |
220 | { | 228 | { |
221 | qDebug( "Wellenreiter: bye." ); | 229 | qDebug( "Wellenreiter: bye." ); |
222 | }; | 230 | }; |
223 | 231 | ||
224 | 232 | ||
225 | void WellenreiterMainWindow::demoAddStations() | 233 | void WellenreiterMainWindow::demoAddStations() |
226 | { | 234 | { |
227 | //mw = 0; // test SIGSEGV handling | 235 | //mw = 0; // test SIGSEGV handling |
228 | 236 | ||
229 | mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:00:20:EF:A6:43"), true, 6, 80, GpsLocation( 39.8794, -94.0936) ); | 237 | mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:00:20:EF:A6:43"), true, 6, 80, GpsLocation( 39.8794, -94.0936) ); |
230 | mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:30:6D:EF:A6:23"), true, 11, 10, GpsLocation( 0.0, 0.0 ) ); | 238 | mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:30:6D:EF:A6:23"), true, 11, 10, GpsLocation( 0.0, 0.0 ) ); |
231 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:03:F8:E7:16:22"), false, 3, 10, GpsLocation( 5.5, 2.3 ) ); | 239 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:03:F8:E7:16:22"), false, 3, 10, GpsLocation( 5.5, 2.3 ) ); |
232 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:04:01:E7:56:62"), false, 3, 15, GpsLocation( 2.3, 5.5 ) ); | 240 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:04:01:E7:56:62"), false, 3, 15, GpsLocation( 2.3, 5.5 ) ); |
233 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:05:8E:E7:56:E2"), false, 3, 20, GpsLocation( -10.0, -20.5 ) ); | 241 | mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:05:8E:E7:56:E2"), false, 3, 20, GpsLocation( -10.0, -20.5 ) ); |
234 | } | 242 | } |
235 | 243 | ||
236 | 244 | ||
237 | void WellenreiterMainWindow::demoReadFromGps() | 245 | void WellenreiterMainWindow::demoReadFromGps() |
238 | { | 246 | { |
239 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); | 247 | WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); |
240 | GPS* gps = new GPS( this ); | 248 | GPS* gps = new GPS( this ); |
241 | qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 249 | qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
242 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 250 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
243 | GpsLocation loc = gps->position(); | 251 | GpsLocation loc = gps->position(); |
244 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); | 252 | QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); |
245 | delete gps; | 253 | delete gps; |
246 | } | 254 | } |
247 | 255 | ||
248 | 256 | ||
249 | QString WellenreiterMainWindow::getFileName( bool save ) | 257 | QString WellenreiterMainWindow::getFileName( bool save ) |
250 | { | 258 | { |
251 | QMap<QString, QStringList> map; | 259 | QMap<QString, QStringList> map; |
252 | map.insert( tr("All"), QStringList() ); | 260 | map.insert( tr("All"), QStringList() ); |
253 | QStringList text; | 261 | QStringList text; |
254 | text << "text/*"; | 262 | text << "text/*"; |
255 | map.insert( tr("Text"), text ); | 263 | map.insert( tr("Text"), text ); |
256 | text << "*"; | 264 | text << "*"; |
257 | map.insert( tr("All"), text ); | 265 | map.insert( tr("All"), text ); |
258 | 266 | ||
259 | QString str; | 267 | QString str; |
260 | if ( save ) | 268 | if ( save ) |
261 | { | 269 | { |
262 | #ifdef QWS | 270 | #ifdef QWS |
263 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); | 271 | str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); |
264 | #else | 272 | #else |
265 | str = QFileDialog::getSaveFileName(); | 273 | str = QFileDialog::getSaveFileName(); |
266 | #endif | 274 | #endif |
267 | if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ ) | 275 | if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ ) |
268 | return ""; | 276 | return ""; |
269 | } | 277 | } |
270 | else | 278 | else |
271 | { | 279 | { |
272 | #ifdef QWS | 280 | #ifdef QWS |
273 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); | 281 | str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); |
274 | #else | 282 | #else |
275 | str = QFileDialog::getOpenFileName(); | 283 | str = QFileDialog::getOpenFileName(); |
276 | #endif | 284 | #endif |
277 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) | 285 | if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) |
278 | return ""; | 286 | return ""; |
279 | } | 287 | } |
280 | return str; | 288 | return str; |
281 | } | 289 | } |
282 | 290 | ||
283 | 291 | ||
284 | void WellenreiterMainWindow::fileSaveLog() | 292 | void WellenreiterMainWindow::fileSaveLog() |
285 | { | 293 | { |
286 | QString fname = getFileName( true ); | 294 | QString fname = getFileName( true ); |
287 | if ( !fname.isEmpty() ) | 295 | if ( !fname.isEmpty() ) |
288 | { | 296 | { |
289 | QFile f( fname ); | 297 | QFile f( fname ); |
290 | if ( f.open(IO_WriteOnly) ) | 298 | if ( f.open(IO_WriteOnly) ) |
291 | { | 299 | { |
292 | QTextStream t( &f ); | 300 | QTextStream t( &f ); |
293 | t << mw->logWindow()->getLog(); | 301 | t << mw->logWindow()->getLog(); |
294 | f.close(); | 302 | f.close(); |
295 | qDebug( "Saved log to file '%s'", (const char*) fname ); | 303 | qDebug( "Saved log to file '%s'", (const char*) fname ); |
296 | } | 304 | } |
297 | else | 305 | else |
298 | { | 306 | { |
299 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); | 307 | qDebug( "Problem saving log to file '%s'", (const char*) fname ); |
300 | } | 308 | } |
301 | } | 309 | } |
302 | } | 310 | } |
303 | 311 | ||
304 | void WellenreiterMainWindow::fileSaveSession() | 312 | void WellenreiterMainWindow::fileSaveSession() |
305 | { | 313 | { |
306 | QString fname = getFileName( true ); | 314 | QString fname = getFileName( true ); |
307 | if ( !fname.isEmpty() ) | 315 | if ( !fname.isEmpty() ) |
308 | { | 316 | { |
309 | 317 | ||
310 | QFile f( fname ); | 318 | QFile f( fname ); |
311 | if ( f.open(IO_WriteOnly) ) | 319 | if ( f.open(IO_WriteOnly) ) |
312 | { | 320 | { |
313 | QDataStream t( &f ); | 321 | QDataStream t( &f ); |
314 | t << *mw->netView(); | 322 | t << *mw->netView(); |
315 | f.close(); | 323 | f.close(); |
316 | qDebug( "Saved session to file '%s'", (const char*) fname ); | 324 | qDebug( "Saved session to file '%s'", (const char*) fname ); |
317 | } | 325 | } |
318 | else | 326 | else |
319 | { | 327 | { |
320 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); | 328 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); |
321 | } | 329 | } |
322 | } | 330 | } |
323 | } | 331 | } |
324 | 332 | ||
325 | void WellenreiterMainWindow::fileSaveHex() | 333 | void WellenreiterMainWindow::fileSaveHex() |
326 | { | 334 | { |
327 | QString fname = getFileName( true ); | 335 | QString fname = getFileName( true ); |
328 | if ( !fname.isEmpty() ) | 336 | if ( !fname.isEmpty() ) |
329 | { | 337 | { |
330 | QFile f( fname ); | 338 | QFile f( fname ); |
331 | if ( f.open(IO_WriteOnly) ) | 339 | if ( f.open(IO_WriteOnly) ) |
332 | { | 340 | { |
333 | QTextStream t( &f ); | 341 | QTextStream t( &f ); |
334 | t << mw->hexWindow()->getLog(); | 342 | t << mw->hexWindow()->getLog(); |
335 | f.close(); | 343 | f.close(); |
@@ -364,192 +372,202 @@ void WellenreiterMainWindow::fileLoadSession() | |||
364 | 372 | ||
365 | 373 | ||
366 | void WellenreiterMainWindow::fileNew() | 374 | void WellenreiterMainWindow::fileNew() |
367 | { | 375 | { |
368 | mw->netView()->clear(); | 376 | mw->netView()->clear(); |
369 | mw->logWindow()->clear(); | 377 | mw->logWindow()->clear(); |
370 | mw->hexWindow()->clear(); | 378 | mw->hexWindow()->clear(); |
371 | } | 379 | } |
372 | 380 | ||
373 | 381 | ||
374 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) | 382 | void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) |
375 | { | 383 | { |
376 | if ( mw->isDaemonRunning() ) | 384 | if ( mw->isDaemonRunning() ) |
377 | { | 385 | { |
378 | QMessageBox::warning( this, "Wellenreiter/Opie", | 386 | QMessageBox::warning( this, "Wellenreiter/Opie", |
379 | tr( "Sniffing in progress!\nPlease stop sniffing before closing." ) ); | 387 | tr( "Sniffing in progress!\nPlease stop sniffing before closing." ) ); |
380 | e->ignore(); | 388 | e->ignore(); |
381 | } | 389 | } |
382 | else | 390 | else |
383 | { | 391 | { |
384 | QMainWindow::closeEvent( e ); | 392 | QMainWindow::closeEvent( e ); |
385 | } | 393 | } |
386 | } | 394 | } |
387 | 395 | ||
388 | static const char* CAP_hostname = "www.vanille.de"; | 396 | static const char* CAP_hostname = "www.vanille.de"; |
389 | 397 | ||
390 | #include <netdb.h> | 398 | #include <netdb.h> |
391 | #include <unistd.h> | 399 | #include <unistd.h> |
392 | #include <sys/types.h> | 400 | #include <sys/types.h> |
393 | #include <sys/socket.h> | 401 | #include <sys/socket.h> |
394 | 402 | ||
395 | void WellenreiterMainWindow::uploadSession() | 403 | void WellenreiterMainWindow::uploadSession() |
396 | { | 404 | { |
397 | QLineEdit* from; | 405 | QLineEdit* from; |
398 | QLineEdit* location; | 406 | QLineEdit* location; |
399 | QLineEdit* comments; | 407 | QLineEdit* comments; |
400 | QPushButton* accept; | 408 | QPushButton* accept; |
401 | QPushButton* reject; | 409 | QPushButton* reject; |
402 | 410 | ||
403 | QDialog* d = new QDialog( 0, "session upload", true ); | 411 | QDialog* d = new QDialog( 0, "session upload", true ); |
404 | d->setCaption( tr( "Upload Session" ) ); | 412 | d->setCaption( tr( "Upload Session" ) ); |
405 | QGridLayout* g = new QGridLayout( d, 4, 2, 3 ); | 413 | QGridLayout* g = new QGridLayout( d, 4, 2, 3 ); |
406 | g->addWidget( new QLabel( tr( "From: " ), d ), 0, 0 ); | 414 | g->addWidget( new QLabel( tr( "From: " ), d ), 0, 0 ); |
407 | g->addWidget( from = new QLineEdit( d ), 0, 1 ); | 415 | g->addWidget( from = new QLineEdit( d ), 0, 1 ); |
408 | g->addWidget( new QLabel( tr( "Location: " ), d ), 1, 0 ); | 416 | g->addWidget( new QLabel( tr( "Location: " ), d ), 1, 0 ); |
409 | g->addWidget( location = new QLineEdit( d ), 1, 1 ); | 417 | g->addWidget( location = new QLineEdit( d ), 1, 1 ); |
410 | g->addWidget( new QLabel( tr( "Comments: " ), d ), 2, 0 ); | 418 | g->addWidget( new QLabel( tr( "Comments: " ), d ), 2, 0 ); |
411 | g->addWidget( comments = new QLineEdit( d ), 2, 1 ); | 419 | g->addWidget( comments = new QLineEdit( d ), 2, 1 ); |
412 | g->addWidget( accept = new QPushButton( tr( "&Ok" ), d ), 3, 0 ); | 420 | g->addWidget( accept = new QPushButton( tr( "&Ok" ), d ), 3, 0 ); |
413 | g->addWidget( reject = new QPushButton( tr( "&Cancel" ), d ), 3, 1 ); | 421 | g->addWidget( reject = new QPushButton( tr( "&Cancel" ), d ), 3, 1 ); |
414 | accept->setDefault( true ); | 422 | accept->setDefault( true ); |
415 | accept->setAutoDefault( true ); | 423 | accept->setAutoDefault( true ); |
416 | from->setText( "WL II User" ); | 424 | from->setText( "WL II User" ); |
417 | location->setText( "WL II Location" ); | 425 | location->setText( "WL II Location" ); |
418 | comments->setText( "No Comments." ); | 426 | comments->setText( "No Comments." ); |
419 | connect( accept, SIGNAL( clicked() ), d, SLOT( accept() ) ); | 427 | connect( accept, SIGNAL( clicked() ), d, SLOT( accept() ) ); |
420 | connect( reject, SIGNAL( clicked() ), d, SLOT( reject() ) ); | 428 | connect( reject, SIGNAL( clicked() ), d, SLOT( reject() ) ); |
421 | int result = d->exec(); | 429 | int result = d->exec(); |
422 | 430 | ||
423 | if ( !result ) | 431 | if ( !result ) |
424 | { | 432 | { |
425 | qDebug( "Session upload cancelled :(" ); | 433 | qDebug( "Session upload cancelled :(" ); |
426 | return; | 434 | return; |
427 | } | 435 | } |
428 | 436 | ||
429 | qDebug( "Starting upload..." ); | 437 | qDebug( "Starting upload..." ); |
430 | 438 | ||
431 | struct sockaddr_in raddr; | 439 | struct sockaddr_in raddr; |
432 | struct hostent *rhost_info; | 440 | struct hostent *rhost_info; |
433 | int sock = -1; | 441 | int sock = -1; |
434 | bool ok = false; | 442 | bool ok = false; |
435 | 443 | ||
436 | rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); | 444 | rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); |
437 | if ( rhost_info ) | 445 | if ( rhost_info ) |
438 | { | 446 | { |
439 | 447 | ||
440 | 448 | ||
441 | if ( !QFile::exists( mw->captureFileName() ) ) | 449 | if ( !QFile::exists( mw->captureFileName() ) ) |
442 | { | 450 | { |
443 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile '%1' doesn't exist</p>").arg( mw->captureFileName() ) ); | 451 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile '%1' doesn't exist</p>").arg( mw->captureFileName() ) ); |
444 | return; | 452 | return; |
445 | } | 453 | } |
446 | 454 | ||
447 | QFile f( mw->captureFileName() ); | 455 | QFile f( mw->captureFileName() ); |
448 | if ( !f.open( IO_ReadOnly ) ) | 456 | if ( !f.open( IO_ReadOnly ) ) |
449 | { | 457 | { |
450 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile '%1'</p>").arg( mw->captureFileName() ) ); | 458 | QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile '%1'</p>").arg( mw->captureFileName() ) ); |
451 | return; | 459 | return; |
452 | } | 460 | } |
453 | 461 | ||
454 | int content_length = f.size(); | 462 | int content_length = f.size(); |
455 | 463 | ||
456 | ::memset( &raddr, 0, sizeof (struct sockaddr_in) ); | 464 | ::memset( &raddr, 0, sizeof (struct sockaddr_in) ); |
457 | ::memcpy( &raddr. sin_addr, rhost_info-> h_addr, rhost_info-> h_length ); | 465 | ::memcpy( &raddr. sin_addr, rhost_info-> h_addr, rhost_info-> h_length ); |
458 | raddr.sin_family = rhost_info-> h_addrtype; | 466 | raddr.sin_family = rhost_info-> h_addrtype; |
459 | raddr.sin_port = htons ( 80 ); | 467 | raddr.sin_port = htons ( 80 ); |
460 | 468 | ||
461 | sock = ::socket( AF_INET, SOCK_STREAM, 0 ); | 469 | sock = ::socket( AF_INET, SOCK_STREAM, 0 ); |
462 | 470 | ||
463 | if ( sock >= 0 ) | 471 | if ( sock >= 0 ) |
464 | { | 472 | { |
465 | if ( ::connect ( sock, (struct sockaddr *) & raddr, sizeof (struct sockaddr)) >= 0 ) | 473 | if ( ::connect ( sock, (struct sockaddr *) & raddr, sizeof (struct sockaddr)) >= 0 ) |
466 | { | 474 | { |
467 | QString header; | 475 | QString header; |
468 | QString content; | 476 | QString content; |
469 | QString preambel; | 477 | QString preambel; |
470 | 478 | ||
471 | header = "" | 479 | header = "" |
472 | "POST /projects/capturedump.spy HTTP/1.1\r\n" | 480 | "POST /projects/capturedump.spy HTTP/1.1\r\n" |
473 | "Host: www.vanille.de\r\n" | 481 | "Host: www.vanille.de\r\n" |
474 | "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031010 Galeon/1.3.10\r\n" | 482 | "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031010 Galeon/1.3.10\r\n" |
475 | "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n" | 483 | "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n" |
476 | "Accept-Language: en\r\n" | 484 | "Accept-Language: en\r\n" |
477 | "Accept-Encoding: gzip, deflate, compress;q=0.9\r\n" | 485 | "Accept-Encoding: gzip, deflate, compress;q=0.9\r\n" |
478 | "Accept-Charset: us-ascii,utf-8;q=0.7,*;q=0.7\r\n" | 486 | "Accept-Charset: us-ascii,utf-8;q=0.7,*;q=0.7\r\n" |
479 | "Keep-Alive: 300\r\n" | 487 | "Keep-Alive: 300\r\n" |
480 | "Connection: keep-alive\r\n" | 488 | "Connection: keep-alive\r\n" |
481 | "Referer: http://www.vanille.de/projects/capturedump.spy\r\n" | 489 | "Referer: http://www.vanille.de/projects/capturedump.spy\r\n" |
482 | "Content-Type: multipart/form-data; boundary=---------------------------97267758015830030481215568065\r\n" | 490 | "Content-Type: multipart/form-data; boundary=---------------------------97267758015830030481215568065\r\n" |
483 | "Content-Length: %1\r\n" | 491 | "Content-Length: %1\r\n" |
484 | "\r\n"; | 492 | "\r\n"; |
485 | 493 | ||
486 | content = "" | 494 | content = "" |
487 | "-----------------------------97267758015830030481215568065\r\n" | 495 | "-----------------------------97267758015830030481215568065\r\n" |
488 | "Content-Disposition: form-data; name=\"Name\"\r\n" | 496 | "Content-Disposition: form-data; name=\"Name\"\r\n" |
489 | "\r\n" | 497 | "\r\n" |
490 | "%1\r\n" | 498 | "%1\r\n" |
491 | "-----------------------------97267758015830030481215568065\r\n" | 499 | "-----------------------------97267758015830030481215568065\r\n" |
492 | "Content-Disposition: form-data; name=\"Location\"\r\n" | 500 | "Content-Disposition: form-data; name=\"Location\"\r\n" |
493 | "\r\n" | 501 | "\r\n" |
494 | "%2\r\n" | 502 | "%2\r\n" |
495 | "-----------------------------97267758015830030481215568065\r\n" | 503 | "-----------------------------97267758015830030481215568065\r\n" |
496 | "Content-Disposition: form-data; name=\"Comments\"\r\n" | 504 | "Content-Disposition: form-data; name=\"Comments\"\r\n" |
497 | "\r\n" | 505 | "\r\n" |
498 | "%3\r\n" | 506 | "%3\r\n" |
499 | "-----------------------------97267758015830030481215568065\r\n" | 507 | "-----------------------------97267758015830030481215568065\r\n" |
500 | "Content-Disposition: form-data; name=\"upfile\"; filename=\"%4\"\r\n" | 508 | "Content-Disposition: form-data; name=\"upfile\"; filename=\"%4\"\r\n" |
501 | "Content-Type: application/octet-stream\r\n" | 509 | "Content-Type: application/octet-stream\r\n" |
502 | "\r\n"; | 510 | "\r\n"; |
503 | 511 | ||
504 | preambel = "" | 512 | preambel = "" |
505 | "\r\n-----------------------------97267758015830030481215568065--\r\n"; | 513 | "\r\n-----------------------------97267758015830030481215568065--\r\n"; |
506 | 514 | ||
507 | content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); | 515 | content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); |
508 | content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); | 516 | content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); |
509 | content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); | 517 | content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); |
510 | content = content.arg( mw->captureFileName() ); | 518 | content = content.arg( mw->captureFileName() ); |
511 | 519 | ||
512 | header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); | 520 | header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); |
513 | 521 | ||
514 | // write header | 522 | // write header |
515 | 523 | ||
516 | const char* ascii = header.latin1(); | 524 | const char* ascii = header.latin1(); |
517 | uint ascii_len = ::strlen( ascii ); | 525 | uint ascii_len = ::strlen( ascii ); |
518 | ::write ( sock, ascii, ascii_len ); | 526 | ::write ( sock, ascii, ascii_len ); |
519 | 527 | ||
520 | // write fixed content | 528 | // write fixed content |
521 | 529 | ||
522 | ascii = content.latin1(); | 530 | ascii = content.latin1(); |
523 | ascii_len = ::strlen( ascii ); | 531 | ascii_len = ::strlen( ascii ); |
524 | ::write ( sock, ascii, ascii_len ); | 532 | ::write ( sock, ascii, ascii_len ); |
525 | 533 | ||
526 | // write variable content | 534 | // write variable content |
527 | 535 | ||
528 | char ch; | 536 | char ch; |
529 | while ( !f.atEnd() ) | 537 | while ( !f.atEnd() ) |
530 | { | 538 | { |
531 | f.readBlock( &ch, 1 ); | 539 | f.readBlock( &ch, 1 ); |
532 | ::write ( sock, &ch, 1 ); | 540 | ::write ( sock, &ch, 1 ); |
533 | } | 541 | } |
534 | 542 | ||
535 | // write preambel | 543 | // write preambel |
536 | 544 | ||
537 | ascii = preambel.latin1(); | 545 | ascii = preambel.latin1(); |
538 | ascii_len = ::strlen( ascii ); | 546 | ascii_len = ::strlen( ascii ); |
539 | ::write ( sock, ascii, ascii_len ); | 547 | ::write ( sock, ascii, ascii_len ); |
540 | 548 | ||
541 | // done! | 549 | // done! |
542 | 550 | ||
543 | ok = true; | 551 | ok = true; |
544 | } | 552 | } |
545 | } | 553 | } |
546 | ::close ( sock ); | 554 | ::close ( sock ); |
547 | } | 555 | } |
548 | if ( ok ) | 556 | if ( ok ) |
549 | QMessageBox::information( 0, tr( "Success" ), | 557 | QMessageBox::information( 0, tr( "Success" ), |
550 | QString ( "<p>%1</p>" ).arg( tr( "Capture Dump was uploaded to %1" ) ).arg( CAP_hostname ) ); | 558 | QString ( "<p>%1</p>" ).arg( tr( "Capture Dump was uploaded to %1" ) ).arg( CAP_hostname ) ); |
551 | else | 559 | else |
552 | QMessageBox::warning( 0, tr( "Error" ), | 560 | QMessageBox::warning( 0, tr( "Error" ), |
553 | QString ( "<p>%1</p>" ).arg ( tr( "Connection to %1 failed" ) ).arg( CAP_hostname ) ); | 561 | QString ( "<p>%1</p>" ).arg ( tr( "Connection to %1 failed" ) ).arg( CAP_hostname ) ); |
554 | } | 562 | } |
555 | 563 | ||
564 | |||
565 | void WellenreiterMainWindow::viewExpandAll() | ||
566 | { | ||
567 | mw->netView()->expand(); | ||
568 | } | ||
569 | |||
570 | void WellenreiterMainWindow::viewCollapseAll() | ||
571 | { | ||
572 | mw->netView()->collapse(); | ||
573 | } | ||
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h index a5cb7a5..9593241 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.h +++ b/noncore/net/wellenreiter/gui/mainwindow.h | |||
@@ -1,63 +1,66 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef MAINWINDOW_H | 16 | #ifndef MAINWINDOW_H |
17 | #define MAINWINDOW_H | 17 | #define MAINWINDOW_H |
18 | 18 | ||
19 | #include <qmainwindow.h> | 19 | #include <qmainwindow.h> |
20 | 20 | ||
21 | class Wellenreiter; | 21 | class Wellenreiter; |
22 | class WellenreiterConfigWindow; | 22 | class WellenreiterConfigWindow; |
23 | class QIconSet; | 23 | class QIconSet; |
24 | class QToolButton; | 24 | class QToolButton; |
25 | 25 | ||
26 | class WellenreiterMainWindow: public QMainWindow | 26 | class WellenreiterMainWindow: public QMainWindow |
27 | { | 27 | { |
28 | Q_OBJECT | 28 | Q_OBJECT |
29 | 29 | ||
30 | public: | 30 | public: |
31 | WellenreiterMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 ); | 31 | WellenreiterMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 ); |
32 | ~WellenreiterMainWindow(); | 32 | ~WellenreiterMainWindow(); |
33 | QString getFileName( bool save ); | 33 | QString getFileName( bool save ); |
34 | 34 | ||
35 | protected: | 35 | protected: |
36 | Wellenreiter* mw; | 36 | Wellenreiter* mw; |
37 | WellenreiterConfigWindow* cw; | 37 | WellenreiterConfigWindow* cw; |
38 | 38 | ||
39 | QToolButton* startButton; | 39 | QToolButton* startButton; |
40 | QToolButton* stopButton; | 40 | QToolButton* stopButton; |
41 | QToolButton* uploadButton; | 41 | QToolButton* uploadButton; |
42 | int startID; | 42 | int startID; |
43 | int stopID; | 43 | int stopID; |
44 | int uploadID; | 44 | int uploadID; |
45 | 45 | ||
46 | protected: | 46 | protected: |
47 | virtual void closeEvent( QCloseEvent* ); | 47 | virtual void closeEvent( QCloseEvent* ); |
48 | void updateToolButtonState(); | 48 | void updateToolButtonState(); |
49 | 49 | ||
50 | public slots: | 50 | public slots: |
51 | void showConfigure(); | 51 | void showConfigure(); |
52 | void demoAddStations(); | 52 | void demoAddStations(); |
53 | void demoReadFromGps(); | 53 | void demoReadFromGps(); |
54 | void fileSaveLog(); | 54 | void fileSaveLog(); |
55 | void fileSaveHex(); | 55 | void fileSaveHex(); |
56 | void fileSaveSession(); | 56 | void fileSaveSession(); |
57 | void fileLoadSession(); | 57 | void fileLoadSession(); |
58 | void fileNew(); | 58 | void fileNew(); |
59 | void uploadSession(); | 59 | void uploadSession(); |
60 | void changedSniffingState(); | 60 | void changedSniffingState(); |
61 | |||
62 | void viewExpandAll(); | ||
63 | void viewCollapseAll(); | ||
61 | }; | 64 | }; |
62 | 65 | ||
63 | #endif | 66 | #endif |
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp index ed22bdd..635e174 100644 --- a/noncore/net/wellenreiter/gui/protolistview.cpp +++ b/noncore/net/wellenreiter/gui/protolistview.cpp | |||
@@ -1,120 +1,120 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | /* LOCAL */ | 16 | /* LOCAL */ |
17 | #include "protolistview.h" | 17 | #include "protolistview.h" |
18 | 18 | ||
19 | #include <qcheckbox.h> | 19 | #include <qcheckbox.h> |
20 | #include <qcombobox.h> | 20 | #include <qcombobox.h> |
21 | #include <qvbox.h> | 21 | #include <qvbox.h> |
22 | #include <qlabel.h> | 22 | #include <qlabel.h> |
23 | 23 | ||
24 | ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) | 24 | ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) |
25 | :QScrollView( parent, name, f ) | 25 | :QScrollView( parent, name, f ) |
26 | { | 26 | { |
27 | parse = ( QString( "parsePackets" ) == QString( name ) ); | 27 | parse = ( QString( "parsePackets" ) == QString( name ) ); |
28 | 28 | ||
29 | setMargins( 3, 3, 0, 0 ); | 29 | setMargins( 3, 3, 0, 0 ); |
30 | viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); | 30 | viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) ); |
31 | 31 | ||
32 | vbox = new QVBox( viewport() ); | 32 | vbox = new QVBox( viewport() ); |
33 | vbox->setSpacing( 1 ); | 33 | vbox->setSpacing( 1 ); |
34 | addChild( vbox ); | 34 | addChild( vbox ); |
35 | 35 | ||
36 | QHBox* hbox = new QHBox( vbox ); | 36 | QHBox* hbox = new QHBox( vbox ); |
37 | hbox->setSpacing( 40 ); | 37 | hbox->setSpacing( 40 ); |
38 | new QLabel( tr( "Protocol Family" ), hbox ); | 38 | new QLabel( tr( "Protocol Family" ), hbox ); |
39 | new QLabel( tr( "Perform Action" ), hbox ); | 39 | new QLabel( tr( "Perform Action" ), hbox ); |
40 | QFrame* frame = new QFrame( vbox ); | 40 | QFrame* frame = new QFrame( vbox ); |
41 | frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); | 41 | frame->setFrameStyle( QFrame::HLine + QFrame::Sunken ); |
42 | 42 | ||
43 | //TODO: hardcoded for now...a protocol database would be nice!? | 43 | //TODO: hardcoded for now...a protocol database would be nice!? |
44 | 44 | ||
45 | //addProtocol( "Ethernet" ); | 45 | //addProtocol( "Ethernet" ); |
46 | addProtocol( "Prism" ); | 46 | addProtocol( "Prism" ); |
47 | //addProtocol( "802.11" ); | 47 | //addProtocol( "802.11" ); |
48 | addProtocol( "802.11 Management" ); | 48 | addProtocol( "802.11 Management" ); |
49 | addProtocol( "802.11 SSID" ); | 49 | addProtocol( "802.11 SSID" ); |
50 | addProtocol( "802.11 Rates" ); | 50 | addProtocol( "802.11 Rates" ); |
51 | addProtocol( "802.11 CF" ); | 51 | addProtocol( "802.11 CF" ); |
52 | addProtocol( "802.11 FH" ); | 52 | addProtocol( "802.11 FH" ); |
53 | addProtocol( "802.11 DS" ); | 53 | addProtocol( "802.11 DS" ); |
54 | addProtocol( "802.11 Tim" ); | 54 | addProtocol( "802.11 Tim" ); |
55 | addProtocol( "802.11 IBSS" ); | 55 | addProtocol( "802.11 IBSS" ); |
56 | addProtocol( "802.11 Challenge" ); | 56 | addProtocol( "802.11 Challenge" ); |
57 | addProtocol( "802.11 Data" ); | 57 | addProtocol( "802.11 Data" ); |
58 | addProtocol( "802.11 LLC" ); | 58 | addProtocol( "802.11 LLC" ); |
59 | addProtocol( "802.11 Data" ); | 59 | addProtocol( "802.11 Data" ); |
60 | addProtocol( "IP" ); | 60 | addProtocol( "IP" ); |
61 | addProtocol( "ARP" ); | 61 | addProtocol( "ARP" ); |
62 | addProtocol( "UDP" ); | 62 | addProtocol( "UDP" ); |
63 | addProtocol( "TCP" ); | 63 | addProtocol( "TCP" ); |
64 | } | 64 | } |
65 | 65 | ||
66 | 66 | ||
67 | ProtocolListView::~ProtocolListView() | 67 | ProtocolListView::~ProtocolListView() |
68 | { | 68 | { |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | void ProtocolListView::addProtocol( const QString& name ) | 72 | void ProtocolListView::addProtocol( const QString& name ) |
73 | { | 73 | { |
74 | QHBox* hbox = new QHBox( vbox ); | 74 | QHBox* hbox = new QHBox( vbox ); |
75 | new QCheckBox( name, hbox, (const char*) name ); | 75 | new QCheckBox( name, hbox, (const char*) name ); |
76 | 76 | ||
77 | if ( parse ) | 77 | if ( parse ) |
78 | { | 78 | { |
79 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); | 79 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); |
80 | #ifdef QWS | 80 | #ifdef QWS |
81 | combo->setFixedWidth( 75 ); | 81 | combo->setFixedWidth( 75 ); |
82 | #endif | 82 | #endif |
83 | combo->insertItem( "Pass" ); | 83 | combo->insertItem( "Pass" ); |
84 | combo->insertItem( "Discard!" ); | 84 | combo->insertItem( "Discard!" ); |
85 | combo->insertItem( "TouchSound" ); | 85 | combo->insertItem( "TouchSound" ); |
86 | combo->insertItem( "AlarmSound" ); | 86 | combo->insertItem( "AlarmSound" ); |
87 | combo->insertItem( "KeySound" ); | 87 | combo->insertItem( "KeySound" ); |
88 | combo->insertItem( "LedOn" ); | 88 | combo->insertItem( "LedOn" ); |
89 | combo->insertItem( "LedOff" ); | 89 | combo->insertItem( "LedOff" ); |
90 | combo->insertItem( "LogMessage" ); | 90 | combo->insertItem( "LogMessage" ); |
91 | combo->insertItem( "MessageBox" ); | 91 | combo->insertItem( "MessageBox" ); |
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
95 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); | 95 | QComboBox* combo = new QComboBox( hbox, (const char*) name ); |
96 | #ifdef QWS | 96 | #ifdef QWS |
97 | combo->setFixedWidth( 75 ); | 97 | combo->setFixedWidth( 75 ); |
98 | #endif | 98 | #endif |
99 | combo->insertItem( "Pass" ); | 99 | combo->insertItem( "Pass" ); |
100 | combo->insertItem( "Discard!" ); | 100 | combo->insertItem( "Discard!" ); |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
105 | bool ProtocolListView::isProtocolChecked( const QString& name ) | 105 | bool ProtocolListView::isProtocolChecked( const QString& name ) |
106 | { | 106 | { |
107 | QCheckBox* box = (QCheckBox*) child( (const char*) name ); | 107 | QCheckBox* box = (QCheckBox*) child( (const char*) name ); |
108 | return ( box && box->isOn() ); | 108 | return ( box && box->isOn() ); |
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
112 | QString ProtocolListView::protocolAction( const QString& name ) | 112 | QString ProtocolListView::protocolAction( const QString& name ) |
113 | { | 113 | { |
114 | QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" ); | 114 | QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" ); |
115 | if ( combo ) | 115 | if ( combo ) |
116 | return combo->currentText(); | 116 | return combo->currentText(); |
117 | else | 117 | else |
118 | return "<unknown>"; | 118 | return "<unknown>"; |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h index 8b460cb..11f4375 100644 --- a/noncore/net/wellenreiter/gui/protolistview.h +++ b/noncore/net/wellenreiter/gui/protolistview.h | |||
@@ -1,45 +1,45 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef PROTOLISTVIEW_H | 16 | #ifndef PROTOLISTVIEW_H |
17 | #define PROTOLISTVIEW_H | 17 | #define PROTOLISTVIEW_H |
18 | 18 | ||
19 | #include <qscrollview.h> | 19 | #include <qscrollview.h> |
20 | #include <qdict.h> | 20 | #include <qdict.h> |
21 | class QCheckBox; | 21 | class QCheckBox; |
22 | class QComboBox; | 22 | class QComboBox; |
23 | 23 | ||
24 | class QVBox; | 24 | class QVBox; |
25 | 25 | ||
26 | class ProtocolListView : public QScrollView | 26 | class ProtocolListView : public QScrollView |
27 | { | 27 | { |
28 | public: | 28 | public: |
29 | ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); | 29 | ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); |
30 | virtual ~ProtocolListView(); | 30 | virtual ~ProtocolListView(); |
31 | 31 | ||
32 | bool isProtocolChecked( const QString& name ); | 32 | bool isProtocolChecked( const QString& name ); |
33 | QString protocolAction( const QString& name ); | 33 | QString protocolAction( const QString& name ); |
34 | 34 | ||
35 | protected: | 35 | protected: |
36 | virtual void addProtocol( const QString& name ); | 36 | virtual void addProtocol( const QString& name ); |
37 | 37 | ||
38 | private: | 38 | private: |
39 | QVBox* vbox; | 39 | QVBox* vbox; |
40 | bool parse; | 40 | bool parse; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | 43 | ||
44 | 44 | ||
45 | #endif // PROTOLISTVIEW_H | 45 | #endif // PROTOLISTVIEW_H |
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp index 5e5ddc6..d98ef0b 100644 --- a/noncore/net/wellenreiter/gui/resource.cpp +++ b/noncore/net/wellenreiter/gui/resource.cpp | |||
@@ -1,49 +1,49 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "resource.h" | 16 | #include "resource.h" |
17 | 17 | ||
18 | #define PIXMAPPATH "/usr/local/share" | 18 | #define PIXMAPPATH "/usr/local/share" |
19 | 19 | ||
20 | #include <qiconset.h> | 20 | #include <qiconset.h> |
21 | 21 | ||
22 | namespace Resource | 22 | namespace Resource |
23 | { | 23 | { |
24 | 24 | ||
25 | QPixmap loadPixmap( const QString& pix ) | 25 | QPixmap loadPixmap( const QString& pix ) |
26 | { | 26 | { |
27 | QString filename; | 27 | QString filename; |
28 | filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); | 28 | filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); |
29 | QPixmap pixmap( filename ); | 29 | QPixmap pixmap( filename ); |
30 | if ( pixmap.isNull() ) | 30 | if ( pixmap.isNull() ) |
31 | { | 31 | { |
32 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 32 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); |
33 | } | 33 | } |
34 | return pixmap; | 34 | return pixmap; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | QIconSet loadIconSet( const QString& pix ) | 37 | QIconSet loadIconSet( const QString& pix ) |
38 | { | 38 | { |
39 | QString filename; | 39 | QString filename; |
40 | filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); | 40 | filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); |
41 | QPixmap pixmap( filename ); | 41 | QPixmap pixmap( filename ); |
42 | if ( pixmap.isNull() ) | 42 | if ( pixmap.isNull() ) |
43 | { | 43 | { |
44 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); | 44 | qDebug( "Wellenreiter::Resource: can't find pixmap " + filename ); |
45 | } | 45 | } |
46 | return QIconSet( pixmap ); | 46 | return QIconSet( pixmap ); |
47 | }; | 47 | }; |
48 | 48 | ||
49 | }; | 49 | }; |
diff --git a/noncore/net/wellenreiter/gui/resource.h b/noncore/net/wellenreiter/gui/resource.h index 8788c6e..85490b3 100644 --- a/noncore/net/wellenreiter/gui/resource.h +++ b/noncore/net/wellenreiter/gui/resource.h | |||
@@ -1,30 +1,30 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef RESOURCE_H | 16 | #ifndef RESOURCE_H |
17 | #define RESOURCE_H | 17 | #define RESOURCE_H |
18 | 18 | ||
19 | #include <qstring.h> | 19 | #include <qstring.h> |
20 | 20 | ||
21 | class QPixmap; | 21 | class QPixmap; |
22 | class QIconSet; | 22 | class QIconSet; |
23 | 23 | ||
24 | namespace Resource | 24 | namespace Resource |
25 | { | 25 | { |
26 | QPixmap loadPixmap( const QString& ); | 26 | QPixmap loadPixmap( const QString& ); |
27 | QIconSet loadIconSet( const QString& ); | 27 | QIconSet loadIconSet( const QString& ); |
28 | } | 28 | } |
29 | 29 | ||
30 | #endif // RESOURCE_H | 30 | #endif // RESOURCE_H |
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index c75f9b1..6005818 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -1,244 +1,243 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | 19 | ||
20 | #include <assert.h> | 20 | #include <assert.h> |
21 | #include <qcursor.h> | 21 | #include <qcursor.h> |
22 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
23 | #include <qpopupmenu.h> | 23 | #include <qpopupmenu.h> |
24 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | 25 | ||
26 | #ifdef QWS | 26 | #ifdef QWS |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #ifdef QWS | 30 | #ifdef QWS |
31 | #include <qpe/resource.h> | 31 | #include <qpe/resource.h> |
32 | #else | 32 | #else |
33 | #include "resource.h" | 33 | #include "resource.h" |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | const int col_type = 0; | 36 | const int col_type = 0; |
37 | const int col_essid = 0; | 37 | const int col_essid = 0; |
38 | const int col_sig = 1; | 38 | const int col_sig = 1; |
39 | const int col_ap = 2; | 39 | const int col_ap = 2; |
40 | const int col_channel = 3; | 40 | const int col_channel = 3; |
41 | const int col_wep = 4; | 41 | const int col_wep = 4; |
42 | const int col_traffic = 5; | 42 | const int col_traffic = 5; |
43 | const int col_ip = 6; | 43 | const int col_ip = 6; |
44 | const int col_manuf = 7; | 44 | const int col_manuf = 7; |
45 | const int col_firstseen = 8; | 45 | const int col_firstseen = 8; |
46 | const int col_lastseen = 9; | 46 | const int col_lastseen = 9; |
47 | const int col_location = 10; | 47 | const int col_location = 10; |
48 | 48 | ||
49 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 49 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
50 | :OListView( parent, name ) | 50 | :OListView( parent, name ) |
51 | { | 51 | { |
52 | |||
53 | setFrameShape( QListView::StyledPanel ); | 52 | setFrameShape( QListView::StyledPanel ); |
54 | setFrameShadow( QListView::Sunken ); | 53 | setFrameShadow( QListView::Sunken ); |
55 | 54 | ||
56 | addColumn( tr( "Net/Station" ) ); | 55 | addColumn( tr( "Net/Station" ) ); |
57 | setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); | 56 | setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); |
58 | addColumn( tr( "#" ) ); | 57 | addColumn( tr( "#" ) ); |
59 | setColumnAlignment( col_sig, AlignCenter ); | 58 | setColumnAlignment( col_sig, AlignCenter ); |
60 | addColumn( tr( "MAC" ) ); | 59 | addColumn( tr( "MAC" ) ); |
61 | setColumnAlignment( col_ap, AlignCenter ); | 60 | setColumnAlignment( col_ap, AlignCenter ); |
62 | addColumn( tr( "Chn" ) ); | 61 | addColumn( tr( "Chn" ) ); |
63 | setColumnAlignment( col_channel, AlignCenter ); | 62 | setColumnAlignment( col_channel, AlignCenter ); |
64 | addColumn( tr( "W" ) ); | 63 | addColumn( tr( "W" ) ); |
65 | setColumnAlignment( col_wep, AlignCenter ); | 64 | setColumnAlignment( col_wep, AlignCenter ); |
66 | addColumn( tr( "T" ) ); | 65 | addColumn( tr( "T" ) ); |
67 | setColumnAlignment( col_traffic, AlignCenter ); | 66 | setColumnAlignment( col_traffic, AlignCenter ); |
68 | addColumn( tr( "IP" ) ); | 67 | addColumn( tr( "IP" ) ); |
69 | setColumnAlignment( col_ip, AlignCenter ); | 68 | setColumnAlignment( col_ip, AlignCenter ); |
70 | addColumn( tr( "Manufacturer" ) ); | 69 | addColumn( tr( "Manufacturer" ) ); |
71 | setColumnAlignment( col_manuf, AlignCenter ); | 70 | setColumnAlignment( col_manuf, AlignCenter ); |
72 | addColumn( tr( "First Seen" ) ); | 71 | addColumn( tr( "First Seen" ) ); |
73 | setColumnAlignment( col_firstseen, AlignCenter ); | 72 | setColumnAlignment( col_firstseen, AlignCenter ); |
74 | addColumn( tr( "Last Seen" ) ); | 73 | addColumn( tr( "Last Seen" ) ); |
75 | setColumnAlignment( col_lastseen, AlignCenter ); | 74 | setColumnAlignment( col_lastseen, AlignCenter ); |
76 | addColumn( tr( "Location" ) ); | 75 | addColumn( tr( "Location" ) ); |
77 | setColumnAlignment( col_location, AlignCenter ); | 76 | setColumnAlignment( col_location, AlignCenter ); |
78 | setRootIsDecorated( true ); | 77 | setRootIsDecorated( true ); |
79 | setAllColumnsShowFocus( true ); | 78 | setAllColumnsShowFocus( true ); |
80 | 79 | ||
81 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), | 80 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), |
82 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); | 81 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); |
83 | 82 | ||
84 | #ifdef QWS | 83 | #ifdef QWS |
85 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 84 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
86 | #endif | 85 | #endif |
87 | 86 | ||
88 | }; | 87 | }; |
89 | 88 | ||
90 | 89 | ||
91 | MScanListView::~MScanListView() | 90 | MScanListView::~MScanListView() |
92 | { | 91 | { |
93 | }; | 92 | }; |
94 | 93 | ||
95 | 94 | ||
96 | OListViewItem* MScanListView::childFactory() | 95 | OListViewItem* MScanListView::childFactory() |
97 | { | 96 | { |
98 | return new MScanListItem( this ); | 97 | return new MScanListItem( this ); |
99 | } | 98 | } |
100 | 99 | ||
101 | 100 | ||
102 | void MScanListView::serializeTo( QDataStream& s) const | 101 | void MScanListView::serializeTo( QDataStream& s) const |
103 | { | 102 | { |
104 | qDebug( "serializing MScanListView" ); | 103 | qDebug( "serializing MScanListView" ); |
105 | OListView::serializeTo( s ); | 104 | OListView::serializeTo( s ); |
106 | } | 105 | } |
107 | 106 | ||
108 | 107 | ||
109 | void MScanListView::serializeFrom( QDataStream& s) | 108 | void MScanListView::serializeFrom( QDataStream& s) |
110 | { | 109 | { |
111 | qDebug( "serializing MScanListView" ); | 110 | qDebug( "serializing MScanListView" ); |
112 | OListView::serializeFrom( s ); | 111 | OListView::serializeFrom( s ); |
113 | } | 112 | } |
114 | 113 | ||
115 | 114 | ||
116 | void MScanListView::addNewItem( const QString& type, | 115 | void MScanListView::addNewItem( const QString& type, |
117 | const QString& essid, | 116 | const QString& essid, |
118 | const OMacAddress& mac, | 117 | const OMacAddress& mac, |
119 | bool wep, | 118 | bool wep, |
120 | int channel, | 119 | int channel, |
121 | int signal, | 120 | int signal, |
122 | const GpsLocation& loc, | 121 | const GpsLocation& loc, |
123 | bool probe ) | 122 | bool probe ) |
124 | { | 123 | { |
125 | QString macaddr = mac.toString(true); | 124 | QString macaddr = mac.toString(true); |
126 | 125 | ||
127 | #ifdef DEBUG | 126 | #ifdef DEBUG |
128 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", (const char*) type, | 127 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", (const char*) type, |
129 | (const char*) essid, (const char*) macaddr, channel ); | 128 | (const char*) essid, (const char*) macaddr, channel ); |
130 | #endif | 129 | #endif |
131 | 130 | ||
132 | // search, if we already have seen this net | 131 | // search, if we already have seen this net |
133 | 132 | ||
134 | QString s; | 133 | QString s; |
135 | MScanListItem* network; | 134 | MScanListItem* network; |
136 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); | 135 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); |
137 | 136 | ||
138 | while ( item && ( item->text( col_essid ) != essid ) ) | 137 | while ( item && ( item->text( col_essid ) != essid ) ) |
139 | { | 138 | { |
140 | #ifdef DEBUG | 139 | #ifdef DEBUG |
141 | qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); | 140 | qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); |
142 | #endif | 141 | #endif |
143 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 142 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
144 | } | 143 | } |
145 | if ( item ) | 144 | if ( item ) |
146 | { | 145 | { |
147 | // we have already seen this net, check all childs if MAC exists | 146 | // we have already seen this net, check all childs if MAC exists |
148 | 147 | ||
149 | network = item; | 148 | network = item; |
150 | 149 | ||
151 | item = static_cast<MScanListItem*> ( item->firstChild() ); | 150 | item = static_cast<MScanListItem*> ( item->firstChild() ); |
152 | assert( item ); // this shouldn't fail | 151 | assert( item ); // this shouldn't fail |
153 | 152 | ||
154 | while ( item && ( item->text( col_ap ) != macaddr ) ) | 153 | while ( item && ( item->text( col_ap ) != macaddr ) ) |
155 | { | 154 | { |
156 | #ifdef DEBUG | 155 | #ifdef DEBUG |
157 | qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); | 156 | qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); |
158 | #endif | 157 | #endif |
159 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 158 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
160 | } | 159 | } |
161 | 160 | ||
162 | if ( item ) | 161 | if ( item ) |
163 | { | 162 | { |
164 | // we have already seen this item, it's a dupe | 163 | // we have already seen this item, it's a dupe |
165 | #ifdef DEBUG | 164 | #ifdef DEBUG |
166 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); | 165 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); |
167 | #endif | 166 | #endif |
168 | item->receivedBeacon(); | 167 | item->receivedBeacon(); |
169 | return; | 168 | return; |
170 | } | 169 | } |
171 | } | 170 | } |
172 | else | 171 | else |
173 | { | 172 | { |
174 | s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); | 173 | s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); |
175 | MLogWindow::logwindow()->log( s ); | 174 | MLogWindow::logwindow()->log( s ); |
176 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe ); | 175 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe ); |
177 | } | 176 | } |
178 | 177 | ||
179 | 178 | ||
180 | // insert new station as child from network | 179 | // insert new station as child from network |
181 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? | 180 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? |
182 | 181 | ||
183 | #ifdef DEBUG | 182 | #ifdef DEBUG |
184 | qDebug( "inserting new station %s", (const char*) macaddr ); | 183 | qDebug( "inserting new station %s", (const char*) macaddr ); |
185 | #endif | 184 | #endif |
186 | 185 | ||
187 | MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); | 186 | MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); |
188 | station->setManufacturer( mac.manufacturer() ); | 187 | station->setManufacturer( mac.manufacturer() ); |
189 | station->setLocation( loc.dmsPosition() ); | 188 | station->setLocation( loc.dmsPosition() ); |
190 | 189 | ||
191 | if ( type == "managed" ) | 190 | if ( type == "managed" ) |
192 | { | 191 | { |
193 | s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); | 192 | s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); |
194 | } | 193 | } |
195 | else | 194 | else |
196 | { | 195 | { |
197 | s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); | 196 | s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); |
198 | } | 197 | } |
199 | MLogWindow::logwindow()->log( s ); | 198 | MLogWindow::logwindow()->log( s ); |
200 | } | 199 | } |
201 | 200 | ||
202 | 201 | ||
203 | void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type ) | 202 | void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type ) |
204 | { | 203 | { |
205 | MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); | 204 | MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); |
206 | 205 | ||
207 | while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) | 206 | while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) |
208 | { | 207 | { |
209 | #ifdef DEBUG | 208 | #ifdef DEBUG |
210 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); | 209 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); |
211 | #endif | 210 | #endif |
212 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); | 211 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); |
213 | } | 212 | } |
214 | 213 | ||
215 | if ( subitem ) | 214 | if ( subitem ) |
216 | { | 215 | { |
217 | // we have already seen this item, it's a dupe | 216 | // we have already seen this item, it's a dupe |
218 | #ifdef DEBUG | 217 | #ifdef DEBUG |
219 | qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); | 218 | qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) ); |
220 | #endif | 219 | #endif |
221 | subitem->receivedBeacon(); //FIXME: sent data bit | 220 | subitem->receivedBeacon(); //FIXME: sent data bit |
222 | return; | 221 | return; |
223 | } | 222 | } |
224 | 223 | ||
225 | // Hey, it seems to be a new item :-D | 224 | // Hey, it seems to be a new item :-D |
226 | MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 ); | 225 | MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 ); |
227 | station->setManufacturer( addr.manufacturer() ); | 226 | station->setManufacturer( addr.manufacturer() ); |
228 | 227 | ||
229 | QString s; | 228 | QString s; |
230 | if ( type == "station" ) | 229 | if ( type == "station" ) |
231 | { | 230 | { |
232 | s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); | 231 | s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); |
233 | } | 232 | } |
234 | else | 233 | else |
235 | { | 234 | { |
236 | s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); | 235 | s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); |
237 | } | 236 | } |
238 | MLogWindow::logwindow()->log( s ); | 237 | MLogWindow::logwindow()->log( s ); |
239 | } | 238 | } |
240 | 239 | ||
241 | 240 | ||
242 | void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) | 241 | void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) |
243 | { | 242 | { |
244 | qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() ); | 243 | qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() ); |
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index cbacdee..ab870c2 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h | |||
@@ -1,140 +1,140 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef SCANLIST_H | 16 | #ifndef SCANLIST_H |
17 | #define SCANLIST_H | 17 | #define SCANLIST_H |
18 | 18 | ||
19 | #include "gps.h" | 19 | #include "gps.h" |
20 | 20 | ||
21 | /* OPIE */ | 21 | /* OPIE */ |
22 | #include <opie2/olistview.h> | 22 | #include <opie2/olistview.h> |
23 | #include <opie2/onetutils.h> | 23 | #include <opie2/onetutils.h> |
24 | 24 | ||
25 | /* QT */ | 25 | /* QT */ |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | 27 | ||
28 | class QString; | 28 | class QString; |
29 | class MScanListItem; | 29 | class MScanListItem; |
30 | 30 | ||
31 | class MScanListView: public OListView | 31 | class MScanListView: public OListView |
32 | { | 32 | { |
33 | Q_OBJECT | 33 | Q_OBJECT |
34 | 34 | ||
35 | public: | 35 | public: |
36 | MScanListView( QWidget* parent = 0, const char* name = 0 ); | 36 | MScanListView( QWidget* parent = 0, const char* name = 0 ); |
37 | virtual ~MScanListView(); | 37 | virtual ~MScanListView(); |
38 | 38 | ||
39 | virtual OListViewItem* childFactory(); | 39 | virtual OListViewItem* childFactory(); |
40 | virtual void serializeTo( QDataStream& s ) const; | 40 | virtual void serializeTo( QDataStream& s ) const; |
41 | virtual void serializeFrom( QDataStream& s ); | 41 | virtual void serializeFrom( QDataStream& s ); |
42 | 42 | ||
43 | public slots: | 43 | public slots: |
44 | void addNewItem( const QString& type, const QString&, const OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); | 44 | void addNewItem( const QString& type, const QString&, const OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); |
45 | void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); | 45 | void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); |
46 | 46 | ||
47 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 47 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
48 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 48 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
49 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); | 49 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); |
50 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 50 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
51 | 51 | ||
52 | void identify( const OMacAddress&, const QString& ipaddr ); | 52 | void identify( const OMacAddress&, const QString& ipaddr ); |
53 | 53 | ||
54 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); | 54 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); |
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | void rightButtonClicked(QListViewItem*,const QPoint&,int); | 57 | void rightButtonClicked(QListViewItem*,const QPoint&,int); |
58 | void joinNetwork( const QString&, const QString&, int, const QString& ); | 58 | void joinNetwork( const QString&, const QString&, int, const QString& ); |
59 | 59 | ||
60 | protected: | 60 | protected: |
61 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); | 61 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); |
62 | 62 | ||
63 | }; | 63 | }; |
64 | 64 | ||
65 | //****************************** MScanListItem **************************************************************** | 65 | //****************************** MScanListItem **************************************************************** |
66 | 66 | ||
67 | class MScanListItem: public OListViewItem | 67 | class MScanListItem: public OListViewItem |
68 | { | 68 | { |
69 | public: | 69 | public: |
70 | MScanListItem::MScanListItem( QListView* parent, | 70 | MScanListItem::MScanListItem( QListView* parent, |
71 | const QString& type = "unknown", | 71 | const QString& type = "unknown", |
72 | const QString& essid = "unknown", | 72 | const QString& essid = "unknown", |
73 | const QString& macaddr = "unknown", | 73 | const QString& macaddr = "unknown", |
74 | bool wep = false, | 74 | bool wep = false, |
75 | int channel = 0, | 75 | int channel = 0, |
76 | int signal = 0, | 76 | int signal = 0, |
77 | bool probed = false ); | 77 | bool probed = false ); |
78 | 78 | ||
79 | MScanListItem::MScanListItem( QListViewItem* parent, | 79 | MScanListItem::MScanListItem( QListViewItem* parent, |
80 | const QString& type = "unknown", | 80 | const QString& type = "unknown", |
81 | const QString& essid = "unknown", | 81 | const QString& essid = "unknown", |
82 | const QString& macaddr = "unknown", | 82 | const QString& macaddr = "unknown", |
83 | bool wep = false, | 83 | bool wep = false, |
84 | int channel = 0, | 84 | int channel = 0, |
85 | int signal = 0 ); | 85 | int signal = 0 ); |
86 | 86 | ||
87 | 87 | ||
88 | protected: | 88 | protected: |
89 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ); | 89 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ); |
90 | 90 | ||
91 | public: | 91 | public: |
92 | QString type; | 92 | QString type; |
93 | 93 | ||
94 | public: | 94 | public: |
95 | //const QString& type() { return _type; }; | 95 | //const QString& type() { return _type; }; |
96 | const QString& essid() const; | 96 | const QString& essid() const; |
97 | const QString& macaddr() { return _macaddr; }; | 97 | const QString& macaddr() { return _macaddr; }; |
98 | bool wep() { return _wep; }; | 98 | bool wep() { return _wep; }; |
99 | int channel() { return _channel; }; | 99 | int channel() { return _channel; }; |
100 | int signal() { return _signal; }; | 100 | int signal() { return _signal; }; |
101 | int beacons() { return _beacons; }; | 101 | int beacons() { return _beacons; }; |
102 | 102 | ||
103 | void setSignal( int signal ) { /* TODO */ }; | 103 | void setSignal( int signal ) { /* TODO */ }; |
104 | void receivedBeacon(); | 104 | void receivedBeacon(); |
105 | 105 | ||
106 | void setManufacturer( const QString& manufacturer ); | 106 | void setManufacturer( const QString& manufacturer ); |
107 | void setLocation( const QString& location ); | 107 | void setLocation( const QString& location ); |
108 | 108 | ||
109 | virtual OListViewItem* childFactory(); | 109 | virtual OListViewItem* childFactory(); |
110 | virtual void serializeTo( QDataStream& s ) const; | 110 | virtual void serializeTo( QDataStream& s ) const; |
111 | virtual void serializeFrom( QDataStream& s ); | 111 | virtual void serializeFrom( QDataStream& s ); |
112 | 112 | ||
113 | private: | 113 | private: |
114 | QString _type; | 114 | QString _type; |
115 | QString _essid; | 115 | QString _essid; |
116 | QString _macaddr; | 116 | QString _macaddr; |
117 | bool _wep; | 117 | bool _wep; |
118 | int _channel; | 118 | int _channel; |
119 | int _signal; | 119 | int _signal; |
120 | int _beacons; | 120 | int _beacons; |
121 | 121 | ||
122 | }; | 122 | }; |
123 | 123 | ||
124 | //****************************** MScanListViewFactory **************************************************************** | 124 | //****************************** MScanListViewFactory **************************************************************** |
125 | 125 | ||
126 | /* | 126 | /* |
127 | 127 | ||
128 | class MScanListViewFactory : public OListViewFactory | 128 | class MScanListViewFactory : public OListViewFactory |
129 | { | 129 | { |
130 | public: | 130 | public: |
131 | virtual QListView* listViewFactory(); | 131 | virtual QListView* listViewFactory(); |
132 | virtual QListViewItem* listViewItemFactory( QListView* lv ); | 132 | virtual QListViewItem* listViewItemFactory( QListView* lv ); |
133 | virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); | 133 | virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); |
134 | virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); | 134 | virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); |
135 | virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text ); | 135 | virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text ); |
136 | } | 136 | } |
137 | */ | 137 | */ |
138 | 138 | ||
139 | #endif | 139 | #endif |
140 | 140 | ||
diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp index a9ae661..48e4847 100644 --- a/noncore/net/wellenreiter/gui/statwindow.cpp +++ b/noncore/net/wellenreiter/gui/statwindow.cpp | |||
@@ -1,43 +1,43 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "statwindow.h" | 16 | #include "statwindow.h" |
17 | #include <opie2/olistview.h> | 17 | #include <opie2/olistview.h> |
18 | 18 | ||
19 | MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) | 19 | MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) |
20 | :QVBox( parent, name, f ) | 20 | :QVBox( parent, name, f ) |
21 | { | 21 | { |
22 | table = new OListView( this ); | 22 | table = new OListView( this ); |
23 | table->addColumn( tr( "Protocol" ) ); | 23 | table->addColumn( tr( "Protocol" ) ); |
24 | table->addColumn( tr( "Count" ) ); | 24 | table->addColumn( tr( "Count" ) ); |
25 | table->setItemMargin( 2 ); | 25 | table->setItemMargin( 2 ); |
26 | }; | 26 | }; |
27 | 27 | ||
28 | 28 | ||
29 | void MStatWindow::updateCounter( const QString& protocol, int counter ) | 29 | void MStatWindow::updateCounter( const QString& protocol, int counter ) |
30 | { | 30 | { |
31 | QListViewItemIterator it( table ); | 31 | QListViewItemIterator it( table ); |
32 | for ( ; it.current(); ++it ) | 32 | for ( ; it.current(); ++it ) |
33 | { | 33 | { |
34 | if ( it.current()->text( 0 ) == protocol ) | 34 | if ( it.current()->text( 0 ) == protocol ) |
35 | { | 35 | { |
36 | it.current()->setText( 1, QString::number( counter ) ); | 36 | it.current()->setText( 1, QString::number( counter ) ); |
37 | return; | 37 | return; |
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | new OListViewItem( table, protocol, QString::number( counter ) ); | 41 | new OListViewItem( table, protocol, QString::number( counter ) ); |
42 | } | 42 | } |
43 | 43 | ||
diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h index 0ab4b50..b9057e7 100644 --- a/noncore/net/wellenreiter/gui/statwindow.h +++ b/noncore/net/wellenreiter/gui/statwindow.h | |||
@@ -1,43 +1,43 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef STATWINDOW_H | 16 | #ifndef STATWINDOW_H |
17 | #define STATWINDOW_H | 17 | #define STATWINDOW_H |
18 | 18 | ||
19 | #include <qvbox.h> | 19 | #include <qvbox.h> |
20 | 20 | ||
21 | class QString; | 21 | class QString; |
22 | class OListView; | 22 | class OListView; |
23 | 23 | ||
24 | class MStatWindow: public QVBox | 24 | class MStatWindow: public QVBox |
25 | { | 25 | { |
26 | Q_OBJECT | 26 | Q_OBJECT |
27 | 27 | ||
28 | public: | 28 | public: |
29 | MStatWindow( QWidget * parent = 0, const char * name = "MStatWindow", WFlags f = 0 ); | 29 | MStatWindow( QWidget * parent = 0, const char * name = "MStatWindow", WFlags f = 0 ); |
30 | 30 | ||
31 | void log( QString text ); | 31 | void log( QString text ); |
32 | const QString getLog() const; | 32 | const QString getLog() const; |
33 | void clear(); | 33 | void clear(); |
34 | 34 | ||
35 | void updateCounter( const QString&, int ); | 35 | void updateCounter( const QString&, int ); |
36 | 36 | ||
37 | protected: | 37 | protected: |
38 | OListView* table; | 38 | OListView* table; |
39 | 39 | ||
40 | }; | 40 | }; |
41 | 41 | ||
42 | #endif | 42 | #endif |
43 | 43 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index db68e5b..67e3940 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -323,385 +323,393 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
323 | { | 323 | { |
324 | qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); | 324 | qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); |
325 | netView()->identify( source, dhcp->serverAddress().toString() ); | 325 | netView()->identify( source, dhcp->serverAddress().toString() ); |
326 | netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); | 326 | netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); |
327 | } | 327 | } |
328 | else if ( dhcp->type() == "ACK" ) | 328 | else if ( dhcp->type() == "ACK" ) |
329 | { | 329 | { |
330 | qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); | 330 | qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); |
331 | netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); | 331 | netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); |
332 | } | 332 | } |
333 | } | 333 | } |
334 | } | 334 | } |
335 | 335 | ||
336 | 336 | ||
337 | QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol ) | 337 | QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol ) |
338 | { | 338 | { |
339 | if ( configwindow->parsePackets->isProtocolChecked( protocol ) ) | 339 | if ( configwindow->parsePackets->isProtocolChecked( protocol ) ) |
340 | if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" ) | 340 | if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" ) |
341 | return 0; | 341 | return 0; |
342 | 342 | ||
343 | return p->child( protocol ); | 343 | return p->child( protocol ); |
344 | } | 344 | } |
345 | 345 | ||
346 | 346 | ||
347 | bool Wellenreiter::checkDumpPacket( OPacket* p ) | 347 | bool Wellenreiter::checkDumpPacket( OPacket* p ) |
348 | { | 348 | { |
349 | // go through all child packets and see if one is inside the child hierarchy for p | 349 | // go through all child packets and see if one is inside the child hierarchy for p |
350 | // if so, do what the user requested (protocolAction), e.g. pass or discard | 350 | // if so, do what the user requested (protocolAction), e.g. pass or discard |
351 | if ( !configwindow->writeCaptureFile->isChecked() ) | 351 | if ( !configwindow->writeCaptureFile->isChecked() ) |
352 | return true; // semantic change - we're logging anyway now to /tmp/wellenreiter | 352 | return true; // semantic change - we're logging anyway now to /tmp/wellenreiter |
353 | 353 | ||
354 | QObjectList* l = p->queryList(); | 354 | QObjectList* l = p->queryList(); |
355 | QObjectListIt it( *l ); | 355 | QObjectListIt it( *l ); |
356 | QObject* o; | 356 | QObject* o; |
357 | 357 | ||
358 | while ( (o = it.current()) != 0 ) | 358 | while ( (o = it.current()) != 0 ) |
359 | { | 359 | { |
360 | QString name = it.current()->name(); | 360 | QString name = it.current()->name(); |
361 | if ( configwindow->capturePackets->isProtocolChecked( name ) ) | 361 | if ( configwindow->capturePackets->isProtocolChecked( name ) ) |
362 | { | 362 | { |
363 | QString action = configwindow->capturePackets->protocolAction( name ); | 363 | QString action = configwindow->capturePackets->protocolAction( name ); |
364 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | 364 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); |
365 | if ( action == "Discard" ) | 365 | if ( action == "Discard" ) |
366 | { | 366 | { |
367 | logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); | 367 | logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); |
368 | return false; | 368 | return false; |
369 | } | 369 | } |
370 | } | 370 | } |
371 | else | 371 | else |
372 | { | 372 | { |
373 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); | 373 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); |
374 | } | 374 | } |
375 | ++it; | 375 | ++it; |
376 | } | 376 | } |
377 | return true; | 377 | return true; |
378 | } | 378 | } |
379 | 379 | ||
380 | 380 | ||
381 | void Wellenreiter::receivePacket( OPacket* p ) | 381 | void Wellenreiter::receivePacket( OPacket* p ) |
382 | { | 382 | { |
383 | hexWindow()->log( p->dump( 8 ) ); | 383 | hexWindow()->log( p->dump( 8 ) ); |
384 | 384 | ||
385 | if ( checkDumpPacket( p ) ) | 385 | if ( checkDumpPacket( p ) ) |
386 | { | 386 | { |
387 | pcap->dump( p ); | 387 | pcap->dump( p ); |
388 | } | 388 | } |
389 | 389 | ||
390 | // check for a management frame | 390 | // check for a management frame |
391 | OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); | 391 | OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); |
392 | if ( manage ) | 392 | if ( manage ) |
393 | { | 393 | { |
394 | handleManagementFrame( p, manage ); | 394 | handleManagementFrame( p, manage ); |
395 | return; | 395 | return; |
396 | } | 396 | } |
397 | 397 | ||
398 | // check for a control frame | 398 | // check for a control frame |
399 | OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) ); | 399 | OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) ); |
400 | if ( control ) | 400 | if ( control ) |
401 | { | 401 | { |
402 | handleControlFrame( p, control ); | 402 | handleControlFrame( p, control ); |
403 | return; | 403 | return; |
404 | } | 404 | } |
405 | 405 | ||
406 | OMacAddress source; | 406 | OMacAddress source; |
407 | OMacAddress dest; | 407 | OMacAddress dest; |
408 | 408 | ||
409 | //TODO: WEP check here | 409 | //TODO: WEP check here |
410 | 410 | ||
411 | // check for a wireless data frame | 411 | // check for a wireless data frame |
412 | OWaveLanDataPacket* wlan = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) ); | 412 | OWaveLanDataPacket* wlan = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) ); |
413 | if ( wlan ) | 413 | if ( wlan ) |
414 | { | 414 | { |
415 | handleWlanData( p, wlan, source, dest ); | 415 | handleWlanData( p, wlan, source, dest ); |
416 | } | 416 | } |
417 | 417 | ||
418 | // check for a wired data frame | 418 | // check for a wired data frame |
419 | OEthernetPacket* eth = static_cast<OEthernetPacket*>( childIfToParse( p, "Ethernet" ) ); | 419 | OEthernetPacket* eth = static_cast<OEthernetPacket*>( childIfToParse( p, "Ethernet" ) ); |
420 | if ( eth ) | 420 | if ( eth ) |
421 | { | 421 | { |
422 | handleEthernetData( p, eth, source, dest ); | 422 | handleEthernetData( p, eth, source, dest ); |
423 | } | 423 | } |
424 | 424 | ||
425 | // check for an arp frame since arp frames come in two flavours: | 425 | // check for an arp frame since arp frames come in two flavours: |
426 | // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't. | 426 | // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't. |
427 | OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) ); | 427 | OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) ); |
428 | if ( arp ) | 428 | if ( arp ) |
429 | { | 429 | { |
430 | handleARPData( p, arp, source, dest ); | 430 | handleARPData( p, arp, source, dest ); |
431 | } | 431 | } |
432 | 432 | ||
433 | // check for a ip frame | 433 | // check for a ip frame |
434 | OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) ); | 434 | OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) ); |
435 | if ( ip ) | 435 | if ( ip ) |
436 | { | 436 | { |
437 | handleIPData( p, ip, source, dest ); | 437 | handleIPData( p, ip, source, dest ); |
438 | } | 438 | } |
439 | 439 | ||
440 | //handleNotification( p ); | 440 | //handleNotification( p ); |
441 | 441 | ||
442 | } | 442 | } |
443 | 443 | ||
444 | 444 | ||
445 | void Wellenreiter::stopClicked() | 445 | void Wellenreiter::stopClicked() |
446 | { | 446 | { |
447 | if ( iface ) | 447 | if ( iface ) |
448 | { | 448 | { |
449 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 449 | disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
450 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 450 | disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
451 | iface->setChannelHopping(); // stop hopping channels | 451 | iface->setChannelHopping(); // stop hopping channels |
452 | } | 452 | } |
453 | else | 453 | else |
454 | killTimers(); | 454 | killTimers(); |
455 | 455 | ||
456 | pcap->close(); | 456 | pcap->close(); |
457 | sniffing = false; | 457 | sniffing = false; |
458 | 458 | ||
459 | if ( iface ) | 459 | if ( iface ) |
460 | { | 460 | { |
461 | // switch off monitor mode | 461 | // switch off monitor mode |
462 | iface->setMode( "managed" ); | 462 | iface->setMode( "managed" ); |
463 | // switch off promisc flag | 463 | // switch off promisc flag |
464 | iface->setPromiscuousMode( false ); | 464 | iface->setPromiscuousMode( false ); |
465 | 465 | ||
466 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess | 466 | system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess |
467 | } | 467 | } |
468 | 468 | ||
469 | logwindow->log( "(i) Stopped Scanning." ); | 469 | logwindow->log( "(i) Stopped Scanning." ); |
470 | assert( parent() ); | 470 | assert( parent() ); |
471 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); | 471 | ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); |
472 | 472 | ||
473 | // message the user | 473 | // message the user |
474 | QMessageBox::information( this, "Wellenreiter II", | 474 | QMessageBox::information( this, "Wellenreiter II", |
475 | tr( "Your wireless card\nshould now be usable again." ) ); | 475 | tr( "Your wireless card\nshould now be usable again." ) ); |
476 | 476 | ||
477 | sniffing = false; | 477 | sniffing = false; |
478 | emit( stoppedSniffing() ); | 478 | emit( stoppedSniffing() ); |
479 | 479 | ||
480 | #ifdef QWS | 480 | #ifdef QWS |
481 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) | 481 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) |
482 | { | 482 | { |
483 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 483 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
484 | } | 484 | } |
485 | #else | 485 | #else |
486 | #warning FIXME: setScreenSaverMode is not operational on the X11 build | 486 | #warning FIXME: setScreenSaverMode is not operational on the X11 build |
487 | #endif | 487 | #endif |
488 | 488 | ||
489 | // print out statistics | 489 | // print out statistics |
490 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) | 490 | for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) |
491 | statwindow->updateCounter( it.key(), it.data() ); | 491 | statwindow->updateCounter( it.key(), it.data() ); |
492 | } | 492 | } |
493 | 493 | ||
494 | 494 | ||
495 | void Wellenreiter::startClicked() | 495 | void Wellenreiter::startClicked() |
496 | { | 496 | { |
497 | // get configuration from config window | 497 | // get configuration from config window |
498 | 498 | ||
499 | const QString& interface = configwindow->interfaceName->currentText(); | 499 | const QString& interface = configwindow->interfaceName->currentText(); |
500 | const int cardtype = configwindow->driverType(); | 500 | const int cardtype = configwindow->driverType(); |
501 | const int interval = configwindow->hoppingInterval(); | 501 | const int interval = configwindow->hoppingInterval(); |
502 | 502 | ||
503 | if ( ( interface == "" ) || ( cardtype == 0 ) ) | 503 | if ( ( interface == "" ) || ( cardtype == 0 ) ) |
504 | { | 504 | { |
505 | QMessageBox::information( this, "Wellenreiter II", | 505 | QMessageBox::information( this, "Wellenreiter II", |
506 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); | 506 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); |
507 | return; | 507 | return; |
508 | } | 508 | } |
509 | 509 | ||
510 | // configure device | 510 | // configure device |
511 | ONetwork* net = ONetwork::instance(); | 511 | ONetwork* net = ONetwork::instance(); |
512 | 512 | ||
513 | // TODO: check if interface is wireless and support sniffing for non-wireless interfaces | 513 | // TODO: check if interface is wireless and support sniffing for non-wireless interfaces |
514 | 514 | ||
515 | if ( !net->isPresent( interface ) ) | ||
516 | { | ||
517 | QMessageBox::information( this, "Wellenreiter II", | ||
518 | tr( "The configured device (%1)\nis not available on this system\n. Please reconfigure!" ).arg( interface ) ); | ||
519 | return; | ||
520 | } | ||
521 | |||
515 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! | 522 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! |
523 | assert( iface ); | ||
516 | 524 | ||
517 | // bring device UP | 525 | // bring device UP |
518 | if ( cardtype != DEVTYPE_FILE ) | 526 | if ( cardtype != DEVTYPE_FILE ) |
519 | { | 527 | { |
520 | iface->setUp( true ); | 528 | iface->setUp( true ); |
521 | if ( !iface->isUp() ) | 529 | if ( !iface->isUp() ) |
522 | { | 530 | { |
523 | QMessageBox::warning( this, "Wellenreiter II", | 531 | QMessageBox::warning( this, "Wellenreiter II", |
524 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); | 532 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); |
525 | return; | 533 | return; |
526 | } | 534 | } |
527 | } | 535 | } |
528 | // set monitor mode | 536 | // set monitor mode |
529 | bool usePrism = configwindow->usePrismHeader(); | 537 | bool usePrism = configwindow->usePrismHeader(); |
530 | 538 | ||
531 | switch ( cardtype ) | 539 | switch ( cardtype ) |
532 | { | 540 | { |
533 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; | 541 | case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; |
534 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; | 542 | case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; |
535 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; | 543 | case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; |
536 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; | 544 | case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; |
537 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; | 545 | case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; |
538 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; | 546 | case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; |
539 | default: assert( 0 ); // shouldn't reach this | 547 | default: assert( 0 ); // shouldn't reach this |
540 | } | 548 | } |
541 | 549 | ||
542 | // switch device into monitor mode | 550 | // switch device into monitor mode |
543 | if ( cardtype < DEVTYPE_FILE ) | 551 | if ( cardtype < DEVTYPE_FILE ) |
544 | { | 552 | { |
545 | if ( cardtype != DEVTYPE_MANUAL ) | 553 | if ( cardtype != DEVTYPE_MANUAL ) |
546 | iface->setMode( "monitor" ); | 554 | iface->setMode( "monitor" ); |
547 | if ( iface->mode() != "monitor" ) | 555 | if ( iface->mode() != "monitor" ) |
548 | { | 556 | { |
549 | if ( QMessageBox::warning( this, "Wellenreiter II", | 557 | if ( QMessageBox::warning( this, "Wellenreiter II", |
550 | tr( "Can't set interface '%1'\ninto monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) + | 558 | tr( "Can't set interface '%1'\ninto monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) + |
551 | tr( "\nContinue with limited functionality?" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) | 559 | tr( "\nContinue with limited functionality?" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) |
552 | return; | 560 | return; |
553 | } | 561 | } |
554 | } | 562 | } |
555 | 563 | ||
556 | // open GPS device | 564 | // open GPS device |
557 | if ( configwindow->enableGPS->isChecked() ) | 565 | if ( configwindow->enableGPS->isChecked() ) |
558 | { | 566 | { |
559 | qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 567 | qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
560 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); | 568 | gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); |
561 | } | 569 | } |
562 | 570 | ||
563 | // open pcap and start sniffing | 571 | // open pcap and start sniffing |
564 | 572 | ||
565 | if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? | 573 | if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? |
566 | { | 574 | { |
567 | dumpname = configwindow->captureFileName->text(); | 575 | dumpname = configwindow->captureFileName->text(); |
568 | if ( dumpname.isEmpty() ) dumpname = "captureFile"; | 576 | if ( dumpname.isEmpty() ) dumpname = "captureFile"; |
569 | dumpname.append( '-' ); | 577 | dumpname.append( '-' ); |
570 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); | 578 | dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); |
571 | dumpname.append( ".wellenreiter" ); | 579 | dumpname.append( ".wellenreiter" ); |
572 | } | 580 | } |
573 | else // write it anyway ;) | 581 | else // write it anyway ;) |
574 | { | 582 | { |
575 | dumpname = "/var/log/dump.wellenreiter"; | 583 | dumpname = "/var/log/dump.wellenreiter"; |
576 | } | 584 | } |
577 | 585 | ||
578 | if ( cardtype != DEVTYPE_FILE ) | 586 | if ( cardtype != DEVTYPE_FILE ) |
579 | pcap->open( interface ); | 587 | pcap->open( interface ); |
580 | else | 588 | else |
581 | pcap->open( QFile( interface ) ); | 589 | pcap->open( QFile( interface ) ); |
582 | 590 | ||
583 | qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); | 591 | qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); |
584 | pcap->openDumpFile( dumpname ); | 592 | pcap->openDumpFile( dumpname ); |
585 | 593 | ||
586 | if ( !pcap->isOpen() ) | 594 | if ( !pcap->isOpen() ) |
587 | { | 595 | { |
588 | QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( | 596 | QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( |
589 | cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); | 597 | cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); |
590 | return; | 598 | return; |
591 | } | 599 | } |
592 | 600 | ||
593 | // set capturer to non-blocking mode | 601 | // set capturer to non-blocking mode |
594 | pcap->setBlocking( false ); | 602 | pcap->setBlocking( false ); |
595 | 603 | ||
596 | // start channel hopper | 604 | // start channel hopper |
597 | if ( cardtype != DEVTYPE_FILE ) | 605 | if ( cardtype != DEVTYPE_FILE ) |
598 | { | 606 | { |
599 | logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); | 607 | logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); |
600 | iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window | 608 | iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window |
601 | } | 609 | } |
602 | 610 | ||
603 | if ( cardtype != DEVTYPE_FILE ) | 611 | if ( cardtype != DEVTYPE_FILE ) |
604 | { | 612 | { |
605 | // connect socket notifier and start channel hopper | 613 | // connect socket notifier and start channel hopper |
606 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); | 614 | connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); |
607 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); | 615 | connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); |
608 | } | 616 | } |
609 | else | 617 | else |
610 | { | 618 | { |
611 | // start timer for reading packets | 619 | // start timer for reading packets |
612 | startTimer( 100 ); | 620 | startTimer( 100 ); |
613 | } | 621 | } |
614 | 622 | ||
615 | logwindow->log( "(i) Started Scanning." ); | 623 | logwindow->log( "(i) Started Scanning." ); |
616 | sniffing = true; | 624 | sniffing = true; |
617 | 625 | ||
618 | #ifdef QWS | 626 | #ifdef QWS |
619 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) | 627 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) |
620 | { | 628 | { |
621 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; | 629 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; |
622 | } | 630 | } |
623 | #else | 631 | #else |
624 | #warning FIXME: setScreenSaverMode is not operational on the X11 build | 632 | #warning FIXME: setScreenSaverMode is not operational on the X11 build |
625 | #endif | 633 | #endif |
626 | 634 | ||
627 | emit( startedSniffing() ); | 635 | emit( startedSniffing() ); |
628 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title | 636 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title |
629 | else | 637 | else |
630 | { | 638 | { |
631 | assert( parent() ); | 639 | assert( parent() ); |
632 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); | 640 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); |
633 | } | 641 | } |
634 | } | 642 | } |
635 | 643 | ||
636 | 644 | ||
637 | void Wellenreiter::timerEvent( QTimerEvent* ) | 645 | void Wellenreiter::timerEvent( QTimerEvent* ) |
638 | { | 646 | { |
639 | qDebug( "Wellenreiter::timerEvent()" ); | 647 | qDebug( "Wellenreiter::timerEvent()" ); |
640 | OPacket* p = pcap->next(); | 648 | OPacket* p = pcap->next(); |
641 | if ( !p ) // no more packets available | 649 | if ( !p ) // no more packets available |
642 | { | 650 | { |
643 | stopClicked(); | 651 | stopClicked(); |
644 | } | 652 | } |
645 | else | 653 | else |
646 | { | 654 | { |
647 | receivePacket( p ); | 655 | receivePacket( p ); |
648 | delete p; | 656 | delete p; |
649 | } | 657 | } |
650 | } | 658 | } |
651 | 659 | ||
652 | 660 | ||
653 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) | 661 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) |
654 | { | 662 | { |
655 | #ifdef QWS | 663 | #ifdef QWS |
656 | if ( action == "TouchSound" ) | 664 | if ( action == "TouchSound" ) |
657 | ODevice::inst()->playTouchSound(); | 665 | ODevice::inst()->playTouchSound(); |
658 | else if ( action == "AlarmSound" ) | 666 | else if ( action == "AlarmSound" ) |
659 | ODevice::inst()->playAlarmSound(); | 667 | ODevice::inst()->playAlarmSound(); |
660 | else if ( action == "KeySound" ) | 668 | else if ( action == "KeySound" ) |
661 | ODevice::inst()->playKeySound(); | 669 | ODevice::inst()->playKeySound(); |
662 | else if ( action == "LedOn" ) | 670 | else if ( action == "LedOn" ) |
663 | ODevice::inst()->setLedState( Led_Mail, Led_On ); | 671 | ODevice::inst()->setLedState( Led_Mail, Led_On ); |
664 | else if ( action == "LedOff" ) | 672 | else if ( action == "LedOff" ) |
665 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); | 673 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); |
666 | else if ( action == "LogMessage" ) | 674 | else if ( action == "LogMessage" ) |
667 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 675 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
668 | else if ( action == "MessageBox" ) | 676 | else if ( action == "MessageBox" ) |
669 | QMessageBox::information( this, "Notification!", | 677 | QMessageBox::information( this, "Notification!", |
670 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 678 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
671 | #else | 679 | #else |
672 | #warning Actions do not work with Qt/X11 yet | 680 | #warning Actions do not work with Qt/X11 yet |
673 | #endif | 681 | #endif |
674 | } | 682 | } |
675 | 683 | ||
676 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) | 684 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) |
677 | { | 685 | { |
678 | #ifdef QWS | 686 | #ifdef QWS |
679 | if ( !iface ) | 687 | if ( !iface ) |
680 | { | 688 | { |
681 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); | 689 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); |
682 | return; | 690 | return; |
683 | } | 691 | } |
684 | 692 | ||
685 | if ( sniffing ) | 693 | if ( sniffing ) |
686 | { | 694 | { |
687 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); | 695 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); |
688 | return; | 696 | return; |
689 | } | 697 | } |
690 | 698 | ||
691 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", | 699 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", |
692 | (const char*) iface->name(), | 700 | (const char*) iface->name(), |
693 | (const char*) type, | 701 | (const char*) type, |
694 | (const char*) essid, | 702 | (const char*) essid, |
695 | channel, | 703 | channel, |
696 | (const char*) macaddr ); | 704 | (const char*) macaddr ); |
697 | 705 | ||
698 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | 706 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); |
699 | int count = 3; | 707 | int count = 3; |
700 | qDebug("sending %d messages",count); | 708 | qDebug("sending %d messages",count); |
701 | msg << QString("count") << QString::number(count); | 709 | msg << QString("count") << QString::number(count); |
702 | qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); | 710 | qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); |
703 | msg << QString(iface->name()) << QString("Mode") << type; | 711 | msg << QString(iface->name()) << QString("Mode") << type; |
704 | qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); | 712 | qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); |
705 | msg << QString(iface->name()) << QString("ESSID") << essid; | 713 | msg << QString(iface->name()) << QString("ESSID") << essid; |
706 | qDebug("msg >%s< channel >%d<", iface->name(),channel); | 714 | qDebug("msg >%s< channel >%d<", iface->name(),channel); |
707 | msg << QString(iface->name()) << QString("Channel") << channel; | 715 | msg << QString(iface->name()) << QString("Channel") << channel; |
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index b8b6730..f57dba2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |||
@@ -1,177 +1,177 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 "wellenreiterbase.h" | 16 | #include "wellenreiterbase.h" |
17 | 17 | ||
18 | #include <qlabel.h> | 18 | #include <qlabel.h> |
19 | #include <qlayout.h> | 19 | #include <qlayout.h> |
20 | 20 | ||
21 | #include "logwindow.h" | 21 | #include "logwindow.h" |
22 | #include "hexwindow.h" | 22 | #include "hexwindow.h" |
23 | #include "scanlist.h" | 23 | #include "scanlist.h" |
24 | #include "statwindow.h" | 24 | #include "statwindow.h" |
25 | #include "graphwindow.h" | 25 | #include "graphwindow.h" |
26 | 26 | ||
27 | #ifdef QWS | 27 | #ifdef QWS |
28 | #include <qpe/resource.h> | 28 | #include <qpe/resource.h> |
29 | #include <opie2/otabwidget.h> | 29 | #include <opie2/otabwidget.h> |
30 | using namespace Opie; | 30 | using namespace Opie; |
31 | #else | 31 | #else |
32 | #include "resource.h" | 32 | #include "resource.h" |
33 | #include <qtabwidget.h> | 33 | #include <qtabwidget.h> |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Constructs a WellenreiterBase which is a child of 'parent', with the | 38 | * Constructs a WellenreiterBase which is a child of 'parent', with the |
39 | * name 'name' and widget flags set to 'f' | 39 | * name 'name' and widget flags set to 'f' |
40 | */ | 40 | */ |
41 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) | 41 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) |
42 | : QWidget( parent, name, fl ) | 42 | : QWidget( parent, name, fl ) |
43 | { | 43 | { |
44 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); | 44 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); |
45 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); | 45 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); |
46 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); | 46 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); |
47 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); | 47 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); |
48 | 48 | ||
49 | if ( !name ) | 49 | if ( !name ) |
50 | setName( "WellenreiterBase" ); | 50 | setName( "WellenreiterBase" ); |
51 | resize( 191, 294 ); | 51 | resize( 191, 294 ); |
52 | #ifdef QWS | 52 | #ifdef QWS |
53 | setCaption( tr( "Wellenreiter/Opie" ) ); | 53 | setCaption( tr( "Wellenreiter/Opie" ) ); |
54 | #else | 54 | #else |
55 | setCaption( tr( "Wellenreiter/X11" ) ); | 55 | setCaption( tr( "Wellenreiter/X11" ) ); |
56 | #endif | 56 | #endif |
57 | WellenreiterBaseLayout = new QVBoxLayout( this ); | 57 | WellenreiterBaseLayout = new QVBoxLayout( this ); |
58 | WellenreiterBaseLayout->setSpacing( 2 ); | 58 | WellenreiterBaseLayout->setSpacing( 2 ); |
59 | WellenreiterBaseLayout->setMargin( 0 ); | 59 | WellenreiterBaseLayout->setMargin( 0 ); |
60 | #ifdef QWS | 60 | #ifdef QWS |
61 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); | 61 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); |
62 | #else | 62 | #else |
63 | TabWidget = new QTabWidget( this, "TabWidget" ); | 63 | TabWidget = new QTabWidget( this, "TabWidget" ); |
64 | #endif | 64 | #endif |
65 | ap = new QWidget( TabWidget, "ap" ); | 65 | ap = new QWidget( TabWidget, "ap" ); |
66 | apLayout = new QVBoxLayout( ap ); | 66 | apLayout = new QVBoxLayout( ap ); |
67 | apLayout->setSpacing( 2 ); | 67 | apLayout->setSpacing( 2 ); |
68 | apLayout->setMargin( 2 ); | 68 | apLayout->setMargin( 2 ); |
69 | 69 | ||
70 | //--------- NETVIEW TAB -------------- | 70 | //--------- NETVIEW TAB -------------- |
71 | 71 | ||
72 | netview = new MScanListView( ap ); | 72 | netview = new MScanListView( ap ); |
73 | apLayout->addWidget( netview ); | 73 | apLayout->addWidget( netview ); |
74 | 74 | ||
75 | //--------- GRAPH TAB -------------- | 75 | //--------- GRAPH TAB -------------- |
76 | 76 | ||
77 | graphwindow = new MGraphWindow( TabWidget, "Graph" ); | 77 | graphwindow = new MGraphWindow( TabWidget, "Graph" ); |
78 | 78 | ||
79 | //--------- LOG TAB -------------- | 79 | //--------- LOG TAB -------------- |
80 | 80 | ||
81 | logwindow = new MLogWindow( TabWidget, "Log" ); | 81 | logwindow = new MLogWindow( TabWidget, "Log" ); |
82 | 82 | ||
83 | //--------- HEX TAB -------------- | 83 | //--------- HEX TAB -------------- |
84 | 84 | ||
85 | hexwindow = new MHexWindow( TabWidget, "Hex" ); | 85 | hexwindow = new MHexWindow( TabWidget, "Hex" ); |
86 | 86 | ||
87 | //--------- STAT TAB -------------- | 87 | //--------- STAT TAB -------------- |
88 | 88 | ||
89 | statwindow = new MStatWindow( TabWidget, "Stat" ); | 89 | statwindow = new MStatWindow( TabWidget, "Stat" ); |
90 | 90 | ||
91 | //--------- ABOUT TAB -------------- | 91 | //--------- ABOUT TAB -------------- |
92 | 92 | ||
93 | about = new QWidget( TabWidget, "about" ); | 93 | about = new QWidget( TabWidget, "about" ); |
94 | aboutLayout = new QGridLayout( about ); | 94 | aboutLayout = new QGridLayout( about ); |
95 | aboutLayout->setSpacing( 6 ); | 95 | aboutLayout->setSpacing( 6 ); |
96 | aboutLayout->setMargin( 11 ); | 96 | aboutLayout->setMargin( 11 ); |
97 | 97 | ||
98 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); | 98 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); |
99 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); | 99 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); |
100 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); | 100 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); |
101 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); | 101 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); |
102 | PixmapLabel1_3_2->setLineWidth( 2 ); | 102 | PixmapLabel1_3_2->setLineWidth( 2 ); |
103 | PixmapLabel1_3_2->setMargin( 0 ); | 103 | PixmapLabel1_3_2->setMargin( 0 ); |
104 | PixmapLabel1_3_2->setMidLineWidth( 0 ); | 104 | PixmapLabel1_3_2->setMidLineWidth( 0 ); |
105 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); | 105 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); |
106 | PixmapLabel1_3_2->setScaledContents( TRUE ); | 106 | PixmapLabel1_3_2->setScaledContents( TRUE ); |
107 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); | 107 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); |
108 | 108 | ||
109 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); | 109 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); |
110 | 110 | ||
111 | TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" ); | 111 | TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" ); |
112 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); | 112 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); |
113 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); | 113 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); |
114 | TextLabel1_4_2_font.setPointSize( 10 ); | 114 | TextLabel1_4_2_font.setPointSize( 10 ); |
115 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); | 115 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); |
116 | TextLabel1_4_2->setText( tr( "<p align=center>\n" | 116 | TextLabel1_4_2->setText( tr( "<p align=center>\n" |
117 | "<hr>\n" | 117 | "<hr>\n" |
118 | "Michael 'Mickey' Lauer<br><hr>\n" | 118 | "Michael 'Mickey' Lauer<br><hr>\n" |
119 | "Max Moser<br>\n" | 119 | "Max Moser<br>\n" |
120 | "Martin J. Muench<br>\n" | 120 | "Martin J. Muench<br>\n" |
121 | "<b>www.wellenreiter.net</b>\n" | 121 | "<b>www.wellenreiter.net</b>\n" |
122 | "</p>" ) ); | 122 | "</p>" ) ); |
123 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); | 123 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); |
124 | 124 | ||
125 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); | 125 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); |
126 | 126 | ||
127 | #ifdef QWS | 127 | #ifdef QWS |
128 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Nets" ) ); | 128 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Nets" ) ); |
129 | TabWidget->addTab( graphwindow, "wellenreiter/graph", tr( "Graph" ) ); | 129 | TabWidget->addTab( graphwindow, "wellenreiter/graph", tr( "Graph" ) ); |
130 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); | 130 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); |
131 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); | 131 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); |
132 | TabWidget->addTab( statwindow, "wellenreiter/stat", tr( "Stat" ) ); | 132 | TabWidget->addTab( statwindow, "wellenreiter/stat", tr( "Stat" ) ); |
133 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); | 133 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); |
134 | #else | 134 | #else |
135 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); | 135 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); |
136 | TabWidget->addTab( graphwindow, /* "wellenreiter/graph", */ tr( "Graph" ) ); | 136 | TabWidget->addTab( graphwindow, /* "wellenreiter/graph", */ tr( "Graph" ) ); |
137 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); | 137 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); |
138 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); | 138 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); |
139 | TabWidget->addTab( statwindow, /* "wellenreiter/hex", */ tr( "Stat" ) ); | 139 | TabWidget->addTab( statwindow, /* "wellenreiter/hex", */ tr( "Stat" ) ); |
140 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); | 140 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); |
141 | #endif | 141 | #endif |
142 | WellenreiterBaseLayout->addWidget( TabWidget ); | 142 | WellenreiterBaseLayout->addWidget( TabWidget ); |
143 | 143 | ||
144 | #ifdef QWS | 144 | #ifdef QWS |
145 | TabWidget->setCurrentTab( tr( "Nets" ) ); | 145 | TabWidget->setCurrentTab( tr( "Nets" ) ); |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | } | 148 | } |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Destroys the object and frees any allocated resources | 151 | * Destroys the object and frees any allocated resources |
152 | */ | 152 | */ |
153 | WellenreiterBase::~WellenreiterBase() | 153 | WellenreiterBase::~WellenreiterBase() |
154 | { | 154 | { |
155 | // no need to delete child widgets, Qt does it all for us | 155 | // no need to delete child widgets, Qt does it all for us |
156 | } | 156 | } |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * Main event handler. Reimplemented to handle application | 159 | * Main event handler. Reimplemented to handle application |
160 | * font changes | 160 | * font changes |
161 | */ | 161 | */ |
162 | bool WellenreiterBase::event( QEvent* ev ) | 162 | bool WellenreiterBase::event( QEvent* ev ) |
163 | { | 163 | { |
164 | bool ret = QWidget::event( ev ); | 164 | bool ret = QWidget::event( ev ); |
165 | if ( ev->type() == QEvent::ApplicationFontChange ) { | 165 | if ( ev->type() == QEvent::ApplicationFontChange ) { |
166 | //QFont Log_2_font( Log_2->font() ); | 166 | //QFont Log_2_font( Log_2->font() ); |
167 | //Log_2_font.setFamily( "adobe-courier" ); | 167 | //Log_2_font.setFamily( "adobe-courier" ); |
168 | //Log_2_font.setPointSize( 8 ); | 168 | //Log_2_font.setPointSize( 8 ); |
169 | //Log_2->setFont( Log_2_font ); | 169 | //Log_2->setFont( Log_2_font ); |
170 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); | 170 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); |
171 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); | 171 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); |
172 | TextLabel1_4_2_font.setPointSize( 10 ); | 172 | TextLabel1_4_2_font.setPointSize( 10 ); |
173 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); | 173 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); |
174 | } | 174 | } |
175 | return ret; | 175 | return ret; |
176 | } | 176 | } |
177 | 177 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h index 2cc273e..5e00ddc 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.h +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h | |||
@@ -1,77 +1,77 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
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 | #ifndef WELLENREITERBASE_H | 16 | #ifndef WELLENREITERBASE_H |
17 | #define WELLENREITERBASE_H | 17 | #define WELLENREITERBASE_H |
18 | 18 | ||
19 | #include <qvariant.h> | 19 | #include <qvariant.h> |
20 | #include <qwidget.h> | 20 | #include <qwidget.h> |
21 | class QVBoxLayout; | 21 | class QVBoxLayout; |
22 | class QHBoxLayout; | 22 | class QHBoxLayout; |
23 | class QGridLayout; | 23 | class QGridLayout; |
24 | class QLabel; | 24 | class QLabel; |
25 | class MScanListView; | 25 | class MScanListView; |
26 | class MScanListItem; | 26 | class MScanListItem; |
27 | class QPushButton; | 27 | class QPushButton; |
28 | class MLogWindow; | 28 | class MLogWindow; |
29 | class MHexWindow; | 29 | class MHexWindow; |
30 | class MStatWindow; | 30 | class MStatWindow; |
31 | class MGraphWindow; | 31 | class MGraphWindow; |
32 | 32 | ||
33 | #ifdef QWS | 33 | #ifdef QWS |
34 | #include <opie2/otabwidget.h> | 34 | #include <opie2/otabwidget.h> |
35 | using namespace Opie; | 35 | using namespace Opie; |
36 | #else | 36 | #else |
37 | class QTabWidget; | 37 | class QTabWidget; |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | class WellenreiterBase : public QWidget | 40 | class WellenreiterBase : public QWidget |
41 | { | 41 | { |
42 | Q_OBJECT | 42 | Q_OBJECT |
43 | 43 | ||
44 | public: | 44 | public: |
45 | WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 45 | WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
46 | ~WellenreiterBase(); | 46 | ~WellenreiterBase(); |
47 | 47 | ||
48 | #ifdef QWS | 48 | #ifdef QWS |
49 | OTabWidget* TabWidget; | 49 | OTabWidget* TabWidget; |
50 | #else | 50 | #else |
51 | QTabWidget* TabWidget; | 51 | QTabWidget* TabWidget; |
52 | #endif | 52 | #endif |
53 | QWidget* ap; | 53 | QWidget* ap; |
54 | MScanListView* netview; | 54 | MScanListView* netview; |
55 | MLogWindow* logwindow; | 55 | MLogWindow* logwindow; |
56 | MHexWindow* hexwindow; | 56 | MHexWindow* hexwindow; |
57 | MStatWindow* statwindow; | 57 | MStatWindow* statwindow; |
58 | MGraphWindow* graphwindow; | 58 | MGraphWindow* graphwindow; |
59 | QWidget* about; | 59 | QWidget* about; |
60 | QLabel* PixmapLabel1_3_2; | 60 | QLabel* PixmapLabel1_3_2; |
61 | QLabel* TextLabel1_4_2; | 61 | QLabel* TextLabel1_4_2; |
62 | 62 | ||
63 | protected: | 63 | protected: |
64 | QVBoxLayout* WellenreiterBaseLayout; | 64 | QVBoxLayout* WellenreiterBaseLayout; |
65 | QVBoxLayout* apLayout; | 65 | QVBoxLayout* apLayout; |
66 | QGridLayout* aboutLayout; | 66 | QGridLayout* aboutLayout; |
67 | bool event( QEvent* ); | 67 | bool event( QEvent* ); |
68 | 68 | ||
69 | QPixmap* ani1; | 69 | QPixmap* ani1; |
70 | QPixmap* ani2; | 70 | QPixmap* ani2; |
71 | QPixmap* ani3; | 71 | QPixmap* ani3; |
72 | QPixmap* ani4; | 72 | QPixmap* ani4; |
73 | 73 | ||
74 | 74 | ||
75 | }; | 75 | }; |
76 | 76 | ||
77 | #endif // WELLENREITERBASE_H | 77 | #endif // WELLENREITERBASE_H |