summaryrefslogtreecommitdiff
authortille <tille>2002-06-24 11:16:30 (UTC)
committer tille <tille>2002-06-24 11:16:30 (UTC)
commit5bbfde2c34b3bbccdae89171fa0528ca8ae22b32 (patch) (unidiff)
tree69546c118ae88be28c29196db39205620de702f1
parent191d88cc062f4c50b28984e17b93139c685efee1 (diff)
downloadopie-5bbfde2c34b3bbccdae89171fa0528ca8ae22b32.zip
opie-5bbfde2c34b3bbccdae89171fa0528ca8ae22b32.tar.gz
opie-5bbfde2c34b3bbccdae89171fa0528ca8ae22b32.tar.bz2
added predict time
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp42
-rw-r--r--noncore/settings/netsystemtime/ntp.h1
-rw-r--r--noncore/settings/netsystemtime/ntpbase.ui117
3 files changed, 134 insertions, 26 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index c2b64f0..04b113b 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -1,146 +1,180 @@
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 <qtable.h> 4#include <qtable.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qlineedit.h> 6#include <qlineedit.h>
7#include <qmultilineedit.h> 7#include <qmultilineedit.h>
8#include <opie/oprocess.h> 8#include <opie/oprocess.h>
9#include <qpe/config.h> 9#include <qpe/config.h>
10#include <qpe/global.h> 10#include <qpe/global.h>
11#include <qpe/timeconversion.h> 11#include <qpe/timeconversion.h>
12#include <qpe/tzselect.h> 12#include <qpe/tzselect.h>
13#include <qpe/timestring.h> 13#include <qpe/timestring.h>
14#include <qpe/qpedialog.h> 14#include <qpe/qpedialog.h>
15#include <sys/time.h> 15#include <sys/time.h>
16#include <time.h> 16#include <time.h>
17#include <stdlib.h> 17#include <stdlib.h>
18 18
19 19
20Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) 20Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
21 : NtpBase( parent, name, fl ) 21 : NtpBase( parent, name, fl )
22{ 22{
23 Config cfg("ntp",Config::User); 23 Config cfg("ntp",Config::User);
24 cfg.setGroup("settings"); 24 cfg.setGroup("settings");
25 _maxOffset = cfg.readNumEntry("maxOffset",5); 25 _maxOffset = cfg.readNumEntry("maxOffset",5);
26 _minLookupDiff = cfg.readNumEntry("minLookupDiff",10); 26 _minLookupDiff = cfg.readNumEntry("minLookupDiff",10);
27 LineEditNtpServer->setText( cfg.readEntry("ntpServer") ); 27 LineEditNtpServer->setText( cfg.readEntry("ntpServer") );
28 ntpProcess = new OProcess( ); 28 ntpProcess = new OProcess( );
29 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), 29 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
30 this, SLOT(getNtpOutput(OProcess*,char*,int))); 30 this, SLOT(getNtpOutput(OProcess*,char*,int)));
31 connect ( ntpProcess, SIGNAL(processExited(OProcess*)), 31 connect ( ntpProcess, SIGNAL(processExited(OProcess*)),
32 this, SLOT(ntpFinished(OProcess*))); 32 this, SLOT(ntpFinished(OProcess*)));
33 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); 33 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp()));
34 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime()));
34 _nextCorrection = new QTimer( this ); 35 _nextCorrection = new QTimer( this );
35 connect( _nextCorrection, SIGNAL(timeout()), SLOT(correctClock()) ); 36 connect( _nextCorrection, SIGNAL(timeout()), SLOT(correctClock()) );
36 slotRunNtp(); 37 slotRunNtp();
37 readLookups(); 38 readLookups();
38} 39}
39 40
40Ntp::~Ntp() 41Ntp::~Ntp()
41{ 42{
42 Config cfg("ntp",Config::User); 43 Config cfg("ntp",Config::User);
43 cfg.setGroup("settings"); 44 cfg.setGroup("settings");
44 cfg.writeEntry("ntpServer", LineEditNtpServer->text()); 45 cfg.writeEntry("ntpServer", LineEditNtpServer->text());
45} 46}
46 47
47 48
48void Ntp::slotRunNtp() 49void Ntp::slotRunNtp()
49{ 50{
50 TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); 51 TextLabelStartTime->setText(QDateTime::currentDateTime().toString());
51 ntpProcess->clearArguments(); 52 ntpProcess->clearArguments();
52 *ntpProcess << "ntpdate" << LineEditNtpServer->text(); 53 *ntpProcess << "ntpdate" << LineEditNtpServer->text();
53 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); 54 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput);
54 if ( !ret ) { 55 if ( !ret ) {
55 qDebug("Error while executing ntp"); 56 qDebug("Error while executing ntp");
56 outPut->append("\nError while executing\n\n"); 57 outPut->append("\nError while executing\n\n");
57 } 58 }
58} 59}
59 60
60void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) 61void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen)
61{ 62{
62 QString lineStr, lineStrOld; 63 QString lineStr, lineStrOld;
63 lineStr = buffer; 64 lineStr = buffer;
64 lineStr=lineStr.left(buflen); 65 lineStr=lineStr.left(buflen);
65 if (lineStr!=lineStrOld) 66 if (lineStr!=lineStrOld)
66 { 67 {
67 outPut->append(lineStr); 68 outPut->append(lineStr);
68 _ntpOutput += lineStr; 69 _ntpOutput += lineStr;
69 } 70 }
70 lineStrOld = lineStr; 71 lineStrOld = lineStr;
71} 72}
72 73
73void Ntp::ntpFinished(OProcess*) 74void Ntp::ntpFinished(OProcess*)
74{ 75{
75 Config cfg("ntp",Config::User); 76 Config cfg("ntp",Config::User);
76 cfg.setGroup("lookups"); 77 cfg.setGroup("lookups");
77 int lastLookup = cfg.readNumEntry("time",0); 78 int lastLookup = cfg.readNumEntry("time",0);
78 int lookupCount = cfg.readNumEntry("count",-1); 79 int lookupCount = cfg.readNumEntry("count",-1);
79 int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); 80 int time = TimeConversion::toUTC( QDateTime::currentDateTime() );
80 cfg.writeEntry("time", time); 81 cfg.writeEntry("time", time);
81 82
82 float timeShift = getTimeShift(); 83 float timeShift = getTimeShift();
83 if (timeShift = 0.0) return; 84 if (timeShift == 0.0) return;
84 int secsSinceLast = time - lastLookup; 85 int secsSinceLast = time - lastLookup;
85 TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); 86 TextLabelNewTime->setText(QDateTime::currentDateTime().toString());
86 if ( lastLookup > 0 && secsSinceLast > 60*_minLookupDiff) 87 if ( lastLookup > 0 && secsSinceLast > 60*_minLookupDiff)
87 { 88 {
88 lookupCount++; 89 lookupCount++;
89 cfg.writeEntry("count",lookupCount); 90 cfg.writeEntry("count",lookupCount);
90 cfg.setGroup("lookup_"+QString::number(lookupCount)); 91 cfg.setGroup("lookup_"+QString::number(lookupCount));
91 _shiftPerSec = timeShift / secsSinceLast; 92 _shiftPerSec = timeShift / secsSinceLast;
92 float nextCorr = _maxOffset / _shiftPerSec; 93 float nextCorr = _maxOffset / _shiftPerSec;
93 qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec);qDebug("in %f secs the time will be shifted by %i", nextCorr,_maxOffset); 94 qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec);
94 cfg.writeEntry("secsSinceLast",secsSinceLast); 95 cfg.writeEntry("secsSinceLast",secsSinceLast);
95 cfg.writeEntry("timeShift",QString::number(timeShift)); 96 cfg.writeEntry("timeShift",QString::number(timeShift));
96 } 97 }
97} 98}
98 99
99void Ntp::correctClock() 100void Ntp::correctClock()
100{ 101{
101 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1()); 102 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
102 Config cfg("ntp",Config::User); 103 Config cfg("ntp",Config::User);
103 cfg.setGroup("correction"); 104 cfg.setGroup("correction");
104 int lastTime = cfg.readNumEntry("time",0); 105 int lastTime = cfg.readNumEntry("time",0);
105 int now = TimeConversion::toUTC( QDateTime::currentDateTime() ); 106 int now = TimeConversion::toUTC( QDateTime::currentDateTime() );
106 int corr = int((now - lastTime) * _shiftPerSec); 107 int corr = int((now - lastTime) * _shiftPerSec);
107 outPut->append( "time will be shifted by "+QString::number(corr)+ "secs"); 108 outPut->append( "time will be shifted by "+QString::number(corr)+ "secs");
108 struct timeval myTv; 109 struct timeval myTv;
109 myTv.tv_sec = TimeConversion::toUTC( QDateTime::currentDateTime().addSecs(corr) ); 110 myTv.tv_sec = TimeConversion::toUTC( QDateTime::currentDateTime().addSecs(corr) );
110 myTv.tv_usec = 0; 111 myTv.tv_usec = 0;
111 112
112 if ( myTv.tv_sec != -1 ) 113 if ( myTv.tv_sec != -1 )
113 ::settimeofday( &myTv, 0 ); 114 ::settimeofday( &myTv, 0 );
114 Global::writeHWClock(); 115 Global::writeHWClock();
115 cfg.writeEntry("time",now); 116 cfg.writeEntry("time",now);
116 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1()); 117 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
117} 118}
118 119
119float Ntp::getTimeShift() 120float Ntp::getTimeShift()
120{ 121{
121 QString _offset = "offset"; 122 QString _offset = "offset";
122 QString _sec = "sec"; 123 QString _sec = "sec";
123 QRegExp _reOffset = QRegExp(_offset); 124 QRegExp _reOffset = QRegExp(_offset);
124 QRegExp _reEndOffset = QRegExp(_sec); 125 QRegExp _reEndOffset = QRegExp(_sec);
125 int posOffset = _reOffset.match( _ntpOutput ); 126 int posOffset = _reOffset.match( _ntpOutput );
126 int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset ); 127 int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset );
127 posOffset += _offset.length() + 1; 128 posOffset += _offset.length() + 1;
128 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1); 129 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1);
129 qDebug("%s", _ntpOutput.latin1()); 130 qDebug("%s", _ntpOutput.latin1());
130 qDebug("diff = >%s<",diff.latin1()); 131 qDebug("diff = >%s<",diff.latin1());
131 TextLabelTimeShift->setText(diff); 132 TextLabelTimeShift->setText(diff);
132 return diff.toFloat(); 133 return diff.toFloat();
133} 134}
134 135
135void Ntp::readLookups() 136void Ntp::readLookups()
136{ 137{
137 Config cfg("ntp",Config::User); 138 Config cfg("ntp",Config::User);
138 cfg.setGroup("lookups"); 139 cfg.setGroup("lookups");
139 int lookupCount = cfg.readNumEntry("count",-1); 140 int lookupCount = cfg.readNumEntry("count",-1);
141 float last, shift, shiftPerSec;
142 qDebug("lookupCount = %i",lookupCount);
143 TableLookups->setNumCols( 3 );
144 TableLookups->setNumRows( lookupCount);
145 TableLookups->horizontalHeader()->setLabel(2,"secsSinceLast");
146 TableLookups->horizontalHeader()->setLabel(1,"timeShift");
147 TableLookups->horizontalHeader()->setLabel(0,"shift/s");
148 int cw = TableLookups->width()/4;
149 qDebug("column width %i",cw);
150 TableLookups->setColumnWidth( 0, cw );
151 TableLookups->setColumnWidth( 1, cw );
152 TableLookups->setColumnWidth( 2, cw );
140 for (int i=0; i < lookupCount; i++) 153 for (int i=0; i < lookupCount; i++)
141 { 154 {
142 cfg.setGroup("lookup_"+QString::number(i)); 155 cfg.setGroup("lookup_"+QString::number(i));
143 TableLookups->setText( 1,i,cfg.readEntry("secsSinceLast",0)); 156 last = cfg.readEntry("secsSinceLast",0).toFloat();
144 TableLookups->setText( 2,i,cfg.readEntry("timeShift",0)); 157 shift = QString(cfg.readEntry("timeShift",0)).toFloat();
158 qDebug("%i last %f",i,last);
159 qDebug("%i shift %f",i,shift);
160 shiftPerSec = shift / last;
161 _shiftPerSec += shiftPerSec;
162 TableLookups->setText( i,0,QString::number(shiftPerSec));
163 TableLookups->setText( i,1,QString::number(shift));
164 TableLookups->setText( i,2,QString::number(last));
145 } 165 }
166 _shiftPerSec /= lookupCount+1;
167 TextLabelShift->setText(QString::number(_shiftPerSec));
168}
169
170void Ntp::preditctTime()
171{
172 qDebug("current time: %s",QDateTime::currentDateTime().toString().latin1());
173 Config cfg("ntp",Config::User);
174 cfg.setGroup("lookups");
175 int lastTime = cfg.readNumEntry("time",0);
176 int now = TimeConversion::toUTC( QDateTime::currentDateTime() );
177 int corr = int((now - lastTime) * _shiftPerSec);
178 outPut->append( "time will be shifted by "+QString::number(corr)+ "secs");
179 TextLabelPredTime->setText(QDateTime::currentDateTime().addSecs(corr).toString());
146} 180}
diff --git a/noncore/settings/netsystemtime/ntp.h b/noncore/settings/netsystemtime/ntp.h
index 4dc04b1..e3f6d16 100644
--- a/noncore/settings/netsystemtime/ntp.h
+++ b/noncore/settings/netsystemtime/ntp.h
@@ -1,37 +1,38 @@
1#ifndef NTP_H 1#ifndef NTP_H
2#define NTP_H 2#define NTP_H
3#include "ntpbase.h" 3#include "ntpbase.h"
4#include <qdatetime.h> 4#include <qdatetime.h>
5#include <qtimer.h> 5#include <qtimer.h>
6 6
7class OProcess; 7class OProcess;
8class QString; 8class QString;
9 9
10 10
11class Ntp : public NtpBase 11class Ntp : public NtpBase
12{ 12{
13 Q_OBJECT 13 Q_OBJECT
14 14
15public: 15public:
16 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 16 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
17 ~Ntp(); 17 ~Ntp();
18 18
19 OProcess *ntpProcess; 19 OProcess *ntpProcess;
20 20
21private: 21private:
22 QString _ntpOutput; 22 QString _ntpOutput;
23 int _maxOffset; 23 int _maxOffset;
24 float _shiftPerSec; 24 float _shiftPerSec;
25 QTimer *_nextCorrection; 25 QTimer *_nextCorrection;
26 int _minLookupDiff; 26 int _minLookupDiff;
27 27
28 float getTimeShift(); 28 float getTimeShift();
29 void readLookups(); 29 void readLookups();
30private slots: 30private slots:
31 void slotRunNtp(); 31 void slotRunNtp();
32 void getNtpOutput(OProcess *proc, char *buffer, int buflen); 32 void getNtpOutput(OProcess *proc, char *buffer, int buflen);
33 void ntpFinished(OProcess*); 33 void ntpFinished(OProcess*);
34 void correctClock(); 34 void correctClock();
35 void preditctTime();
35}; 36};
36 37
37#endif 38#endif
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui
index eb09e4a..1c1e1aa 100644
--- a/noncore/settings/netsystemtime/ntpbase.ui
+++ b/noncore/settings/netsystemtime/ntpbase.ui
@@ -1,322 +1,395 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
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>296</width> 14 <width>292</width>
15 <height>337</height> 15 <height>337</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>
28 <grid> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>2</number> 31 <number>2</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>1</number> 35 <number>1</number>
36 </property> 36 </property>
37 <widget row="0" column="0" > 37 <widget row="0" column="0" >
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>TabWidgetMain</cstring> 41 <cstring>TabWidgetMain</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>tabNtp</cstring> 53 <cstring>tabNtp</cstring>
54 </property> 54 </property>
55 <attribute> 55 <attribute>
56 <name>title</name> 56 <name>title</name>
57 <string>NTP</string> 57 <string>NTP</string>
58 </attribute> 58 </attribute>
59 <grid> 59 <grid>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>3</number> 62 <number>3</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>3</number> 66 <number>3</number>
67 </property> 67 </property>
68 <widget row="1" column="0" > 68 <widget row="1" column="0" >
69 <class>QPushButton</class> 69 <class>QPushButton</class>
70 <property stdset="1"> 70 <property stdset="1">
71 <name>name</name> 71 <name>name</name>
72 <cstring>runNtp</cstring> 72 <cstring>runNtp</cstring>
73 </property> 73 </property>
74 <property stdset="1"> 74 <property stdset="1">
75 <name>text</name> 75 <name>text</name>
76 <string>get time from network</string> 76 <string>get time from network</string>
77 </property> 77 </property>
78 </widget> 78 </widget>
79 <widget row="0" column="0" > 79 <widget row="0" column="0" >
80 <class>QFrame</class> 80 <class>QFrame</class>
81 <property stdset="1"> 81 <property stdset="1">
82 <name>name</name> 82 <name>name</name>
83 <cstring>FrameNtp</cstring> 83 <cstring>FrameNtp</cstring>
84 </property> 84 </property>
85 <property stdset="1"> 85 <property stdset="1">
86 <name>frameShape</name> 86 <name>frameShape</name>
87 <enum>StyledPanel</enum> 87 <enum>StyledPanel</enum>
88 </property> 88 </property>
89 <property stdset="1"> 89 <property stdset="1">
90 <name>frameShadow</name> 90 <name>frameShadow</name>
91 <enum>Raised</enum> 91 <enum>Raised</enum>
92 </property> 92 </property>
93 <property> 93 <property>
94 <name>layoutMargin</name> 94 <name>layoutMargin</name>
95 </property> 95 </property>
96 <grid> 96 <grid>
97 <property stdset="1"> 97 <property stdset="1">
98 <name>margin</name> 98 <name>margin</name>
99 <number>11</number> 99 <number>11</number>
100 </property> 100 </property>
101 <property stdset="1"> 101 <property stdset="1">
102 <name>spacing</name> 102 <name>spacing</name>
103 <number>6</number> 103 <number>6</number>
104 </property> 104 </property>
105 <widget row="0" column="0" > 105 <widget row="0" column="0" >
106 <class>QLayoutWidget</class> 106 <class>QLayoutWidget</class>
107 <property stdset="1"> 107 <property stdset="1">
108 <name>name</name> 108 <name>name</name>
109 <cstring>Layout4</cstring> 109 <cstring>Layout4</cstring>
110 </property> 110 </property>
111 <vbox> 111 <vbox>
112 <property stdset="1"> 112 <property stdset="1">
113 <name>margin</name> 113 <name>margin</name>
114 <number>0</number> 114 <number>0</number>
115 </property> 115 </property>
116 <property stdset="1"> 116 <property stdset="1">
117 <name>spacing</name> 117 <name>spacing</name>
118 <number>6</number> 118 <number>6</number>
119 </property> 119 </property>
120 <widget> 120 <widget>
121 <class>QLabel</class> 121 <class>QLabel</class>
122 <property stdset="1"> 122 <property stdset="1">
123 <name>name</name> 123 <name>name</name>
124 <cstring>TextLabel1</cstring> 124 <cstring>TextLabel1</cstring>
125 </property> 125 </property>
126 <property stdset="1"> 126 <property stdset="1">
127 <name>autoMask</name> 127 <name>autoMask</name>
128 <bool>false</bool> 128 <bool>false</bool>
129 </property> 129 </property>
130 <property stdset="1"> 130 <property stdset="1">
131 <name>text</name> 131 <name>text</name>
132 <string>Start Time:</string> 132 <string>Start Time:</string>
133 </property> 133 </property>
134 </widget> 134 </widget>
135 <widget> 135 <widget>
136 <class>QLabel</class> 136 <class>QLabel</class>
137 <property stdset="1"> 137 <property stdset="1">
138 <name>name</name> 138 <name>name</name>
139 <cstring>TextLabelStartTime</cstring> 139 <cstring>TextLabelStartTime</cstring>
140 </property> 140 </property>
141 <property stdset="1"> 141 <property stdset="1">
142 <name>text</name> 142 <name>text</name>
143 <string></string> 143 <string>nan</string>
144 </property> 144 </property>
145 </widget> 145 </widget>
146 <widget> 146 <widget>
147 <class>QLabel</class> 147 <class>QLabel</class>
148 <property stdset="1"> 148 <property stdset="1">
149 <name>name</name> 149 <name>name</name>
150 <cstring>TextLabel3</cstring> 150 <cstring>TextLabel3</cstring>
151 </property> 151 </property>
152 <property stdset="1"> 152 <property stdset="1">
153 <name>text</name> 153 <name>text</name>
154 <string>Time Shift:</string> 154 <string>Time Shift:</string>
155 </property> 155 </property>
156 </widget> 156 </widget>
157 <widget> 157 <widget>
158 <class>QLabel</class> 158 <class>QLabel</class>
159 <property stdset="1"> 159 <property stdset="1">
160 <name>name</name> 160 <name>name</name>
161 <cstring>TextLabelTimeShift</cstring> 161 <cstring>TextLabelTimeShift</cstring>
162 </property> 162 </property>
163 <property stdset="1"> 163 <property stdset="1">
164 <name>text</name> 164 <name>text</name>
165 <string></string> 165 <string>nan</string>
166 </property> 166 </property>
167 </widget> 167 </widget>
168 <widget> 168 <widget>
169 <class>QLabel</class> 169 <class>QLabel</class>
170 <property stdset="1"> 170 <property stdset="1">
171 <name>name</name> 171 <name>name</name>
172 <cstring>TextLabel5</cstring> 172 <cstring>TextLabel5</cstring>
173 </property> 173 </property>
174 <property stdset="1"> 174 <property stdset="1">
175 <name>text</name> 175 <name>text</name>
176 <string>New Time:</string> 176 <string>New Time:</string>
177 </property> 177 </property>
178 </widget> 178 </widget>
179 <widget> 179 <widget>
180 <class>QLabel</class> 180 <class>QLabel</class>
181 <property stdset="1"> 181 <property stdset="1">
182 <name>name</name> 182 <name>name</name>
183 <cstring>TextLabelNewTime</cstring> 183 <cstring>TextLabelNewTime</cstring>
184 </property> 184 </property>
185 <property stdset="1"> 185 <property stdset="1">
186 <name>text</name> 186 <name>text</name>
187 <string></string> 187 <string>nan</string>
188 </property> 188 </property>
189 </widget> 189 </widget>
190 <spacer> 190 <spacer>
191 <property> 191 <property>
192 <name>name</name> 192 <name>name</name>
193 <cstring>Spacer1</cstring> 193 <cstring>Spacer1</cstring>
194 </property> 194 </property>
195 <property stdset="1"> 195 <property stdset="1">
196 <name>orientation</name> 196 <name>orientation</name>
197 <enum>Vertical</enum> 197 <enum>Vertical</enum>
198 </property> 198 </property>
199 <property stdset="1"> 199 <property stdset="1">
200 <name>sizeType</name> 200 <name>sizeType</name>
201 <enum>Expanding</enum> 201 <enum>Expanding</enum>
202 </property> 202 </property>
203 <property> 203 <property>
204 <name>sizeHint</name> 204 <name>sizeHint</name>
205 <size> 205 <size>
206 <width>20</width> 206 <width>20</width>
207 <height>20</height> 207 <height>20</height>
208 </size> 208 </size>
209 </property> 209 </property>
210 </spacer> 210 </spacer>
211 </vbox> 211 </vbox>
212 </widget> 212 </widget>
213 <widget row="1" column="0" > 213 <widget row="1" column="0" >
214 <class>QLayoutWidget</class> 214 <class>QLayoutWidget</class>
215 <property stdset="1"> 215 <property stdset="1">
216 <name>name</name> 216 <name>name</name>
217 <cstring>Layout6</cstring> 217 <cstring>Layout6</cstring>
218 </property> 218 </property>
219 <hbox> 219 <hbox>
220 <property stdset="1"> 220 <property stdset="1">
221 <name>margin</name> 221 <name>margin</name>
222 <number>0</number> 222 <number>0</number>
223 </property> 223 </property>
224 <property stdset="1"> 224 <property stdset="1">
225 <name>spacing</name> 225 <name>spacing</name>
226 <number>6</number> 226 <number>6</number>
227 </property> 227 </property>
228 <widget> 228 <widget>
229 <class>QLabel</class> 229 <class>QLabel</class>
230 <property stdset="1"> 230 <property stdset="1">
231 <name>name</name> 231 <name>name</name>
232 <cstring>TextLabel7</cstring> 232 <cstring>TextLabel7</cstring>
233 </property> 233 </property>
234 <property stdset="1"> 234 <property stdset="1">
235 <name>text</name> 235 <name>text</name>
236 <string>NTP Server:</string> 236 <string>NTP Server:</string>
237 </property> 237 </property>
238 </widget> 238 </widget>
239 <widget> 239 <widget>
240 <class>QLineEdit</class> 240 <class>QLineEdit</class>
241 <property stdset="1"> 241 <property stdset="1">
242 <name>name</name> 242 <name>name</name>
243 <cstring>LineEditNtpServer</cstring> 243 <cstring>LineEditNtpServer</cstring>
244 </property> 244 </property>
245 </widget> 245 </widget>
246 </hbox> 246 </hbox>
247 </widget> 247 </widget>
248 </grid> 248 </grid>
249 </widget> 249 </widget>
250 </grid> 250 </grid>
251 </widget> 251 </widget>
252 <widget> 252 <widget>
253 <class>QWidget</class> 253 <class>QWidget</class>
254 <property stdset="1"> 254 <property stdset="1">
255 <name>name</name> 255 <name>name</name>
256 <cstring>tab</cstring> 256 <cstring>tab</cstring>
257 </property> 257 </property>
258 <attribute> 258 <attribute>
259 <name>title</name> 259 <name>title</name>
260 <string>Auto Correction</string> 260 <string>Auto Correction</string>
261 </attribute> 261 </attribute>
262 <widget> 262 <grid>
263 <class>QTable</class>
264 <property stdset="1">
265 <name>name</name>
266 <cstring>TableLookups</cstring>
267 </property>
268 <property stdset="1">
269 <name>geometry</name>
270 <rect>
271 <x>10</x>
272 <y>10</y>
273 <width>270</width>
274 <height>220</height>
275 </rect>
276 </property>
277 <property stdset="1"> 263 <property stdset="1">
278 <name>numRows</name> 264 <name>margin</name>
279 <number>2</number> 265 <number>2</number>
280 </property> 266 </property>
281 <property stdset="1"> 267 <property stdset="1">
282 <name>numCols</name> 268 <name>spacing</name>
283 <number>2</number> 269 <number>2</number>
284 </property> 270 </property>
285 </widget> 271 <widget row="0" column="0" >
272 <class>QTable</class>
273 <property stdset="1">
274 <name>name</name>
275 <cstring>TableLookups</cstring>
276 </property>
277 <property stdset="1">
278 <name>numRows</name>
279 <number>2</number>
280 </property>
281 <property stdset="1">
282 <name>numCols</name>
283 <number>2</number>
284 </property>
285 </widget>
286 <widget row="2" column="0" >
287 <class>QPushButton</class>
288 <property stdset="1">
289 <name>name</name>
290 <cstring>PushButtonPredict</cstring>
291 </property>
292 <property stdset="1">
293 <name>text</name>
294 <string>predict time</string>
295 </property>
296 </widget>
297 <widget row="1" column="0" >
298 <class>QLayoutWidget</class>
299 <property stdset="1">
300 <name>name</name>
301 <cstring>Layout5</cstring>
302 </property>
303 <grid>
304 <property stdset="1">
305 <name>margin</name>
306 <number>0</number>
307 </property>
308 <property stdset="1">
309 <name>spacing</name>
310 <number>6</number>
311 </property>
312 <widget row="0" column="1" >
313 <class>QLabel</class>
314 <property stdset="1">
315 <name>name</name>
316 <cstring>TextLabelShift</cstring>
317 </property>
318 <property stdset="1">
319 <name>text</name>
320 <string>nan</string>
321 </property>
322 </widget>
323 <widget row="1" column="1" >
324 <class>QLabel</class>
325 <property stdset="1">
326 <name>name</name>
327 <cstring>TextLabelPredTime</cstring>
328 </property>
329 <property stdset="1">
330 <name>text</name>
331 <string>nan</string>
332 </property>
333 </widget>
334 <widget row="0" column="0" >
335 <class>QLabel</class>
336 <property stdset="1">
337 <name>name</name>
338 <cstring>Mean_shift_label</cstring>
339 </property>
340 <property stdset="1">
341 <name>text</name>
342 <string>Mean shift:</string>
343 </property>
344 </widget>
345 <widget row="1" column="0" >
346 <class>QLabel</class>
347 <property stdset="1">
348 <name>name</name>
349 <cstring>TextLabel3_2</cstring>
350 </property>
351 <property stdset="1">
352 <name>text</name>
353 <string>Pred. Time:</string>
354 </property>
355 </widget>
356 </grid>
357 </widget>
358 </grid>
286 </widget> 359 </widget>
287 <widget> 360 <widget>
288 <class>QWidget</class> 361 <class>QWidget</class>
289 <property stdset="1"> 362 <property stdset="1">
290 <name>name</name> 363 <name>name</name>
291 <cstring>TabDebug</cstring> 364 <cstring>TabDebug</cstring>
292 </property> 365 </property>
293 <attribute> 366 <attribute>
294 <name>title</name> 367 <name>title</name>
295 <string>Debug</string> 368 <string>Debug</string>
296 </attribute> 369 </attribute>
297 <grid> 370 <grid>
298 <property stdset="1"> 371 <property stdset="1">
299 <name>margin</name> 372 <name>margin</name>
300 <number>3</number> 373 <number>3</number>
301 </property> 374 </property>
302 <property stdset="1"> 375 <property stdset="1">
303 <name>spacing</name> 376 <name>spacing</name>
304 <number>6</number> 377 <number>6</number>
305 </property> 378 </property>
306 <widget row="0" column="0" > 379 <widget row="0" column="0" >
307 <class>QMultiLineEdit</class> 380 <class>QMultiLineEdit</class>
308 <property stdset="1"> 381 <property stdset="1">
309 <name>name</name> 382 <name>name</name>
310 <cstring>outPut</cstring> 383 <cstring>outPut</cstring>
311 </property> 384 </property>
312 <property stdset="1"> 385 <property stdset="1">
313 <name>wordWrap</name> 386 <name>wordWrap</name>
314 <enum>WidgetWidth</enum> 387 <enum>WidgetWidth</enum>
315 </property> 388 </property>
316 </widget> 389 </widget>
317 </grid> 390 </grid>
318 </widget> 391 </widget>
319 </widget> 392 </widget>
320 </grid> 393 </grid>
321</widget> 394</widget>
322</UI> 395</UI>