summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp74
-rw-r--r--noncore/settings/netsystemtime/ntp.h7
-rw-r--r--noncore/settings/netsystemtime/ntpbase.ui111
3 files changed, 157 insertions, 35 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index 52fc6be..364609d 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -1,67 +1,95 @@
1#include "ntp.h" 1#include "ntp.h"
2#include <qpushbutton.h> 2#include <qpushbutton.h>
3#include <qregexp.h> 3#include <qregexp.h>
4#include <qtimer.h>
4#include <qtable.h> 5#include <qtable.h>
5#include <qlabel.h> 6#include <qlabel.h>
6#include <qsocket.h> 7#include <qsocket.h>
7#include <qlineedit.h> 8#include <qlineedit.h>
8#include <qspinbox.h> 9#include <qspinbox.h>
9#include <qmessagebox.h> 10#include <qmessagebox.h>
10#include <qmultilineedit.h> 11#include <qmultilineedit.h>
11#include <opie/oprocess.h> 12#include <opie/oprocess.h>
12#include <qpe/config.h> 13#include <qpe/config.h>
13#include <qpe/global.h> 14#include <qpe/global.h>
14#include <qpe/timeconversion.h> 15#include <qpe/timeconversion.h>
15#include <qpe/tzselect.h> 16#include <qpe/tzselect.h>
16#include <qpe/timestring.h> 17#include <qpe/timestring.h>
17#include <qpe/qpedialog.h> 18#include <qpe/qpedialog.h>
18#include <sys/time.h> 19#include <sys/time.h>
19#include <time.h> 20#include <time.h>
20#include <stdlib.h> 21#include <stdlib.h>
21 22
22 23
23Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) 24Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
24 : SetDateTime( parent, name, fl ) 25 : SetDateTime( parent, name, fl )
25{ 26{
27
28 Config ntpSrvs("/etc/ntpservers",Config::File);
29 ntpSrvs.setGroup("servers");
30 int srvCount = ntpSrvs.readNumEntry("count", 0 );
31 for (int i = 0; i < srvCount; i++)
32 {
33 ntpSrvs.setGroup(QString::number(i));
34 ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") );
35 }
36 if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de"));
37
26 Config cfg("ntp",Config::User); 38 Config cfg("ntp",Config::User);
27 cfg.setGroup("settings"); 39 cfg.setGroup("settings");
28 // _maxOffset = cfg.readNumEntry("maxOffset",5); 40 // _maxOffset = cfg.readNumEntry("maxOffset",5);
29// _minLookupDiff = cfg.readNumEntry("minLookupDiff",10); 41// _minLookupDiff = cfg.readNumEntry("minLookupDiff",10);
30 SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",60) ); 42 SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",41) );
31 SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",60) ); 43 SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",42) );
32 LineEditNtpSrv->setText( cfg.readEntry("ntpServer", tr("time.fu-berlin.de")) ); 44 ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) );
45
46 ntpTimer = new QTimer(this);
47 ntpTimer->start(SpinBoxNtpDelay->value()*100);
48
33 ntpProcess = new OProcess( ); 49 ntpProcess = new OProcess( );
50 connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ),
51 SLOT(slotNtpDelayChanged(int)) );
34 52
35 QSocket *ntpSock = new QSocket( this ); 53 ntpSock = new QSocket( this );
36 ntpSock->connectToHost( LineEditNtpSrv->text() ,123);
37 connect( ntpSock, SIGNAL( error(int) ), 54 connect( ntpSock, SIGNAL( error(int) ),
38 SLOT(slotCheckNtp(int)) ); 55 SLOT(slotCheckNtp(int)) );
56 slotProbeNtpServer();
39 57
40 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), 58 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
41 this, SLOT(getNtpOutput(OProcess*,char*,int))); 59 this, SLOT(getNtpOutput(OProcess*,char*,int)));
42 connect ( ntpProcess, SIGNAL(processExited(OProcess*)), 60 connect ( ntpProcess, SIGNAL(processExited(OProcess*)),
43 this, SLOT(ntpFinished(OProcess*))); 61 this, SLOT(ntpFinished(OProcess*)));
44 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); 62 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp()));
45 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); 63 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime()));
64 connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime()));
46 slotCheckNtp(-1); 65 slotCheckNtp(-1);
47// slotRunNtp();
48 readLookups(); 66 readLookups();
49} 67}
50 68
51Ntp::~Ntp() 69Ntp::~Ntp()
52{ 70{
71 delete ntpProcess;
72 Config ntpSrvs("/etc/ntpservers",Config::File);
73 ntpSrvs.setGroup("servers");
74 int srvCount = ComboNtpSrv->count();
75 ntpSrvs.writeEntry("count", srvCount);
76 for (int i = 0; i < srvCount; i++)
77 {
78 ntpSrvs.setGroup(QString::number(i));
79 ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) );
80 }
53 Config cfg("ntp",Config::User); 81 Config cfg("ntp",Config::User);
54 cfg.setGroup("settings"); 82 cfg.setGroup("settings");
55 cfg.writeEntry("ntpServer", LineEditNtpSrv->text()); 83 cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem());
56 cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() ); 84 cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() );
57 cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() ); 85 cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() );
58} 86}
59 87
60 88
61void Ntp::slotRunNtp() 89void Ntp::slotRunNtp()
62{ 90{
63 Config cfg("ntp",Config::User); 91 Config cfg("ntp",Config::User);
64 cfg.setGroup("lookups"); 92 cfg.setGroup("lookups");
65 int lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); 93 int lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
66 94
67 if ( lookupDiff < SpinBoxNtpDelay->value()*60 ) 95 if ( lookupDiff < SpinBoxNtpDelay->value()*60 )
@@ -70,26 +98,27 @@ void Ntp::slotRunNtp()
70 QMessageBox::warning(this, tr("Run ntp?"), 98 QMessageBox::warning(this, tr("Run ntp?"),
71 tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+ 99 tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+
72 QString::number(lookupDiff%60)+tr(" minutes elapsed since last loopup.")+ 100 QString::number(lookupDiff%60)+tr(" minutes elapsed since last loopup.")+
73 "<br>"+tr("Rerun ntp?"), 101 "<br>"+tr("Rerun ntp?"),
74 QMessageBox::Ok,QMessageBox::Cancel) 102 QMessageBox::Ok,QMessageBox::Cancel)
75 ) { 103 ) {
76 case QMessageBox::Ok: break; 104 case QMessageBox::Ok: break;
77 case QMessageBox::Cancel: return; 105 case QMessageBox::Cancel: return;
78 default: return; 106 default: return;
79 } 107 }
80 } 108 }
81 TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); 109 TextLabelStartTime->setText(QDateTime::currentDateTime().toString());
110 MultiLineEditntpOutPut->append( "\n"+tr("Running:")+"\nntpdate "+ ComboNtpSrv->currentText()+"\n");
82 ntpProcess->clearArguments(); 111 ntpProcess->clearArguments();
83 *ntpProcess << "ntpdate" << LineEditNtpSrv->text(); 112 *ntpProcess << "ntpdate" << ComboNtpSrv->currentText();
84 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); 113 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput);
85 if ( !ret ) { 114 if ( !ret ) {
86 qDebug("Error while executing ntp"); 115 qDebug("Error while executing ntp");
87 } 116 }
88} 117}
89 118
90void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) 119void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen)
91{ 120{
92 QString lineStr, lineStrOld; 121 QString lineStr, lineStrOld;
93 lineStr = buffer; 122 lineStr = buffer;
94 lineStr=lineStr.left(buflen); 123 lineStr=lineStr.left(buflen);
95 if (lineStr!=lineStrOld) 124 if (lineStr!=lineStrOld)
@@ -181,36 +210,63 @@ void Ntp::readLookups()
181 TextLabelShift->setText(QString::number(_shiftPerSec)+tr(" seconds")); 210 TextLabelShift->setText(QString::number(_shiftPerSec)+tr(" seconds"));
182} 211}
183 212
184void Ntp::preditctTime() 213void Ntp::preditctTime()
185{ 214{
186 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1()); 215 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
187 Config cfg("ntp",Config::User); 216 Config cfg("ntp",Config::User);
188 cfg.setGroup("lookups"); 217 cfg.setGroup("lookups");
189 int lastTime = cfg.readNumEntry("time",0); 218 int lastTime = cfg.readNumEntry("time",0);
190 setenv( "TZ", tz->currentZone(), 1 ); 219 setenv( "TZ", tz->currentZone(), 1 );
191 int now = TimeConversion::toUTC( QDateTime::currentDateTime() ); 220 int now = TimeConversion::toUTC( QDateTime::currentDateTime() );
192 int corr = int((now - lastTime) * _shiftPerSec); 221 int corr = int((now - lastTime) * _shiftPerSec);
222 TextLabelEstimatedShift->setText(QString::number(corr)+tr(" seconds"));
193 predictedTime = QDateTime::currentDateTime().addSecs(corr); 223 predictedTime = QDateTime::currentDateTime().addSecs(corr);
194 TextLabelPredTime->setText(predictedTime.toString()); 224 TextLabelPredTime->setText(predictedTime.toString());
195 TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); 225 TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>");
196} 226}
197 227
198void Ntp::setPredictTime() 228void Ntp::setPredictTime()
199{ 229{
200 preditctTime(); 230 preditctTime();
201 setTime( predictedTime ); 231 setTime( predictedTime );
202} 232}
203 233
204void Ntp::slotCheckNtp(int i) 234void Ntp::slotCheckNtp(int i)
205{ 235{
206 if (i == 0) 236 if (i == 0)
207 { 237 {
208 TextLabelMainPredTime->hide(); 238 TextLabelMainPredTime->hide();
209 ButtonSetTime->setText( tr("Get time from network") ); 239 ButtonSetTime->setText( tr("Get time from network") );
210 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); 240 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) );
241 Config cfg("ntp",Config::User);
242 cfg.setGroup("lookups");
243 int lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
244 if ( lookupDiff > SpinBoxNtpDelay->value()*60 )
245 {
246 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) );
247 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) );
248 }else{
249 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) );
250 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
251 }
211 }else{ 252 }else{
212 preditctTime(); 253 preditctTime();
213 ButtonSetTime->setText( tr("Set predicted time") ); 254 ButtonSetTime->setText( tr("Set predicted time") );
214 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); 255 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) );
215 }; 256 connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
257 }
258}
259
260void Ntp::slotProbeNtpServer()
261{
262 Config cfg("ntp",Config::User);
263 cfg.setGroup("lookups");
264 int lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
265 if ( lookupDiff > SpinBoxNtpDelay->value()*60 )
266 ntpSock->connectToHost( ComboNtpSrv->currentText() ,123);
267}
268
269void Ntp::slotNtpDelayChanged(int delay)
270{
271 ntpTimer->changeInterval( delay*100 );
216} 272}
diff --git a/noncore/settings/netsystemtime/ntp.h b/noncore/settings/netsystemtime/ntp.h
index 284ae27..7cc309f 100644
--- a/noncore/settings/netsystemtime/ntp.h
+++ b/noncore/settings/netsystemtime/ntp.h
@@ -1,38 +1,43 @@
1#ifndef NTP_H 1#ifndef NTP_H
2#define NTP_H 2#define NTP_H
3#include "settime.h" 3#include "settime.h"
4#include <qdatetime.h> 4#include <qdatetime.h>
5 5
6class OProcess; 6class OProcess;
7class QString; 7class QString;
8 8class QTimer;
9class QSocket;
9 10
10class Ntp : public SetDateTime 11class Ntp : public SetDateTime
11{ 12{
12 Q_OBJECT 13 Q_OBJECT
13 14
14public: 15public:
15 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 16 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
16 ~Ntp(); 17 ~Ntp();
17 18
18protected: 19protected:
19 QDateTime predictedTime; 20 QDateTime predictedTime;
20 21
21 22
22private: 23private:
23 QString _ntpOutput; 24 QString _ntpOutput;
24 float _shiftPerSec; 25 float _shiftPerSec;
25 OProcess *ntpProcess; 26 OProcess *ntpProcess;
27 QTimer *ntpTimer;
28 QSocket *ntpSock;
26 29
27 float getTimeShift(); 30 float getTimeShift();
28 void readLookups(); 31 void readLookups();
29private slots: 32private slots:
30 void slotRunNtp(); 33 void slotRunNtp();
31 void getNtpOutput(OProcess *proc, char *buffer, int buflen); 34 void getNtpOutput(OProcess *proc, char *buffer, int buflen);
32 void ntpFinished(OProcess*); 35 void ntpFinished(OProcess*);
33 void preditctTime(); 36 void preditctTime();
34 void slotCheckNtp(int); 37 void slotCheckNtp(int);
35 void setPredictTime(); 38 void setPredictTime();
39 void slotProbeNtpServer();
40 void slotNtpDelayChanged(int);
36}; 41};
37 42
38#endif 43#endif
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui
index 8d32849..4e10fd2 100644
--- a/noncore/settings/netsystemtime/ntpbase.ui
+++ b/noncore/settings/netsystemtime/ntpbase.ui
@@ -2,26 +2,26 @@
2<class>NtpBase</class> 2<class>NtpBase</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>NtpBase</cstring> 7 <cstring>NtpBase</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>330</width> 14 <width>331</width>
15 <height>419</height> 15 <height>426</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>Network Time</string> 20 <string>Network Time</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>
@@ -100,25 +100,25 @@
100 <property stdset="1"> 100 <property stdset="1">
101 <name>spacing</name> 101 <name>spacing</name>
102 <number>2</number> 102 <number>2</number>
103 </property> 103 </property>
104 <widget row="1" column="0" > 104 <widget row="1" column="0" >
105 <class>QPushButton</class> 105 <class>QPushButton</class>
106 <property stdset="1"> 106 <property stdset="1">
107 <name>name</name> 107 <name>name</name>
108 <cstring>runNtp</cstring> 108 <cstring>runNtp</cstring>
109 </property> 109 </property>
110 <property stdset="1"> 110 <property stdset="1">
111 <name>text</name> 111 <name>text</name>
112 <string>get time from network</string> 112 <string>Get time from network</string>
113 </property> 113 </property>
114 </widget> 114 </widget>
115 <widget row="0" column="0" > 115 <widget row="0" column="0" >
116 <class>QFrame</class> 116 <class>QFrame</class>
117 <property stdset="1"> 117 <property stdset="1">
118 <name>name</name> 118 <name>name</name>
119 <cstring>FrameNtp</cstring> 119 <cstring>FrameNtp</cstring>
120 </property> 120 </property>
121 <property stdset="1"> 121 <property stdset="1">
122 <name>frameShape</name> 122 <name>frameShape</name>
123 <enum>StyledPanel</enum> 123 <enum>StyledPanel</enum>
124 </property> 124 </property>
@@ -278,117 +278,167 @@
278 <class>QWidget</class> 278 <class>QWidget</class>
279 <property stdset="1"> 279 <property stdset="1">
280 <name>name</name> 280 <name>name</name>
281 <cstring>tab</cstring> 281 <cstring>tab</cstring>
282 </property> 282 </property>
283 <attribute> 283 <attribute>
284 <name>title</name> 284 <name>title</name>
285 <string>Predict</string> 285 <string>Predict</string>
286 </attribute> 286 </attribute>
287 <grid> 287 <grid>
288 <property stdset="1"> 288 <property stdset="1">
289 <name>margin</name> 289 <name>margin</name>
290 <number>2</number> 290 <number>5</number>
291 </property> 291 </property>
292 <property stdset="1"> 292 <property stdset="1">
293 <name>spacing</name> 293 <name>spacing</name>
294 <number>2</number> 294 <number>6</number>
295 </property> 295 </property>
296 <widget row="0" column="0" > 296 <widget row="0" column="0" >
297 <class>QTable</class> 297 <class>QTable</class>
298 <property stdset="1"> 298 <property stdset="1">
299 <name>name</name> 299 <name>name</name>
300 <cstring>TableLookups</cstring> 300 <cstring>TableLookups</cstring>
301 </property> 301 </property>
302 <property stdset="1"> 302 <property stdset="1">
303 <name>numRows</name> 303 <name>numRows</name>
304 <number>2</number> 304 <number>2</number>
305 </property> 305 </property>
306 <property stdset="1"> 306 <property stdset="1">
307 <name>numCols</name> 307 <name>numCols</name>
308 <number>2</number> 308 <number>2</number>
309 </property> 309 </property>
310 </widget> 310 </widget>
311 <widget row="2" column="0" >
312 <class>QPushButton</class>
313 <property stdset="1">
314 <name>name</name>
315 <cstring>PushButtonPredict</cstring>
316 </property>
317 <property stdset="1">
318 <name>text</name>
319 <string>predict time</string>
320 </property>
321 </widget>
322 <widget row="1" column="0" > 311 <widget row="1" column="0" >
323 <class>QLayoutWidget</class> 312 <class>QLayoutWidget</class>
324 <property stdset="1"> 313 <property stdset="1">
325 <name>name</name> 314 <name>name</name>
326 <cstring>Layout5</cstring> 315 <cstring>Layout9</cstring>
327 </property> 316 </property>
328 <grid> 317 <grid>
329 <property stdset="1"> 318 <property stdset="1">
330 <name>margin</name> 319 <name>margin</name>
331 <number>0</number> 320 <number>0</number>
332 </property> 321 </property>
333 <property stdset="1"> 322 <property stdset="1">
334 <name>spacing</name> 323 <name>spacing</name>
335 <number>6</number> 324 <number>6</number>
336 </property> 325 </property>
337 <widget row="0" column="1" > 326 <widget row="0" column="1" >
338 <class>QLabel</class> 327 <class>QLabel</class>
339 <property stdset="1"> 328 <property stdset="1">
340 <name>name</name> 329 <name>name</name>
341 <cstring>TextLabelShift</cstring> 330 <cstring>TextLabelShift</cstring>
342 </property> 331 </property>
343 <property stdset="1"> 332 <property stdset="1">
344 <name>text</name> 333 <name>text</name>
345 <string>nan</string> 334 <string>nan</string>
346 </property> 335 </property>
347 </widget> 336 </widget>
337 <widget row="1" column="0" >
338 <class>QLabel</class>
339 <property stdset="1">
340 <name>name</name>
341 <cstring>TextLabel4</cstring>
342 </property>
343 <property stdset="1">
344 <name>text</name>
345 <string>Esimated Shift:</string>
346 </property>
347 </widget>
348 <widget row="1" column="1" > 348 <widget row="1" column="1" >
349 <class>QLabel</class> 349 <class>QLabel</class>
350 <property stdset="1"> 350 <property stdset="1">
351 <name>name</name> 351 <name>name</name>
352 <cstring>TextLabelPredTime</cstring> 352 <cstring>TextLabelEstimatedShift</cstring>
353 </property> 353 </property>
354 <property stdset="1"> 354 <property stdset="1">
355 <name>text</name> 355 <name>text</name>
356 <string>nan</string> 356 <string>nan</string>
357 </property> 357 </property>
358 </widget> 358 </widget>
359 <widget row="2" column="0" >
360 <class>QLabel</class>
361 <property stdset="1">
362 <name>name</name>
363 <cstring>TextLabel3_2</cstring>
364 </property>
365 <property stdset="1">
366 <name>text</name>
367 <string>Predicted Time:</string>
368 </property>
369 </widget>
359 <widget row="0" column="0" > 370 <widget row="0" column="0" >
360 <class>QLabel</class> 371 <class>QLabel</class>
361 <property stdset="1"> 372 <property stdset="1">
362 <name>name</name> 373 <name>name</name>
363 <cstring>Mean_shift_label</cstring> 374 <cstring>Mean_shift_label</cstring>
364 </property> 375 </property>
365 <property stdset="1"> 376 <property stdset="1">
366 <name>text</name> 377 <name>text</name>
367 <string>Mean shift:</string> 378 <string>Mean shift:</string>
368 </property> 379 </property>
369 </widget> 380 </widget>
370 <widget row="1" column="0" > 381 <widget row="2" column="1" >
371 <class>QLabel</class> 382 <class>QLabel</class>
372 <property stdset="1"> 383 <property stdset="1">
373 <name>name</name> 384 <name>name</name>
374 <cstring>TextLabel3_2</cstring> 385 <cstring>TextLabelPredTime</cstring>
375 </property> 386 </property>
376 <property stdset="1"> 387 <property stdset="1">
377 <name>text</name> 388 <name>text</name>
378 <string>Pred. Time:</string> 389 <string>nan</string>
379 </property> 390 </property>
380 </widget> 391 </widget>
381 </grid> 392 </grid>
382 </widget> 393 </widget>
394 <widget row="2" column="0" >
395 <class>QLayoutWidget</class>
396 <property stdset="1">
397 <name>name</name>
398 <cstring>Layout11</cstring>
399 </property>
400 <hbox>
401 <property stdset="1">
402 <name>margin</name>
403 <number>0</number>
404 </property>
405 <property stdset="1">
406 <name>spacing</name>
407 <number>6</number>
408 </property>
409 <widget>
410 <class>QPushButton</class>
411 <property stdset="1">
412 <name>name</name>
413 <cstring>PushButtonSetPredTime</cstring>
414 </property>
415 <property stdset="1">
416 <name>text</name>
417 <string>Set predicted time</string>
418 </property>
419 </widget>
420 <widget>
421 <class>QPushButton</class>
422 <property stdset="1">
423 <name>name</name>
424 <cstring>PushButtonPredict</cstring>
425 </property>
426 <property stdset="1">
427 <name>text</name>
428 <string>Predict time</string>
429 </property>
430 </widget>
431 </hbox>
432 </widget>
383 </grid> 433 </grid>
384 </widget> 434 </widget>
385 <widget> 435 <widget>
386 <class>QWidget</class> 436 <class>QWidget</class>
387 <property stdset="1"> 437 <property stdset="1">
388 <name>name</name> 438 <name>name</name>
389 <cstring>TabSettings</cstring> 439 <cstring>TabSettings</cstring>
390 </property> 440 </property>
391 <attribute> 441 <attribute>
392 <name>title</name> 442 <name>title</name>
393 <string>Settings</string> 443 <string>Settings</string>
394 </attribute> 444 </attribute>
@@ -477,28 +527,32 @@
477 <name>text</name> 527 <name>text</name>
478 <string>NTP server to get the time from the network.</string> 528 <string>NTP server to get the time from the network.</string>
479 </property> 529 </property>
480 <property stdset="1"> 530 <property stdset="1">
481 <name>alignment</name> 531 <name>alignment</name>
482 <set>WordBreak|AlignVCenter|AlignLeft</set> 532 <set>WordBreak|AlignVCenter|AlignLeft</set>
483 </property> 533 </property>
484 <property> 534 <property>
485 <name>wordwrap</name> 535 <name>wordwrap</name>
486 </property> 536 </property>
487 </widget> 537 </widget>
488 <widget row="0" column="1" > 538 <widget row="0" column="1" >
489 <class>QLineEdit</class> 539 <class>QComboBox</class>
490 <property stdset="1"> 540 <property stdset="1">
491 <name>name</name> 541 <name>name</name>
492 <cstring>LineEditNtpSrv</cstring> 542 <cstring>ComboNtpSrv</cstring>
543 </property>
544 <property stdset="1">
545 <name>editable</name>
546 <bool>true</bool>
493 </property> 547 </property>
494 </widget> 548 </widget>
495 </grid> 549 </grid>
496 </widget> 550 </widget>
497 <spacer row="3" column="0" > 551 <spacer row="3" column="0" >
498 <property> 552 <property>
499 <name>name</name> 553 <name>name</name>
500 <cstring>Spacer2</cstring> 554 <cstring>Spacer2</cstring>
501 </property> 555 </property>
502 <property stdset="1"> 556 <property stdset="1">
503 <name>orientation</name> 557 <name>orientation</name>
504 <enum>Vertical</enum> 558 <enum>Vertical</enum>
@@ -600,48 +654,55 @@
600 </property> 654 </property>
601 <property stdset="1"> 655 <property stdset="1">
602 <name>spacing</name> 656 <name>spacing</name>
603 <number>6</number> 657 <number>6</number>
604 </property> 658 </property>
605 <widget row="0" column="0" > 659 <widget row="0" column="0" >
606 <class>QLabel</class> 660 <class>QLabel</class>
607 <property stdset="1"> 661 <property stdset="1">
608 <name>name</name> 662 <name>name</name>
609 <cstring>TextLabel1_2_2</cstring> 663 <cstring>TextLabel1_2_2</cstring>
610 </property> 664 </property>
611 <property stdset="1"> 665 <property stdset="1">
666 <name>sizePolicy</name>
667 <sizepolicy>
668 <hsizetype>1</hsizetype>
669 <vsizetype>1</vsizetype>
670 </sizepolicy>
671 </property>
672 <property stdset="1">
612 <name>text</name> 673 <name>text</name>
613 <string>Wait for</string> 674 <string>Wait for </string>
614 </property> 675 </property>
615 </widget> 676 </widget>
616 <widget row="0" column="2" > 677 <widget row="0" column="2" >
617 <class>QLabel</class> 678 <class>QLabel</class>
618 <property stdset="1"> 679 <property stdset="1">
619 <name>name</name> 680 <name>name</name>
620 <cstring>TextLabel2_3</cstring> 681 <cstring>TextLabel2_3</cstring>
621 </property> 682 </property>
622 <property stdset="1"> 683 <property stdset="1">
623 <name>text</name> 684 <name>text</name>
624 <string>minutes until</string> 685 <string>minutes until</string>
625 </property> 686 </property>
626 </widget> 687 </widget>
627 <widget row="1" column="0" rowspan="1" colspan="3" > 688 <widget row="1" column="0" rowspan="1" colspan="3" >
628 <class>QLabel</class> 689 <class>QLabel</class>
629 <property stdset="1"> 690 <property stdset="1">
630 <name>name</name> 691 <name>name</name>
631 <cstring>TextLabel3_3_2</cstring> 692 <cstring>TextLabel3_3_2</cstring>
632 </property> 693 </property>
633 <property stdset="1"> 694 <property stdset="1">
634 <name>text</name> 695 <name>text</name>
635 <string>NTP syncronises the clock with the network</string> 696 <string>NTP tries to syncronises the clock with the network.</string>
636 </property> 697 </property>
637 <property stdset="1"> 698 <property stdset="1">
638 <name>alignment</name> 699 <name>alignment</name>
639 <set>WordBreak|AlignVCenter|AlignLeft</set> 700 <set>WordBreak|AlignVCenter|AlignLeft</set>
640 </property> 701 </property>
641 <property> 702 <property>
642 <name>wordwrap</name> 703 <name>wordwrap</name>
643 </property> 704 </property>
644 </widget> 705 </widget>
645 <widget row="0" column="1" > 706 <widget row="0" column="1" >
646 <class>QSpinBox</class> 707 <class>QSpinBox</class>
647 <property stdset="1"> 708 <property stdset="1">