From 4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 Mon Sep 17 00:00:00 2001 From: wimpie Date: Wed, 12 Jan 2005 00:09:13 +0000 Subject: GUI changes to profileedit --- (limited to 'noncore/settings/networksettings2/profile/profileedit.cpp') 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 @@ #include +#include +#include #include #include #include @@ -23,13 +25,17 @@ ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : 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 ); @@ -82,13 +88,23 @@ bool ProfileEdit::commit( ProfileData & Data ) { 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 ); } @@ -100,3 +116,10 @@ void ProfileEdit::SLOT_AutoRefresh( bool ar ) { RefreshTimer.stop(); } } + +void ProfileEdit::SLOT_ResetODO( void ) { + InterfaceInfo * II = NNI->networkSetup()->assignedInterface(); + RcvODO = II->RcvBytes.toLong(); + SndODO = II->SndBytes.toLong(); + SLOT_Refresh(); +} -- cgit v0.9.0.2