summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui187
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp16
2 files changed, 158 insertions, 45 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui
index 113e783..3a1c258 100644
--- a/noncore/net/wellenreiter/gui/configbase.ui
+++ b/noncore/net/wellenreiter/gui/configbase.ui
@@ -1,206 +1,206 @@
<!DOCTYPE UI><UI>
<class>WellenreiterConfigBase</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>WellenreiterConfigBase</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>246</width>
+ <width>250</width>
<height>371</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Wellenreiter II COnfiguration Dialog</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>2</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>3</number>
</property>
<widget row="0" column="0" >
<class>QTabWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<property>
<name>whatsThis</name>
<string></string>
</property>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>Interface</string>
</attribute>
<vbox>
<property stdset="1">
<name>margin</name>
<number>6</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout7</cstring>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="1" column="1" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>&lt;select&gt;</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>cisco</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>wlan-ng</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>hostap</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>orinoco</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>&lt;manual&gt;</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>&lt;file&gt;</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>deviceType</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property>
<name>whatsThis</name>
<string>Choose the type of driver used for sniffing.</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2_3</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Driver:</string>
</property>
</widget>
<widget row="0" column="1" >
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>interfaceName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>editable</name>
<bool>false</bool>
</property>
<property>
<name>whatsThis</name>
<string>Choose the interface used for sniffing.</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_2</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Name:</string>
</property>
</widget>
@@ -407,480 +407,585 @@
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget row="1" column="1" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel6</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>6</string>
</property>
</widget>
<widget row="1" column="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel8</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>8</string>
</property>
</widget>
<widget row="0" column="2" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>2</string>
</property>
</widget>
<widget row="1" column="4" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel9</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>9</string>
</property>
</widget>
<widget row="0" column="1" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>1</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channelAll</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>All</string>
</property>
</widget>
<widget row="2" column="1" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel11</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>11</string>
</property>
</widget>
<widget row="2" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel10</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>10</string>
</property>
</widget>
<widget row="1" column="2" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel7</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>7</string>
</property>
</widget>
<widget row="0" column="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>3</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel5</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>5</string>
</property>
</widget>
<widget row="0" column="4" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>4</string>
</property>
</widget>
<widget row="2" column="2" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel12</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>12</string>
</property>
</widget>
<widget row="2" column="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel13</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>13</string>
</property>
</widget>
<widget row="2" column="4" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>channel14</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>14</string>
</property>
</widget>
</grid>
</widget>
</vbox>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>Capture</string>
</attribute>
<grid>
<property stdset="1">
<name>margin</name>
<number>5</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>3</number>
</property>
- <widget row="2" column="0" rowspan="1" colspan="3" >
- <class>ProtocolListView</class>
- <property stdset="1">
- <name>name</name>
- <cstring>capturePackets</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- </sizepolicy>
- </property>
- </widget>
- <widget row="1" column="0" rowspan="1" colspan="3" >
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>captureFileName</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>/tmp/capture</string>
- </property>
- <property>
- <name>whatsThis</name>
- <string>Configure the name of the capture file.</string>
- </property>
- </widget>
<widget row="0" column="2" >
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>getCaptureFileName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Browse</string>
</property>
<property>
<name>whatsThis</name>
<string>Click to open a file requester to choose a capture file name.</string>
</property>
</widget>
<spacer row="0" column="1" >
<property>
<name>name</name>
<cstring>Spacer2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget row="0" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>writeCaptureFile</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Write Capture Files To</string>
</property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
+ </property>
<property>
<name>whatsThis</name>
<string>Check this to write an ethereal compatible capture file.</string>
</property>
</widget>
+ <widget row="1" column="0" rowspan="1" colspan="3" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>captureFileName</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>/tmp/capture</string>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Configure the name of the capture file.</string>
+ </property>
+ </widget>
+ <widget row="2" column="0" rowspan="1" colspan="3" >
+ <class>ProtocolListView</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>capturePackets</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget row="3" column="0" rowspan="1" colspan="3" >
+ <class>QButtonGroup</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Hex View Buffer</string>
+ </property>
+ <property stdset="1">
+ <name>exclusive</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>6</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>1</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>hexViewBufferUnlimited</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>unlimited</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout7</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QRadioButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>hexViewBufferLimited</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>limited to</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>hexViewBufferSize</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>suffix</name>
+ <string> Packets</string>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>10000</number>
+ </property>
+ <property stdset="1">
+ <name>lineStep</name>
+ <number>100</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>2000</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
</grid>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>Parse</string>
</attribute>
<grid>
<property stdset="1">
<name>margin</name>
<number>5</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>3</number>
</property>
<widget row="0" column="0" >
<class>ProtocolListView</class>
<property stdset="1">
<name>name</name>
<cstring>parsePackets</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
</sizepolicy>
</property>
</widget>
</grid>
</widget>
<widget>
<class>QWidget</class>
<property stdset="1">
<name>name</name>
<cstring>tab</cstring>
</property>
<attribute>
<name>title</name>
<string>UI</string>
</attribute>
<vbox>
<property stdset="1">
<name>margin</name>
<number>5</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>3</number>
</property>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>lookupVendor</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Lookup MAC vendor names</string>
</property>
<property>
<name>whatsThis</name>
<string>Check this to lookup MAC vendor names.</string>
</property>
</widget>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>openTree</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Open Tree On New Station</string>
</property>
<property>
<name>whatsThis</name>
<string>Check this to automatically make a tree visible when a new station is detected.</string>
</property>
</widget>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>disablePM</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Disable Power Management</string>
</property>
<property>
<name>whatsThis</name>
<string>Check this to disable power management while scanning.</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer3</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>GroupBox4_2</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>title</name>
<string>Action on detecting a new</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>3</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>0</number>
</property>
<widget row="0" column="0" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>2</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget row="4" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Wired Station:</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Network:</string>
@@ -1409,194 +1514,200 @@
<number>0</number>
</property>
<property>
<name>whatsThis</name>
<string>Hostadress where the gps daemon listens on.</string>
</property>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>:</string>
</property>
</widget>
<widget>
<class>QSpinBox</class>
<property stdset="1">
<name>name</name>
<cstring>gpsdPort</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>maxValue</name>
<number>65535</number>
</property>
<property stdset="1">
<name>minValue</name>
<number>1024</number>
</property>
<property stdset="1">
<name>value</name>
<number>2947</number>
</property>
<property>
<name>whatsThis</name>
<string>Port number where the gps daemon listens on.</string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>startGPS</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Start gpsd on localhost</string>
</property>
<property>
<name>whatsThis</name>
<string>Check to start the GPS daemon on localhost.</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>commandGPS</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>gpsd -p /dev/ttyS3 -s 4800</string>
</property>
<property>
<name>whatsThis</name>
<string>Command line to start the gps daemon.</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</grid>
</widget>
</widget>
</grid>
</widget>
<customwidgets>
<customwidget>
<class>ProtocolListView</class>
<header location="local">protolistview.h</header>
<sizehint>
<width>100</width>
<height>100</height>
</sizehint>
<container>0</container>
<sizepolicy>
<hordata>3</hordata>
<verdata>3</verdata>
</sizepolicy>
<pixmap>image0</pixmap>
</customwidget>
</customwidgets>
<images>
<image>
<name>image0</name>
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
<connections>
<connection>
<sender>hopChannels</sender>
<signal>toggled(bool)</signal>
<receiver>hopInterval</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>hopChannels</sender>
<signal>toggled(bool)</signal>
<receiver>TextLabel1</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableActiveScanning</sender>
<signal>toggled(bool)</signal>
<receiver>GroupBox3</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableActiveScanning</sender>
<signal>toggled(bool)</signal>
<receiver>GroupBox4</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>writeCaptureFile</sender>
<signal>toggled(bool)</signal>
<receiver>getCaptureFileName</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>writeCaptureFile</sender>
<signal>toggled(bool)</signal>
<receiver>captureFileName</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>writeCaptureFile</sender>
<signal>toggled(bool)</signal>
<receiver>capturePackets</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableGPS</sender>
<signal>toggled(bool)</signal>
<receiver>gpsdHost</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>enableGPS</sender>
<signal>toggled(bool)</signal>
<receiver>gpsdPort</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>startGPS</sender>
<signal>toggled(bool)</signal>
<receiver>commandGPS</receiver>
<slot>setEnabled(bool)</slot>
</connection>
+ <connection>
+ <sender>hexViewBufferLimited</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>hexViewBufferSize</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
</connections>
</UI>
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index f035e89..9bdf3e0 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -1,180 +1,182 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Wellenreiter II.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
***********************************************************************/
#include "wellenreiterbase.h"
#include <qlabel.h>
#include <qlayout.h>
#include "logwindow.h"
#include "packetview.h"
#include "scanlist.h"
#include "statwindow.h"
#include "graphwindow.h"
#ifdef QWS
#include <qpe/resource.h>
#include <opie2/otabwidget.h>
using namespace Opie;
#else
#include "resource.h"
#include <qtabwidget.h>
#endif
/*
* Constructs a WellenreiterBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
using namespace Opie::Ui;
using namespace Opie::Ui;
using namespace Opie::Ui;
WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
{
//ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) );
//ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) );
//ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) );
//ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) );
if ( !name )
setName( "WellenreiterBase" );
resize( 191, 294 );
#ifdef QWS
setCaption( tr( "Wellenreiter/Opie" ) );
#else
setCaption( tr( "Wellenreiter/X11" ) );
#endif
WellenreiterBaseLayout = new QVBoxLayout( this );
WellenreiterBaseLayout->setSpacing( 2 );
WellenreiterBaseLayout->setMargin( 0 );
#ifdef QWS
TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global );
#else
TabWidget = new QTabWidget( this, "TabWidget" );
#endif
ap = new QWidget( TabWidget, "ap" );
apLayout = new QVBoxLayout( ap );
apLayout->setSpacing( 2 );
apLayout->setMargin( 2 );
//--------- NETVIEW TAB --------------
netview = new MScanListView( ap );
apLayout->addWidget( netview );
//--------- GRAPH TAB --------------
graphwindow = new MGraphWindow( TabWidget, "Graph" );
//--------- LOG TAB --------------
logwindow = new MLogWindow( TabWidget, "Log" );
//--------- HEX TAB --------------
hexwindow = new PacketView( TabWidget, "Hex" );
//--------- STAT TAB --------------
statwindow = new MStatWindow( TabWidget, "Stat" );
//--------- ABOUT TAB --------------
about = new QWidget( TabWidget, "about" );
aboutLayout = new QGridLayout( about );
aboutLayout->setSpacing( 6 );
aboutLayout->setMargin( 11 );
PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" );
PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) );
PixmapLabel1_3_2->setFrameShape( QLabel::Panel );
PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken );
PixmapLabel1_3_2->setLineWidth( 2 );
PixmapLabel1_3_2->setMargin( 0 );
PixmapLabel1_3_2->setMidLineWidth( 0 );
PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) );
PixmapLabel1_3_2->setScaledContents( TRUE );
PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) );
aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 );
TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" );
QFont TextLabel1_4_2_font( TextLabel1_4_2->font() );
TextLabel1_4_2_font.setFamily( "adobe-helvetica" );
TextLabel1_4_2_font.setPointSize( 10 );
TextLabel1_4_2->setFont( TextLabel1_4_2_font );
- TextLabel1_4_2->setText( tr( "<p align=center>\n"
-"<hr>\n"
-"Michael 'Mickey' Lauer<br><hr>\n"
-"Max Moser<br>\n"
-"Martin J. Muench<br>\n"
-"<b>www.wellenreiter.net</b>\n"
-"</p>" ) );
+ TextLabel1_4_2->setText(
+"<p align=center>"
+"<hr>"
+"<b>(C) Michael 'Mickey' Lauer</b><br>"
+"<hr>"
+"mickey@Vanille.de<br>"
+"www.Vanille.de/projects/wellenreiter.html<br>"
+"www.wellenreiter.net"
+"</p>" );
TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) );
aboutLayout->addWidget( TextLabel1_4_2, 1, 0 );
#ifdef QWS
TabWidget->addTab( ap, "wellenreiter/networks", tr( "Nets" ) );
TabWidget->addTab( graphwindow, "wellenreiter/graph", tr( "Graph" ) );
TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) );
TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) );
TabWidget->addTab( statwindow, "wellenreiter/stat", tr( "Stat" ) );
TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) );
#else
TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) );
TabWidget->addTab( graphwindow, /* "wellenreiter/graph", */ tr( "Graph" ) );
TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) );
TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) );
TabWidget->addTab( statwindow, /* "wellenreiter/hex", */ tr( "Stat" ) );
TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) );
#endif
WellenreiterBaseLayout->addWidget( TabWidget );
#ifdef QWS
TabWidget->setCurrentTab( tr( "Nets" ) );
#endif
}
/*
* Destroys the object and frees any allocated resources
*/
WellenreiterBase::~WellenreiterBase()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Main event handler. Reimplemented to handle application
* font changes
*/
bool WellenreiterBase::event( QEvent* ev )
{
bool ret = QWidget::event( ev );
if ( ev->type() == QEvent::ApplicationFontChange ) {
//QFont Log_2_font( Log_2->font() );
//Log_2_font.setFamily( "adobe-courier" );
//Log_2_font.setPointSize( 8 );
//Log_2->setFont( Log_2_font );
QFont TextLabel1_4_2_font( TextLabel1_4_2->font() );
TextLabel1_4_2_font.setFamily( "adobe-helvetica" );
TextLabel1_4_2_font.setPointSize( 10 );
TextLabel1_4_2->setFont( TextLabel1_4_2_font );
}
return ret;
}