author | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-04 01:35:26 (UTC) |
commit | a9c188235c97e07b0eb96b13adbcdfd4bad64767 (patch) (unidiff) | |
tree | 13f6ae5c499dc0c1d1bd4b763a1973a0fa8635cf /noncore/settings/networksettings2/profile/profileedit.cpp | |
parent | 48b6cd5966ec6cc0b968edf10ba1a1ad96ef165f (diff) | |
download | opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.zip opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.gz opie-a9c188235c97e07b0eb96b13adbcdfd4bad64767.tar.bz2 |
CONTROL files : changed version string
NS2 many changes and first release of OT2
Diffstat (limited to 'noncore/settings/networksettings2/profile/profileedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/profile/profileedit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/profile/profileedit.cpp b/noncore/settings/networksettings2/profile/profileedit.cpp index 87e503e..88aab15 100644 --- a/noncore/settings/networksettings2/profile/profileedit.cpp +++ b/noncore/settings/networksettings2/profile/profileedit.cpp | |||
@@ -1,98 +1,98 @@ | |||
1 | #include <qlabel.h> | 1 | #include <qlabel.h> |
2 | #include <qframe.h> | 2 | #include <qframe.h> |
3 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | #include <qcheckbox.h> | 5 | #include <qcheckbox.h> |
6 | 6 | ||
7 | #include <GUIUtils.h> | 7 | #include <GUIUtils.h> |
8 | #include <asdevice.h> | 8 | #include <netnode.h> |
9 | #include <resources.h> | 9 | #include <resources.h> |
10 | 10 | ||
11 | #include "profileedit.h" | 11 | #include "profileedit.h" |
12 | 12 | ||
13 | ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : | 13 | ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : |
14 | ProfileGUI( Parent ), RefreshTimer(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 = NNI->connection()->assignedInterface() ) ) { |
20 | 20 | ||
21 | Refresh_CB->setEnabled( TRUE ); | 21 | Refresh_CB->setEnabled( TRUE ); |
22 | Snd_GB->setEnabled( TRUE ); | 22 | Snd_GB->setEnabled( TRUE ); |
23 | Rcv_GB->setEnabled( TRUE ); | 23 | Rcv_GB->setEnabled( TRUE ); |
24 | Collisions_FRM->setEnabled( TRUE ); | 24 | Collisions_FRM->setEnabled( TRUE ); |
25 | 25 | ||
26 | // show current content | 26 | // show current content |
27 | SLOT_Refresh(); | 27 | SLOT_Refresh(); |
28 | 28 | ||
29 | // fill in static data | 29 | // fill in static data |
30 | InterfaceName_LBL->setText( II->Name ); | 30 | InterfaceName_LBL->setText( II->Name ); |
31 | IPAddress_LBL->setText( II->Address ); | 31 | IPAddress_LBL->setText( II->Address ); |
32 | SubnetMask_LBL->setText( II->Netmask ); | 32 | SubnetMask_LBL->setText( II->Netmask ); |
33 | Broadcast_LBL->setText( II->BCastAddress ); | 33 | Broadcast_LBL->setText( II->BCastAddress ); |
34 | MACAddress_LBL->setText( II->MACAddress ); | 34 | MACAddress_LBL->setText( II->MACAddress ); |
35 | if( II->IsPointToPoint ) { | 35 | if( II->IsPointToPoint ) { |
36 | PointToPoint_LBL->setText( II->DstAddress ); | 36 | PointToPoint_LBL->setText( II->DstAddress ); |
37 | } | 37 | } |
38 | QString S; | 38 | QString S; |
39 | InterfaceName_LBL->setText( II->Name ); | 39 | InterfaceName_LBL->setText( II->Name ); |
40 | if( II->HasMulticast ) { | 40 | if( II->HasMulticast ) { |
41 | S += "Multicast"; | 41 | S += "Multicast"; |
42 | } | 42 | } |
43 | if( ! S.isEmpty() ) { | 43 | if( ! S.isEmpty() ) { |
44 | S.prepend( " : " ); | 44 | S.prepend( " : " ); |
45 | } | 45 | } |
46 | InterfaceOptions_LBL->setText( S ); | 46 | InterfaceOptions_LBL->setText( S ); |
47 | 47 | ||
48 | connect( &RefreshTimer, SIGNAL( timeout() ), | 48 | connect( &RefreshTimer, SIGNAL( timeout() ), |
49 | this, SLOT( SLOT_Refresh() ) ); | 49 | this, SLOT( SLOT_Refresh() ) ); |
50 | } | 50 | } |
51 | 51 | ||
52 | } | 52 | } |
53 | 53 | ||
54 | QString ProfileEdit::acceptable( void ) { | 54 | QString ProfileEdit::acceptable( void ) { |
55 | return QString(); | 55 | return QString(); |
56 | } | 56 | } |
57 | 57 | ||
58 | void ProfileEdit::showData( ProfileData_t & Data ) { | 58 | void ProfileEdit::showData( ProfileData & Data ) { |
59 | Description_LE->setText( Data.Description ); | 59 | Description_LE->setText( Data.Description ); |
60 | Automatic_CB->setChecked( Data.Automatic ); | 60 | Automatic_CB->setChecked( Data.Automatic ); |
61 | TriggersVPN_CB->setChecked( Data.TriggerVPN ); | 61 | TriggersVPN_CB->setChecked( Data.TriggerVPN ); |
62 | Confirm_CB->setChecked( Data.Confirm ); | 62 | Confirm_CB->setChecked( Data.Confirm ); |
63 | Disabled_CB->setChecked( Data.Disabled ); | 63 | Disabled_CB->setChecked( Data.Disabled ); |
64 | } | 64 | } |
65 | 65 | ||
66 | 66 | ||
67 | bool ProfileEdit::commit( ProfileData_t & Data ) { | 67 | bool ProfileEdit::commit( ProfileData & Data ) { |
68 | bool SM = 0; | 68 | bool SM = 0; |
69 | TXTM( Data.Description, Description_LE, SM ); | 69 | TXTM( Data.Description, Description_LE, SM ); |
70 | 70 | ||
71 | CBM( Data.Automatic, Automatic_CB, SM ); | 71 | CBM( Data.Automatic, Automatic_CB, SM ); |
72 | CBM( Data.TriggerVPN, TriggersVPN_CB, SM ); | 72 | CBM( Data.TriggerVPN, TriggersVPN_CB, SM ); |
73 | CBM( Data.Disabled, Disabled_CB, SM ); | 73 | CBM( Data.Disabled, Disabled_CB, SM ); |
74 | CBM( Data.Confirm, Confirm_CB, SM ); | 74 | CBM( Data.Confirm, Confirm_CB, SM ); |
75 | 75 | ||
76 | return SM; | 76 | return SM; |
77 | } | 77 | } |
78 | 78 | ||
79 | void ProfileEdit::SLOT_Refresh( void ) { | 79 | void ProfileEdit::SLOT_Refresh( void ) { |
80 | InterfaceInfo * II = Dev->assignedInterface(); | 80 | InterfaceInfo * II = NNI->connection()->assignedInterface(); |
81 | NSResources->system().refreshStatistics( *II ); | 81 | NSResources->system().refreshStatistics( *II ); |
82 | RcvBytes_LBL->setText( II->RcvBytes ); | 82 | RcvBytes_LBL->setText( II->RcvBytes ); |
83 | SndBytes_LBL->setText( II->SndBytes ); | 83 | SndBytes_LBL->setText( II->SndBytes ); |
84 | RcvErrors_LBL->setText( II->RcvErrors ); | 84 | RcvErrors_LBL->setText( II->RcvErrors ); |
85 | SndErrors_LBL->setText( II->SndErrors ); | 85 | SndErrors_LBL->setText( II->SndErrors ); |
86 | RcvDropped_LBL->setText( II->RcvDropped ); | 86 | RcvDropped_LBL->setText( II->RcvDropped ); |
87 | SndDropped_LBL->setText( II->SndDropped ); | 87 | SndDropped_LBL->setText( II->SndDropped ); |
88 | Collisions_LBL->setText( II->Collisions ); | 88 | Collisions_LBL->setText( II->Collisions ); |
89 | } | 89 | } |
90 | 90 | ||
91 | void ProfileEdit::SLOT_AutoRefresh( bool ar ) { | 91 | void ProfileEdit::SLOT_AutoRefresh( bool ar ) { |
92 | if( ar ) { | 92 | if( ar ) { |
93 | RefreshTimer.start( 1000 ); | 93 | RefreshTimer.start( 1000 ); |
94 | SLOT_Refresh(); | 94 | SLOT_Refresh(); |
95 | } else { | 95 | } else { |
96 | RefreshTimer.stop(); | 96 | RefreshTimer.stop(); |
97 | } | 97 | } |
98 | } | 98 | } |