author | wimpie <wimpie> | 2005-01-12 00:09:13 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-12 00:09:13 (UTC) |
commit | 4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 (patch) (side-by-side diff) | |
tree | 90d4ac2f37ec43f69008b3cba67ff018e3af3ee1 /noncore/settings/networksettings2/profile/profileedit.cpp | |
parent | b0afa096730ac7893fcd25873f6fd09fcef32a95 (diff) | |
download | opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.zip opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.gz opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.bz2 |
GUI changes to profileedit
Diffstat (limited to 'noncore/settings/networksettings2/profile/profileedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/profile/profileedit.cpp | 33 |
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 @@ #include <qlabel.h> +#include <qgroupbox.h> +#include <qpushbutton.h> #include <qframe.h> #include <qcheckbox.h> #include <qmultilineedit.h> @@ -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(); +} |