summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-12 00:09:13 (UTC)
committer wimpie <wimpie>2005-01-12 00:09:13 (UTC)
commit4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 (patch) (side-by-side diff)
tree90d4ac2f37ec43f69008b3cba67ff018e3af3ee1
parentb0afa096730ac7893fcd25873f6fd09fcef32a95 (diff)
downloadopie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.zip
opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.gz
opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.bz2
GUI changes to profileedit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/resources.cpp12
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.cpp52
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.h7
-rw-r--r--noncore/settings/networksettings2/profile/profileGUI.ui835
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.cpp33
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.h3
6 files changed, 476 insertions, 466 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/resources.cpp b/noncore/settings/networksettings2/networksettings2/resources.cpp
index 2dd91f8..4d46778 100644
--- a/noncore/settings/networksettings2/networksettings2/resources.cpp
+++ b/noncore/settings/networksettings2/networksettings2/resources.cpp
@@ -75,22 +75,22 @@ TheNSResources::TheNSResources( void ) : NodeTypeNameMap(),
}
}
// define built in Node types to Description map
addNodeType( "device", tr( "Network Device" ),
tr( "<p>Devices that can handle IP packets</p>" ) );
addNodeType( "line", tr( "Character device" ),
tr( "<p>Devices that can handle single bytes</p>" ) );
- addNodeType( "NetworkSetup", tr( "IP NetworkSetup" ),
- tr( "<p>Nodes that provide working IP NetworkSetups</p>" ) );
- addNodeType( "fullsetup", tr( "NetworkSetup Profile" ),
- tr( "<p>Fully configured NetworkSetup profile</p>" ) );
- addNodeType( "GPRS", tr( "NetworkSetup to GPRS device" ),
- tr( "<p>NetworkSetup to a GPRS capable device</p>" ) );
+ addNodeType( "connection", tr( "IP Connection" ),
+ tr( "<p>Nodes that provide working IP connection</p>" ) );
+ addNodeType( "fullsetup", tr( "Connection Profile" ),
+ tr( "<p>Fully configured network profile</p>" ) );
+ addNodeType( "GPRS", tr( "Connection to GPRS device" ),
+ tr( "<p>Connection to a GPRS capable device</p>" ) );
// get access to the system
TheSystem = new System();
}
TheNSResources::~TheNSResources( void ) {
diff --git a/noncore/settings/networksettings2/networksettings2/system.cpp b/noncore/settings/networksettings2/networksettings2/system.cpp
index 33cc5bd..82f5c43 100644
--- a/noncore/settings/networksettings2/networksettings2/system.cpp
+++ b/noncore/settings/networksettings2/networksettings2/system.cpp
@@ -213,46 +213,58 @@ void System::refreshStatistics( InterfaceInfo & I ) {
if( (loc = line.find(":") ) == -1) {
continue;
}
if( I.Name != line.left(loc) )
continue;
// tokenize
- SL = QStringList::split( ' ', line, FALSE );
+ SL = QStringList::split( ' ', line.mid(loc+1), FALSE );
// update data
switch( version ) {
case 1 :
- I.RcvBytes = SL[1];
- I.RcvErrors = SL[3];
- I.RcvDropped = SL[4];
+ I.RcvBytes = "";
+ I.RcvPackets = SL[0];
+ I.RcvErrors = SL[1];
+ I.RcvDropped = SL[2];
+
+ I.SndBytes = "";
+ I.SndPackets = SL[5];
+ I.SndErrors = SL[6];
+ I.SndDropped = SL[7];
+
+ I.Collisions = SL[9];
+ break;
+ case 2 :
+ I.RcvBytes = SL[0];
+ I.RcvPackets = SL[1];
+ I.RcvErrors = SL[2];
+ I.RcvDropped = SL[3];
+
I.SndBytes = SL[6];
+ I.SndPackets = SL[7];
I.SndErrors = SL[8];
I.SndDropped = SL[9];
+
I.Collisions = SL[11];
break;
- case 2 :
- I.RcvBytes = SL[1];
- I.RcvErrors = SL[3];
- I.RcvDropped = SL[4];
- I.SndBytes = SL[7];
- I.SndErrors = SL[9];
- I.SndDropped = SL[10];
- I.Collisions = SL[12];
- break;
case 3 :
- I.RcvBytes = SL[1];
- I.RcvErrors = SL[3];
- I.RcvDropped = SL[4];
- I.SndBytes = SL[9];
- I.SndErrors = SL[11];
- I.SndDropped = SL[12];
- I.Collisions = SL[14];
+ I.RcvBytes = SL[0];
+ I.RcvPackets = SL[1];
+ I.RcvErrors = SL[2];
+ I.RcvDropped = SL[3];
+
+ I.SndBytes = SL[8];
+ I.SndPackets = SL[9];
+ I.SndErrors = SL[10];
+ I.SndDropped = SL[11];
+
+ I.Collisions = SL[13];
break;
}
break;
}
}
//
// THIS UPDATES THE LIST -> INTERFACES ARE NOT DELETED BUT
diff --git a/noncore/settings/networksettings2/networksettings2/system.h b/noncore/settings/networksettings2/networksettings2/system.h
index 794b868..52613d8 100644
--- a/noncore/settings/networksettings2/networksettings2/system.h
+++ b/noncore/settings/networksettings2/networksettings2/system.h
@@ -80,20 +80,23 @@ public :
QString BCastAddress; // Broadcast Address
QString Netmask; // Netmask
QString DstAddress; // Peer address (if P-t-P)
bool IsUp; // interface is UP
bool HasMulticast; // Supports Multicast
bool IsPointToPoint; // IsPointToPoint card
QString RcvBytes;
- QString SndBytes;
QString RcvErrors;
- QString SndErrors;
+ QString RcvPackets;
QString RcvDropped;
+
+ QString SndBytes;
+ QString SndErrors;
+ QString SndPackets;
QString SndDropped;
QString Collisions;
};
class System : public QObject {
Q_OBJECT
diff --git a/noncore/settings/networksettings2/profile/profileGUI.ui b/noncore/settings/networksettings2/profile/profileGUI.ui
index 5bf9a9c..8b421e8 100644
--- a/noncore/settings/networksettings2/profile/profileGUI.ui
+++ b/noncore/settings/networksettings2/profile/profileGUI.ui
@@ -6,38 +6,38 @@
<name>name</name>
<cstring>Profile_FRM</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>276</width>
- <height>231</height>
+ <width>551</width>
+ <height>547</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Profile</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
- <number>0</number>
+ <number>1</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>0</number>
+ <number>3</number>
</property>
<widget>
<class>QTabWidget</class>
<property stdset="1">
<name>name</name>
<cstring>TabWidget6</cstring>
</property>
<property>
@@ -943,180 +943,111 @@
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>0</number>
</property>
<widget>
- <class>QLayoutWidget</class>
+ <class>QGroupBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout5</cstring>
+ <cstring>Receiving_GB</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>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel1_2</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Receiving</string>
- </property>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer17_2</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>
- </hbox>
- </widget>
- <widget>
- <class>QLayoutWidget</class>
<property stdset="1">
- <name>name</name>
- <cstring>Layout43</cstring>
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Receiving</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
<name>margin</name>
- <number>2</number>
+ <number>4</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>0</number>
+ <number>2</number>
</property>
<widget>
- <class>QFrame</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Frame114</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>minimumSize</name>
- <size>
- <width>5</width>
- <height>0</height>
- </size>
- </property>
- <property stdset="1">
- <name>maximumSize</name>
- <size>
- <width>5</width>
- <height>32767</height>
- </size>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- </widget>
- <widget>
- <class>QFrame</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Rcv_GB</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- <property>
- <name>layoutMargin</name>
+ <cstring>Layout11</cstring>
</property>
<property>
<name>layoutSpacing</name>
</property>
- <grid>
+ <hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>1</number>
+ <number>2</number>
</property>
- <widget row="1" column="0" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_5_9</cstring>
+ <cstring>xxxxxxxxxxxxx</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Errors</string>
+ <string>Pkt</string>
</property>
</widget>
- <widget row="0" column="1" rowspan="1" colspan="3" >
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>RcvPackets_LBL</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Panel</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>indent</name>
+ <number>0</number>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5_3_4</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Bytes</string>
+ </property>
+ </widget>
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>RcvBytes_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
@@ -1132,21 +1063,32 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- <widget row="1" column="3" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>RcvDropped_LBL</cstring>
+ <cstring>TextLabel1_5_3_4_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>ODO</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>RcvODO_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
@@ -1158,17 +1100,48 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- <widget row="1" column="1" >
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout12</cstring>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5_9</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Errors</string>
+ </property>
+ </widget>
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>RcvErrors_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
@@ -1184,233 +1157,266 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- <widget row="1" column="2" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_5_4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Dropped</string>
</property>
</widget>
- <widget row="0" column="0" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_5_3</cstring>
+ <cstring>RcvDropped_LBL</cstring>
</property>
<property stdset="1">
- <name>text</name>
- <string>Bytes</string>
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Panel</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>indent</name>
+ <number>0</number>
</property>
</widget>
- </grid>
+ </hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QFrame</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout6</cstring>
+ <cstring>Frame114</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>5</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>5</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Raised</enum>
</property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel1</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>1</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Transmitting</string>
- </property>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer18_2</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>
- </hbox>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QFrame</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout44</cstring>
+ <cstring>Frame115</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>5</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>maximumSize</name>
+ <size>
+ <width>5</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>NoFrame</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Plain</enum>
+ </property>
+ </widget>
+ <widget>
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Sending_GB</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Sending</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
<name>margin</name>
- <number>2</number>
+ <number>4</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>0</number>
+ <number>2</number>
</property>
<widget>
- <class>QFrame</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Frame115</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>minimumSize</name>
- <size>
- <width>5</width>
- <height>0</height>
- </size>
- </property>
- <property stdset="1">
- <name>maximumSize</name>
- <size>
- <width>5</width>
- <height>32767</height>
- </size>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Plain</enum>
- </property>
- </widget>
- <widget>
- <class>QFrame</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Snd_GB</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- <property>
- <name>layoutMargin</name>
+ <cstring>Layout13</cstring>
</property>
<property>
<name>layoutSpacing</name>
</property>
- <grid>
+ <hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>1</number>
+ <number>2</number>
</property>
- <widget row="1" column="0" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_5_9_2</cstring>
+ <cstring>dfsfadf</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Errors</string>
+ <string>Pkt</string>
</property>
</widget>
- <widget row="1" column="2" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_5_4_2</cstring>
+ <cstring>SndPackets_LBL</cstring>
</property>
<property stdset="1">
- <name>text</name>
- <string>Dropped</string>
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Panel</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>indent</name>
+ <number>0</number>
</property>
</widget>
- <widget row="0" column="0" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_5_3_2</cstring>
+ <cstring>TextLabel1_5_3_4_4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Bytes</string>
</property>
</widget>
- <widget row="1" column="3" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>SndDropped_LBL</cstring>
+ <cstring>SndBytes_LBL</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>frameShape</name>
+ <enum>Panel</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>indent</name>
+ <number>0</number>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5_3_4_2_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>ODO</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>SndODO_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
@@ -1422,17 +1428,48 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- <widget row="1" column="1" >
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout14</cstring>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>2</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5_9_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Errors</string>
+ </property>
+ </widget>
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>SndErrors_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
@@ -1448,21 +1485,32 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- <widget row="0" column="1" rowspan="1" colspan="3" >
+ <widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>SndBytes_LBL</cstring>
+ <cstring>TextLabel1_5_4_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Dropped</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>SndDropped_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
@@ -1474,57 +1522,90 @@
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property stdset="1">
<name>indent</name>
<number>0</number>
</property>
</widget>
- </grid>
+ </hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>QGroupBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout7</cstring>
+ <cstring>Misc_GB</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Miscellaneous</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
- <number>0</number>
+ <number>4</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>6</number>
+ <number>2</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>TextLabel1_3</cstring>
+ <cstring>TextLabel1_5_3_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Collisions</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Collisions_LBL</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
- <hsizetype>0</hsizetype>
+ <hsizetype>7</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
- <name>text</name>
- <string>Others</string>
+ <name>frameShape</name>
+ <enum>Panel</enum>
+ </property>
+ <property stdset="1">
+ <name>frameShadow</name>
+ <enum>Sunken</enum>
+ </property>
+ <property stdset="1">
+ <name>indent</name>
+ <number>0</number>
</property>
</widget>
<spacer>
<property>
<name>name</name>
- <cstring>Spacer19</cstring>
+ <cstring>Spacer10</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
@@ -1532,175 +1613,37 @@
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- </hbox>
- </widget>
- <widget>
- <class>QLayoutWidget</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Layout45</cstring>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>2</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>0</number>
- </property>
- <widget>
- <class>QFrame</class>
- <property stdset="1">
+ <spacer>
+ <property>
<name>name</name>
- <cstring>Frame116</cstring>
+ <cstring>Spacer13</cstring>
</property>
<property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
+ <name>orientation</name>
+ <enum>Horizontal</enum>
</property>
<property stdset="1">
- <name>minimumSize</name>
- <size>
- <width>5</width>
- <height>0</height>
- </size>
+ <name>sizeType</name>
+ <enum>Expanding</enum>
</property>
- <property stdset="1">
- <name>maximumSize</name>
+ <property>
+ <name>sizeHint</name>
<size>
- <width>5</width>
- <height>32767</height>
+ <width>20</width>
+ <height>20</height>
</size>
</property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- </widget>
- <widget>
- <class>QFrame</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Collisions_FRM</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>5</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>NoFrame</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Raised</enum>
- </property>
- <property>
- <name>layoutMargin</name>
- </property>
- <property>
- <name>layoutSpacing</name>
- </property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>2</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel1_5_3_3</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Collisions</string>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Collisions_LBL</cstring>
- </property>
- <property stdset="1">
- <name>sizePolicy</name>
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>1</vsizetype>
- </sizepolicy>
- </property>
- <property stdset="1">
- <name>frameShape</name>
- <enum>Panel</enum>
- </property>
- <property stdset="1">
- <name>frameShadow</name>
- <enum>Sunken</enum>
- </property>
- <property stdset="1">
- <name>indent</name>
- <number>0</number>
- </property>
- </widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer18</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>
- </hbox>
- </widget>
+ </spacer>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer17</cstring>
</property>
<property stdset="1">
@@ -1718,17 +1661,17 @@
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout17</cstring>
+ <cstring>Layout10</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
@@ -1736,16 +1679,20 @@
</property>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>Refresh_CB</cstring>
</property>
<property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
<name>text</name>
<string>Live feed </string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer57</cstring>
@@ -1761,25 +1708,47 @@
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ResetODO_But</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Reset ODO</string>
+ </property>
+ </widget>
</hbox>
</widget>
</vbox>
</widget>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>Refresh_CB</sender>
<signal>toggled(bool)</signal>
<receiver>Profile_FRM</receiver>
<slot>SLOT_AutoRefresh(bool)</slot>
</connection>
+ <connection>
+ <sender>ResetODO_But</sender>
+ <signal>clicked()</signal>
+ <receiver>Profile_FRM</receiver>
+ <slot>SLOT_ResetODO()</slot>
+ </connection>
<slot access="public">SLOT_AutoRefresh(bool)</slot>
+ <slot access="public">SLOT_ResetODO()</slot>
</connections>
</UI>
diff --git a/noncore/settings/networksettings2/profile/profileedit.cpp b/noncore/settings/networksettings2/profile/profileedit.cpp
index ad943fe..1713f0c 100644
--- a/noncore/settings/networksettings2/profile/profileedit.cpp
+++ b/noncore/settings/networksettings2/profile/profileedit.cpp
@@ -1,9 +1,11 @@
#include <qlabel.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
#include <qframe.h>
#include <qcheckbox.h>
#include <qmultilineedit.h>
#include <qcheckbox.h>
#include <GUIUtils.h>
#include <netnode.h>
#include <resources.h>
@@ -18,23 +20,27 @@ ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
Log(( "Interface %p %p %p: %d\n", II,
TNNI, TNNI->networkSetup(), (II) ? II->IsUp : 0 ));
NNI = TNNI;
Dev = NNI->runtime()->device();
if( ( II = NNI->networkSetup()->assignedInterface() ) ) {
Refresh_CB->setEnabled( TRUE );
- Snd_GB->setEnabled( TRUE );
- Rcv_GB->setEnabled( TRUE );
- Collisions_FRM->setEnabled( TRUE );
+ ResetODO_But->setEnabled( TRUE );
+ Sending_GB->setEnabled( TRUE );
+ Receiving_GB->setEnabled( TRUE );
+ Misc_GB->setEnabled( TRUE );
// show current content
SLOT_Refresh();
+ // initialize ODO
+ SLOT_ResetODO();
+
// fill in static data
InterfaceName_LBL->setText( II->Name );
IPAddress_LBL->setText( II->Address );
SubnetMask_LBL->setText( II->Netmask );
Broadcast_LBL->setText( II->BCastAddress );
MACAddress_LBL->setText( II->MACAddress );
if( II->IsPointToPoint ) {
PointToPoint_LBL->setText( II->DstAddress );
@@ -77,26 +83,43 @@ bool ProfileEdit::commit( ProfileData & Data ) {
CBM( Data.Disabled, Disabled_CB, SM );
CBM( Data.Confirm, Confirm_CB, SM );
return SM;
}
void ProfileEdit::SLOT_Refresh( void ) {
InterfaceInfo * II = NNI->networkSetup()->assignedInterface();
+ QString S;
NSResources->system().refreshStatistics( *II );
+
RcvBytes_LBL->setText( II->RcvBytes );
- SndBytes_LBL->setText( II->SndBytes );
+ RcvPackets_LBL->setText( II->RcvPackets );
RcvErrors_LBL->setText( II->RcvErrors );
- SndErrors_LBL->setText( II->SndErrors );
RcvDropped_LBL->setText( II->RcvDropped );
+ S.setNum( II->RcvBytes.toLong() - RcvODO );
+ RcvODO_LBL->setText( S );
+
+ SndBytes_LBL->setText( II->SndBytes );
+ SndPackets_LBL->setText( II->SndPackets );
+ SndErrors_LBL->setText( II->SndErrors );
SndDropped_LBL->setText( II->SndDropped );
+ S.setNum( II->SndBytes.toLong() - SndODO );
+ SndODO_LBL->setText( S );
+
Collisions_LBL->setText( II->Collisions );
}
void ProfileEdit::SLOT_AutoRefresh( bool ar ) {
if( ar ) {
RefreshTimer.start( 1000 );
SLOT_Refresh();
} else {
RefreshTimer.stop();
}
}
+
+void ProfileEdit::SLOT_ResetODO( void ) {
+ InterfaceInfo * II = NNI->networkSetup()->assignedInterface();
+ RcvODO = II->RcvBytes.toLong();
+ SndODO = II->SndBytes.toLong();
+ SLOT_Refresh();
+}
diff --git a/noncore/settings/networksettings2/profile/profileedit.h b/noncore/settings/networksettings2/profile/profileedit.h
index 9cde845..56bd15d 100644
--- a/noncore/settings/networksettings2/profile/profileedit.h
+++ b/noncore/settings/networksettings2/profile/profileedit.h
@@ -15,15 +15,18 @@ public :
QString acceptable( void );
bool commit( ProfileData & Data );
void showData( ProfileData & Data );
public slots :
void SLOT_AutoRefresh( bool );
void SLOT_Refresh( void );
+ void SLOT_ResetODO( void );
private :
QTimer RefreshTimer;
ANetNodeInstance * NNI;
RuntimeInfo * Dev;
+ long RcvODO;
+ long SndODO;
};