summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/profile/profileedit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/profile/profileedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/profile/profileedit.cpp b/noncore/settings/networksettings2/profile/profileedit.cpp
index 3f72c52..c9fb650 100644
--- a/noncore/settings/networksettings2/profile/profileedit.cpp
+++ b/noncore/settings/networksettings2/profile/profileedit.cpp
@@ -11,16 +11,18 @@
11#include "profileedit.h" 11#include "profileedit.h"
12 12
13ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : 13ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
14 ProfileGUI( Parent ), TrafficRefresh(this) { 14 ProfileGUI( Parent ), RefreshTimer(this) {
15 InterfaceInfo * II; 15 InterfaceInfo * II;
16 16
17 NNI = TNNI; 17 NNI = TNNI;
18 Dev = NNI->runtime()->device(); 18 Dev = NNI->runtime()->device();
19 if( ( II = Dev->assignedInterface() ) ) { 19 if( ( II = Dev->assignedInterface() ) ) {
20
20 Refresh_CB->setEnabled( TRUE ); 21 Refresh_CB->setEnabled( TRUE );
21 Snd_GB->setEnabled( TRUE ); 22 Snd_GB->setEnabled( TRUE );
22 Rcv_GB->setEnabled( TRUE ); 23 Rcv_GB->setEnabled( TRUE );
23 Collisions_FRM->setEnabled( TRUE ); 24 Collisions_FRM->setEnabled( TRUE );
25
24 // show current content 26 // show current content
25 SLOT_Refresh(); 27 SLOT_Refresh();
26 28
@@ -42,10 +44,11 @@ ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
42 S.prepend( " : " ); 44 S.prepend( " : " );
43 } 45 }
44 InterfaceOptions_LBL->setText( S ); 46 InterfaceOptions_LBL->setText( S );
47
48 connect( &RefreshTimer, SIGNAL( timeout() ),
49 this, SLOT( SLOT_Refresh() ) );
45 } 50 }
46 51
47 connect( &TrafficRefresh, SIGNAL( timeout() ),
48 this, SLOT( SLOT_Refresh() ) );
49} 52}
50 53
51QString ProfileEdit::acceptable( void ) { 54QString ProfileEdit::acceptable( void ) {
@@ -85,9 +88,9 @@ void ProfileEdit::SLOT_Refresh( void ) {
85 88
86void ProfileEdit::SLOT_AutoRefresh( bool ar ) { 89void ProfileEdit::SLOT_AutoRefresh( bool ar ) {
87 if( ar ) { 90 if( ar ) {
88 TrafficRefresh.start( 1000 ); 91 RefreshTimer.start( 1000 );
89 SLOT_Refresh(); 92 SLOT_Refresh();
90 } else { 93 } else {
91 TrafficRefresh.stop(); 94 RefreshTimer.stop();
92 } 95 }
93} 96}