summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/profile/profileedit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/profile/profileedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.cpp33
1 files changed, 28 insertions, 5 deletions
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,4 +1,6 @@
1#include <qlabel.h> 1#include <qlabel.h>
2#include <qgroupbox.h>
3#include <qpushbutton.h>
2#include <qframe.h> 4#include <qframe.h>
3#include <qcheckbox.h> 5#include <qcheckbox.h>
4#include <qmultilineedit.h> 6#include <qmultilineedit.h>
@@ -23,13 +25,17 @@ ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
23 if( ( II = NNI->networkSetup()->assignedInterface() ) ) { 25 if( ( II = NNI->networkSetup()->assignedInterface() ) ) {
24 26
25 Refresh_CB->setEnabled( TRUE ); 27 Refresh_CB->setEnabled( TRUE );
26 Snd_GB->setEnabled( TRUE ); 28 ResetODO_But->setEnabled( TRUE );
27 Rcv_GB->setEnabled( TRUE ); 29 Sending_GB->setEnabled( TRUE );
28 Collisions_FRM->setEnabled( TRUE ); 30 Receiving_GB->setEnabled( TRUE );
31 Misc_GB->setEnabled( TRUE );
29 32
30 // show current content 33 // show current content
31 SLOT_Refresh(); 34 SLOT_Refresh();
32 35
36 // initialize ODO
37 SLOT_ResetODO();
38
33 // fill in static data 39 // fill in static data
34 InterfaceName_LBL->setText( II->Name ); 40 InterfaceName_LBL->setText( II->Name );
35 IPAddress_LBL->setText( II->Address ); 41 IPAddress_LBL->setText( II->Address );
@@ -82,13 +88,23 @@ bool ProfileEdit::commit( ProfileData & Data ) {
82 88
83void ProfileEdit::SLOT_Refresh( void ) { 89void ProfileEdit::SLOT_Refresh( void ) {
84 InterfaceInfo * II = NNI->networkSetup()->assignedInterface(); 90 InterfaceInfo * II = NNI->networkSetup()->assignedInterface();
91 QString S;
85 NSResources->system().refreshStatistics( *II ); 92 NSResources->system().refreshStatistics( *II );
93
86 RcvBytes_LBL->setText( II->RcvBytes ); 94 RcvBytes_LBL->setText( II->RcvBytes );
87 SndBytes_LBL->setText( II->SndBytes ); 95 RcvPackets_LBL->setText( II->RcvPackets );
88 RcvErrors_LBL->setText( II->RcvErrors ); 96 RcvErrors_LBL->setText( II->RcvErrors );
89 SndErrors_LBL->setText( II->SndErrors );
90 RcvDropped_LBL->setText( II->RcvDropped ); 97 RcvDropped_LBL->setText( II->RcvDropped );
98 S.setNum( II->RcvBytes.toLong() - RcvODO );
99 RcvODO_LBL->setText( S );
100
101 SndBytes_LBL->setText( II->SndBytes );
102 SndPackets_LBL->setText( II->SndPackets );
103 SndErrors_LBL->setText( II->SndErrors );
91 SndDropped_LBL->setText( II->SndDropped ); 104 SndDropped_LBL->setText( II->SndDropped );
105 S.setNum( II->SndBytes.toLong() - SndODO );
106 SndODO_LBL->setText( S );
107
92 Collisions_LBL->setText( II->Collisions ); 108 Collisions_LBL->setText( II->Collisions );
93} 109}
94 110
@@ -100,3 +116,10 @@ void ProfileEdit::SLOT_AutoRefresh( bool ar ) {
100 RefreshTimer.stop(); 116 RefreshTimer.stop();
101 } 117 }
102} 118}
119
120void ProfileEdit::SLOT_ResetODO( void ) {
121 InterfaceInfo * II = NNI->networkSetup()->assignedInterface();
122 RcvODO = II->RcvBytes.toLong();
123 SndODO = II->SndBytes.toLong();
124 SLOT_Refresh();
125}