summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-12 00:09:13 (UTC)
committer wimpie <wimpie>2005-01-12 00:09:13 (UTC)
commit4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 (patch) (unidiff)
tree90d4ac2f37ec43f69008b3cba67ff018e3af3ee1
parentb0afa096730ac7893fcd25873f6fd09fcef32a95 (diff)
downloadopie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.zip
opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.gz
opie-4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232.tar.bz2
GUI changes to profileedit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/resources.cpp12
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.cpp52
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.h7
-rw-r--r--noncore/settings/networksettings2/profile/profileGUI.ui835
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.cpp33
-rw-r--r--noncore/settings/networksettings2/profile/profileedit.h3
6 files changed, 476 insertions, 466 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/resources.cpp b/noncore/settings/networksettings2/networksettings2/resources.cpp
index 2dd91f8..4d46778 100644
--- a/noncore/settings/networksettings2/networksettings2/resources.cpp
+++ b/noncore/settings/networksettings2/networksettings2/resources.cpp
@@ -1,344 +1,344 @@
1#include <unistd.h> 1#include <unistd.h>
2#include <errno.h> 2#include <errno.h>
3#include <fcntl.h> 3#include <fcntl.h>
4#include <pwd.h> 4#include <pwd.h>
5#include <qpixmap.h> 5#include <qpixmap.h>
6#include <qdir.h> 6#include <qdir.h>
7#include <qmessagebox.h> 7#include <qmessagebox.h>
8 8
9#include <qpe/qlibrary.h> 9#include <qpe/qlibrary.h>
10#include <qpe/qpeapplication.h> 10#include <qpe/qpeapplication.h>
11 11
12#include <opie2/odebug.h> 12#include <opie2/odebug.h>
13#include <opie2/opluginloader.h> 13#include <opie2/opluginloader.h>
14 14
15#include <qtopia/resource.h> 15#include <qtopia/resource.h>
16 16
17#include "netnode.h" 17#include "netnode.h"
18#include "resources.h" 18#include "resources.h"
19#include "netnodeinterface.h" 19#include "netnodeinterface.h"
20 20
21#define PLUGINDIR "plugins/networksettings2" 21#define PLUGINDIR "plugins/networksettings2"
22#define ICONDIR "/pics/networksettings2/" 22#define ICONDIR "/pics/networksettings2/"
23 23
24// single resources instance 24// single resources instance
25TheNSResources * _NSResources = 0; 25TheNSResources * _NSResources = 0;
26 26
27TheNSResources::TheNSResources( void ) : NodeTypeNameMap(), 27TheNSResources::TheNSResources( void ) : NodeTypeNameMap(),
28 NetworkSetupsMap(), DanglingNetworkSetupsMap() { 28 NetworkSetupsMap(), DanglingNetworkSetupsMap() {
29 29
30 _NSResources = this; 30 _NSResources = this;
31 31
32 detectCurrentUser(); 32 detectCurrentUser();
33 33
34 // load available netnodes 34 // load available netnodes
35 35
36 Plugins = 0; 36 Plugins = 0;
37 findAvailableNetNodes(); 37 findAvailableNetNodes();
38 38
39 // compile provides and needs lists 39 // compile provides and needs lists
40 { const char ** NeedsRun; 40 { const char ** NeedsRun;
41 QDictIterator<ANetNode> OuterIt( AllNodeTypes ); 41 QDictIterator<ANetNode> OuterIt( AllNodeTypes );
42 bool Done; 42 bool Done;
43 43
44 for ( ; OuterIt.current(); ++OuterIt ) { 44 for ( ; OuterIt.current(); ++OuterIt ) {
45 // find needs list 45 // find needs list
46 ANetNode::NetNodeList * NNLP = new ANetNode::NetNodeList; 46 ANetNode::NetNodeList * NNLP = new ANetNode::NetNodeList;
47 ANetNode::NetNodeList & NNL = *(NNLP); 47 ANetNode::NetNodeList & NNL = *(NNLP);
48 48
49 // must iterate this way to avoid duplication pointers 49 // must iterate this way to avoid duplication pointers
50 for ( QDictIterator<ANetNode> InnerIt( AllNodeTypes ); 50 for ( QDictIterator<ANetNode> InnerIt( AllNodeTypes );
51 InnerIt.current(); ++InnerIt ) { 51 InnerIt.current(); ++InnerIt ) {
52 52
53 if( InnerIt.current() == OuterIt.current() ) 53 if( InnerIt.current() == OuterIt.current() )
54 // avoid recursive 54 // avoid recursive
55 continue; 55 continue;
56 56
57 const char ** Provides = InnerIt.current()->provides(); 57 const char ** Provides = InnerIt.current()->provides();
58 NeedsRun = OuterIt.current()->needs(); 58 NeedsRun = OuterIt.current()->needs();
59 59
60 for( ; *NeedsRun; NeedsRun ++ ) { 60 for( ; *NeedsRun; NeedsRun ++ ) {
61 const char ** PRun; 61 const char ** PRun;
62 PRun = Provides; 62 PRun = Provides;
63 for( ; *PRun; PRun ++ ) { 63 for( ; *PRun; PRun ++ ) {
64 if( strcmp( *PRun, *NeedsRun ) == 0 ) { 64 if( strcmp( *PRun, *NeedsRun ) == 0 ) {
65 // inner provides what outer needs 65 // inner provides what outer needs
66 NNL.resize( NNL.size() + 1 ); 66 NNL.resize( NNL.size() + 1 );
67 NNL[NNL.size()-1] = InnerIt.current(); 67 NNL[NNL.size()-1] = InnerIt.current();
68 Done = 1; // break from 2 loops 68 Done = 1; // break from 2 loops
69 break; 69 break;
70 } 70 }
71 } 71 }
72 } 72 }
73 } 73 }
74 OuterIt.current()->setAlternatives( NNLP ); 74 OuterIt.current()->setAlternatives( NNLP );
75 } 75 }
76 } 76 }
77 77
78 // define built in Node types to Description map 78 // define built in Node types to Description map
79 addNodeType( "device", tr( "Network Device" ), 79 addNodeType( "device", tr( "Network Device" ),
80 tr( "<p>Devices that can handle IP packets</p>" ) ); 80 tr( "<p>Devices that can handle IP packets</p>" ) );
81 addNodeType( "line", tr( "Character device" ), 81 addNodeType( "line", tr( "Character device" ),
82 tr( "<p>Devices that can handle single bytes</p>" ) ); 82 tr( "<p>Devices that can handle single bytes</p>" ) );
83 addNodeType( "NetworkSetup", tr( "IP NetworkSetup" ), 83 addNodeType( "connection", tr( "IP Connection" ),
84 tr( "<p>Nodes that provide working IP NetworkSetups</p>" ) ); 84 tr( "<p>Nodes that provide working IP connection</p>" ) );
85 addNodeType( "fullsetup", tr( "NetworkSetup Profile" ), 85 addNodeType( "fullsetup", tr( "Connection Profile" ),
86 tr( "<p>Fully configured NetworkSetup profile</p>" ) ); 86 tr( "<p>Fully configured network profile</p>" ) );
87 addNodeType( "GPRS", tr( "NetworkSetup to GPRS device" ), 87 addNodeType( "GPRS", tr( "Connection to GPRS device" ),
88 tr( "<p>NetworkSetup to a GPRS capable device</p>" ) ); 88 tr( "<p>Connection to a GPRS capable device</p>" ) );
89 89
90 // get access to the system 90 // get access to the system
91 TheSystem = new System(); 91 TheSystem = new System();
92 92
93} 93}
94 94
95TheNSResources::~TheNSResources( void ) { 95TheNSResources::~TheNSResources( void ) {
96 96
97 if( Plugins ) { 97 if( Plugins ) {
98 delete Plugins; 98 delete Plugins;
99 delete PluginManager; 99 delete PluginManager;
100 } 100 }
101 delete TheSystem; 101 delete TheSystem;
102 102
103} 103}
104 104
105void TheNSResources::addNodeType( const QString & ID, 105void TheNSResources::addNodeType( const QString & ID,
106 const QString & Name, 106 const QString & Name,
107 const QString & Descr ) { 107 const QString & Descr ) {
108 if( NodeTypeNameMap[ID].isEmpty() ) { 108 if( NodeTypeNameMap[ID].isEmpty() ) {
109 NodeTypeNameMap.insert( ID, Name ); 109 NodeTypeNameMap.insert( ID, Name );
110 NodeTypeDescriptionMap.insert( ID, Descr ); 110 NodeTypeDescriptionMap.insert( ID, Descr );
111 } 111 }
112} 112}
113 113
114void TheNSResources::addSystemFile( const QString & ID, 114void TheNSResources::addSystemFile( const QString & ID,
115 const QString & P, 115 const QString & P,
116 bool KDI ) { 116 bool KDI ) {
117 if( ! SystemFiles.find( ID ) ) { 117 if( ! SystemFiles.find( ID ) ) {
118 // new system file 118 // new system file
119 SystemFiles.insert( ID, new SystemFile( ID, P, KDI ) ); 119 SystemFiles.insert( ID, new SystemFile( ID, P, KDI ) );
120 } // else existed 120 } // else existed
121} 121}
122 122
123void TheNSResources::busy( bool ) { 123void TheNSResources::busy( bool ) {
124/* 124/*
125 if( B ) { 125 if( B ) {
126 ShowWait->show(); 126 ShowWait->show();
127 qApp->process 127 qApp->process
128 } else { 128 } else {
129 ShowWait->hide(); 129 ShowWait->hide();
130 } 130 }
131*/ 131*/
132} 132}
133 133
134void TheNSResources::findAvailableNetNodes( void ){ 134void TheNSResources::findAvailableNetNodes( void ){
135 135
136 Plugins = new OPluginLoader( "networksettings2" ); 136 Plugins = new OPluginLoader( "networksettings2" );
137 Plugins->setAutoDelete( true ); 137 Plugins->setAutoDelete( true );
138 138
139 PluginManager = new OPluginManager( Plugins ); 139 PluginManager = new OPluginManager( Plugins );
140 PluginManager->load(); 140 PluginManager->load();
141 141
142 if( Plugins->isInSafeMode() ) { 142 if( Plugins->isInSafeMode() ) {
143 QMessageBox::information( 143 QMessageBox::information(
144 0, 144 0,
145 tr( "Today Error"), 145 tr( "Today Error"),
146 tr( "<qt>The plugin '%1' caused Today to crash." 146 tr( "<qt>The plugin '%1' caused Today to crash."
147 " It could be that the plugin is not properly" 147 " It could be that the plugin is not properly"
148 " installed.<br>Today tries to continue loading" 148 " installed.<br>Today tries to continue loading"
149 " plugins.</qt>" ) 149 " plugins.</qt>" )
150 .arg( PluginManager->crashedPlugin().name())); 150 .arg( PluginManager->crashedPlugin().name()));
151 } 151 }
152 152
153 // Get All Plugins 153 // Get All Plugins
154 OPluginLoader::List allplugins = Plugins->filtered(); 154 OPluginLoader::List allplugins = Plugins->filtered();
155 QString lang = ::getenv("LANG"); 155 QString lang = ::getenv("LANG");
156 156
157 for( OPluginLoader::List::Iterator it = allplugins.begin(); 157 for( OPluginLoader::List::Iterator it = allplugins.begin();
158 it != allplugins.end(); 158 it != allplugins.end();
159 ++it ) { 159 ++it ) {
160 160
161 // check if this plugin supports the proper interface 161 // check if this plugin supports the proper interface
162 NetNodeInterface * interface = 162 NetNodeInterface * interface =
163 Plugins->load<NetNodeInterface>( *it, IID_NetworkSettings2 ); 163 Plugins->load<NetNodeInterface>( *it, IID_NetworkSettings2 );
164 164
165 if( ! interface ) { 165 if( ! interface ) {
166 Log(( "Plugin %s from %s does not support proper interface\n", 166 Log(( "Plugin %s from %s does not support proper interface\n",
167 (*it).name().latin1(), (*it).path().latin1() )); 167 (*it).name().latin1(), (*it).path().latin1() ));
168 continue; 168 continue;
169 } 169 }
170 170
171 // add the nodes in this plugin to the dictionary 171 // add the nodes in this plugin to the dictionary
172 { QList<ANetNode> PNN; 172 { QList<ANetNode> PNN;
173 173
174 interface->create_plugin( PNN ); 174 interface->create_plugin( PNN );
175 175
176 if( PNN.isEmpty() ) { 176 if( PNN.isEmpty() ) {
177 Log(( "Plugin %s from %s does offer any nodes\n", 177 Log(( "Plugin %s from %s does offer any nodes\n",
178 (*it).name().latin1(), (*it).path().latin1() )); 178 (*it).name().latin1(), (*it).path().latin1() ));
179 delete interface; 179 delete interface;
180 continue; 180 continue;
181 } 181 }
182 182
183 // merge this node with global node 183 // merge this node with global node
184 for( QListIterator<ANetNode> nnit(PNN); 184 for( QListIterator<ANetNode> nnit(PNN);
185 nnit.current(); 185 nnit.current();
186 ++nnit ) { 186 ++nnit ) {
187 Log(( "Found node type %s in plugin %s\n", 187 Log(( "Found node type %s in plugin %s\n",
188 nnit.current()->name(), (*it).name().latin1() )); 188 nnit.current()->name(), (*it).name().latin1() ));
189 AllNodeTypes.insert( nnit.current()->name(), nnit.current() ); 189 AllNodeTypes.insert( nnit.current()->name(), nnit.current() );
190 } 190 }
191 } 191 }
192 192
193 // load the translation 193 // load the translation
194 QTranslator *trans = new QTranslator(qApp); 194 QTranslator *trans = new QTranslator(qApp);
195 QString fn = QPEApplication::qpeDir()+ 195 QString fn = QPEApplication::qpeDir()+
196 "/i18n/"+lang+"/"+ (*it).name() + ".qm"; 196 "/i18n/"+lang+"/"+ (*it).name() + ".qm";
197 197
198 if( trans->load( fn ) ) 198 if( trans->load( fn ) )
199 qApp->installTranslator( trans ); 199 qApp->installTranslator( trans );
200 else 200 else
201 delete trans; 201 delete trans;
202 } 202 }
203 203
204} 204}
205 205
206// used to find unique NetworkSetup number 206// used to find unique NetworkSetup number
207int TheNSResources::assignNetworkSetupNumber( void ) { 207int TheNSResources::assignNetworkSetupNumber( void ) {
208 bool found = 1; 208 bool found = 1;
209 for( int trial = 0; ; trial ++ ) { 209 for( int trial = 0; ; trial ++ ) {
210 found = 1; 210 found = 1;
211 for( QDictIterator<NetworkSetup> it(NetworkSetupsMap); 211 for( QDictIterator<NetworkSetup> it(NetworkSetupsMap);
212 it.current(); 212 it.current();
213 ++it ) { 213 ++it ) {
214 if( it.current()->number() == trial ) { 214 if( it.current()->number() == trial ) {
215 found = 0; 215 found = 0;
216 break; 216 break;
217 } 217 }
218 } 218 }
219 219
220 if( found ) { 220 if( found ) {
221 Log(("Assign profile number %d\n", trial )); 221 Log(("Assign profile number %d\n", trial ));
222 return trial; 222 return trial;
223 } 223 }
224 } 224 }
225} 225}
226 226
227QPixmap TheNSResources::getPixmap( const QString & QS ) { 227QPixmap TheNSResources::getPixmap( const QString & QS ) {
228 QPixmap P; 228 QPixmap P;
229 QString S("networksettings2/"); 229 QString S("networksettings2/");
230 S += QS; 230 S += QS;
231 P = Resource::loadPixmap( S ); 231 P = Resource::loadPixmap( S );
232 if( P.isNull() ) { 232 if( P.isNull() ) {
233 Log(( "Cannot load %s\n", S.latin1() )); 233 Log(( "Cannot load %s\n", S.latin1() ));
234 } 234 }
235 return ( P.isNull() ) ? QPixmap() : P; 235 return ( P.isNull() ) ? QPixmap() : P;
236} 236}
237 237
238QString TheNSResources::tr( const char * s ) { 238QString TheNSResources::tr( const char * s ) {
239 return qApp->translate( "resource", s ); 239 return qApp->translate( "resource", s );
240} 240}
241 241
242const QString & TheNSResources::netNode2Name( const char * s ) { 242const QString & TheNSResources::netNode2Name( const char * s ) {
243 return NodeTypeNameMap[s]; 243 return NodeTypeNameMap[s];
244} 244}
245 245
246const QString & TheNSResources::netNode2Description( const char * s ) { 246const QString & TheNSResources::netNode2Description( const char * s ) {
247 return NodeTypeDescriptionMap[s]; 247 return NodeTypeDescriptionMap[s];
248} 248}
249 249
250void TheNSResources::addNetworkSetup( NetworkSetup * NC, bool Dangling ) { 250void TheNSResources::addNetworkSetup( NetworkSetup * NC, bool Dangling ) {
251 ANetNodeInstance * NNI; 251 ANetNodeInstance * NNI;
252 Log(( "Add NetworkSetup %s, Dangling %d\n", 252 Log(( "Add NetworkSetup %s, Dangling %d\n",
253 NC->name().latin1(), Dangling )); 253 NC->name().latin1(), Dangling ));
254 if( Dangling ) { 254 if( Dangling ) {
255 DanglingNetworkSetupsMap.insert( NC->name(), NC ); 255 DanglingNetworkSetupsMap.insert( NC->name(), NC );
256 } else { 256 } else {
257 NetworkSetupsMap.insert( NC->name(), NC ); 257 NetworkSetupsMap.insert( NC->name(), NC );
258 } 258 }
259 259
260 // add (new) nodes to NodeList 260 // add (new) nodes to NodeList
261 for( QListIterator<ANetNodeInstance> it(*NC); 261 for( QListIterator<ANetNodeInstance> it(*NC);
262 it.current(); 262 it.current();
263 ++it ) { 263 ++it ) {
264 NNI = it.current(); 264 NNI = it.current();
265 if( findNodeInstance( NNI->name() ) == 0 ) { 265 if( findNodeInstance( NNI->name() ) == 0 ) {
266 // new item 266 // new item
267 addNodeInstance( NNI ); 267 addNodeInstance( NNI );
268 } 268 }
269 } 269 }
270} 270}
271 271
272void TheNSResources::removeNetworkSetup( const QString & N ) { 272void TheNSResources::removeNetworkSetup( const QString & N ) {
273 NetworkSetup * NC = findNetworkSetup( N ); 273 NetworkSetup * NC = findNetworkSetup( N );
274 if( ! NC ) 274 if( ! NC )
275 return; 275 return;
276 276
277 // delete netnodes in this NetworkSetup 277 // delete netnodes in this NetworkSetup
278 ANetNodeInstance * NNI; 278 ANetNodeInstance * NNI;
279 for( NNI = NC->first(); NNI != 0; NNI = NC->next() ) { 279 for( NNI = NC->first(); NNI != 0; NNI = NC->next() ) {
280 removeNodeInstance( NNI->name() ); 280 removeNodeInstance( NNI->name() );
281 } 281 }
282 if( NetworkSetupsMap.find( N ) ) { 282 if( NetworkSetupsMap.find( N ) ) {
283 NetworkSetupsMap.remove( N ); 283 NetworkSetupsMap.remove( N );
284 } else { 284 } else {
285 DanglingNetworkSetupsMap.remove( N ); 285 DanglingNetworkSetupsMap.remove( N );
286 } 286 }
287 287
288} 288}
289 289
290// dangling NetworkSetups are filtered out 290// dangling NetworkSetups are filtered out
291NetworkSetup * TheNSResources::findNetworkSetup( const QString & S ) { 291NetworkSetup * TheNSResources::findNetworkSetup( const QString & S ) {
292 return NetworkSetupsMap[ S ]; 292 return NetworkSetupsMap[ S ];
293} 293}
294 294
295NetworkSetup * TheNSResources::getNetworkSetup( int nr ) { 295NetworkSetup * TheNSResources::getNetworkSetup( int nr ) {
296 for( QDictIterator<NetworkSetup> it(NetworkSetupsMap); 296 for( QDictIterator<NetworkSetup> it(NetworkSetupsMap);
297 it.current(); 297 it.current();
298 ++it ) { 298 ++it ) {
299 if( it.current()->number() == nr ) { 299 if( it.current()->number() == nr ) {
300 return it.current(); 300 return it.current();
301 } 301 }
302 } 302 }
303 return 0; 303 return 0;
304} 304}
305/* 305/*
306void TheNSResources::renumberNetworkSetups( void ) { 306void TheNSResources::renumberNetworkSetups( void ) {
307 Name2NetworkSetup_t & M = NSResources->NetworkSetups(); 307 Name2NetworkSetup_t & M = NSResources->NetworkSetups();
308 NetworkSetup * NC; 308 NetworkSetup * NC;
309 309
310 // for all NetworkSetups 310 // for all NetworkSetups
311 NetworkSetup::resetMaxNr(); 311 NetworkSetup::resetMaxNr();
312 for( QDictIterator<NetworkSetup> it(M); 312 for( QDictIterator<NetworkSetup> it(M);
313 it.current(); 313 it.current();
314 ++it ) { 314 ++it ) {
315 NC = it.current(); 315 NC = it.current();
316 NC->setNumber( NC->maxNetworkSetupNumber()+1 ); 316 NC->setNumber( NC->maxNetworkSetupNumber()+1 );
317 NC->setModified( 1 ); 317 NC->setModified( 1 );
318 } 318 }
319} 319}
320*/ 320*/
321 321
322typedef struct EnvVars { 322typedef struct EnvVars {
323 char * Name; 323 char * Name;
324 int Len; 324 int Len;
325} EnvVar_t; 325} EnvVar_t;
326 326
327#define AnEV(x) x, sizeof(x)-1 327#define AnEV(x) x, sizeof(x)-1
328 328
329static EnvVar_t EV[] = { 329static EnvVar_t EV[] = {
330 AnEV( "HOME" ), 330 AnEV( "HOME" ),
331 AnEV( "LOGNAME" ), 331 AnEV( "LOGNAME" ),
332 AnEV( "USER" ), 332 AnEV( "USER" ),
333 AnEV( "LD_LIBRARY_PATH" ), 333 AnEV( "LD_LIBRARY_PATH" ),
334 AnEV( "PATH" ), 334 AnEV( "PATH" ),
335 AnEV( "QTDIR" ), 335 AnEV( "QTDIR" ),
336 AnEV( "OPIEDIR" ), 336 AnEV( "OPIEDIR" ),
337 AnEV( "SHELL" ), 337 AnEV( "SHELL" ),
338 { NULL, 0 } 338 { NULL, 0 }
339}; 339};
340 340
341void TheNSResources::detectCurrentUser( void ) { 341void TheNSResources::detectCurrentUser( void ) {
342 // find current running qpe 342 // find current running qpe
343 QString QPEEnvFile = ""; 343 QString QPEEnvFile = "";
344 344
diff --git a/noncore/settings/networksettings2/networksettings2/system.cpp b/noncore/settings/networksettings2/networksettings2/system.cpp
index 33cc5bd..82f5c43 100644
--- a/noncore/settings/networksettings2/networksettings2/system.cpp
+++ b/noncore/settings/networksettings2/networksettings2/system.cpp
@@ -1,506 +1,518 @@
1#include <sys/types.h> 1#include <sys/types.h>
2#include <sys/wait.h> 2#include <sys/wait.h>
3 3
4#include <net/if.h> 4#include <net/if.h>
5#include <net/if_arp.h> 5#include <net/if_arp.h>
6#include <netinet/in.h> 6#include <netinet/in.h>
7#include <arpa/inet.h> 7#include <arpa/inet.h>
8#include <sys/ioctl.h> 8#include <sys/ioctl.h>
9#include <sys/socket.h> 9#include <sys/socket.h>
10#include <stdlib.h> 10#include <stdlib.h>
11#include <stdio.h> 11#include <stdio.h>
12#include <fcntl.h> 12#include <fcntl.h>
13#include <errno.h> 13#include <errno.h>
14#include <unistd.h> 14#include <unistd.h>
15 15
16#include <opie2/oprocess.h> 16#include <opie2/oprocess.h>
17 17
18#include <qdir.h> 18#include <qdir.h>
19#include <qregexp.h> 19#include <qregexp.h>
20#include <qstringlist.h> 20#include <qstringlist.h>
21#include <qfile.h> 21#include <qfile.h>
22#include <qtextstream.h> 22#include <qtextstream.h>
23#include <qapplication.h> 23#include <qapplication.h>
24 24
25#include "resources.h" 25#include "resources.h"
26#include "system.h" 26#include "system.h"
27 27
28#define PROCNETDEV "/proc/net/dev" 28#define PROCNETDEV "/proc/net/dev"
29 29
30#ifndef ARPHRD_IEEE80211 30#ifndef ARPHRD_IEEE80211
31#define ARPHRD_IEEE80211 801 31#define ARPHRD_IEEE80211 801
32#endif 32#endif
33 33
34static char Dig2Hex[] = { 34static char Dig2Hex[] = {
35 '0', '1', '2', '3', 35 '0', '1', '2', '3',
36 '4', '5', '6', '7', 36 '4', '5', '6', '7',
37 '8', '9', 'A', 'B', 37 '8', '9', 'A', 'B',
38 'C', 'D', 'E', 'F' 38 'C', 'D', 'E', 'F'
39}; 39};
40 40
41// get HIGH nibble of byte 41// get HIGH nibble of byte
42#define HN(x) Dig2Hex[(((x)&0xf0)>>4)] 42#define HN(x) Dig2Hex[(((x)&0xf0)>>4)]
43// get LOW nibble of byte 43// get LOW nibble of byte
44#define LN(x) Dig2Hex[((x)&0x0f)] 44#define LN(x) Dig2Hex[((x)&0x0f)]
45 45
46System::System( void ) : QObject(), ProbedInterfaces() { 46System::System( void ) : QObject(), ProbedInterfaces() {
47 ProcDevNet = 0; 47 ProcDevNet = 0;
48} 48}
49 49
50System::~System( void ) { 50System::~System( void ) {
51 if( ProcDevNet ) 51 if( ProcDevNet )
52 delete ProcDevNet; 52 delete ProcDevNet;
53} 53}
54 54
55QDict<InterfaceInfo> & System::interfaces( void ) { 55QDict<InterfaceInfo> & System::interfaces( void ) {
56 if( ProbedInterfaces.count() == 0 ) { 56 if( ProbedInterfaces.count() == 0 ) {
57 probeInterfaces(); 57 probeInterfaces();
58 } 58 }
59 return ProbedInterfaces; 59 return ProbedInterfaces;
60} 60}
61 61
62int System::runAsRoot( QStringList & S, MyProcess * Prc ) { 62int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
63 char * usr = getenv("USER"); 63 char * usr = getenv("USER");
64 64
65 if( S.count() == 0 ) { 65 if( S.count() == 0 ) {
66 // close loophole to start shell 66 // close loophole to start shell
67 return 8888; 67 return 8888;
68 } 68 }
69 if( usr == 0 || strcmp( usr, "root" ) ) { 69 if( usr == 0 || strcmp( usr, "root" ) ) {
70 // unknown or non-root user -> use SUDO 70 // unknown or non-root user -> use SUDO
71 S.prepend( "sudo" ); 71 S.prepend( "sudo" );
72 } 72 }
73 73
74 if( getenv( "NS2TESTMODE" ) ) { 74 if( getenv( "NS2TESTMODE" ) ) {
75 odebug << "TESTMODE !!! execute " 75 odebug << "TESTMODE !!! execute "
76 << S.join( " ") 76 << S.join( " ")
77 << oendl; 77 << oendl;
78 } else { 78 } else {
79 MyProcess * P; 79 MyProcess * P;
80 80
81 if( Prc ) { 81 if( Prc ) {
82 P = Prc; 82 P = Prc;
83 } else { 83 } else {
84 P = new MyProcess(); 84 P = new MyProcess();
85 emit processEvent( tr("Command : ") + S.join( " " ) ); 85 emit processEvent( tr("Command : ") + S.join( " " ) );
86 86
87 connect( P, 87 connect( P,
88 SIGNAL( stdoutLine( const QString & ) ), 88 SIGNAL( stdoutLine( const QString & ) ),
89 this, 89 this,
90 SIGNAL( stdoutLine( const QString & ) ) ); 90 SIGNAL( stdoutLine( const QString & ) ) );
91 91
92 connect( P, 92 connect( P,
93 SIGNAL( stderrLine( const QString & ) ), 93 SIGNAL( stderrLine( const QString & ) ),
94 this, 94 this,
95 SIGNAL( stderrLine( const QString & ) ) ); 95 SIGNAL( stderrLine( const QString & ) ) );
96 96
97 connect( P, 97 connect( P,
98 SIGNAL(processExited(MyProcess*) ), 98 SIGNAL(processExited(MyProcess*) ),
99 this, SLOT 99 this, SLOT
100 (SLOT_ProcessExited(MyProcess*) ) ); 100 (SLOT_ProcessExited(MyProcess*) ) );
101 } 101 }
102 102
103 P->process() << S; 103 P->process() << S;
104 104
105 Log(("Executing %s\n", S.join( " " ).latin1() )); 105 Log(("Executing %s\n", S.join( " " ).latin1() ));
106 106
107 if( ! P->process().start( OProcess::DontCare, 107 if( ! P->process().start( OProcess::DontCare,
108 OProcess::AllOutput ) ) { 108 OProcess::AllOutput ) ) {
109 odebug << "Error starting " << S << oendl; 109 odebug << "Error starting " << S << oendl;
110 if( ! Prc ) 110 if( ! Prc )
111 delete P; 111 delete P;
112 // error starting app 112 // error starting app
113 return 0; 113 return 0;
114 } 114 }
115 odebug << "Started " << S << oendl; 115 odebug << "Started " << S << oendl;
116 } 116 }
117 117
118 // all is fine 118 // all is fine
119 return 1; 119 return 1;
120} 120}
121 121
122int System::execAsUser( QStringList & SL, bool Synchronous ) { 122int System::execAsUser( QStringList & SL, bool Synchronous ) {
123 MyProcess * P = new MyProcess(); 123 MyProcess * P = new MyProcess();
124 CurrentQPEUser CU = NSResources->currentUser(); 124 CurrentQPEUser CU = NSResources->currentUser();
125 char * usr = getenv("USER"); 125 char * usr = getenv("USER");
126 126
127 if( usr == 0 || 127 if( usr == 0 ||
128 strcmp( usr, "root" ) == 0 ) { 128 strcmp( usr, "root" ) == 0 ) {
129 // find user running qpe 129 // find user running qpe
130 if( CU.UserName.isEmpty() ) { 130 if( CU.UserName.isEmpty() ) {
131 // if we come here, the exec was not successfull 131 // if we come here, the exec was not successfull
132 Log(("User not known \n" )); 132 Log(("User not known \n" ));
133 return 0; 133 return 0;
134 } 134 }
135 } 135 }
136 136
137 // now we are ready to exec the requested command 137 // now we are ready to exec the requested command
138 setuid( CU.Uid ); 138 setuid( CU.Uid );
139 setgid( CU.Gid ); 139 setgid( CU.Gid );
140 140
141 for( unsigned int i = 0 ; i < CU.EnvList.count() ; i ++ ) { 141 for( unsigned int i = 0 ; i < CU.EnvList.count() ; i ++ ) {
142 QString X; 142 QString X;
143 QStringList SL; 143 QStringList SL;
144 X = CU.EnvList[i]; 144 X = CU.EnvList[i];
145 SL = QStringList::split( "=", X ); 145 SL = QStringList::split( "=", X );
146 P->process().setEnvironment( SL[0], SL[1] ); 146 P->process().setEnvironment( SL[0], SL[1] );
147 } 147 }
148 148
149 P->process() << SL; 149 P->process() << SL;
150 150
151 emit processEvent( tr("Command : ") + SL.join( " " ) ); 151 emit processEvent( tr("Command : ") + SL.join( " " ) );
152 152
153 Log(("Executing as user %s : %s\n", 153 Log(("Executing as user %s : %s\n",
154 CU.UserName.latin1(), 154 CU.UserName.latin1(),
155 SL.join( " " ).latin1() )); 155 SL.join( " " ).latin1() ));
156 156
157 P->setEchoMode( Synchronous ); 157 P->setEchoMode( Synchronous );
158 158
159 bool rv = P->process().start( 159 bool rv = P->process().start(
160 (Synchronous) ? OProcess::Block : 160 (Synchronous) ? OProcess::Block :
161 OProcess::DontCare, 161 OProcess::DontCare,
162 (Synchronous) ? OProcess::AllOutput : 162 (Synchronous) ? OProcess::AllOutput :
163 OProcess::NoCommunication ); 163 OProcess::NoCommunication );
164 delete P; 164 delete P;
165 165
166 if( ! rv ) { 166 if( ! rv ) {
167 // if we come here, the exec was not successfull 167 // if we come here, the exec was not successfull
168 Log(("Could not exec : %d\n", errno )); 168 Log(("Could not exec : %d\n", errno ));
169 } 169 }
170 170
171 return rv; 171 return rv;
172} 172}
173 173
174void System::SLOT_ProcessExited( MyProcess * P ) { 174void System::SLOT_ProcessExited( MyProcess * P ) {
175 QString R; 175 QString R;
176 176
177 for( QValueListConstIterator<QCString> it = P->process().args().begin(); 177 for( QValueListConstIterator<QCString> it = P->process().args().begin();
178 it != P->process().args().end(); 178 it != P->process().args().end();
179 ++it ) { 179 ++it ) {
180 R += (*it); 180 R += (*it);
181 R += " "; 181 R += " ";
182 } 182 }
183 183
184 R += "Returned with " + QString().setNum( P->process().exitStatus() ); 184 R += "Returned with " + QString().setNum( P->process().exitStatus() );
185 emit processEvent( R ); 185 emit processEvent( R );
186 delete P; 186 delete P;
187} 187}
188 188
189void System::refreshStatistics( InterfaceInfo & I ) { 189void System::refreshStatistics( InterfaceInfo & I ) {
190 if( ! ProcDevNet ) { 190 if( ! ProcDevNet ) {
191 return; 191 return;
192 } 192 }
193 // cannot seek on dev 193 // cannot seek on dev
194 ProcDevNet->close(); 194 ProcDevNet->close();
195 ProcDevNet->open( IO_ReadOnly ); 195 ProcDevNet->open( IO_ReadOnly );
196 196
197 QString line; 197 QString line;
198 QTextStream procTs(ProcDevNet); 198 QTextStream procTs(ProcDevNet);
199 QStringList SL; 199 QStringList SL;
200 int loc = -1; 200 int loc = -1;
201 int version; 201 int version;
202 202
203 procTs.readLine(); 203 procTs.readLine();
204 line = procTs.readLine(); 204 line = procTs.readLine();
205 // get version 205 // get version
206 if( line.find("compressed") ) 206 if( line.find("compressed") )
207 version = 3; 207 version = 3;
208 else if( line.find( "bytes" ) ) 208 else if( line.find( "bytes" ) )
209 version = 2; 209 version = 2;
210 else 210 else
211 version = 1; 211 version = 1;
212 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) { 212 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) {
213 if( (loc = line.find(":") ) == -1) { 213 if( (loc = line.find(":") ) == -1) {
214 continue; 214 continue;
215 } 215 }
216 216
217 if( I.Name != line.left(loc) ) 217 if( I.Name != line.left(loc) )
218 continue; 218 continue;
219 219
220 // tokenize 220 // tokenize
221 SL = QStringList::split( ' ', line, FALSE ); 221 SL = QStringList::split( ' ', line.mid(loc+1), FALSE );
222 222
223 // update data 223 // update data
224 switch( version ) { 224 switch( version ) {
225 case 1 : 225 case 1 :
226 I.RcvBytes = SL[1]; 226 I.RcvBytes = "";
227 I.RcvErrors = SL[3]; 227 I.RcvPackets = SL[0];
228 I.RcvDropped = SL[4]; 228 I.RcvErrors = SL[1];
229 I.RcvDropped = SL[2];
230
231 I.SndBytes = "";
232 I.SndPackets = SL[5];
233 I.SndErrors = SL[6];
234 I.SndDropped = SL[7];
235
236 I.Collisions = SL[9];
237 break;
238 case 2 :
239 I.RcvBytes = SL[0];
240 I.RcvPackets = SL[1];
241 I.RcvErrors = SL[2];
242 I.RcvDropped = SL[3];
243
229 I.SndBytes = SL[6]; 244 I.SndBytes = SL[6];
245 I.SndPackets = SL[7];
230 I.SndErrors = SL[8]; 246 I.SndErrors = SL[8];
231 I.SndDropped = SL[9]; 247 I.SndDropped = SL[9];
248
232 I.Collisions = SL[11]; 249 I.Collisions = SL[11];
233 break; 250 break;
234 case 2 :
235 I.RcvBytes = SL[1];
236 I.RcvErrors = SL[3];
237 I.RcvDropped = SL[4];
238 I.SndBytes = SL[7];
239 I.SndErrors = SL[9];
240 I.SndDropped = SL[10];
241 I.Collisions = SL[12];
242 break;
243 case 3 : 251 case 3 :
244 I.RcvBytes = SL[1]; 252 I.RcvBytes = SL[0];
245 I.RcvErrors = SL[3]; 253 I.RcvPackets = SL[1];
246 I.RcvDropped = SL[4]; 254 I.RcvErrors = SL[2];
247 I.SndBytes = SL[9]; 255 I.RcvDropped = SL[3];
248 I.SndErrors = SL[11]; 256
249 I.SndDropped = SL[12]; 257 I.SndBytes = SL[8];
250 I.Collisions = SL[14]; 258 I.SndPackets = SL[9];
259 I.SndErrors = SL[10];
260 I.SndDropped = SL[11];
261
262 I.Collisions = SL[13];
251 break; 263 break;
252 } 264 }
253 break; 265 break;
254 } 266 }
255} 267}
256 268
257// 269//
258// THIS UPDATES THE LIST -> INTERFACES ARE NOT DELETED BUT 270// THIS UPDATES THE LIST -> INTERFACES ARE NOT DELETED BUT
259// FLAGGED AS ! 'IsUp' IF NO LONGER PRESENT 271// FLAGGED AS ! 'IsUp' IF NO LONGER PRESENT
260// 272//
261 273
262void System::probeInterfaces( void ) { 274void System::probeInterfaces( void ) {
263 275
264 // probe interfaces 276 // probe interfaces
265 int sockfd; 277 int sockfd;
266 // get list of all interfaces 278 // get list of all interfaces
267 struct ifreq ifrs; 279 struct ifreq ifrs;
268 InterfaceInfo * IFI; 280 InterfaceInfo * IFI;
269 281
270 // flag all as 'down' 282 // flag all as 'down'
271 for( QDictIterator<InterfaceInfo> it( ProbedInterfaces ); 283 for( QDictIterator<InterfaceInfo> it( ProbedInterfaces );
272 it.current(); 284 it.current();
273 ++it ) { 285 ++it ) {
274 it.current()->IsUp = 0; 286 it.current()->IsUp = 0;
275 } 287 }
276 288
277 sockfd = socket(PF_INET, SOCK_DGRAM, 0); 289 sockfd = socket(PF_INET, SOCK_DGRAM, 0);
278 if(sockfd == -1) { 290 if(sockfd == -1) {
279 odebug << "Cannot open INET socket " 291 odebug << "Cannot open INET socket "
280 << errno 292 << errno
281 << " " 293 << " "
282 << strerror( errno ) 294 << strerror( errno )
283 << oendl; 295 << oendl;
284 return; 296 return;
285 } 297 }
286 298
287 // read interfaces from /proc/dev/net 299 // read interfaces from /proc/dev/net
288 // SIOCGIFCONF does not return ALL interfaces ???!? 300 // SIOCGIFCONF does not return ALL interfaces ???!?
289 ProcDevNet = new QFile(PROCNETDEV); 301 ProcDevNet = new QFile(PROCNETDEV);
290 if( ! ProcDevNet->open(IO_ReadOnly) ) { 302 if( ! ProcDevNet->open(IO_ReadOnly) ) {
291 odebug << "Cannot open " 303 odebug << "Cannot open "
292 << PROCNETDEV 304 << PROCNETDEV
293 << " " 305 << " "
294 << errno 306 << errno
295 << " " 307 << " "
296 << strerror( errno ) 308 << strerror( errno )
297 << oendl; 309 << oendl;
298 delete ProcDevNet; 310 delete ProcDevNet;
299 ProcDevNet =0; 311 ProcDevNet =0;
300 ::close( sockfd ); 312 ::close( sockfd );
301 return; 313 return;
302 } 314 }
303 315
304 QString line; 316 QString line;
305 QString NicName; 317 QString NicName;
306 QTextStream procTs(ProcDevNet); 318 QTextStream procTs(ProcDevNet);
307 int loc = -1; 319 int loc = -1;
308 320
309 procTs.readLine(); // eat a line 321 procTs.readLine(); // eat a line
310 procTs.readLine(); // eat a line 322 procTs.readLine(); // eat a line
311 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) { 323 while((line = procTs.readLine().simplifyWhiteSpace()) != QString::null) {
312 if((loc = line.find(":")) == -1) { 324 if((loc = line.find(":")) == -1) {
313 continue; 325 continue;
314 } 326 }
315 327
316 NicName = line.left(loc); 328 NicName = line.left(loc);
317 329
318 // set name for ioctl 330 // set name for ioctl
319 strcpy( ifrs.ifr_name, NicName.latin1() ); 331 strcpy( ifrs.ifr_name, NicName.latin1() );
320 332
321 if ( ! ( IFI = ProbedInterfaces.find( NicName ) ) ) { 333 if ( ! ( IFI = ProbedInterfaces.find( NicName ) ) ) {
322 // new nic 334 // new nic
323 Log(("New NIC found : %s\n", NicName.latin1())); 335 Log(("New NIC found : %s\n", NicName.latin1()));
324 IFI = new InterfaceInfo; 336 IFI = new InterfaceInfo;
325 IFI->Name = line.left(loc); 337 IFI->Name = line.left(loc);
326 IFI->Collection = 0; 338 IFI->Collection = 0;
327 ProbedInterfaces.insert( IFI->Name, IFI ); 339 ProbedInterfaces.insert( IFI->Name, IFI );
328 340
329 // get dynamic info 341 // get dynamic info
330 if( ioctl(sockfd, SIOCGIFFLAGS, &ifrs) >= 0 ) { 342 if( ioctl(sockfd, SIOCGIFFLAGS, &ifrs) >= 0 ) {
331 IFI->IsPointToPoint = ((ifrs.ifr_flags & IFF_POINTOPOINT) == IFF_POINTOPOINT); 343 IFI->IsPointToPoint = ((ifrs.ifr_flags & IFF_POINTOPOINT) == IFF_POINTOPOINT);
332 } else { 344 } else {
333 IFI->IsPointToPoint = 0; 345 IFI->IsPointToPoint = 0;
334 } 346 }
335 347
336 // settings that never change 348 // settings that never change
337 IFI->DstAddress = ""; 349 IFI->DstAddress = "";
338 350
339 if( IFI->IsPointToPoint ) { 351 if( IFI->IsPointToPoint ) {
340 if( ioctl(sockfd, SIOCGIFDSTADDR, &ifrs) >= 0 ) { 352 if( ioctl(sockfd, SIOCGIFDSTADDR, &ifrs) >= 0 ) {
341 IFI->DstAddress = 353 IFI->DstAddress =
342 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_dstaddr)->sin_addr); 354 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_dstaddr)->sin_addr);
343 } 355 }
344 } 356 }
345 357
346 IFI->CardType = 999999; 358 IFI->CardType = 999999;
347 IFI->MACAddress = ""; 359 IFI->MACAddress = "";
348 360
349 if( ioctl(sockfd, SIOCGIFHWADDR, &ifrs) >= 0 ) { 361 if( ioctl(sockfd, SIOCGIFHWADDR, &ifrs) >= 0 ) {
350 Log(("Family for NIC %s : %d\n", IFI->Name.latin1(), 362 Log(("Family for NIC %s : %d\n", IFI->Name.latin1(),
351 ifrs.ifr_hwaddr.sa_family )); 363 ifrs.ifr_hwaddr.sa_family ));
352 364
353 IFI->CardType = ifrs.ifr_hwaddr.sa_family; 365 IFI->CardType = ifrs.ifr_hwaddr.sa_family;
354 switch( ifrs.ifr_hwaddr.sa_family ) { 366 switch( ifrs.ifr_hwaddr.sa_family ) {
355 case ARPHRD_ETHER : // regular MAC address 367 case ARPHRD_ETHER : // regular MAC address
356 // valid address -> convert to regular ::: format 368 // valid address -> convert to regular ::: format
357 // length = 6 bytes = 12 DIGITS -> 6 : 369 // length = 6 bytes = 12 DIGITS -> 6 :
358 IFI->MACAddress.sprintf( 370 IFI->MACAddress.sprintf(
359 "%c%c:%c%c:%c%c:%c%c:%c%c:%c%c", 371 "%c%c:%c%c:%c%c:%c%c:%c%c:%c%c",
360 HN( ifrs.ifr_hwaddr.sa_data[0] ), 372 HN( ifrs.ifr_hwaddr.sa_data[0] ),
361 LN( ifrs.ifr_hwaddr.sa_data[0] ), 373 LN( ifrs.ifr_hwaddr.sa_data[0] ),
362 HN( ifrs.ifr_hwaddr.sa_data[1] ), 374 HN( ifrs.ifr_hwaddr.sa_data[1] ),
363 LN( ifrs.ifr_hwaddr.sa_data[1] ), 375 LN( ifrs.ifr_hwaddr.sa_data[1] ),
364 HN( ifrs.ifr_hwaddr.sa_data[2] ), 376 HN( ifrs.ifr_hwaddr.sa_data[2] ),
365 LN( ifrs.ifr_hwaddr.sa_data[2] ), 377 LN( ifrs.ifr_hwaddr.sa_data[2] ),
366 HN( ifrs.ifr_hwaddr.sa_data[3] ), 378 HN( ifrs.ifr_hwaddr.sa_data[3] ),
367 LN( ifrs.ifr_hwaddr.sa_data[3] ), 379 LN( ifrs.ifr_hwaddr.sa_data[3] ),
368 HN( ifrs.ifr_hwaddr.sa_data[4] ), 380 HN( ifrs.ifr_hwaddr.sa_data[4] ),
369 LN( ifrs.ifr_hwaddr.sa_data[4] ), 381 LN( ifrs.ifr_hwaddr.sa_data[4] ),
370 HN( ifrs.ifr_hwaddr.sa_data[5] ), 382 HN( ifrs.ifr_hwaddr.sa_data[5] ),
371 LN( ifrs.ifr_hwaddr.sa_data[5] ) 383 LN( ifrs.ifr_hwaddr.sa_data[5] )
372 ); 384 );
373 break; 385 break;
374#ifdef ARPHRD_IEEE1394 386#ifdef ARPHRD_IEEE1394
375 case ARPHRD_IEEE1394 : // Firewire Eth address 387 case ARPHRD_IEEE1394 : // Firewire Eth address
376 IFI->MACAddress.sprintf( 388 IFI->MACAddress.sprintf(
377 "%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-00-00", 389 "%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-%c%c-00-00",
378 HN( ifrs.ifr_hwaddr.sa_data[0] ), 390 HN( ifrs.ifr_hwaddr.sa_data[0] ),
379 LN( ifrs.ifr_hwaddr.sa_data[0] ), 391 LN( ifrs.ifr_hwaddr.sa_data[0] ),
380 HN( ifrs.ifr_hwaddr.sa_data[1] ), 392 HN( ifrs.ifr_hwaddr.sa_data[1] ),
381 LN( ifrs.ifr_hwaddr.sa_data[1] ), 393 LN( ifrs.ifr_hwaddr.sa_data[1] ),
382 HN( ifrs.ifr_hwaddr.sa_data[2] ), 394 HN( ifrs.ifr_hwaddr.sa_data[2] ),
383 LN( ifrs.ifr_hwaddr.sa_data[2] ), 395 LN( ifrs.ifr_hwaddr.sa_data[2] ),
384 HN( ifrs.ifr_hwaddr.sa_data[3] ), 396 HN( ifrs.ifr_hwaddr.sa_data[3] ),
385 LN( ifrs.ifr_hwaddr.sa_data[3] ), 397 LN( ifrs.ifr_hwaddr.sa_data[3] ),
386 HN( ifrs.ifr_hwaddr.sa_data[4] ), 398 HN( ifrs.ifr_hwaddr.sa_data[4] ),
387 LN( ifrs.ifr_hwaddr.sa_data[4] ), 399 LN( ifrs.ifr_hwaddr.sa_data[4] ),
388 HN( ifrs.ifr_hwaddr.sa_data[5] ), 400 HN( ifrs.ifr_hwaddr.sa_data[5] ),
389 LN( ifrs.ifr_hwaddr.sa_data[5] ), 401 LN( ifrs.ifr_hwaddr.sa_data[5] ),
390 HN( ifrs.ifr_hwaddr.sa_data[6] ), 402 HN( ifrs.ifr_hwaddr.sa_data[6] ),
391 LN( ifrs.ifr_hwaddr.sa_data[6] ), 403 LN( ifrs.ifr_hwaddr.sa_data[6] ),
392 HN( ifrs.ifr_hwaddr.sa_data[7] ), 404 HN( ifrs.ifr_hwaddr.sa_data[7] ),
393 LN( ifrs.ifr_hwaddr.sa_data[7] ), 405 LN( ifrs.ifr_hwaddr.sa_data[7] ),
394 HN( ifrs.ifr_hwaddr.sa_data[8] ), 406 HN( ifrs.ifr_hwaddr.sa_data[8] ),
395 LN( ifrs.ifr_hwaddr.sa_data[8] ), 407 LN( ifrs.ifr_hwaddr.sa_data[8] ),
396 HN( ifrs.ifr_hwaddr.sa_data[9] ), 408 HN( ifrs.ifr_hwaddr.sa_data[9] ),
397 LN( ifrs.ifr_hwaddr.sa_data[9] ), 409 LN( ifrs.ifr_hwaddr.sa_data[9] ),
398 HN( ifrs.ifr_hwaddr.sa_data[10] ), 410 HN( ifrs.ifr_hwaddr.sa_data[10] ),
399 LN( ifrs.ifr_hwaddr.sa_data[10] ), 411 LN( ifrs.ifr_hwaddr.sa_data[10] ),
400 HN( ifrs.ifr_hwaddr.sa_data[11] ), 412 HN( ifrs.ifr_hwaddr.sa_data[11] ),
401 LN( ifrs.ifr_hwaddr.sa_data[11] ), 413 LN( ifrs.ifr_hwaddr.sa_data[11] ),
402 HN( ifrs.ifr_hwaddr.sa_data[12] ), 414 HN( ifrs.ifr_hwaddr.sa_data[12] ),
403 LN( ifrs.ifr_hwaddr.sa_data[12] ), 415 LN( ifrs.ifr_hwaddr.sa_data[12] ),
404 HN( ifrs.ifr_hwaddr.sa_data[13] ), 416 HN( ifrs.ifr_hwaddr.sa_data[13] ),
405 LN( ifrs.ifr_hwaddr.sa_data[13] ) 417 LN( ifrs.ifr_hwaddr.sa_data[13] )
406 ); 418 );
407 break; 419 break;
408#endif 420#endif
409 case ARPHRD_PPP : // PPP 421 case ARPHRD_PPP : // PPP
410 break; 422 break;
411 case ARPHRD_IEEE80211 : // WLAN 423 case ARPHRD_IEEE80211 : // WLAN
412 break; 424 break;
413 case ARPHRD_IRDA : // IRDA 425 case ARPHRD_IRDA : // IRDA
414 break; 426 break;
415 } 427 }
416 } 428 }
417 } else // else already probed before -> just update 429 } else // else already probed before -> just update
418 Log(("Redetected NIC %s\n", NicName.latin1())); 430 Log(("Redetected NIC %s\n", NicName.latin1()));
419 431
420 // get dynamic info 432 // get dynamic info
421 if( ioctl(sockfd, SIOCGIFFLAGS, &ifrs) >= 0 ) { 433 if( ioctl(sockfd, SIOCGIFFLAGS, &ifrs) >= 0 ) {
422 IFI->IsUp = ((ifrs.ifr_flags & IFF_UP) == IFF_UP); 434 IFI->IsUp = ((ifrs.ifr_flags & IFF_UP) == IFF_UP);
423 IFI->HasMulticast = ((ifrs.ifr_flags & IFF_MULTICAST) == IFF_MULTICAST); 435 IFI->HasMulticast = ((ifrs.ifr_flags & IFF_MULTICAST) == IFF_MULTICAST);
424 } else { 436 } else {
425 IFI->IsUp = 0; 437 IFI->IsUp = 0;
426 IFI->HasMulticast = 0; 438 IFI->HasMulticast = 0;
427 } 439 }
428 440
429 if( ioctl(sockfd, SIOCGIFADDR, &ifrs) >= 0 ) { 441 if( ioctl(sockfd, SIOCGIFADDR, &ifrs) >= 0 ) {
430 IFI->Address = 442 IFI->Address =
431 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_addr)->sin_addr); 443 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_addr)->sin_addr);
432 } else { 444 } else {
433 IFI->Address = ""; 445 IFI->Address = "";
434 IFI->IsUp = 0; 446 IFI->IsUp = 0;
435 } 447 }
436 if( ioctl(sockfd, SIOCGIFBRDADDR, &ifrs) >= 0 ) { 448 if( ioctl(sockfd, SIOCGIFBRDADDR, &ifrs) >= 0 ) {
437 IFI->BCastAddress = 449 IFI->BCastAddress =
438 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_broadaddr)->sin_addr); 450 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_broadaddr)->sin_addr);
439 } else { 451 } else {
440 IFI->BCastAddress = ""; 452 IFI->BCastAddress = "";
441 } 453 }
442 if( ioctl(sockfd, SIOCGIFNETMASK, &ifrs) >= 0 ) { 454 if( ioctl(sockfd, SIOCGIFNETMASK, &ifrs) >= 0 ) {
443 IFI->Netmask = 455 IFI->Netmask =
444 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_netmask)->sin_addr); 456 inet_ntoa(((struct sockaddr_in*)&ifrs.ifr_netmask)->sin_addr);
445 } else { 457 } else {
446 IFI->Netmask = ""; 458 IFI->Netmask = "";
447 } 459 }
448 Log(("NIC %s UP ? %d\n", NicName.latin1(), IFI->IsUp )); 460 Log(("NIC %s UP ? %d\n", NicName.latin1(), IFI->IsUp ));
449 } 461 }
450 462
451 ::close( sockfd ); 463 ::close( sockfd );
452} 464}
453 465
454InterfaceInfo * System::findInterface( const QString & N ) { 466InterfaceInfo * System::findInterface( const QString & N ) {
455 InterfaceInfo * Run; 467 InterfaceInfo * Run;
456 // has PAN NetworkSetup UP interface ? 468 // has PAN NetworkSetup UP interface ?
457 for( QDictIterator<InterfaceInfo> It(ProbedInterfaces); 469 for( QDictIterator<InterfaceInfo> It(ProbedInterfaces);
458 It.current(); 470 It.current();
459 ++It ) { 471 ++It ) {
460 Run = It.current(); 472 Run = It.current();
461 if( N == Run->Name ) { 473 if( N == Run->Name ) {
462 // this PAN NetworkSetup is up 474 // this PAN NetworkSetup is up
463 return Run; 475 return Run;
464 } 476 }
465 } 477 }
466 return 0; 478 return 0;
467} 479}
468 480
469#include <stdarg.h> 481#include <stdarg.h>
470static FILE * logf = 0; 482static FILE * logf = 0;
471 483
472void VLog( char * Format, ... ) { 484void VLog( char * Format, ... ) {
473 va_list l; 485 va_list l;
474 486
475 va_start(l, Format ); 487 va_start(l, Format );
476 488
477 if( logf == (FILE *)0 ) { 489 if( logf == (FILE *)0 ) {
478 QString S = getenv("NS2LOG"); 490 QString S = getenv("NS2LOG");
479 if( S == "stderr" ) { 491 if( S == "stderr" ) {
480 logf = stderr; 492 logf = stderr;
481 } else if( S.isEmpty() ) { 493 } else if( S.isEmpty() ) {
482 logf = fopen( "/tmp/ns2log", "a" ); 494 logf = fopen( "/tmp/ns2log", "a" );
483 } else { 495 } else {
484 logf = fopen( S, "a" ); 496 logf = fopen( S, "a" );
485 } 497 }
486 498
487 if( ! logf ) { 499 if( ! logf ) {
488 fprintf( stderr, "Cannot open logfile %s : %d\n", 500 fprintf( stderr, "Cannot open logfile %s : %d\n",
489 S.latin1(), errno ); 501 S.latin1(), errno );
490 logf = (FILE *)1; 502 logf = (FILE *)1;
491 } else { 503 } else {
492 fprintf( logf, "____ OPEN LOGFILE ____\n"); 504 fprintf( logf, "____ OPEN LOGFILE ____\n");
493 } 505 }
494 } 506 }
495 507
496 if( (unsigned long)logf > 1 ) { 508 if( (unsigned long)logf > 1 ) {
497 vfprintf( logf, Format, l ); 509 vfprintf( logf, Format, l );
498 } 510 }
499 va_end( l ); 511 va_end( l );
500 fflush( logf ); 512 fflush( logf );
501 513
502} 514}
503 515
504void LogClose( void ) { 516void LogClose( void ) {
505 if( (long)logf > 1 ) { 517 if( (long)logf > 1 ) {
506 fprintf( logf, "____ CLOSE LOGFILE ____\n"); 518 fprintf( logf, "____ CLOSE LOGFILE ____\n");
diff --git a/noncore/settings/networksettings2/networksettings2/system.h b/noncore/settings/networksettings2/networksettings2/system.h
index 794b868..52613d8 100644
--- a/noncore/settings/networksettings2/networksettings2/system.h
+++ b/noncore/settings/networksettings2/networksettings2/system.h
@@ -1,140 +1,143 @@
1#ifndef __SYSTEM__H 1#ifndef __SYSTEM__H
2#define __SYSTEM__H 2#define __SYSTEM__H
3 3
4#include <qstring.h> 4#include <qstring.h>
5 5
6#include <opie2/oprocess.h> 6#include <opie2/oprocess.h>
7 7
8using namespace Opie::Core; 8using namespace Opie::Core;
9 9
10// for hardware types 10// for hardware types
11#include <net/if_arp.h> 11#include <net/if_arp.h>
12#include <qdict.h> 12#include <qdict.h>
13#include <qobject.h> 13#include <qobject.h>
14#include <stdio.h> 14#include <stdio.h>
15 15
16class NetworkSetup; 16class NetworkSetup;
17class ANetNodeInstance; 17class ANetNodeInstance;
18class QFile; 18class QFile;
19 19
20class MyProcess : public QObject { 20class MyProcess : public QObject {
21 21
22 Q_OBJECT 22 Q_OBJECT
23 23
24public : 24public :
25 25
26 MyProcess(); 26 MyProcess();
27 ~MyProcess(); 27 ~MyProcess();
28 28
29 inline OProcess & process() 29 inline OProcess & process()
30 { return *P; } 30 { return *P; }
31 31
32 inline void setEchoMode( bool M ) { 32 inline void setEchoMode( bool M ) {
33 EchoMode = M; 33 EchoMode = M;
34 } 34 }
35 35
36public slots : 36public slots :
37 37
38 void SLOT_Stdout( Opie::Core::OProcess * P, char *, int ); 38 void SLOT_Stdout( Opie::Core::OProcess * P, char *, int );
39 void SLOT_Stderr( Opie::Core::OProcess * P, char *, int ); 39 void SLOT_Stderr( Opie::Core::OProcess * P, char *, int );
40 void SLOT_ProcessExited( Opie::Core::OProcess * P); 40 void SLOT_ProcessExited( Opie::Core::OProcess * P);
41 41
42signals : 42signals :
43 43
44 void stdoutLine( const QString & ); 44 void stdoutLine( const QString & );
45 void stderrLine( const QString & ); 45 void stderrLine( const QString & );
46 void processExited( MyProcess * ); 46 void processExited( MyProcess * );
47 47
48private : 48private :
49 49
50 QString StdoutBuffer; 50 QString StdoutBuffer;
51 QString StderrBuffer; 51 QString StderrBuffer;
52 OProcess * P; 52 OProcess * P;
53 // output all output to my output 53 // output all output to my output
54 bool EchoMode; 54 bool EchoMode;
55}; 55};
56 56
57class InterfaceInfo { 57class InterfaceInfo {
58 58
59public : 59public :
60 60
61 InterfaceInfo() : 61 InterfaceInfo() :
62 Name(), 62 Name(),
63 MACAddress(), 63 MACAddress(),
64 BCastAddress(), 64 BCastAddress(),
65 Netmask(), 65 Netmask(),
66 DstAddress() { 66 DstAddress() {
67 } 67 }
68 68
69 NetworkSetup * assignedToNetworkSetup() 69 NetworkSetup * assignedToNetworkSetup()
70 { return Collection; } 70 { return Collection; }
71 71
72 void assignToNetworkSetup( NetworkSetup * NNI ) 72 void assignToNetworkSetup( NetworkSetup * NNI )
73 { Collection = NNI; } 73 { Collection = NNI; }
74 74
75 NetworkSetup * Collection; // networkSetup taking care of me 75 NetworkSetup * Collection; // networkSetup taking care of me
76 QString Name; // name of interface 76 QString Name; // name of interface
77 int CardType; // type of card 77 int CardType; // type of card
78 QString MACAddress; // MAC address 78 QString MACAddress; // MAC address
79 QString Address; // IP Address 79 QString Address; // IP Address
80 QString BCastAddress; // Broadcast Address 80 QString BCastAddress; // Broadcast Address
81 QString Netmask; // Netmask 81 QString Netmask; // Netmask
82 QString DstAddress; // Peer address (if P-t-P) 82 QString DstAddress; // Peer address (if P-t-P)
83 bool IsUp; // interface is UP 83 bool IsUp; // interface is UP
84 bool HasMulticast; // Supports Multicast 84 bool HasMulticast; // Supports Multicast
85 bool IsPointToPoint; // IsPointToPoint card 85 bool IsPointToPoint; // IsPointToPoint card
86 86
87 QString RcvBytes; 87 QString RcvBytes;
88 QString SndBytes;
89 QString RcvErrors; 88 QString RcvErrors;
90 QString SndErrors; 89 QString RcvPackets;
91 QString RcvDropped; 90 QString RcvDropped;
91
92 QString SndBytes;
93 QString SndErrors;
94 QString SndPackets;
92 QString SndDropped; 95 QString SndDropped;
93 QString Collisions; 96 QString Collisions;
94}; 97};
95 98
96class System : public QObject { 99class System : public QObject {
97 100
98 Q_OBJECT 101 Q_OBJECT
99 102
100public : 103public :
101 104
102 System( void ); 105 System( void );
103 ~System( void ); 106 ~System( void );
104 107
105 QDict<InterfaceInfo> & interfaces( void ); 108 QDict<InterfaceInfo> & interfaces( void );
106 InterfaceInfo * interface( const QString& N ) 109 InterfaceInfo * interface( const QString& N )
107 { return interfaces()[N]; } 110 { return interfaces()[N]; }
108 111
109 // exec command as root 112 // exec command as root
110 int runAsRoot( QStringList & S, MyProcess * Prc = 0 ); 113 int runAsRoot( QStringList & S, MyProcess * Prc = 0 );
111 114
112 // exec command as user 115 // exec command as user
113 int execAsUser( QStringList & Cmd, bool Synchronous = 0 ); 116 int execAsUser( QStringList & Cmd, bool Synchronous = 0 );
114 117
115 // refresh stats for this interface 118 // refresh stats for this interface
116 void refreshStatistics( InterfaceInfo & ); 119 void refreshStatistics( InterfaceInfo & );
117 120
118 // reloads interfaces 121 // reloads interfaces
119 void probeInterfaces( void ); 122 void probeInterfaces( void );
120 123
121 InterfaceInfo * findInterface( const QString & DevName ); 124 InterfaceInfo * findInterface( const QString & DevName );
122 125
123private slots : 126private slots :
124 127
125 void SLOT_ProcessExited( MyProcess * ); 128 void SLOT_ProcessExited( MyProcess * );
126 129
127signals : 130signals :
128 131
129 void stdoutLine( const QString & ); 132 void stdoutLine( const QString & );
130 void stderrLine( const QString & ); 133 void stderrLine( const QString & );
131 void processEvent( const QString & ); 134 void processEvent( const QString & );
132 135
133private : 136private :
134 137
135 QDict<InterfaceInfo> ProbedInterfaces; 138 QDict<InterfaceInfo> ProbedInterfaces;
136 FILE * OutputOfCmd; 139 FILE * OutputOfCmd;
137 QFile * ProcDevNet; 140 QFile * ProcDevNet;
138}; 141};
139 142
140#endif 143#endif
diff --git a/noncore/settings/networksettings2/profile/profileGUI.ui b/noncore/settings/networksettings2/profile/profileGUI.ui
index 5bf9a9c..8b421e8 100644
--- a/noncore/settings/networksettings2/profile/profileGUI.ui
+++ b/noncore/settings/networksettings2/profile/profileGUI.ui
@@ -1,291 +1,291 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ProfileGUI</class> 2<class>ProfileGUI</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QWidget</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>Profile_FRM</cstring> 7 <cstring>Profile_FRM</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>276</width> 14 <width>551</width>
15 <height>231</height> 15 <height>547</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Profile</string> 20 <string>Profile</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>0</number> 31 <number>1</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>0</number> 35 <number>3</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget6</cstring> 41 <cstring>TabWidget6</cstring>
42 </property> 42 </property>
43 <property> 43 <property>
44 <name>layoutMargin</name> 44 <name>layoutMargin</name>
45 </property> 45 </property>
46 <property> 46 <property>
47 <name>layoutSpacing</name> 47 <name>layoutSpacing</name>
48 </property> 48 </property>
49 <widget> 49 <widget>
50 <class>QWidget</class> 50 <class>QWidget</class>
51 <property stdset="1"> 51 <property stdset="1">
52 <name>name</name> 52 <name>name</name>
53 <cstring>tab</cstring> 53 <cstring>tab</cstring>
54 </property> 54 </property>
55 <attribute> 55 <attribute>
56 <name>title</name> 56 <name>title</name>
57 <string>Setup</string> 57 <string>Setup</string>
58 </attribute> 58 </attribute>
59 <vbox> 59 <vbox>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>1</number> 62 <number>1</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>2</number> 66 <number>2</number>
67 </property> 67 </property>
68 <widget> 68 <widget>
69 <class>QLayoutWidget</class> 69 <class>QLayoutWidget</class>
70 <property stdset="1"> 70 <property stdset="1">
71 <name>name</name> 71 <name>name</name>
72 <cstring>Layout8</cstring> 72 <cstring>Layout8</cstring>
73 </property> 73 </property>
74 <grid> 74 <grid>
75 <property stdset="1"> 75 <property stdset="1">
76 <name>margin</name> 76 <name>margin</name>
77 <number>0</number> 77 <number>0</number>
78 </property> 78 </property>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>spacing</name> 80 <name>spacing</name>
81 <number>6</number> 81 <number>6</number>
82 </property> 82 </property>
83 <widget row="0" column="0" rowspan="2" colspan="1" > 83 <widget row="0" column="0" rowspan="2" colspan="1" >
84 <class>QGroupBox</class> 84 <class>QGroupBox</class>
85 <property stdset="1"> 85 <property stdset="1">
86 <name>name</name> 86 <name>name</name>
87 <cstring>GroupBox1</cstring> 87 <cstring>GroupBox1</cstring>
88 </property> 88 </property>
89 <property stdset="1"> 89 <property stdset="1">
90 <name>title</name> 90 <name>title</name>
91 <string>Start</string> 91 <string>Start</string>
92 </property> 92 </property>
93 <vbox> 93 <vbox>
94 <property stdset="1"> 94 <property stdset="1">
95 <name>margin</name> 95 <name>margin</name>
96 <number>11</number> 96 <number>11</number>
97 </property> 97 </property>
98 <property stdset="1"> 98 <property stdset="1">
99 <name>spacing</name> 99 <name>spacing</name>
100 <number>6</number> 100 <number>6</number>
101 </property> 101 </property>
102 <widget> 102 <widget>
103 <class>QCheckBox</class> 103 <class>QCheckBox</class>
104 <property stdset="1"> 104 <property stdset="1">
105 <name>name</name> 105 <name>name</name>
106 <cstring>Automatic_CB</cstring> 106 <cstring>Automatic_CB</cstring>
107 </property> 107 </property>
108 <property stdset="1"> 108 <property stdset="1">
109 <name>text</name> 109 <name>text</name>
110 <string>Automatically</string> 110 <string>Automatically</string>
111 </property> 111 </property>
112 </widget> 112 </widget>
113 <widget> 113 <widget>
114 <class>QCheckBox</class> 114 <class>QCheckBox</class>
115 <property stdset="1"> 115 <property stdset="1">
116 <name>name</name> 116 <name>name</name>
117 <cstring>Confirm_CB</cstring> 117 <cstring>Confirm_CB</cstring>
118 </property> 118 </property>
119 <property stdset="1"> 119 <property stdset="1">
120 <name>enabled</name> 120 <name>enabled</name>
121 <bool>true</bool> 121 <bool>true</bool>
122 </property> 122 </property>
123 <property stdset="1"> 123 <property stdset="1">
124 <name>text</name> 124 <name>text</name>
125 <string>Ask</string> 125 <string>Ask</string>
126 </property> 126 </property>
127 <property> 127 <property>
128 <name>layoutMargin</name> 128 <name>layoutMargin</name>
129 </property> 129 </property>
130 </widget> 130 </widget>
131 <widget> 131 <widget>
132 <class>QCheckBox</class> 132 <class>QCheckBox</class>
133 <property stdset="1"> 133 <property stdset="1">
134 <name>name</name> 134 <name>name</name>
135 <cstring>Disabled_CB</cstring> 135 <cstring>Disabled_CB</cstring>
136 </property> 136 </property>
137 <property stdset="1"> 137 <property stdset="1">
138 <name>enabled</name> 138 <name>enabled</name>
139 <bool>true</bool> 139 <bool>true</bool>
140 </property> 140 </property>
141 <property stdset="1"> 141 <property stdset="1">
142 <name>text</name> 142 <name>text</name>
143 <string>Disabled</string> 143 <string>Disabled</string>
144 </property> 144 </property>
145 <property> 145 <property>
146 <name>layoutMargin</name> 146 <name>layoutMargin</name>
147 </property> 147 </property>
148 </widget> 148 </widget>
149 </vbox> 149 </vbox>
150 </widget> 150 </widget>
151 <widget row="0" column="1" > 151 <widget row="0" column="1" >
152 <class>QCheckBox</class> 152 <class>QCheckBox</class>
153 <property stdset="1"> 153 <property stdset="1">
154 <name>name</name> 154 <name>name</name>
155 <cstring>TriggersVPN_CB</cstring> 155 <cstring>TriggersVPN_CB</cstring>
156 </property> 156 </property>
157 <property stdset="1"> 157 <property stdset="1">
158 <name>text</name> 158 <name>text</name>
159 <string>Trigger VPN</string> 159 <string>Trigger VPN</string>
160 </property> 160 </property>
161 </widget> 161 </widget>
162 <spacer row="1" column="1" > 162 <spacer row="1" column="1" >
163 <property> 163 <property>
164 <name>name</name> 164 <name>name</name>
165 <cstring>Spacer8</cstring> 165 <cstring>Spacer8</cstring>
166 </property> 166 </property>
167 <property stdset="1"> 167 <property stdset="1">
168 <name>orientation</name> 168 <name>orientation</name>
169 <enum>Vertical</enum> 169 <enum>Vertical</enum>
170 </property> 170 </property>
171 <property stdset="1"> 171 <property stdset="1">
172 <name>sizeType</name> 172 <name>sizeType</name>
173 <enum>Expanding</enum> 173 <enum>Expanding</enum>
174 </property> 174 </property>
175 <property> 175 <property>
176 <name>sizeHint</name> 176 <name>sizeHint</name>
177 <size> 177 <size>
178 <width>20</width> 178 <width>20</width>
179 <height>20</height> 179 <height>20</height>
180 </size> 180 </size>
181 </property> 181 </property>
182 </spacer> 182 </spacer>
183 </grid> 183 </grid>
184 </widget> 184 </widget>
185 <widget> 185 <widget>
186 <class>QLabel</class> 186 <class>QLabel</class>
187 <property stdset="1"> 187 <property stdset="1">
188 <name>name</name> 188 <name>name</name>
189 <cstring>TextLabel3</cstring> 189 <cstring>TextLabel3</cstring>
190 </property> 190 </property>
191 <property stdset="1"> 191 <property stdset="1">
192 <name>text</name> 192 <name>text</name>
193 <string>Description</string> 193 <string>Description</string>
194 </property> 194 </property>
195 </widget> 195 </widget>
196 <widget> 196 <widget>
197 <class>QMultiLineEdit</class> 197 <class>QMultiLineEdit</class>
198 <property stdset="1"> 198 <property stdset="1">
199 <name>name</name> 199 <name>name</name>
200 <cstring>Description_LE</cstring> 200 <cstring>Description_LE</cstring>
201 </property> 201 </property>
202 </widget> 202 </widget>
203 </vbox> 203 </vbox>
204 </widget> 204 </widget>
205 <widget> 205 <widget>
206 <class>QWidget</class> 206 <class>QWidget</class>
207 <property stdset="1"> 207 <property stdset="1">
208 <name>name</name> 208 <name>name</name>
209 <cstring>tab</cstring> 209 <cstring>tab</cstring>
210 </property> 210 </property>
211 <attribute> 211 <attribute>
212 <name>title</name> 212 <name>title</name>
213 <string>State</string> 213 <string>State</string>
214 </attribute> 214 </attribute>
215 <vbox> 215 <vbox>
216 <property stdset="1"> 216 <property stdset="1">
217 <name>margin</name> 217 <name>margin</name>
218 <number>0</number> 218 <number>0</number>
219 </property> 219 </property>
220 <property stdset="1"> 220 <property stdset="1">
221 <name>spacing</name> 221 <name>spacing</name>
222 <number>2</number> 222 <number>2</number>
223 </property> 223 </property>
224 <widget> 224 <widget>
225 <class>QFrame</class> 225 <class>QFrame</class>
226 <property stdset="1"> 226 <property stdset="1">
227 <name>name</name> 227 <name>name</name>
228 <cstring>Frame73</cstring> 228 <cstring>Frame73</cstring>
229 </property> 229 </property>
230 <property stdset="1"> 230 <property stdset="1">
231 <name>sizePolicy</name> 231 <name>sizePolicy</name>
232 <sizepolicy> 232 <sizepolicy>
233 <hsizetype>7</hsizetype> 233 <hsizetype>7</hsizetype>
234 <vsizetype>5</vsizetype> 234 <vsizetype>5</vsizetype>
235 </sizepolicy> 235 </sizepolicy>
236 </property> 236 </property>
237 <property stdset="1"> 237 <property stdset="1">
238 <name>frameShape</name> 238 <name>frameShape</name>
239 <enum>NoFrame</enum> 239 <enum>NoFrame</enum>
240 </property> 240 </property>
241 <property stdset="1"> 241 <property stdset="1">
242 <name>frameShadow</name> 242 <name>frameShadow</name>
243 <enum>Plain</enum> 243 <enum>Plain</enum>
244 </property> 244 </property>
245 <property> 245 <property>
246 <name>layoutMargin</name> 246 <name>layoutMargin</name>
247 </property> 247 </property>
248 <property> 248 <property>
249 <name>layoutSpacing</name> 249 <name>layoutSpacing</name>
250 </property> 250 </property>
251 <hbox> 251 <hbox>
252 <property stdset="1"> 252 <property stdset="1">
253 <name>margin</name> 253 <name>margin</name>
254 <number>2</number> 254 <number>2</number>
255 </property> 255 </property>
256 <property stdset="1"> 256 <property stdset="1">
257 <name>spacing</name> 257 <name>spacing</name>
258 <number>0</number> 258 <number>0</number>
259 </property> 259 </property>
260 <widget> 260 <widget>
261 <class>QLabel</class> 261 <class>QLabel</class>
262 <property stdset="1"> 262 <property stdset="1">
263 <name>name</name> 263 <name>name</name>
264 <cstring>InterfaceName_LBL</cstring> 264 <cstring>InterfaceName_LBL</cstring>
265 </property> 265 </property>
266 <property stdset="1"> 266 <property stdset="1">
267 <name>font</name> 267 <name>font</name>
268 <font> 268 <font>
269 <underline>1</underline> 269 <underline>1</underline>
270 </font> 270 </font>
271 </property> 271 </property>
272 <property stdset="1"> 272 <property stdset="1">
273 <name>text</name> 273 <name>text</name>
274 <string>eth0</string> 274 <string>eth0</string>
275 </property> 275 </property>
276 </widget> 276 </widget>
277 <widget> 277 <widget>
278 <class>QLabel</class> 278 <class>QLabel</class>
279 <property stdset="1"> 279 <property stdset="1">
280 <name>name</name> 280 <name>name</name>
281 <cstring>InterfaceOptions_LBL</cstring> 281 <cstring>InterfaceOptions_LBL</cstring>
282 </property> 282 </property>
283 <property stdset="1"> 283 <property stdset="1">
284 <name>sizePolicy</name> 284 <name>sizePolicy</name>
285 <sizepolicy> 285 <sizepolicy>
286 <hsizetype>7</hsizetype> 286 <hsizetype>7</hsizetype>
287 <vsizetype>1</vsizetype> 287 <vsizetype>1</vsizetype>
288 </sizepolicy> 288 </sizepolicy>
289 </property> 289 </property>
290 <property stdset="1"> 290 <property stdset="1">
291 <name>font</name> 291 <name>font</name>
@@ -695,1091 +695,1060 @@
695 <widget> 695 <widget>
696 <class>QFrame</class> 696 <class>QFrame</class>
697 <property stdset="1"> 697 <property stdset="1">
698 <name>name</name> 698 <name>name</name>
699 <cstring>DHCP_GB</cstring> 699 <cstring>DHCP_GB</cstring>
700 </property> 700 </property>
701 <property stdset="1"> 701 <property stdset="1">
702 <name>sizePolicy</name> 702 <name>sizePolicy</name>
703 <sizepolicy> 703 <sizepolicy>
704 <hsizetype>7</hsizetype> 704 <hsizetype>7</hsizetype>
705 <vsizetype>5</vsizetype> 705 <vsizetype>5</vsizetype>
706 </sizepolicy> 706 </sizepolicy>
707 </property> 707 </property>
708 <property stdset="1"> 708 <property stdset="1">
709 <name>frameShape</name> 709 <name>frameShape</name>
710 <enum>NoFrame</enum> 710 <enum>NoFrame</enum>
711 </property> 711 </property>
712 <property stdset="1"> 712 <property stdset="1">
713 <name>frameShadow</name> 713 <name>frameShadow</name>
714 <enum>Raised</enum> 714 <enum>Raised</enum>
715 </property> 715 </property>
716 <property> 716 <property>
717 <name>layoutMargin</name> 717 <name>layoutMargin</name>
718 </property> 718 </property>
719 <property> 719 <property>
720 <name>layoutSpacing</name> 720 <name>layoutSpacing</name>
721 </property> 721 </property>
722 <grid> 722 <grid>
723 <property stdset="1"> 723 <property stdset="1">
724 <name>margin</name> 724 <name>margin</name>
725 <number>2</number> 725 <number>2</number>
726 </property> 726 </property>
727 <property stdset="1"> 727 <property stdset="1">
728 <name>spacing</name> 728 <name>spacing</name>
729 <number>1</number> 729 <number>1</number>
730 </property> 730 </property>
731 <widget row="2" column="0" > 731 <widget row="2" column="0" >
732 <class>QLabel</class> 732 <class>QLabel</class>
733 <property stdset="1"> 733 <property stdset="1">
734 <name>name</name> 734 <name>name</name>
735 <cstring>TextLabel9_3</cstring> 735 <cstring>TextLabel9_3</cstring>
736 </property> 736 </property>
737 <property stdset="1"> 737 <property stdset="1">
738 <name>enabled</name> 738 <name>enabled</name>
739 <bool>true</bool> 739 <bool>true</bool>
740 </property> 740 </property>
741 <property stdset="1"> 741 <property stdset="1">
742 <name>sizePolicy</name> 742 <name>sizePolicy</name>
743 <sizepolicy> 743 <sizepolicy>
744 <hsizetype>1</hsizetype> 744 <hsizetype>1</hsizetype>
745 <vsizetype>1</vsizetype> 745 <vsizetype>1</vsizetype>
746 </sizepolicy> 746 </sizepolicy>
747 </property> 747 </property>
748 <property stdset="1"> 748 <property stdset="1">
749 <name>text</name> 749 <name>text</name>
750 <string>Lease Expires</string> 750 <string>Lease Expires</string>
751 </property> 751 </property>
752 </widget> 752 </widget>
753 <widget row="1" column="0" > 753 <widget row="1" column="0" >
754 <class>QLabel</class> 754 <class>QLabel</class>
755 <property stdset="1"> 755 <property stdset="1">
756 <name>name</name> 756 <name>name</name>
757 <cstring>TextLabel8_3</cstring> 757 <cstring>TextLabel8_3</cstring>
758 </property> 758 </property>
759 <property stdset="1"> 759 <property stdset="1">
760 <name>enabled</name> 760 <name>enabled</name>
761 <bool>true</bool> 761 <bool>true</bool>
762 </property> 762 </property>
763 <property stdset="1"> 763 <property stdset="1">
764 <name>sizePolicy</name> 764 <name>sizePolicy</name>
765 <sizepolicy> 765 <sizepolicy>
766 <hsizetype>0</hsizetype> 766 <hsizetype>0</hsizetype>
767 <vsizetype>1</vsizetype> 767 <vsizetype>1</vsizetype>
768 </sizepolicy> 768 </sizepolicy>
769 </property> 769 </property>
770 <property stdset="1"> 770 <property stdset="1">
771 <name>text</name> 771 <name>text</name>
772 <string>Lease Obtained</string> 772 <string>Lease Obtained</string>
773 </property> 773 </property>
774 </widget> 774 </widget>
775 <widget row="0" column="1" > 775 <widget row="0" column="1" >
776 <class>QLabel</class> 776 <class>QLabel</class>
777 <property stdset="1"> 777 <property stdset="1">
778 <name>name</name> 778 <name>name</name>
779 <cstring>DHCPServer_LBL</cstring> 779 <cstring>DHCPServer_LBL</cstring>
780 </property> 780 </property>
781 <property stdset="1"> 781 <property stdset="1">
782 <name>enabled</name> 782 <name>enabled</name>
783 <bool>true</bool> 783 <bool>true</bool>
784 </property> 784 </property>
785 <property stdset="1"> 785 <property stdset="1">
786 <name>sizePolicy</name> 786 <name>sizePolicy</name>
787 <sizepolicy> 787 <sizepolicy>
788 <hsizetype>5</hsizetype> 788 <hsizetype>5</hsizetype>
789 <vsizetype>1</vsizetype> 789 <vsizetype>1</vsizetype>
790 </sizepolicy> 790 </sizepolicy>
791 </property> 791 </property>
792 <property stdset="1"> 792 <property stdset="1">
793 <name>frameShape</name> 793 <name>frameShape</name>
794 <enum>Panel</enum> 794 <enum>Panel</enum>
795 </property> 795 </property>
796 <property stdset="1"> 796 <property stdset="1">
797 <name>frameShadow</name> 797 <name>frameShadow</name>
798 <enum>Sunken</enum> 798 <enum>Sunken</enum>
799 </property> 799 </property>
800 <property stdset="1"> 800 <property stdset="1">
801 <name>text</name> 801 <name>text</name>
802 <string></string> 802 <string></string>
803 </property> 803 </property>
804 <property stdset="1"> 804 <property stdset="1">
805 <name>indent</name> 805 <name>indent</name>
806 <number>0</number> 806 <number>0</number>
807 </property> 807 </property>
808 </widget> 808 </widget>
809 <widget row="1" column="1" > 809 <widget row="1" column="1" >
810 <class>QLabel</class> 810 <class>QLabel</class>
811 <property stdset="1"> 811 <property stdset="1">
812 <name>name</name> 812 <name>name</name>
813 <cstring>LeaseObtained_LBL</cstring> 813 <cstring>LeaseObtained_LBL</cstring>
814 </property> 814 </property>
815 <property stdset="1"> 815 <property stdset="1">
816 <name>enabled</name> 816 <name>enabled</name>
817 <bool>true</bool> 817 <bool>true</bool>
818 </property> 818 </property>
819 <property stdset="1"> 819 <property stdset="1">
820 <name>sizePolicy</name> 820 <name>sizePolicy</name>
821 <sizepolicy> 821 <sizepolicy>
822 <hsizetype>5</hsizetype> 822 <hsizetype>5</hsizetype>
823 <vsizetype>1</vsizetype> 823 <vsizetype>1</vsizetype>
824 </sizepolicy> 824 </sizepolicy>
825 </property> 825 </property>
826 <property stdset="1"> 826 <property stdset="1">
827 <name>minimumSize</name> 827 <name>minimumSize</name>
828 <size> 828 <size>
829 <width>94</width> 829 <width>94</width>
830 <height>0</height> 830 <height>0</height>
831 </size> 831 </size>
832 </property> 832 </property>
833 <property stdset="1"> 833 <property stdset="1">
834 <name>frameShape</name> 834 <name>frameShape</name>
835 <enum>Panel</enum> 835 <enum>Panel</enum>
836 </property> 836 </property>
837 <property stdset="1"> 837 <property stdset="1">
838 <name>frameShadow</name> 838 <name>frameShadow</name>
839 <enum>Sunken</enum> 839 <enum>Sunken</enum>
840 </property> 840 </property>
841 <property stdset="1"> 841 <property stdset="1">
842 <name>text</name> 842 <name>text</name>
843 <string></string> 843 <string></string>
844 </property> 844 </property>
845 <property stdset="1"> 845 <property stdset="1">
846 <name>indent</name> 846 <name>indent</name>
847 <number>0</number> 847 <number>0</number>
848 </property> 848 </property>
849 </widget> 849 </widget>
850 <widget row="2" column="1" > 850 <widget row="2" column="1" >
851 <class>QLabel</class> 851 <class>QLabel</class>
852 <property stdset="1"> 852 <property stdset="1">
853 <name>name</name> 853 <name>name</name>
854 <cstring>LeaseExpires_LBL</cstring> 854 <cstring>LeaseExpires_LBL</cstring>
855 </property> 855 </property>
856 <property stdset="1"> 856 <property stdset="1">
857 <name>enabled</name> 857 <name>enabled</name>
858 <bool>true</bool> 858 <bool>true</bool>
859 </property> 859 </property>
860 <property stdset="1"> 860 <property stdset="1">
861 <name>sizePolicy</name> 861 <name>sizePolicy</name>
862 <sizepolicy> 862 <sizepolicy>
863 <hsizetype>5</hsizetype> 863 <hsizetype>5</hsizetype>
864 <vsizetype>1</vsizetype> 864 <vsizetype>1</vsizetype>
865 </sizepolicy> 865 </sizepolicy>
866 </property> 866 </property>
867 <property stdset="1"> 867 <property stdset="1">
868 <name>frameShape</name> 868 <name>frameShape</name>
869 <enum>Panel</enum> 869 <enum>Panel</enum>
870 </property> 870 </property>
871 <property stdset="1"> 871 <property stdset="1">
872 <name>frameShadow</name> 872 <name>frameShadow</name>
873 <enum>Sunken</enum> 873 <enum>Sunken</enum>
874 </property> 874 </property>
875 <property stdset="1"> 875 <property stdset="1">
876 <name>text</name> 876 <name>text</name>
877 <string></string> 877 <string></string>
878 </property> 878 </property>
879 <property stdset="1"> 879 <property stdset="1">
880 <name>indent</name> 880 <name>indent</name>
881 <number>0</number> 881 <number>0</number>
882 </property> 882 </property>
883 </widget> 883 </widget>
884 <widget row="0" column="0" > 884 <widget row="0" column="0" >
885 <class>QLabel</class> 885 <class>QLabel</class>
886 <property stdset="1"> 886 <property stdset="1">
887 <name>name</name> 887 <name>name</name>
888 <cstring>TextLabel6_3</cstring> 888 <cstring>TextLabel6_3</cstring>
889 </property> 889 </property>
890 <property stdset="1"> 890 <property stdset="1">
891 <name>enabled</name> 891 <name>enabled</name>
892 <bool>true</bool> 892 <bool>true</bool>
893 </property> 893 </property>
894 <property stdset="1"> 894 <property stdset="1">
895 <name>sizePolicy</name> 895 <name>sizePolicy</name>
896 <sizepolicy> 896 <sizepolicy>
897 <hsizetype>1</hsizetype> 897 <hsizetype>1</hsizetype>
898 <vsizetype>1</vsizetype> 898 <vsizetype>1</vsizetype>
899 </sizepolicy> 899 </sizepolicy>
900 </property> 900 </property>
901 <property stdset="1"> 901 <property stdset="1">
902 <name>text</name> 902 <name>text</name>
903 <string>DHCP Server</string> 903 <string>DHCP Server</string>
904 </property> 904 </property>
905 </widget> 905 </widget>
906 </grid> 906 </grid>
907 </widget> 907 </widget>
908 <spacer> 908 <spacer>
909 <property> 909 <property>
910 <name>name</name> 910 <name>name</name>
911 <cstring>Spacer16</cstring> 911 <cstring>Spacer16</cstring>
912 </property> 912 </property>
913 <property stdset="1"> 913 <property stdset="1">
914 <name>orientation</name> 914 <name>orientation</name>
915 <enum>Vertical</enum> 915 <enum>Vertical</enum>
916 </property> 916 </property>
917 <property stdset="1"> 917 <property stdset="1">
918 <name>sizeType</name> 918 <name>sizeType</name>
919 <enum>Expanding</enum> 919 <enum>Expanding</enum>
920 </property> 920 </property>
921 <property> 921 <property>
922 <name>sizeHint</name> 922 <name>sizeHint</name>
923 <size> 923 <size>
924 <width>20</width> 924 <width>20</width>
925 <height>20</height> 925 <height>20</height>
926 </size> 926 </size>
927 </property> 927 </property>
928 </spacer> 928 </spacer>
929 </vbox> 929 </vbox>
930 </widget> 930 </widget>
931 <widget> 931 <widget>
932 <class>QWidget</class> 932 <class>QWidget</class>
933 <property stdset="1"> 933 <property stdset="1">
934 <name>name</name> 934 <name>name</name>
935 <cstring>tab</cstring> 935 <cstring>tab</cstring>
936 </property> 936 </property>
937 <attribute> 937 <attribute>
938 <name>title</name> 938 <name>title</name>
939 <string>Traffic</string> 939 <string>Traffic</string>
940 </attribute> 940 </attribute>
941 <vbox> 941 <vbox>
942 <property stdset="1"> 942 <property stdset="1">
943 <name>margin</name> 943 <name>margin</name>
944 <number>0</number> 944 <number>0</number>
945 </property> 945 </property>
946 <property stdset="1"> 946 <property stdset="1">
947 <name>spacing</name> 947 <name>spacing</name>
948 <number>0</number> 948 <number>0</number>
949 </property> 949 </property>
950 <widget> 950 <widget>
951 <class>QLayoutWidget</class> 951 <class>QGroupBox</class>
952 <property stdset="1"> 952 <property stdset="1">
953 <name>name</name> 953 <name>name</name>
954 <cstring>Layout5</cstring> 954 <cstring>Receiving_GB</cstring>
955 </property> 955 </property>
956 <hbox>
957 <property stdset="1">
958 <name>margin</name>
959 <number>0</number>
960 </property>
961 <property stdset="1">
962 <name>spacing</name>
963 <number>6</number>
964 </property>
965 <widget>
966 <class>QLabel</class>
967 <property stdset="1">
968 <name>name</name>
969 <cstring>TextLabel1_2</cstring>
970 </property>
971 <property stdset="1">
972 <name>sizePolicy</name>
973 <sizepolicy>
974 <hsizetype>0</hsizetype>
975 <vsizetype>1</vsizetype>
976 </sizepolicy>
977 </property>
978 <property stdset="1">
979 <name>text</name>
980 <string>Receiving</string>
981 </property>
982 </widget>
983 <spacer>
984 <property>
985 <name>name</name>
986 <cstring>Spacer17_2</cstring>
987 </property>
988 <property stdset="1">
989 <name>orientation</name>
990 <enum>Horizontal</enum>
991 </property>
992 <property stdset="1">
993 <name>sizeType</name>
994 <enum>Expanding</enum>
995 </property>
996 <property>
997 <name>sizeHint</name>
998 <size>
999 <width>20</width>
1000 <height>20</height>
1001 </size>
1002 </property>
1003 </spacer>
1004 </hbox>
1005 </widget>
1006 <widget>
1007 <class>QLayoutWidget</class>
1008 <property stdset="1"> 956 <property stdset="1">
1009 <name>name</name> 957 <name>enabled</name>
1010 <cstring>Layout43</cstring> 958 <bool>false</bool>
959 </property>
960 <property stdset="1">
961 <name>title</name>
962 <string>Receiving</string>
1011 </property> 963 </property>
1012 <property> 964 <property>
1013 <name>layoutMargin</name> 965 <name>layoutMargin</name>
1014 </property> 966 </property>
1015 <property> 967 <property>
1016 <name>layoutSpacing</name> 968 <name>layoutSpacing</name>
1017 </property> 969 </property>
1018 <hbox> 970 <vbox>
1019 <property stdset="1"> 971 <property stdset="1">
1020 <name>margin</name> 972 <name>margin</name>
1021 <number>2</number> 973 <number>4</number>
1022 </property> 974 </property>
1023 <property stdset="1"> 975 <property stdset="1">
1024 <name>spacing</name> 976 <name>spacing</name>
1025 <number>0</number> 977 <number>2</number>
1026 </property> 978 </property>
1027 <widget> 979 <widget>
1028 <class>QFrame</class> 980 <class>QLayoutWidget</class>
1029 <property stdset="1"> 981 <property stdset="1">
1030 <name>name</name> 982 <name>name</name>
1031 <cstring>Frame114</cstring> 983 <cstring>Layout11</cstring>
1032 </property>
1033 <property stdset="1">
1034 <name>sizePolicy</name>
1035 <sizepolicy>
1036 <hsizetype>0</hsizetype>
1037 <vsizetype>5</vsizetype>
1038 </sizepolicy>
1039 </property>
1040 <property stdset="1">
1041 <name>minimumSize</name>
1042 <size>
1043 <width>5</width>
1044 <height>0</height>
1045 </size>
1046 </property>
1047 <property stdset="1">
1048 <name>maximumSize</name>
1049 <size>
1050 <width>5</width>
1051 <height>32767</height>
1052 </size>
1053 </property>
1054 <property stdset="1">
1055 <name>frameShape</name>
1056 <enum>NoFrame</enum>
1057 </property>
1058 <property stdset="1">
1059 <name>frameShadow</name>
1060 <enum>Raised</enum>
1061 </property>
1062 </widget>
1063 <widget>
1064 <class>QFrame</class>
1065 <property stdset="1">
1066 <name>name</name>
1067 <cstring>Rcv_GB</cstring>
1068 </property>
1069 <property stdset="1">
1070 <name>enabled</name>
1071 <bool>false</bool>
1072 </property>
1073 <property stdset="1">
1074 <name>sizePolicy</name>
1075 <sizepolicy>
1076 <hsizetype>7</hsizetype>
1077 <vsizetype>5</vsizetype>
1078 </sizepolicy>
1079 </property>
1080 <property stdset="1">
1081 <name>frameShape</name>
1082 <enum>NoFrame</enum>
1083 </property>
1084 <property stdset="1">
1085 <name>frameShadow</name>
1086 <enum>Raised</enum>
1087 </property>
1088 <property>
1089 <name>layoutMargin</name>
1090 </property> 984 </property>
1091 <property> 985 <property>
1092 <name>layoutSpacing</name> 986 <name>layoutSpacing</name>
1093 </property> 987 </property>
1094 <grid> 988 <hbox>
1095 <property stdset="1"> 989 <property stdset="1">
1096 <name>margin</name> 990 <name>margin</name>
1097 <number>0</number> 991 <number>0</number>
1098 </property> 992 </property>
1099 <property stdset="1"> 993 <property stdset="1">
1100 <name>spacing</name> 994 <name>spacing</name>
1101 <number>1</number> 995 <number>2</number>
1102 </property> 996 </property>
1103 <widget row="1" column="0" > 997 <widget>
1104 <class>QLabel</class> 998 <class>QLabel</class>
1105 <property stdset="1"> 999 <property stdset="1">
1106 <name>name</name> 1000 <name>name</name>
1107 <cstring>TextLabel1_5_9</cstring> 1001 <cstring>xxxxxxxxxxxxx</cstring>
1108 </property> 1002 </property>
1109 <property stdset="1"> 1003 <property stdset="1">
1110 <name>text</name> 1004 <name>text</name>
1111 <string>Errors</string> 1005 <string>Pkt</string>
1112 </property> 1006 </property>
1113 </widget> 1007 </widget>
1114 <widget row="0" column="1" rowspan="1" colspan="3" > 1008 <widget>
1009 <class>QLabel</class>
1010 <property stdset="1">
1011 <name>name</name>
1012 <cstring>RcvPackets_LBL</cstring>
1013 </property>
1014 <property stdset="1">
1015 <name>sizePolicy</name>
1016 <sizepolicy>
1017 <hsizetype>7</hsizetype>
1018 <vsizetype>1</vsizetype>
1019 </sizepolicy>
1020 </property>
1021 <property stdset="1">
1022 <name>frameShape</name>
1023 <enum>Panel</enum>
1024 </property>
1025 <property stdset="1">
1026 <name>frameShadow</name>
1027 <enum>Sunken</enum>
1028 </property>
1029 <property stdset="1">
1030 <name>indent</name>
1031 <number>0</number>
1032 </property>
1033 </widget>
1034 <widget>
1035 <class>QLabel</class>
1036 <property stdset="1">
1037 <name>name</name>
1038 <cstring>TextLabel1_5_3_4</cstring>
1039 </property>
1040 <property stdset="1">
1041 <name>text</name>
1042 <string>Bytes</string>
1043 </property>
1044 </widget>
1045 <widget>
1115 <class>QLabel</class> 1046 <class>QLabel</class>
1116 <property stdset="1"> 1047 <property stdset="1">
1117 <name>name</name> 1048 <name>name</name>
1118 <cstring>RcvBytes_LBL</cstring> 1049 <cstring>RcvBytes_LBL</cstring>
1119 </property> 1050 </property>
1120 <property stdset="1"> 1051 <property stdset="1">
1121 <name>sizePolicy</name> 1052 <name>sizePolicy</name>
1122 <sizepolicy> 1053 <sizepolicy>
1123 <hsizetype>7</hsizetype> 1054 <hsizetype>7</hsizetype>
1124 <vsizetype>1</vsizetype> 1055 <vsizetype>1</vsizetype>
1125 </sizepolicy> 1056 </sizepolicy>
1126 </property> 1057 </property>
1127 <property stdset="1"> 1058 <property stdset="1">
1128 <name>frameShape</name> 1059 <name>frameShape</name>
1129 <enum>Panel</enum> 1060 <enum>Panel</enum>
1130 </property> 1061 </property>
1131 <property stdset="1"> 1062 <property stdset="1">
1132 <name>frameShadow</name> 1063 <name>frameShadow</name>
1133 <enum>Sunken</enum> 1064 <enum>Sunken</enum>
1134 </property> 1065 </property>
1135 <property stdset="1"> 1066 <property stdset="1">
1136 <name>indent</name> 1067 <name>indent</name>
1137 <number>0</number> 1068 <number>0</number>
1138 </property> 1069 </property>
1139 </widget> 1070 </widget>
1140 <widget row="1" column="3" > 1071 <widget>
1141 <class>QLabel</class> 1072 <class>QLabel</class>
1142 <property stdset="1"> 1073 <property stdset="1">
1143 <name>name</name> 1074 <name>name</name>
1144 <cstring>RcvDropped_LBL</cstring> 1075 <cstring>TextLabel1_5_3_4_2</cstring>
1076 </property>
1077 <property stdset="1">
1078 <name>text</name>
1079 <string>ODO</string>
1080 </property>
1081 </widget>
1082 <widget>
1083 <class>QLabel</class>
1084 <property stdset="1">
1085 <name>name</name>
1086 <cstring>RcvODO_LBL</cstring>
1145 </property> 1087 </property>
1146 <property stdset="1"> 1088 <property stdset="1">
1147 <name>sizePolicy</name> 1089 <name>sizePolicy</name>
1148 <sizepolicy> 1090 <sizepolicy>
1149 <hsizetype>7</hsizetype> 1091 <hsizetype>7</hsizetype>
1150 <vsizetype>1</vsizetype> 1092 <vsizetype>1</vsizetype>
1151 </sizepolicy> 1093 </sizepolicy>
1152 </property> 1094 </property>
1153 <property stdset="1"> 1095 <property stdset="1">
1154 <name>frameShape</name> 1096 <name>frameShape</name>
1155 <enum>Panel</enum> 1097 <enum>Panel</enum>
1156 </property> 1098 </property>
1157 <property stdset="1"> 1099 <property stdset="1">
1158 <name>frameShadow</name> 1100 <name>frameShadow</name>
1159 <enum>Sunken</enum> 1101 <enum>Sunken</enum>
1160 </property> 1102 </property>
1161 <property stdset="1"> 1103 <property stdset="1">
1162 <name>indent</name> 1104 <name>indent</name>
1163 <number>0</number> 1105 <number>0</number>
1164 </property> 1106 </property>
1165 </widget> 1107 </widget>
1166 <widget row="1" column="1" > 1108 </hbox>
1109 </widget>
1110 <widget>
1111 <class>QLayoutWidget</class>
1112 <property stdset="1">
1113 <name>name</name>
1114 <cstring>Layout12</cstring>
1115 </property>
1116 <property>
1117 <name>layoutSpacing</name>
1118 </property>
1119 <hbox>
1120 <property stdset="1">
1121 <name>margin</name>
1122 <number>0</number>
1123 </property>
1124 <property stdset="1">
1125 <name>spacing</name>
1126 <number>2</number>
1127 </property>
1128 <widget>
1129 <class>QLabel</class>
1130 <property stdset="1">
1131 <name>name</name>
1132 <cstring>TextLabel1_5_9</cstring>
1133 </property>
1134 <property stdset="1">
1135 <name>text</name>
1136 <string>Errors</string>
1137 </property>
1138 </widget>
1139 <widget>
1167 <class>QLabel</class> 1140 <class>QLabel</class>
1168 <property stdset="1"> 1141 <property stdset="1">
1169 <name>name</name> 1142 <name>name</name>
1170 <cstring>RcvErrors_LBL</cstring> 1143 <cstring>RcvErrors_LBL</cstring>
1171 </property> 1144 </property>
1172 <property stdset="1"> 1145 <property stdset="1">
1173 <name>sizePolicy</name> 1146 <name>sizePolicy</name>
1174 <sizepolicy> 1147 <sizepolicy>
1175 <hsizetype>7</hsizetype> 1148 <hsizetype>7</hsizetype>
1176 <vsizetype>1</vsizetype> 1149 <vsizetype>1</vsizetype>
1177 </sizepolicy> 1150 </sizepolicy>
1178 </property> 1151 </property>
1179 <property stdset="1"> 1152 <property stdset="1">
1180 <name>frameShape</name> 1153 <name>frameShape</name>
1181 <enum>Panel</enum> 1154 <enum>Panel</enum>
1182 </property> 1155 </property>
1183 <property stdset="1"> 1156 <property stdset="1">
1184 <name>frameShadow</name> 1157 <name>frameShadow</name>
1185 <enum>Sunken</enum> 1158 <enum>Sunken</enum>
1186 </property> 1159 </property>
1187 <property stdset="1"> 1160 <property stdset="1">
1188 <name>indent</name> 1161 <name>indent</name>
1189 <number>0</number> 1162 <number>0</number>
1190 </property> 1163 </property>
1191 </widget> 1164 </widget>
1192 <widget row="1" column="2" > 1165 <widget>
1193 <class>QLabel</class> 1166 <class>QLabel</class>
1194 <property stdset="1"> 1167 <property stdset="1">
1195 <name>name</name> 1168 <name>name</name>
1196 <cstring>TextLabel1_5_4</cstring> 1169 <cstring>TextLabel1_5_4</cstring>
1197 </property> 1170 </property>
1198 <property stdset="1"> 1171 <property stdset="1">
1199 <name>text</name> 1172 <name>text</name>
1200 <string>Dropped</string> 1173 <string>Dropped</string>
1201 </property> 1174 </property>
1202 </widget> 1175 </widget>
1203 <widget row="0" column="0" > 1176 <widget>
1204 <class>QLabel</class> 1177 <class>QLabel</class>
1205 <property stdset="1"> 1178 <property stdset="1">
1206 <name>name</name> 1179 <name>name</name>
1207 <cstring>TextLabel1_5_3</cstring> 1180 <cstring>RcvDropped_LBL</cstring>
1208 </property> 1181 </property>
1209 <property stdset="1"> 1182 <property stdset="1">
1210 <name>text</name> 1183 <name>sizePolicy</name>
1211 <string>Bytes</string> 1184 <sizepolicy>
1185 <hsizetype>7</hsizetype>
1186 <vsizetype>1</vsizetype>
1187 </sizepolicy>
1188 </property>
1189 <property stdset="1">
1190 <name>frameShape</name>
1191 <enum>Panel</enum>
1192 </property>
1193 <property stdset="1">
1194 <name>frameShadow</name>
1195 <enum>Sunken</enum>
1196 </property>
1197 <property stdset="1">
1198 <name>indent</name>
1199 <number>0</number>
1212 </property> 1200 </property>
1213 </widget> 1201 </widget>
1214 </grid> 1202 </hbox>
1215 </widget> 1203 </widget>
1216 </hbox> 1204 </vbox>
1217 </widget> 1205 </widget>
1218 <widget> 1206 <widget>
1219 <class>QLayoutWidget</class> 1207 <class>QFrame</class>
1220 <property stdset="1"> 1208 <property stdset="1">
1221 <name>name</name> 1209 <name>name</name>
1222 <cstring>Layout6</cstring> 1210 <cstring>Frame114</cstring>
1211 </property>
1212 <property stdset="1">
1213 <name>sizePolicy</name>
1214 <sizepolicy>
1215 <hsizetype>0</hsizetype>
1216 <vsizetype>5</vsizetype>
1217 </sizepolicy>
1218 </property>
1219 <property stdset="1">
1220 <name>minimumSize</name>
1221 <size>
1222 <width>5</width>
1223 <height>0</height>
1224 </size>
1225 </property>
1226 <property stdset="1">
1227 <name>maximumSize</name>
1228 <size>
1229 <width>5</width>
1230 <height>32767</height>
1231 </size>
1232 </property>
1233 <property stdset="1">
1234 <name>frameShape</name>
1235 <enum>NoFrame</enum>
1236 </property>
1237 <property stdset="1">
1238 <name>frameShadow</name>
1239 <enum>Raised</enum>
1223 </property> 1240 </property>
1224 <hbox>
1225 <property stdset="1">
1226 <name>margin</name>
1227 <number>0</number>
1228 </property>
1229 <property stdset="1">
1230 <name>spacing</name>
1231 <number>6</number>
1232 </property>
1233 <widget>
1234 <class>QLabel</class>
1235 <property stdset="1">
1236 <name>name</name>
1237 <cstring>TextLabel1</cstring>
1238 </property>
1239 <property stdset="1">
1240 <name>sizePolicy</name>
1241 <sizepolicy>
1242 <hsizetype>0</hsizetype>
1243 <vsizetype>1</vsizetype>
1244 </sizepolicy>
1245 </property>
1246 <property stdset="1">
1247 <name>text</name>
1248 <string>Transmitting</string>
1249 </property>
1250 </widget>
1251 <spacer>
1252 <property>
1253 <name>name</name>
1254 <cstring>Spacer18_2</cstring>
1255 </property>
1256 <property stdset="1">
1257 <name>orientation</name>
1258 <enum>Horizontal</enum>
1259 </property>
1260 <property stdset="1">
1261 <name>sizeType</name>
1262 <enum>Expanding</enum>
1263 </property>
1264 <property>
1265 <name>sizeHint</name>
1266 <size>
1267 <width>20</width>
1268 <height>20</height>
1269 </size>
1270 </property>
1271 </spacer>
1272 </hbox>
1273 </widget> 1241 </widget>
1274 <widget> 1242 <widget>
1275 <class>QLayoutWidget</class> 1243 <class>QFrame</class>
1276 <property stdset="1"> 1244 <property stdset="1">
1277 <name>name</name> 1245 <name>name</name>
1278 <cstring>Layout44</cstring> 1246 <cstring>Frame115</cstring>
1247 </property>
1248 <property stdset="1">
1249 <name>sizePolicy</name>
1250 <sizepolicy>
1251 <hsizetype>0</hsizetype>
1252 <vsizetype>5</vsizetype>
1253 </sizepolicy>
1254 </property>
1255 <property stdset="1">
1256 <name>minimumSize</name>
1257 <size>
1258 <width>5</width>
1259 <height>0</height>
1260 </size>
1261 </property>
1262 <property stdset="1">
1263 <name>maximumSize</name>
1264 <size>
1265 <width>5</width>
1266 <height>32767</height>
1267 </size>
1268 </property>
1269 <property stdset="1">
1270 <name>frameShape</name>
1271 <enum>NoFrame</enum>
1272 </property>
1273 <property stdset="1">
1274 <name>frameShadow</name>
1275 <enum>Plain</enum>
1276 </property>
1277 </widget>
1278 <widget>
1279 <class>QGroupBox</class>
1280 <property stdset="1">
1281 <name>name</name>
1282 <cstring>Sending_GB</cstring>
1283 </property>
1284 <property stdset="1">
1285 <name>enabled</name>
1286 <bool>false</bool>
1287 </property>
1288 <property stdset="1">
1289 <name>title</name>
1290 <string>Sending</string>
1279 </property> 1291 </property>
1280 <property> 1292 <property>
1281 <name>layoutMargin</name> 1293 <name>layoutMargin</name>
1282 </property> 1294 </property>
1283 <property> 1295 <property>
1284 <name>layoutSpacing</name> 1296 <name>layoutSpacing</name>
1285 </property> 1297 </property>
1286 <hbox> 1298 <vbox>
1287 <property stdset="1"> 1299 <property stdset="1">
1288 <name>margin</name> 1300 <name>margin</name>
1289 <number>2</number> 1301 <number>4</number>
1290 </property> 1302 </property>
1291 <property stdset="1"> 1303 <property stdset="1">
1292 <name>spacing</name> 1304 <name>spacing</name>
1293 <number>0</number> 1305 <number>2</number>
1294 </property> 1306 </property>
1295 <widget> 1307 <widget>
1296 <class>QFrame</class> 1308 <class>QLayoutWidget</class>
1297 <property stdset="1"> 1309 <property stdset="1">
1298 <name>name</name> 1310 <name>name</name>
1299 <cstring>Frame115</cstring> 1311 <cstring>Layout13</cstring>
1300 </property>
1301 <property stdset="1">
1302 <name>sizePolicy</name>
1303 <sizepolicy>
1304 <hsizetype>0</hsizetype>
1305 <vsizetype>5</vsizetype>
1306 </sizepolicy>
1307 </property>
1308 <property stdset="1">
1309 <name>minimumSize</name>
1310 <size>
1311 <width>5</width>
1312 <height>0</height>
1313 </size>
1314 </property>
1315 <property stdset="1">
1316 <name>maximumSize</name>
1317 <size>
1318 <width>5</width>
1319 <height>32767</height>
1320 </size>
1321 </property>
1322 <property stdset="1">
1323 <name>frameShape</name>
1324 <enum>NoFrame</enum>
1325 </property>
1326 <property stdset="1">
1327 <name>frameShadow</name>
1328 <enum>Plain</enum>
1329 </property>
1330 </widget>
1331 <widget>
1332 <class>QFrame</class>
1333 <property stdset="1">
1334 <name>name</name>
1335 <cstring>Snd_GB</cstring>
1336 </property>
1337 <property stdset="1">
1338 <name>enabled</name>
1339 <bool>false</bool>
1340 </property>
1341 <property stdset="1">
1342 <name>sizePolicy</name>
1343 <sizepolicy>
1344 <hsizetype>7</hsizetype>
1345 <vsizetype>5</vsizetype>
1346 </sizepolicy>
1347 </property>
1348 <property stdset="1">
1349 <name>frameShape</name>
1350 <enum>NoFrame</enum>
1351 </property>
1352 <property stdset="1">
1353 <name>frameShadow</name>
1354 <enum>Raised</enum>
1355 </property>
1356 <property>
1357 <name>layoutMargin</name>
1358 </property> 1312 </property>
1359 <property> 1313 <property>
1360 <name>layoutSpacing</name> 1314 <name>layoutSpacing</name>
1361 </property> 1315 </property>
1362 <grid> 1316 <hbox>
1363 <property stdset="1"> 1317 <property stdset="1">
1364 <name>margin</name> 1318 <name>margin</name>
1365 <number>0</number> 1319 <number>0</number>
1366 </property> 1320 </property>
1367 <property stdset="1"> 1321 <property stdset="1">
1368 <name>spacing</name> 1322 <name>spacing</name>
1369 <number>1</number> 1323 <number>2</number>
1370 </property> 1324 </property>
1371 <widget row="1" column="0" > 1325 <widget>
1372 <class>QLabel</class> 1326 <class>QLabel</class>
1373 <property stdset="1"> 1327 <property stdset="1">
1374 <name>name</name> 1328 <name>name</name>
1375 <cstring>TextLabel1_5_9_2</cstring> 1329 <cstring>dfsfadf</cstring>
1376 </property> 1330 </property>
1377 <property stdset="1"> 1331 <property stdset="1">
1378 <name>text</name> 1332 <name>text</name>
1379 <string>Errors</string> 1333 <string>Pkt</string>
1380 </property> 1334 </property>
1381 </widget> 1335 </widget>
1382 <widget row="1" column="2" > 1336 <widget>
1383 <class>QLabel</class> 1337 <class>QLabel</class>
1384 <property stdset="1"> 1338 <property stdset="1">
1385 <name>name</name> 1339 <name>name</name>
1386 <cstring>TextLabel1_5_4_2</cstring> 1340 <cstring>SndPackets_LBL</cstring>
1387 </property> 1341 </property>
1388 <property stdset="1"> 1342 <property stdset="1">
1389 <name>text</name> 1343 <name>sizePolicy</name>
1390 <string>Dropped</string> 1344 <sizepolicy>
1345 <hsizetype>7</hsizetype>
1346 <vsizetype>1</vsizetype>
1347 </sizepolicy>
1348 </property>
1349 <property stdset="1">
1350 <name>frameShape</name>
1351 <enum>Panel</enum>
1352 </property>
1353 <property stdset="1">
1354 <name>frameShadow</name>
1355 <enum>Sunken</enum>
1356 </property>
1357 <property stdset="1">
1358 <name>indent</name>
1359 <number>0</number>
1391 </property> 1360 </property>
1392 </widget> 1361 </widget>
1393 <widget row="0" column="0" > 1362 <widget>
1394 <class>QLabel</class> 1363 <class>QLabel</class>
1395 <property stdset="1"> 1364 <property stdset="1">
1396 <name>name</name> 1365 <name>name</name>
1397 <cstring>TextLabel1_5_3_2</cstring> 1366 <cstring>TextLabel1_5_3_4_4</cstring>
1398 </property> 1367 </property>
1399 <property stdset="1"> 1368 <property stdset="1">
1400 <name>text</name> 1369 <name>text</name>
1401 <string>Bytes</string> 1370 <string>Bytes</string>
1402 </property> 1371 </property>
1403 </widget> 1372 </widget>
1404 <widget row="1" column="3" > 1373 <widget>
1405 <class>QLabel</class> 1374 <class>QLabel</class>
1406 <property stdset="1"> 1375 <property stdset="1">
1407 <name>name</name> 1376 <name>name</name>
1408 <cstring>SndDropped_LBL</cstring> 1377 <cstring>SndBytes_LBL</cstring>
1378 </property>
1379 <property stdset="1">
1380 <name>sizePolicy</name>
1381 <sizepolicy>
1382 <hsizetype>7</hsizetype>
1383 <vsizetype>1</vsizetype>
1384 </sizepolicy>
1385 </property>
1386 <property stdset="1">
1387 <name>frameShape</name>
1388 <enum>Panel</enum>
1389 </property>
1390 <property stdset="1">
1391 <name>frameShadow</name>
1392 <enum>Sunken</enum>
1393 </property>
1394 <property stdset="1">
1395 <name>indent</name>
1396 <number>0</number>
1397 </property>
1398 </widget>
1399 <widget>
1400 <class>QLabel</class>
1401 <property stdset="1">
1402 <name>name</name>
1403 <cstring>TextLabel1_5_3_4_2_3</cstring>
1404 </property>
1405 <property stdset="1">
1406 <name>text</name>
1407 <string>ODO</string>
1408 </property>
1409 </widget>
1410 <widget>
1411 <class>QLabel</class>
1412 <property stdset="1">
1413 <name>name</name>
1414 <cstring>SndODO_LBL</cstring>
1409 </property> 1415 </property>
1410 <property stdset="1"> 1416 <property stdset="1">
1411 <name>sizePolicy</name> 1417 <name>sizePolicy</name>
1412 <sizepolicy> 1418 <sizepolicy>
1413 <hsizetype>7</hsizetype> 1419 <hsizetype>7</hsizetype>
1414 <vsizetype>1</vsizetype> 1420 <vsizetype>1</vsizetype>
1415 </sizepolicy> 1421 </sizepolicy>
1416 </property> 1422 </property>
1417 <property stdset="1"> 1423 <property stdset="1">
1418 <name>frameShape</name> 1424 <name>frameShape</name>
1419 <enum>Panel</enum> 1425 <enum>Panel</enum>
1420 </property> 1426 </property>
1421 <property stdset="1"> 1427 <property stdset="1">
1422 <name>frameShadow</name> 1428 <name>frameShadow</name>
1423 <enum>Sunken</enum> 1429 <enum>Sunken</enum>
1424 </property> 1430 </property>
1425 <property stdset="1"> 1431 <property stdset="1">
1426 <name>indent</name> 1432 <name>indent</name>
1427 <number>0</number> 1433 <number>0</number>
1428 </property> 1434 </property>
1429 </widget> 1435 </widget>
1430 <widget row="1" column="1" > 1436 </hbox>
1437 </widget>
1438 <widget>
1439 <class>QLayoutWidget</class>
1440 <property stdset="1">
1441 <name>name</name>
1442 <cstring>Layout14</cstring>
1443 </property>
1444 <property>
1445 <name>layoutSpacing</name>
1446 </property>
1447 <hbox>
1448 <property stdset="1">
1449 <name>margin</name>
1450 <number>0</number>
1451 </property>
1452 <property stdset="1">
1453 <name>spacing</name>
1454 <number>2</number>
1455 </property>
1456 <widget>
1457 <class>QLabel</class>
1458 <property stdset="1">
1459 <name>name</name>
1460 <cstring>TextLabel1_5_9_3</cstring>
1461 </property>
1462 <property stdset="1">
1463 <name>text</name>
1464 <string>Errors</string>
1465 </property>
1466 </widget>
1467 <widget>
1431 <class>QLabel</class> 1468 <class>QLabel</class>
1432 <property stdset="1"> 1469 <property stdset="1">
1433 <name>name</name> 1470 <name>name</name>
1434 <cstring>SndErrors_LBL</cstring> 1471 <cstring>SndErrors_LBL</cstring>
1435 </property> 1472 </property>
1436 <property stdset="1"> 1473 <property stdset="1">
1437 <name>sizePolicy</name> 1474 <name>sizePolicy</name>
1438 <sizepolicy> 1475 <sizepolicy>
1439 <hsizetype>7</hsizetype> 1476 <hsizetype>7</hsizetype>
1440 <vsizetype>1</vsizetype> 1477 <vsizetype>1</vsizetype>
1441 </sizepolicy> 1478 </sizepolicy>
1442 </property> 1479 </property>
1443 <property stdset="1"> 1480 <property stdset="1">
1444 <name>frameShape</name> 1481 <name>frameShape</name>
1445 <enum>Panel</enum> 1482 <enum>Panel</enum>
1446 </property> 1483 </property>
1447 <property stdset="1"> 1484 <property stdset="1">
1448 <name>frameShadow</name> 1485 <name>frameShadow</name>
1449 <enum>Sunken</enum> 1486 <enum>Sunken</enum>
1450 </property> 1487 </property>
1451 <property stdset="1"> 1488 <property stdset="1">
1452 <name>indent</name> 1489 <name>indent</name>
1453 <number>0</number> 1490 <number>0</number>
1454 </property> 1491 </property>
1455 </widget> 1492 </widget>
1456 <widget row="0" column="1" rowspan="1" colspan="3" > 1493 <widget>
1457 <class>QLabel</class> 1494 <class>QLabel</class>
1458 <property stdset="1"> 1495 <property stdset="1">
1459 <name>name</name> 1496 <name>name</name>
1460 <cstring>SndBytes_LBL</cstring> 1497 <cstring>TextLabel1_5_4_3</cstring>
1498 </property>
1499 <property stdset="1">
1500 <name>text</name>
1501 <string>Dropped</string>
1502 </property>
1503 </widget>
1504 <widget>
1505 <class>QLabel</class>
1506 <property stdset="1">
1507 <name>name</name>
1508 <cstring>SndDropped_LBL</cstring>
1461 </property> 1509 </property>
1462 <property stdset="1"> 1510 <property stdset="1">
1463 <name>sizePolicy</name> 1511 <name>sizePolicy</name>
1464 <sizepolicy> 1512 <sizepolicy>
1465 <hsizetype>7</hsizetype> 1513 <hsizetype>7</hsizetype>
1466 <vsizetype>1</vsizetype> 1514 <vsizetype>1</vsizetype>
1467 </sizepolicy> 1515 </sizepolicy>
1468 </property> 1516 </property>
1469 <property stdset="1"> 1517 <property stdset="1">
1470 <name>frameShape</name> 1518 <name>frameShape</name>
1471 <enum>Panel</enum> 1519 <enum>Panel</enum>
1472 </property> 1520 </property>
1473 <property stdset="1"> 1521 <property stdset="1">
1474 <name>frameShadow</name> 1522 <name>frameShadow</name>
1475 <enum>Sunken</enum> 1523 <enum>Sunken</enum>
1476 </property> 1524 </property>
1477 <property stdset="1"> 1525 <property stdset="1">
1478 <name>indent</name> 1526 <name>indent</name>
1479 <number>0</number> 1527 <number>0</number>
1480 </property> 1528 </property>
1481 </widget> 1529 </widget>
1482 </grid> 1530 </hbox>
1483 </widget> 1531 </widget>
1484 </hbox> 1532 </vbox>
1485 </widget> 1533 </widget>
1486 <widget> 1534 <widget>
1487 <class>QLayoutWidget</class> 1535 <class>QGroupBox</class>
1488 <property stdset="1"> 1536 <property stdset="1">
1489 <name>name</name> 1537 <name>name</name>
1490 <cstring>Layout7</cstring> 1538 <cstring>Misc_GB</cstring>
1539 </property>
1540 <property stdset="1">
1541 <name>enabled</name>
1542 <bool>false</bool>
1543 </property>
1544 <property stdset="1">
1545 <name>title</name>
1546 <string>Miscellaneous</string>
1547 </property>
1548 <property>
1549 <name>layoutMargin</name>
1550 </property>
1551 <property>
1552 <name>layoutSpacing</name>
1491 </property> 1553 </property>
1492 <hbox> 1554 <hbox>
1493 <property stdset="1"> 1555 <property stdset="1">
1494 <name>margin</name> 1556 <name>margin</name>
1495 <number>0</number> 1557 <number>4</number>
1496 </property> 1558 </property>
1497 <property stdset="1"> 1559 <property stdset="1">
1498 <name>spacing</name> 1560 <name>spacing</name>
1499 <number>6</number> 1561 <number>2</number>
1500 </property> 1562 </property>
1501 <widget> 1563 <widget>
1502 <class>QLabel</class> 1564 <class>QLabel</class>
1503 <property stdset="1"> 1565 <property stdset="1">
1504 <name>name</name> 1566 <name>name</name>
1505 <cstring>TextLabel1_3</cstring> 1567 <cstring>TextLabel1_5_3_3</cstring>
1568 </property>
1569 <property stdset="1">
1570 <name>text</name>
1571 <string>Collisions</string>
1572 </property>
1573 </widget>
1574 <widget>
1575 <class>QLabel</class>
1576 <property stdset="1">
1577 <name>name</name>
1578 <cstring>Collisions_LBL</cstring>
1506 </property> 1579 </property>
1507 <property stdset="1"> 1580 <property stdset="1">
1508 <name>sizePolicy</name> 1581 <name>sizePolicy</name>
1509 <sizepolicy> 1582 <sizepolicy>
1510 <hsizetype>0</hsizetype> 1583 <hsizetype>7</hsizetype>
1511 <vsizetype>1</vsizetype> 1584 <vsizetype>1</vsizetype>
1512 </sizepolicy> 1585 </sizepolicy>
1513 </property> 1586 </property>
1514 <property stdset="1"> 1587 <property stdset="1">
1515 <name>text</name> 1588 <name>frameShape</name>
1516 <string>Others</string> 1589 <enum>Panel</enum>
1590 </property>
1591 <property stdset="1">
1592 <name>frameShadow</name>
1593 <enum>Sunken</enum>
1594 </property>
1595 <property stdset="1">
1596 <name>indent</name>
1597 <number>0</number>
1517 </property> 1598 </property>
1518 </widget> 1599 </widget>
1519 <spacer> 1600 <spacer>
1520 <property> 1601 <property>
1521 <name>name</name> 1602 <name>name</name>
1522 <cstring>Spacer19</cstring> 1603 <cstring>Spacer10</cstring>
1523 </property> 1604 </property>
1524 <property stdset="1"> 1605 <property stdset="1">
1525 <name>orientation</name> 1606 <name>orientation</name>
1526 <enum>Horizontal</enum> 1607 <enum>Horizontal</enum>
1527 </property> 1608 </property>
1528 <property stdset="1"> 1609 <property stdset="1">
1529 <name>sizeType</name> 1610 <name>sizeType</name>
1530 <enum>Expanding</enum> 1611 <enum>Expanding</enum>
1531 </property> 1612 </property>
1532 <property> 1613 <property>
1533 <name>sizeHint</name> 1614 <name>sizeHint</name>
1534 <size> 1615 <size>
1535 <width>20</width> 1616 <width>20</width>
1536 <height>20</height> 1617 <height>20</height>
1537 </size> 1618 </size>
1538 </property> 1619 </property>
1539 </spacer> 1620 </spacer>
1540 </hbox> 1621 <spacer>
1541 </widget> 1622 <property>
1542 <widget>
1543 <class>QLayoutWidget</class>
1544 <property stdset="1">
1545 <name>name</name>
1546 <cstring>Layout45</cstring>
1547 </property>
1548 <property>
1549 <name>layoutMargin</name>
1550 </property>
1551 <property>
1552 <name>layoutSpacing</name>
1553 </property>
1554 <hbox>
1555 <property stdset="1">
1556 <name>margin</name>
1557 <number>2</number>
1558 </property>
1559 <property stdset="1">
1560 <name>spacing</name>
1561 <number>0</number>
1562 </property>
1563 <widget>
1564 <class>QFrame</class>
1565 <property stdset="1">
1566 <name>name</name> 1623 <name>name</name>
1567 <cstring>Frame116</cstring> 1624 <cstring>Spacer13</cstring>
1568 </property> 1625 </property>
1569 <property stdset="1"> 1626 <property stdset="1">
1570 <name>sizePolicy</name> 1627 <name>orientation</name>
1571 <sizepolicy> 1628 <enum>Horizontal</enum>
1572 <hsizetype>0</hsizetype>
1573 <vsizetype>5</vsizetype>
1574 </sizepolicy>
1575 </property> 1629 </property>
1576 <property stdset="1"> 1630 <property stdset="1">
1577 <name>minimumSize</name> 1631 <name>sizeType</name>
1578 <size> 1632 <enum>Expanding</enum>
1579 <width>5</width>
1580 <height>0</height>
1581 </size>
1582 </property> 1633 </property>
1583 <property stdset="1"> 1634 <property>
1584 <name>maximumSize</name> 1635 <name>sizeHint</name>
1585 <size> 1636 <size>
1586 <width>5</width> 1637 <width>20</width>
1587 <height>32767</height> 1638 <height>20</height>
1588 </size> 1639 </size>
1589 </property> 1640 </property>
1590 <property stdset="1"> 1641 </spacer>
1591 <name>frameShape</name>
1592 <enum>NoFrame</enum>
1593 </property>
1594 <property stdset="1">
1595 <name>frameShadow</name>
1596 <enum>Raised</enum>
1597 </property>
1598 </widget>
1599 <widget>
1600 <class>QFrame</class>
1601 <property stdset="1">
1602 <name>name</name>
1603 <cstring>Collisions_FRM</cstring>
1604 </property>
1605 <property stdset="1">
1606 <name>enabled</name>
1607 <bool>false</bool>
1608 </property>
1609 <property stdset="1">
1610 <name>sizePolicy</name>
1611 <sizepolicy>
1612 <hsizetype>7</hsizetype>
1613 <vsizetype>5</vsizetype>
1614 </sizepolicy>
1615 </property>
1616 <property stdset="1">
1617 <name>frameShape</name>
1618 <enum>NoFrame</enum>
1619 </property>
1620 <property stdset="1">
1621 <name>frameShadow</name>
1622 <enum>Raised</enum>
1623 </property>
1624 <property>
1625 <name>layoutMargin</name>
1626 </property>
1627 <property>
1628 <name>layoutSpacing</name>
1629 </property>
1630 <hbox>
1631 <property stdset="1">
1632 <name>margin</name>
1633 <number>0</number>
1634 </property>
1635 <property stdset="1">
1636 <name>spacing</name>
1637 <number>2</number>
1638 </property>
1639 <widget>
1640 <class>QLabel</class>
1641 <property stdset="1">
1642 <name>name</name>
1643 <cstring>TextLabel1_5_3_3</cstring>
1644 </property>
1645 <property stdset="1">
1646 <name>text</name>
1647 <string>Collisions</string>
1648 </property>
1649 </widget>
1650 <widget>
1651 <class>QLabel</class>
1652 <property stdset="1">
1653 <name>name</name>
1654 <cstring>Collisions_LBL</cstring>
1655 </property>
1656 <property stdset="1">
1657 <name>sizePolicy</name>
1658 <sizepolicy>
1659 <hsizetype>7</hsizetype>
1660 <vsizetype>1</vsizetype>
1661 </sizepolicy>
1662 </property>
1663 <property stdset="1">
1664 <name>frameShape</name>
1665 <enum>Panel</enum>
1666 </property>
1667 <property stdset="1">
1668 <name>frameShadow</name>
1669 <enum>Sunken</enum>
1670 </property>
1671 <property stdset="1">
1672 <name>indent</name>
1673 <number>0</number>
1674 </property>
1675 </widget>
1676 <spacer>
1677 <property>
1678 <name>name</name>
1679 <cstring>Spacer18</cstring>
1680 </property>
1681 <property stdset="1">
1682 <name>orientation</name>
1683 <enum>Horizontal</enum>
1684 </property>
1685 <property stdset="1">
1686 <name>sizeType</name>
1687 <enum>Expanding</enum>
1688 </property>
1689 <property>
1690 <name>sizeHint</name>
1691 <size>
1692 <width>20</width>
1693 <height>20</height>
1694 </size>
1695 </property>
1696 </spacer>
1697 </hbox>
1698 </widget>
1699 </hbox> 1642 </hbox>
1700 </widget> 1643 </widget>
1701 <spacer> 1644 <spacer>
1702 <property> 1645 <property>
1703 <name>name</name> 1646 <name>name</name>
1704 <cstring>Spacer17</cstring> 1647 <cstring>Spacer17</cstring>
1705 </property> 1648 </property>
1706 <property stdset="1"> 1649 <property stdset="1">
1707 <name>orientation</name> 1650 <name>orientation</name>
1708 <enum>Vertical</enum> 1651 <enum>Vertical</enum>
1709 </property> 1652 </property>
1710 <property stdset="1"> 1653 <property stdset="1">
1711 <name>sizeType</name> 1654 <name>sizeType</name>
1712 <enum>Expanding</enum> 1655 <enum>Expanding</enum>
1713 </property> 1656 </property>
1714 <property> 1657 <property>
1715 <name>sizeHint</name> 1658 <name>sizeHint</name>
1716 <size> 1659 <size>
1717 <width>20</width> 1660 <width>20</width>
1718 <height>20</height> 1661 <height>20</height>
1719 </size> 1662 </size>
1720 </property> 1663 </property>
1721 </spacer> 1664 </spacer>
1722 <widget> 1665 <widget>
1723 <class>QLayoutWidget</class> 1666 <class>QLayoutWidget</class>
1724 <property stdset="1"> 1667 <property stdset="1">
1725 <name>name</name> 1668 <name>name</name>
1726 <cstring>Layout17</cstring> 1669 <cstring>Layout10</cstring>
1727 </property> 1670 </property>
1728 <hbox> 1671 <hbox>
1729 <property stdset="1"> 1672 <property stdset="1">
1730 <name>margin</name> 1673 <name>margin</name>
1731 <number>0</number> 1674 <number>0</number>
1732 </property> 1675 </property>
1733 <property stdset="1"> 1676 <property stdset="1">
1734 <name>spacing</name> 1677 <name>spacing</name>
1735 <number>6</number> 1678 <number>6</number>
1736 </property> 1679 </property>
1737 <widget> 1680 <widget>
1738 <class>QCheckBox</class> 1681 <class>QCheckBox</class>
1739 <property stdset="1"> 1682 <property stdset="1">
1740 <name>name</name> 1683 <name>name</name>
1741 <cstring>Refresh_CB</cstring> 1684 <cstring>Refresh_CB</cstring>
1742 </property> 1685 </property>
1743 <property stdset="1"> 1686 <property stdset="1">
1687 <name>enabled</name>
1688 <bool>false</bool>
1689 </property>
1690 <property stdset="1">
1744 <name>text</name> 1691 <name>text</name>
1745 <string>Live feed </string> 1692 <string>Live feed </string>
1746 </property> 1693 </property>
1747 </widget> 1694 </widget>
1748 <spacer> 1695 <spacer>
1749 <property> 1696 <property>
1750 <name>name</name> 1697 <name>name</name>
1751 <cstring>Spacer57</cstring> 1698 <cstring>Spacer57</cstring>
1752 </property> 1699 </property>
1753 <property stdset="1"> 1700 <property stdset="1">
1754 <name>orientation</name> 1701 <name>orientation</name>
1755 <enum>Horizontal</enum> 1702 <enum>Horizontal</enum>
1756 </property> 1703 </property>
1757 <property stdset="1"> 1704 <property stdset="1">
1758 <name>sizeType</name> 1705 <name>sizeType</name>
1759 <enum>Expanding</enum> 1706 <enum>Expanding</enum>
1760 </property> 1707 </property>
1761 <property> 1708 <property>
1762 <name>sizeHint</name> 1709 <name>sizeHint</name>
1763 <size> 1710 <size>
1764 <width>20</width> 1711 <width>20</width>
1765 <height>20</height> 1712 <height>20</height>
1766 </size> 1713 </size>
1767 </property> 1714 </property>
1768 </spacer> 1715 </spacer>
1716 <widget>
1717 <class>QPushButton</class>
1718 <property stdset="1">
1719 <name>name</name>
1720 <cstring>ResetODO_But</cstring>
1721 </property>
1722 <property stdset="1">
1723 <name>enabled</name>
1724 <bool>false</bool>
1725 </property>
1726 <property stdset="1">
1727 <name>text</name>
1728 <string>Reset ODO</string>
1729 </property>
1730 </widget>
1769 </hbox> 1731 </hbox>
1770 </widget> 1732 </widget>
1771 </vbox> 1733 </vbox>
1772 </widget> 1734 </widget>
1773 </widget> 1735 </widget>
1774 </vbox> 1736 </vbox>
1775</widget> 1737</widget>
1776<connections> 1738<connections>
1777 <connection> 1739 <connection>
1778 <sender>Refresh_CB</sender> 1740 <sender>Refresh_CB</sender>
1779 <signal>toggled(bool)</signal> 1741 <signal>toggled(bool)</signal>
1780 <receiver>Profile_FRM</receiver> 1742 <receiver>Profile_FRM</receiver>
1781 <slot>SLOT_AutoRefresh(bool)</slot> 1743 <slot>SLOT_AutoRefresh(bool)</slot>
1782 </connection> 1744 </connection>
1745 <connection>
1746 <sender>ResetODO_But</sender>
1747 <signal>clicked()</signal>
1748 <receiver>Profile_FRM</receiver>
1749 <slot>SLOT_ResetODO()</slot>
1750 </connection>
1783 <slot access="public">SLOT_AutoRefresh(bool)</slot> 1751 <slot access="public">SLOT_AutoRefresh(bool)</slot>
1752 <slot access="public">SLOT_ResetODO()</slot>
1784</connections> 1753</connections>
1785</UI> 1754</UI>
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,102 +1,125 @@
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>
5#include <qcheckbox.h> 7#include <qcheckbox.h>
6 8
7#include <GUIUtils.h> 9#include <GUIUtils.h>
8#include <netnode.h> 10#include <netnode.h>
9#include <resources.h> 11#include <resources.h>
10 12
11#include "profileedit.h" 13#include "profileedit.h"
12 14
13ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) : 15ProfileEdit::ProfileEdit( QWidget * Parent, ANetNodeInstance * TNNI ) :
14 ProfileGUI( Parent ), RefreshTimer(this) { 16 ProfileGUI( Parent ), RefreshTimer(this) {
15 InterfaceInfo * II; 17 InterfaceInfo * II;
16 18
17 II = TNNI->networkSetup()->assignedInterface(); 19 II = TNNI->networkSetup()->assignedInterface();
18 Log(( "Interface %p %p %p: %d\n", II, 20 Log(( "Interface %p %p %p: %d\n", II,
19 TNNI, TNNI->networkSetup(), (II) ? II->IsUp : 0 )); 21 TNNI, TNNI->networkSetup(), (II) ? II->IsUp : 0 ));
20 22
21 NNI = TNNI; 23 NNI = TNNI;
22 Dev = NNI->runtime()->device(); 24 Dev = NNI->runtime()->device();
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 );
36 SubnetMask_LBL->setText( II->Netmask ); 42 SubnetMask_LBL->setText( II->Netmask );
37 Broadcast_LBL->setText( II->BCastAddress ); 43 Broadcast_LBL->setText( II->BCastAddress );
38 MACAddress_LBL->setText( II->MACAddress ); 44 MACAddress_LBL->setText( II->MACAddress );
39 if( II->IsPointToPoint ) { 45 if( II->IsPointToPoint ) {
40 PointToPoint_LBL->setText( II->DstAddress ); 46 PointToPoint_LBL->setText( II->DstAddress );
41 } 47 }
42 QString S; 48 QString S;
43 InterfaceName_LBL->setText( II->Name ); 49 InterfaceName_LBL->setText( II->Name );
44 if( II->HasMulticast ) { 50 if( II->HasMulticast ) {
45 S += "Multicast"; 51 S += "Multicast";
46 } 52 }
47 if( ! S.isEmpty() ) { 53 if( ! S.isEmpty() ) {
48 S.prepend( " : " ); 54 S.prepend( " : " );
49 } 55 }
50 InterfaceOptions_LBL->setText( S ); 56 InterfaceOptions_LBL->setText( S );
51 57
52 connect( &RefreshTimer, SIGNAL( timeout() ), 58 connect( &RefreshTimer, SIGNAL( timeout() ),
53 this, SLOT( SLOT_Refresh() ) ); 59 this, SLOT( SLOT_Refresh() ) );
54 } 60 }
55 61
56} 62}
57 63
58QString ProfileEdit::acceptable( void ) { 64QString ProfileEdit::acceptable( void ) {
59 return QString(); 65 return QString();
60} 66}
61 67
62void ProfileEdit::showData( ProfileData & Data ) { 68void ProfileEdit::showData( ProfileData & Data ) {
63 Description_LE->setText( Data.Description ); 69 Description_LE->setText( Data.Description );
64 Automatic_CB->setChecked( Data.Automatic ); 70 Automatic_CB->setChecked( Data.Automatic );
65 TriggersVPN_CB->setChecked( Data.TriggerVPN ); 71 TriggersVPN_CB->setChecked( Data.TriggerVPN );
66 Confirm_CB->setChecked( Data.Confirm ); 72 Confirm_CB->setChecked( Data.Confirm );
67 Disabled_CB->setChecked( Data.Disabled ); 73 Disabled_CB->setChecked( Data.Disabled );
68} 74}
69 75
70 76
71bool ProfileEdit::commit( ProfileData & Data ) { 77bool ProfileEdit::commit( ProfileData & Data ) {
72 bool SM = 0; 78 bool SM = 0;
73 TXTM( Data.Description, Description_LE, SM ); 79 TXTM( Data.Description, Description_LE, SM );
74 80
75 CBM( Data.Automatic, Automatic_CB, SM ); 81 CBM( Data.Automatic, Automatic_CB, SM );
76 CBM( Data.TriggerVPN, TriggersVPN_CB, SM ); 82 CBM( Data.TriggerVPN, TriggersVPN_CB, SM );
77 CBM( Data.Disabled, Disabled_CB, SM ); 83 CBM( Data.Disabled, Disabled_CB, SM );
78 CBM( Data.Confirm, Confirm_CB, SM ); 84 CBM( Data.Confirm, Confirm_CB, SM );
79 85
80 return SM; 86 return SM;
81} 87}
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
95void ProfileEdit::SLOT_AutoRefresh( bool ar ) { 111void ProfileEdit::SLOT_AutoRefresh( bool ar ) {
96 if( ar ) { 112 if( ar ) {
97 RefreshTimer.start( 1000 ); 113 RefreshTimer.start( 1000 );
98 SLOT_Refresh(); 114 SLOT_Refresh();
99 } else { 115 } else {
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}
diff --git a/noncore/settings/networksettings2/profile/profileedit.h b/noncore/settings/networksettings2/profile/profileedit.h
index 9cde845..56bd15d 100644
--- a/noncore/settings/networksettings2/profile/profileedit.h
+++ b/noncore/settings/networksettings2/profile/profileedit.h
@@ -1,29 +1,32 @@
1#include "profiledata.h" 1#include "profiledata.h"
2#include "profileGUI.h" 2#include "profileGUI.h"
3 3
4#include <qtimer.h> 4#include <qtimer.h>
5class ANetNodeInstance; 5class ANetNodeInstance;
6class RuntimeInfo; 6class RuntimeInfo;
7 7
8class ProfileEdit : public ProfileGUI { 8class ProfileEdit : public ProfileGUI {
9 9
10 Q_OBJECT 10 Q_OBJECT
11 11
12public : 12public :
13 13
14 ProfileEdit( QWidget * parent, ANetNodeInstance * NNI ); 14 ProfileEdit( QWidget * parent, ANetNodeInstance * NNI );
15 QString acceptable( void ); 15 QString acceptable( void );
16 bool commit( ProfileData & Data ); 16 bool commit( ProfileData & Data );
17 void showData( ProfileData & Data ); 17 void showData( ProfileData & Data );
18 18
19public slots : 19public slots :
20 20
21 void SLOT_AutoRefresh( bool ); 21 void SLOT_AutoRefresh( bool );
22 void SLOT_Refresh( void ); 22 void SLOT_Refresh( void );
23 void SLOT_ResetODO( void );
23 24
24private : 25private :
25 26
26 QTimer RefreshTimer; 27 QTimer RefreshTimer;
27 ANetNodeInstance * NNI; 28 ANetNodeInstance * NNI;
28 RuntimeInfo * Dev; 29 RuntimeInfo * Dev;
30 long RcvODO;
31 long SndODO;
29}; 32};