summaryrefslogtreecommitdiff
authortille <tille>2002-10-21 20:32:05 (UTC)
committer tille <tille>2002-10-21 20:32:05 (UTC)
commit1f4ab9228e9e7db275e42a3e7fcf9affdd5c447b (patch) (unidiff)
treef33d988d7fb7b65637abc563cfae8b76a293ef14
parent9d1a8e414d0c532266297a253e37afe19fa84ccf (diff)
downloadopie-1f4ab9228e9e7db275e42a3e7fcf9affdd5c447b.zip
opie-1f4ab9228e9e7db275e42a3e7fcf9affdd5c447b.tar.gz
opie-1f4ab9228e9e7db275e42a3e7fcf9affdd5c447b.tar.bz2
now it has adv features
and ntpbase.ui is back since it might be usefull
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntp.cpp45
-rw-r--r--noncore/settings/netsystemtime/ntp.h5
-rw-r--r--noncore/settings/netsystemtime/ntpbase.cpp90
-rw-r--r--noncore/settings/netsystemtime/ntpbase.h17
-rw-r--r--noncore/settings/netsystemtime/ntpbase.ui1027
5 files changed, 722 insertions, 462 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp
index fbd65a2..6f6316c 100644
--- a/noncore/settings/netsystemtime/ntp.cpp
+++ b/noncore/settings/netsystemtime/ntp.cpp
@@ -1,332 +1,367 @@
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 <qtimer.h>
5#include <qtable.h> 5#include <qtable.h>
6#include <qlabel.h> 6#include <qlabel.h>
7#include <qsocket.h> 7#include <qsocket.h>
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qspinbox.h> 9#include <qspinbox.h>
10#include <qcheckbox.h>
11#include <qtabwidget.h>
12#include <qlayout.h>
10#include <qmessagebox.h> 13#include <qmessagebox.h>
11#include <qmultilineedit.h> 14#include <qmultilineedit.h>
12#include <opie/oprocess.h> 15#include <opie/oprocess.h>
13#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
14#include <qpe/config.h> 17#include <qpe/config.h>
15#include <qpe/global.h> 18#include <qpe/global.h>
16#include <qpe/timeconversion.h> 19#include <qpe/timeconversion.h>
17#include <qpe/tzselect.h> 20#include <qpe/tzselect.h>
18#include <qpe/timestring.h> 21#include <qpe/timestring.h>
19#include <qpe/qpedialog.h> 22#include <qpe/qpedialog.h>
20#include <qpe/datebookdb.h> 23#include <qpe/datebookdb.h>
21#include <qpe/qcopenvelope_qws.h> 24#include <qpe/qcopenvelope_qws.h>
22#include <sys/time.h> 25#include <sys/time.h>
23#include <time.h> 26#include <time.h>
24#include <stdlib.h> 27#include <stdlib.h>
25 28
26 29
27Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) 30Ntp::Ntp( QWidget* parent, const char* name, WFlags fl )
28 : SetDateTime( parent, name, fl ) 31 : SetDateTime( parent, name, fl )
29{ 32{
30 Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File); 33 Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File);
31 ntpSrvs.setGroup("servers"); 34 ntpSrvs.setGroup("servers");
32 int srvCount = ntpSrvs.readNumEntry("count", 0 ); 35 int srvCount = ntpSrvs.readNumEntry("count", 0 );
33 for (int i = 0; i < srvCount; i++) 36 for (int i = 0; i < srvCount; i++)
34 { 37 {
35 ntpSrvs.setGroup(QString::number(i)); 38 ntpSrvs.setGroup(QString::number(i));
36 ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") ); 39 ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") );
37 } 40 }
38 if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de")); 41 if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de"));
39 42
40 Config cfg("ntp",Config::User); 43 Config cfg("ntp",Config::User);
41 cfg.setGroup("settings"); 44 cfg.setGroup("settings");
42 SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",41) ); 45 SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",720) );
43 SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",42) ); 46 SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",1440) );
44 ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) ); 47 ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) );
45 48
49 bool advMode = cfg.readBoolEntry("advancedFeatures", false );
50 showAdvancedFeatures(advMode);
51 CheckBoxAdvSettings->setChecked( advMode );
52 connect( CheckBoxAdvSettings, SIGNAL( toggled( bool ) ),
53 SLOT( showAdvancedFeatures( bool ) ) );
54
46 makeChannel(); 55 makeChannel();
47 56
48 ntpTimer = new QTimer(this); 57 ntpTimer = new QTimer(this);
49 58
50 ntpProcess = new OProcess( ); 59 ntpProcess = new OProcess( );
51 connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ), 60 connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ),
52 SLOT(slotNtpDelayChanged(int)) ); 61 SLOT(slotNtpDelayChanged(int)) );
53 62
54 ntpSock = new QSocket( this ); 63 ntpSock = new QSocket( this );
55 connect( ntpSock, SIGNAL( error(int) ), 64 connect( ntpSock, SIGNAL( error(int) ),
56 SLOT(slotCheckNtp(int)) ); 65 SLOT(slotCheckNtp(int)) );
57 slotProbeNtpServer(); 66 slotProbeNtpServer();
58 67
59 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), 68 connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)),
60 this, SLOT(getNtpOutput(OProcess*,char*,int))); 69 this, SLOT(getNtpOutput(OProcess*,char*,int)));
61 connect ( ntpProcess, SIGNAL(processExited(OProcess*)), 70 connect ( ntpProcess, SIGNAL(processExited(OProcess*)),
62 this, SLOT(ntpFinished(OProcess*))); 71 this, SLOT(ntpFinished(OProcess*)));
63 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); 72 connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp()));
64 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); 73 connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime()));
65 connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime())); 74 connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime()));
66 slotCheckNtp(-1); 75 slotCheckNtp(-1);
67 readLookups(); 76 readLookups();
68} 77}
69 78
70Ntp::~Ntp() 79Ntp::~Ntp()
71{ 80{
72 delete ntpProcess; 81 delete ntpProcess;
73 Config ntpSrvs("/etc/ntpservers",Config::File); 82 Config ntpSrvs("/etc/ntpservers",Config::File);
74 ntpSrvs.setGroup("servers"); 83 ntpSrvs.setGroup("servers");
75 int srvCount = ComboNtpSrv->count(); 84 int srvCount = ComboNtpSrv->count();
76 ntpSrvs.writeEntry("count", srvCount); 85 ntpSrvs.writeEntry("count", srvCount);
77 for (int i = 0; i < srvCount; i++) 86 for (int i = 0; i < srvCount; i++)
78 { 87 {
79 ntpSrvs.setGroup(QString::number(i)); 88 ntpSrvs.setGroup(QString::number(i));
80 ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) ); 89 ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) );
81 } 90 }
82 Config cfg("ntp",Config::User); 91 Config cfg("ntp",Config::User);
83 cfg.setGroup("settings"); 92 cfg.setGroup("settings");
84 cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem()); 93 cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem());
85 cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() ); 94 cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() );
86 cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() ); 95 cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() );
87} 96}
88 97
89bool Ntp::ntpDelayElapsed() 98bool Ntp::ntpDelayElapsed()
90{ 99{
91 Config cfg("ntp",Config::User); 100 Config cfg("ntp",Config::User);
92 cfg.setGroup("lookups"); 101 cfg.setGroup("lookups");
93 _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); 102 _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0);
94 return (_lookupDiff - (SpinBoxNtpDelay->value()*60)) > -60; 103 return (_lookupDiff - (SpinBoxNtpDelay->value()*60)) > -60;
95} 104}
96 105
97QString Ntp::getNtpServer() 106QString Ntp::getNtpServer()
98{ 107{
99 return ComboNtpSrv->currentText(); 108 return ComboNtpSrv->currentText();
100} 109}
101 110
102void Ntp::slotRunNtp() 111void Ntp::slotRunNtp()
103{ 112{
104 if ( !ntpDelayElapsed() ) 113 if ( !ntpDelayElapsed() )
105 { 114 {
106 switch ( 115 switch (
107 QMessageBox::warning(this, tr("Run NTP?"), 116 QMessageBox::warning(this, tr("Run NTP?"),
108 tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+ 117 tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+
109 QString::number(_lookupDiff/60)+tr(" minutes elapsed since last lookup.")+ 118 QString::number(_lookupDiff/60)+tr(" minutes elapsed since last lookup.")+
110 "<br>"+tr("Rerun NTP?"), 119 "<br>"+tr("Rerun NTP?"),
111 QMessageBox::Ok,QMessageBox::Cancel) 120 QMessageBox::Ok,QMessageBox::Cancel)
112 ) { 121 ) {
113 case QMessageBox::Ok: break; 122 case QMessageBox::Ok: break;
114 case QMessageBox::Cancel: return; 123 case QMessageBox::Cancel: return;
115 default: return; 124 default: return;
116 } 125 }
117 } 126 }
118 TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); 127 TextLabelStartTime->setText(QDateTime::currentDateTime().toString());
119 ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); 128 ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() );
120 129
121 ntpProcess->clearArguments(); 130 ntpProcess->clearArguments();
122 *ntpProcess << "ntpdate" << getNtpServer(); 131 *ntpProcess << "ntpdate" << getNtpServer();
123 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); 132 bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput);
124 if ( !ret ) { 133 if ( !ret ) {
125 qDebug("Error while executing ntpdate"); 134 qDebug("Error while executing ntpdate");
126 ntpOutPut( tr("Error while executing ntpdate")); 135 ntpOutPut( tr("Error while executing ntpdate"));
127 } 136 }
128} 137}
129 138
130void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) 139void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen)
131{ 140{
132 QString lineStr, lineStrOld; 141 QString lineStr, lineStrOld;
133 lineStr = buffer; 142 lineStr = buffer;
134 lineStr=lineStr.left(buflen); 143 lineStr=lineStr.left(buflen);
135 if (lineStr!=lineStrOld) 144 if (lineStr!=lineStrOld)
136 { 145 {
137 ntpOutPut(lineStr); 146 ntpOutPut(lineStr);
138 _ntpOutput += lineStr; 147 _ntpOutput += lineStr;
139 } 148 }
140 lineStrOld = lineStr; 149 lineStrOld = lineStr;
141} 150}
142 151
143void Ntp::ntpFinished(OProcess *p) 152void Ntp::ntpFinished(OProcess *p)
144{ 153{
145 qDebug("p->exitStatus() %i",p->exitStatus()); 154 //qDebug("p->exitStatus() %i",p->exitStatus());
146 if (p->exitStatus()!=0 || !p->normalExit()) 155 if (p->exitStatus()!=0 || !p->normalExit())
147 { 156 {
148 slotProbeNtpServer(); 157 slotProbeNtpServer();
149 return; 158 return;
150 } 159 }
151 160
152 Global::writeHWClock(); 161 Global::writeHWClock();
153 // since time has changed quickly load in the datebookdb 162 // since time has changed quickly load in the datebookdb
154 // to allow the alarm server to get a better grip on itself 163 // to allow the alarm server to get a better grip on itself
155 // (example re-trigger alarms for when we travel back in time) 164 // (example re-trigger alarms for when we travel back in time)
156 DateBookDB db; 165 DateBookDB db;
157 166
158// QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); 167// QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" );
159// timeApplet << ""; 168// timeApplet << "";
160 169
161 Config cfg("ntp",Config::User); 170 Config cfg("ntp",Config::User);
162 cfg.setGroup("lookups"); 171 cfg.setGroup("lookups");
163 int lastLookup = cfg.readNumEntry("time",0); 172 int lastLookup = cfg.readNumEntry("time",0);
164 int lookupCount = cfg.readNumEntry("count",0); 173 int lookupCount = cfg.readNumEntry("count",0);
165 bool lastNtp = cfg.readBoolEntry("lastNtp",false); 174 bool lastNtp = cfg.readBoolEntry("lastNtp",false);
166 int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); 175 int time = TimeConversion::toUTC( QDateTime::currentDateTime() );
167 cfg.writeEntry("time", time); 176 cfg.writeEntry("time", time);
168 177
169 float timeShift = getTimeShift(); 178 float timeShift = getTimeShift();
170 if (timeShift == 0.0) return; 179 if (timeShift == 0.0) return;
171 int secsSinceLast = time - lastLookup; 180 int secsSinceLast = time - lastLookup;
172 TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); 181 TextLabelNewTime->setText(QDateTime::currentDateTime().toString());
173 TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); 182 TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds"));
174 if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) 183 if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value())
175 { 184 {
176 cfg.setGroup("lookup_"+QString::number(lookupCount)); 185 cfg.setGroup("lookup_"+QString::number(lookupCount));
177 lookupCount++; 186 lookupCount++;
178 _shiftPerSec = timeShift / secsSinceLast; 187 _shiftPerSec = timeShift / secsSinceLast;
179 qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); 188 qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec);
180 cfg.writeEntry("secsSinceLast",secsSinceLast); 189 cfg.writeEntry("secsSinceLast",secsSinceLast);
181 cfg.writeEntry("timeShift",QString::number(timeShift)); 190 cfg.writeEntry("timeShift",QString::number(timeShift));
182 cfg.setGroup("lookups"); 191 cfg.setGroup("lookups");
183 cfg.writeEntry("count",lookupCount); 192 cfg.writeEntry("count",lookupCount);
184 cfg.writeEntry("lastNtp",true); 193 cfg.writeEntry("lastNtp",true);
185 } 194 }
186} 195}
187 196
188 197
189float Ntp::getTimeShift() 198float Ntp::getTimeShift()
190{ 199{
191 QString _offset = "offset"; 200 QString _offset = "offset";
192 QString _sec = "sec"; 201 QString _sec = "sec";
193 QRegExp _reOffset = QRegExp(_offset); 202 QRegExp _reOffset = QRegExp(_offset);
194 QRegExp _reEndOffset = QRegExp(_sec); 203 QRegExp _reEndOffset = QRegExp(_sec);
195 int posOffset = _reOffset.match( _ntpOutput ); 204 int posOffset = _reOffset.match( _ntpOutput );
196 int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset ); 205 int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset );
197 posOffset += _offset.length() + 1; 206 posOffset += _offset.length() + 1;
198 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1); 207 QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1);
199 qDebug("%s", _ntpOutput.latin1()); 208 qDebug("%s", _ntpOutput.latin1());
200 qDebug("diff = >%s<",diff.latin1()); 209 qDebug("diff = >%s<",diff.latin1());
201 return diff.toFloat(); 210 return diff.toFloat();
202} 211}
203 212
204void Ntp::readLookups() 213void Ntp::readLookups()
205{ 214{
206 Config cfg("ntp",Config::User); 215 Config cfg("ntp",Config::User);
207 cfg.setGroup("lookups"); 216 cfg.setGroup("lookups");
208 int lookupCount = cfg.readNumEntry("count",0); 217 int lookupCount = cfg.readNumEntry("count",0);
209 float last, shift, shiftPerSec; 218 float last, shift, shiftPerSec;
210 qDebug("lookupCount = %i",lookupCount); 219 qDebug("lookupCount = %i",lookupCount);
211 TableLookups->setNumCols( 3 ); 220 TableLookups->setNumCols( 3 );
212 TableLookups->setNumRows( lookupCount); 221 TableLookups->setNumRows( lookupCount);
213 TableLookups->horizontalHeader()->setLabel(1,tr("last [h]")); 222 TableLookups->horizontalHeader()->setLabel(1,tr("last [h]"));
214 TableLookups->horizontalHeader()->setLabel(2,tr("offset [s]")); 223 TableLookups->horizontalHeader()->setLabel(2,tr("offset [s]"));
215 TableLookups->horizontalHeader()->setLabel(0,tr("shift [s/h]")); 224 TableLookups->horizontalHeader()->setLabel(0,tr("shift [s/h]"));
216 int cw = TableLookups->width()/4; 225 int cw = TableLookups->width()/4;
217 qDebug("column width %i",cw); 226 qDebug("column width %i",cw);
218 cw = 50; 227 cw = 50;
219 TableLookups->setColumnWidth( 0, cw+30 ); 228 TableLookups->setColumnWidth( 0, cw+30 );
220 TableLookups->setColumnWidth( 1, cw ); 229 TableLookups->setColumnWidth( 1, cw );
221 TableLookups->setColumnWidth( 2, cw ); 230 TableLookups->setColumnWidth( 2, cw );
222 TableLookups->sortColumn(0, false, true ); 231 TableLookups->sortColumn(0, false, true );
223 // TableLookups->setSorting( true ); 232 // TableLookups->setSorting( true );
224 _shiftPerSec = 0; 233 _shiftPerSec = 0;
225 for (int i=0; i < lookupCount; i++) 234 for (int i=0; i < lookupCount; i++)
226 { 235 {
227 cfg.setGroup("lookup_"+QString::number(i)); 236 cfg.setGroup("lookup_"+QString::number(i));
228 last = cfg.readEntry("secsSinceLast",0).toFloat(); 237 last = cfg.readEntry("secsSinceLast",0).toFloat();
229 shift = QString(cfg.readEntry("timeShift",0)).toFloat(); 238 shift = QString(cfg.readEntry("timeShift",0)).toFloat();
230 shiftPerSec = shift / last; 239 shiftPerSec = shift / last;
231 qDebug("%i shift %f",i,shiftPerSec); 240 qDebug("%i shift %f",i,shiftPerSec);
232 _shiftPerSec += shiftPerSec; 241 _shiftPerSec += shiftPerSec;
233 TableLookups->setText( i,0,QString::number(shiftPerSec*60*60)); 242 TableLookups->setText( i,0,QString::number(shiftPerSec*60*60));
234 TableLookups->setText( i,2,QString::number(shift)); 243 TableLookups->setText( i,2,QString::number(shift));
235 TableLookups->setText( i,1,QString::number(last/(60*60))); 244 TableLookups->setText( i,1,QString::number(last/(60*60)));
236 } 245 }
237 _shiftPerSec /= lookupCount; 246 _shiftPerSec /= lookupCount;
238 TextLabelShift->setText(QString::number(_shiftPerSec*60*60)+tr(" s/h")); 247 TextLabelShift->setText(QString::number(_shiftPerSec*60*60)+tr(" s/h"));
239} 248}
240 249
241void Ntp::preditctTime() 250void Ntp::preditctTime()
242{ 251{
243 Config cfg("ntp",Config::User); 252 Config cfg("ntp",Config::User);
244 cfg.setGroup("lookups"); 253 cfg.setGroup("lookups");
245 int lastTime = cfg.readNumEntry("time",0); 254 int lastTime = cfg.readNumEntry("time",0);
246 cfg.writeEntry("lastNtp",true); 255 cfg.writeEntry("lastNtp",true);
247 setenv( "TZ", tz->currentZone(), 1 ); 256 setenv( "TZ", tz->currentZone(), 1 );
248 int now = TimeConversion::toUTC( QDateTime::currentDateTime() ); 257 int now = TimeConversion::toUTC( QDateTime::currentDateTime() );
249 int corr = int((now - lastTime) * _shiftPerSec); 258 int corr = int((now - lastTime) * _shiftPerSec);
250 TextLabelEstimatedShift->setText(QString::number(corr)+tr(" seconds")); 259 TextLabelEstimatedShift->setText(QString::number(corr)+tr(" seconds"));
251 predictedTime = QDateTime::currentDateTime().addSecs(corr); 260 predictedTime = QDateTime::currentDateTime().addSecs(corr);
252 TextLabelPredTime->setText(predictedTime.toString()); 261 TextLabelPredTime->setText(predictedTime.toString());
253 TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); 262 TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>");
254} 263}
255 264
256void Ntp::setPredictTime() 265void Ntp::setPredictTime()
257{ 266{
258 preditctTime(); 267 preditctTime();
259 setTime( predictedTime ); 268 setTime( predictedTime );
260} 269}
261 270
262void Ntp::slotCheckNtp(int i) 271void Ntp::slotCheckNtp(int i)
263{ 272{
264 if (i == 0) 273 if (i == 0)
265 { 274 {
266 TextLabelMainPredTime->hide(); 275 TextLabelMainPredTime->hide();
267 ButtonSetTime->setText( tr("Get time from network") ); 276 ButtonSetTime->setText( tr("Get time from network") );
268 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); 277 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) );
269 if ( ntpDelayElapsed() ) 278 if ( ntpDelayElapsed() )
270 { 279 {
271 slotRunNtp(); 280 slotRunNtp();
272 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); 281 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) );
273 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); 282 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) );
274 }else{ 283 }else{
275 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); 284 disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) );
276 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); 285 connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
277 } 286 }
278 }else{ 287 }else{
279 preditctTime(); 288 preditctTime();
280 ButtonSetTime->setText( tr("Set predicted time") ); 289 ButtonSetTime->setText( tr("Set predicted time: ")+predictedTime.toString() );
281 if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); 290 if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer());
282 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); 291 connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) );
283 connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); 292 connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) );
284 } 293 }
285} 294}
286 295
287void Ntp::slotProbeNtpServer() 296void Ntp::slotProbeNtpServer()
288{ 297{
289 qDebug("Ntp::slotProbeNtpServer()");
290 ntpSock->connectToHost( getNtpServer() ,123); 298 ntpSock->connectToHost( getNtpServer() ,123);
291} 299}
292 300
293void Ntp::slotNtpDelayChanged(int delay) 301void Ntp::slotNtpDelayChanged(int delay)
294{ 302{
295 ntpTimer->changeInterval( delay*1000*60 ); 303 ntpTimer->changeInterval( delay*1000*60 );
296} 304}
297 305
298void Ntp::ntpOutPut(QString out) 306void Ntp::ntpOutPut(QString out)
299{ 307{
300 MultiLineEditntpOutPut->append(out); 308 MultiLineEditntpOutPut->append(out);
301 MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); 309 MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE);
302} 310}
303 311
304 312
305void Ntp::makeChannel() 313void Ntp::makeChannel()
306 { 314 {
307 channel = new QCopChannel( "QPE/Application/netsystemtime", this ); 315 channel = new QCopChannel( "QPE/Application/netsystemtime", this );
308 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 316 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
309 this, SLOT(receive(const QCString&, const QByteArray&)) ); 317 this, SLOT(receive(const QCString&, const QByteArray&)) );
310} 318}
311 319
312 320
313 321
314void Ntp::receive(const QCString &msg, const QByteArray &arg) 322void Ntp::receive(const QCString &msg, const QByteArray &arg)
315{ 323{
316 qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); 324 qDebug("QCop(Ntp) "+msg+" "+QCString(arg));
317 if ( msg == "ntpLookup(QString)" ) 325 if ( msg == "ntpLookup(QString)" )
318 { 326 {
319 slotRunNtp(); 327 slotRunNtp();
320 } 328 }
321 if ( msg == "setPredictedTime(QString)" ) 329 if ( msg == "setPredictedTime(QString)" )
322 { 330 {
323 setPredictTime(); 331 setPredictTime();
324 }else{ 332 }else{
325 qDebug("Ntp::receive: Huh what do ya want"); 333 qDebug("Ntp::receive: Huh what do ya want");
326 } 334 }
327} 335}
328 336
329void Ntp::setDocument(const QString &fileName) 337void Ntp::setDocument(const QString &fileName)
330{ 338{
331 339
332} 340}
341
342void Ntp::showAdvancedFeatures(bool advMode)
343{
344 if (advMode) {
345 TabWidgetMain->addTab( tabPredict, tr( "Predict" ) );
346 TabWidgetMain->addTab( tabNtp, tr( "NTP" ) );
347 TextLabel1_2_2->show();
348 TextLabel2_3->show();
349 TextLabel3_3_2->show();
350 TextLabel1_2->show();
351 SpinBoxMinLookupDelay->show();
352 TextLabel2->show();
353 TextLabel3_3->show();
354 SpinBoxNtpDelay->show();
355 }else{
356 TabWidgetMain->removePage( tabPredict );
357 TabWidgetMain->removePage( tabNtp );
358 TextLabel1_2_2->hide();
359 TextLabel2_3->hide();
360 TextLabel3_3_2->hide();
361 TextLabel1_2->hide();
362 SpinBoxMinLookupDelay->hide();
363 TextLabel2->hide();
364 TextLabel3_3->hide();
365 SpinBoxNtpDelay->hide();
366 };
367}
diff --git a/noncore/settings/netsystemtime/ntp.h b/noncore/settings/netsystemtime/ntp.h
index 56e0131..fe0bae6 100644
--- a/noncore/settings/netsystemtime/ntp.h
+++ b/noncore/settings/netsystemtime/ntp.h
@@ -1,52 +1,53 @@
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;
8class QTimer; 8class QTimer;
9class QSocket; 9class QSocket;
10class QCopChannel; 10class QCopChannel;
11 11
12class Ntp : public SetDateTime 12class Ntp : public SetDateTime
13{ 13{
14 Q_OBJECT 14 Q_OBJECT
15 15
16public: 16public:
17 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 17 Ntp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
18 ~Ntp(); 18 ~Ntp();
19 19
20public slots: 20public slots:
21 void setDocument (const QString &); 21 void setDocument (const QString &);
22protected: 22protected:
23 QDateTime predictedTime; 23 QDateTime predictedTime;
24 void makeChannel(); 24 void makeChannel();
25protected slots: 25protected slots:
26 void receive(const QCString &msg, const QByteArray &arg); 26 void receive(const QCString &msg, const QByteArray &arg);
27private: 27private:
28 QString _ntpOutput; 28 QString _ntpOutput;
29 float _shiftPerSec; 29 float _shiftPerSec;
30 int _lookupDiff; 30 int _lookupDiff;
31 OProcess *ntpProcess; 31 OProcess *ntpProcess;
32 QTimer *ntpTimer; 32 QTimer *ntpTimer;
33 QSocket *ntpSock; 33 QSocket *ntpSock;
34 QCopChannel *channel; 34 QCopChannel *channel;
35 35
36 float getTimeShift(); 36 float getTimeShift();
37 void readLookups(); 37 void readLookups();
38 void ntpOutPut(QString); 38 void ntpOutPut(QString);
39 bool ntpDelayElapsed(); 39 bool ntpDelayElapsed();
40 QString getNtpServer(); 40 QString getNtpServer();
41private slots: 41private slots:
42 void slotRunNtp(); 42 void slotRunNtp();
43 void getNtpOutput(OProcess *proc, char *buffer, int buflen); 43 void getNtpOutput(OProcess *proc, char *buffer, int buflen);
44 void ntpFinished(OProcess*); 44 void ntpFinished(OProcess*);
45 void preditctTime(); 45 void preditctTime();
46 void slotCheckNtp(int); 46 void slotCheckNtp(int);
47 void setPredictTime(); 47 void setPredictTime();
48 void showAdvancedFeatures(bool);
48 void slotProbeNtpServer(); 49 void slotProbeNtpServer();
49 void slotNtpDelayChanged(int); 50 void slotNtpDelayChanged(int);
50}; 51};
51 52
52#endif 53#endif
diff --git a/noncore/settings/netsystemtime/ntpbase.cpp b/noncore/settings/netsystemtime/ntpbase.cpp
index 7762e93..c10c6ae 100644
--- a/noncore/settings/netsystemtime/ntpbase.cpp
+++ b/noncore/settings/netsystemtime/ntpbase.cpp
@@ -1,328 +1,338 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'ntpbase.ui' 2** Form implementation generated from reading ui file 'ntpbase.ui'
3** 3**
4** Created: Mon Oct 21 21:06:08 2002 4** Created: Mon Oct 21 21:32:47 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#include "ntpbase.h" 9#include "ntpbase.h"
10 10
11#include <qcheckbox.h>
11#include <qcombobox.h> 12#include <qcombobox.h>
12#include <qframe.h> 13#include <qframe.h>
13#include <qlabel.h> 14#include <qlabel.h>
14#include <qmultilineedit.h> 15#include <qmultilineedit.h>
15#include <qpushbutton.h> 16#include <qpushbutton.h>
16#include <qspinbox.h> 17#include <qspinbox.h>
17#include <qtable.h> 18#include <qtable.h>
18#include <qtabwidget.h> 19#include <qtabwidget.h>
19#include <qlayout.h> 20#include <qlayout.h>
20#include <qvariant.h> 21#include <qvariant.h>
21#include <qtooltip.h> 22#include <qtooltip.h>
22#include <qwhatsthis.h> 23#include <qwhatsthis.h>
23 24
24/* 25/*
25 * Constructs a NtpBase which is a child of 'parent', with the 26 * Constructs a NtpBase which is a child of 'parent', with the
26 * name 'name' and widget flags set to 'f' 27 * name 'name' and widget flags set to 'f'
27 */ 28 */
28NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) 29NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
29 : QWidget( parent, name, fl ) 30 : QWidget( parent, name, fl )
30{ 31{
31 if ( !name ) 32 if ( !name )
32 setName( "NtpBase" ); 33 setName( "NtpBase" );
33 resize( 320, 411 ); 34 resize( 320, 411 );
34 setCaption( tr( "Network Time" ) ); 35 setCaption( tr( "Network Time" ) );
35 NtpBaseLayout = new QGridLayout( this ); 36 NtpBaseLayout = new QGridLayout( this );
36 NtpBaseLayout->setSpacing( 2 ); 37 NtpBaseLayout->setSpacing( 2 );
37 NtpBaseLayout->setMargin( 2 ); 38 NtpBaseLayout->setMargin( 2 );
38 39
39 TabWidgetMain = new QTabWidget( this, "TabWidgetMain" ); 40 TabWidgetMain = new QTabWidget( this, "TabWidgetMain" );
40 41
41 tabMain = new QWidget( TabWidgetMain, "tabMain" ); 42 tabMain = new QWidget( TabWidgetMain, "tabMain" );
42 tabMainLayout = new QGridLayout( tabMain ); 43 tabMainLayout = new QGridLayout( tabMain );
43 tabMainLayout->setSpacing( 2 ); 44 tabMainLayout->setSpacing( 2 );
44 tabMainLayout->setMargin( 2 ); 45 tabMainLayout->setMargin( 2 );
45 46
46 FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" ); 47 FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" );
47 FrameSystemTime->setFrameShape( QFrame::StyledPanel ); 48 FrameSystemTime->setFrameShape( QFrame::StyledPanel );
48 FrameSystemTime->setFrameShadow( QFrame::Raised ); 49 FrameSystemTime->setFrameShadow( QFrame::Raised );
49 50
50 tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); 51 tabMainLayout->addWidget( FrameSystemTime, 0, 0 );
51 52
52 tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); 53 tabNtp = new QWidget( TabWidgetMain, "tabNtp" );
53 tabNtpLayout = new QGridLayout( tabNtp ); 54 tabNtpLayout = new QGridLayout( tabNtp );
54 tabNtpLayout->setSpacing( 2 ); 55 tabNtpLayout->setSpacing( 2 );
55 tabNtpLayout->setMargin( 1 ); 56 tabNtpLayout->setMargin( 1 );
56 57
57 runNtp = new QPushButton( tabNtp, "runNtp" ); 58 runNtp = new QPushButton( tabNtp, "runNtp" );
58 runNtp->setText( tr( "Get time from network" ) ); 59 runNtp->setText( tr( "Get time from network" ) );
59 60
60 tabNtpLayout->addWidget( runNtp, 1, 0 ); 61 tabNtpLayout->addWidget( runNtp, 1, 0 );
61 62
62 FrameNtp = new QFrame( tabNtp, "FrameNtp" ); 63 FrameNtp = new QFrame( tabNtp, "FrameNtp" );
63 FrameNtp->setFrameShape( QFrame::StyledPanel ); 64 FrameNtp->setFrameShape( QFrame::StyledPanel );
64 FrameNtp->setFrameShadow( QFrame::Raised ); 65 FrameNtp->setFrameShadow( QFrame::Raised );
65 FrameNtpLayout = new QGridLayout( FrameNtp ); 66 FrameNtpLayout = new QGridLayout( FrameNtp );
66 FrameNtpLayout->setSpacing( 2 ); 67 FrameNtpLayout->setSpacing( 2 );
67 FrameNtpLayout->setMargin( 2 ); 68 FrameNtpLayout->setMargin( 2 );
68 69
69 Layout4 = new QVBoxLayout; 70 Layout4 = new QVBoxLayout;
70 Layout4->setSpacing( 6 ); 71 Layout4->setSpacing( 6 );
71 Layout4->setMargin( 0 ); 72 Layout4->setMargin( 0 );
72 73
73 TextLabel1 = new QLabel( FrameNtp, "TextLabel1" ); 74 TextLabel1 = new QLabel( FrameNtp, "TextLabel1" );
74 TextLabel1->setAutoMask( FALSE ); 75 TextLabel1->setAutoMask( FALSE );
75 TextLabel1->setText( tr( "Start Time:" ) ); 76 TextLabel1->setText( tr( "Start Time:" ) );
76 Layout4->addWidget( TextLabel1 ); 77 Layout4->addWidget( TextLabel1 );
77 78
78 TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" ); 79 TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" );
79 TextLabelStartTime->setText( tr( "nan" ) ); 80 TextLabelStartTime->setText( tr( "nan" ) );
80 Layout4->addWidget( TextLabelStartTime ); 81 Layout4->addWidget( TextLabelStartTime );
81 82
82 TextLabel3 = new QLabel( FrameNtp, "TextLabel3" ); 83 TextLabel3 = new QLabel( FrameNtp, "TextLabel3" );
83 TextLabel3->setText( tr( "Time Shift:" ) ); 84 TextLabel3->setText( tr( "Time Shift:" ) );
84 Layout4->addWidget( TextLabel3 ); 85 Layout4->addWidget( TextLabel3 );
85 86
86 TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" ); 87 TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" );
87 TextLabelTimeShift->setText( tr( "nan" ) ); 88 TextLabelTimeShift->setText( tr( "nan" ) );
88 Layout4->addWidget( TextLabelTimeShift ); 89 Layout4->addWidget( TextLabelTimeShift );
89 90
90 TextLabel5 = new QLabel( FrameNtp, "TextLabel5" ); 91 TextLabel5 = new QLabel( FrameNtp, "TextLabel5" );
91 TextLabel5->setText( tr( "New Time:" ) ); 92 TextLabel5->setText( tr( "New Time:" ) );
92 Layout4->addWidget( TextLabel5 ); 93 Layout4->addWidget( TextLabel5 );
93 94
94 TextLabelNewTime = new QLabel( FrameNtp, "TextLabelNewTime" ); 95 TextLabelNewTime = new QLabel( FrameNtp, "TextLabelNewTime" );
95 TextLabelNewTime->setText( tr( "nan" ) ); 96 TextLabelNewTime->setText( tr( "nan" ) );
96 Layout4->addWidget( TextLabelNewTime ); 97 Layout4->addWidget( TextLabelNewTime );
97 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 98 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
98 Layout4->addItem( spacer ); 99 Layout4->addItem( spacer );
99 100
100 FrameNtpLayout->addLayout( Layout4, 0, 0 ); 101 FrameNtpLayout->addLayout( Layout4, 0, 0 );
101 102
102 MultiLineEditntpOutPut = new QMultiLineEdit( FrameNtp, "MultiLineEditntpOutPut" ); 103 MultiLineEditntpOutPut = new QMultiLineEdit( FrameNtp, "MultiLineEditntpOutPut" );
103 QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); 104 QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() );
104 MultiLineEditntpOutPut_font.setPointSize( 7 ); 105 MultiLineEditntpOutPut_font.setPointSize( 7 );
105 MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); 106 MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font );
106 MultiLineEditntpOutPut->setWordWrap( QMultiLineEdit::WidgetWidth ); 107 MultiLineEditntpOutPut->setWordWrap( QMultiLineEdit::WidgetWidth );
107 MultiLineEditntpOutPut->setText( tr( "" ) ); 108 MultiLineEditntpOutPut->setText( tr( "" ) );
108 109
109 FrameNtpLayout->addWidget( MultiLineEditntpOutPut, 1, 0 ); 110 FrameNtpLayout->addWidget( MultiLineEditntpOutPut, 1, 0 );
110 111
111 tabNtpLayout->addWidget( FrameNtp, 0, 0 ); 112 tabNtpLayout->addWidget( FrameNtp, 0, 0 );
112 113
113 tabPredict = new QWidget( TabWidgetMain, "tabPredict" ); 114 tabPredict = new QWidget( TabWidgetMain, "tabPredict" );
114 tabPredictLayout = new QGridLayout( tabPredict ); 115 tabPredictLayout = new QGridLayout( tabPredict );
115 tabPredictLayout->setSpacing( 6 ); 116 tabPredictLayout->setSpacing( 6 );
116 tabPredictLayout->setMargin( 5 ); 117 tabPredictLayout->setMargin( 5 );
117 118
118 TableLookups = new QTable( tabPredict, "TableLookups" ); 119 TableLookups = new QTable( tabPredict, "TableLookups" );
119 QFont TableLookups_font( TableLookups->font() ); 120 QFont TableLookups_font( TableLookups->font() );
120 TableLookups_font.setPointSize( 8 ); 121 TableLookups_font.setPointSize( 8 );
121 TableLookups->setFont( TableLookups_font ); 122 TableLookups->setFont( TableLookups_font );
122 TableLookups->setNumRows( 2 ); 123 TableLookups->setNumRows( 2 );
123 TableLookups->setNumCols( 2 ); 124 TableLookups->setNumCols( 2 );
124 125
125 tabPredictLayout->addWidget( TableLookups, 0, 0 ); 126 tabPredictLayout->addWidget( TableLookups, 0, 0 );
126 127
127 Layout9 = new QGridLayout; 128 Layout9 = new QGridLayout;
128 Layout9->setSpacing( 6 ); 129 Layout9->setSpacing( 6 );
129 Layout9->setMargin( 0 ); 130 Layout9->setMargin( 0 );
130 131
131 TextLabelShift = new QLabel( tabPredict, "TextLabelShift" ); 132 TextLabelShift = new QLabel( tabPredict, "TextLabelShift" );
132 TextLabelShift->setText( tr( "nan" ) ); 133 TextLabelShift->setText( tr( "nan" ) );
133 134
134 Layout9->addWidget( TextLabelShift, 0, 1 ); 135 Layout9->addWidget( TextLabelShift, 0, 1 );
135 136
136 TextLabel4 = new QLabel( tabPredict, "TextLabel4" ); 137 TextLabel4 = new QLabel( tabPredict, "TextLabel4" );
137 TextLabel4->setText( tr( "Esimated Shift:" ) ); 138 TextLabel4->setText( tr( "Esimated Shift:" ) );
138 139
139 Layout9->addWidget( TextLabel4, 1, 0 ); 140 Layout9->addWidget( TextLabel4, 1, 0 );
140 141
141 TextLabelEstimatedShift = new QLabel( tabPredict, "TextLabelEstimatedShift" ); 142 TextLabelEstimatedShift = new QLabel( tabPredict, "TextLabelEstimatedShift" );
142 TextLabelEstimatedShift->setText( tr( "nan" ) ); 143 TextLabelEstimatedShift->setText( tr( "nan" ) );
143 144
144 Layout9->addWidget( TextLabelEstimatedShift, 1, 1 ); 145 Layout9->addWidget( TextLabelEstimatedShift, 1, 1 );
145 146
146 TextLabel3_2 = new QLabel( tabPredict, "TextLabel3_2" ); 147 TextLabel3_2 = new QLabel( tabPredict, "TextLabel3_2" );
147 TextLabel3_2->setText( tr( "Predicted Time:" ) ); 148 TextLabel3_2->setText( tr( "Predicted Time:" ) );
148 149
149 Layout9->addWidget( TextLabel3_2, 2, 0 ); 150 Layout9->addWidget( TextLabel3_2, 2, 0 );
150 151
151 Mean_shift_label = new QLabel( tabPredict, "Mean_shift_label" ); 152 Mean_shift_label = new QLabel( tabPredict, "Mean_shift_label" );
152 Mean_shift_label->setText( tr( "Mean shift:" ) ); 153 Mean_shift_label->setText( tr( "Mean shift:" ) );
153 154
154 Layout9->addWidget( Mean_shift_label, 0, 0 ); 155 Layout9->addWidget( Mean_shift_label, 0, 0 );
155 156
156 TextLabelPredTime = new QLabel( tabPredict, "TextLabelPredTime" ); 157 TextLabelPredTime = new QLabel( tabPredict, "TextLabelPredTime" );
157 TextLabelPredTime->setText( tr( "nan" ) ); 158 TextLabelPredTime->setText( tr( "nan" ) );
158 159
159 Layout9->addWidget( TextLabelPredTime, 2, 1 ); 160 Layout9->addWidget( TextLabelPredTime, 2, 1 );
160 161
161 tabPredictLayout->addLayout( Layout9, 1, 0 ); 162 tabPredictLayout->addLayout( Layout9, 1, 0 );
162 163
163 Layout11 = new QHBoxLayout; 164 Layout11 = new QHBoxLayout;
164 Layout11->setSpacing( 6 ); 165 Layout11->setSpacing( 6 );
165 Layout11->setMargin( 0 ); 166 Layout11->setMargin( 0 );
166 167
167 PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" ); 168 PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" );
168 PushButtonSetPredTime->setText( tr( "Set predicted time" ) ); 169 PushButtonSetPredTime->setText( tr( "Set predicted time" ) );
169 Layout11->addWidget( PushButtonSetPredTime ); 170 Layout11->addWidget( PushButtonSetPredTime );
170 171
171 PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" ); 172 PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" );
172 PushButtonPredict->setText( tr( "Predict time" ) ); 173 PushButtonPredict->setText( tr( "Predict time" ) );
173 Layout11->addWidget( PushButtonPredict ); 174 Layout11->addWidget( PushButtonPredict );
174 175
175 tabPredictLayout->addLayout( Layout11, 2, 0 ); 176 tabPredictLayout->addLayout( Layout11, 2, 0 );
176 177
177 TabSettings = new QWidget( TabWidgetMain, "TabSettings" ); 178 TabSettings = new QWidget( TabWidgetMain, "TabSettings" );
178 TabSettingsLayout = new QGridLayout( TabSettings ); 179 TabSettingsLayout = new QGridLayout( TabSettings );
179 TabSettingsLayout->setSpacing( 2 ); 180 TabSettingsLayout->setSpacing( 2 );
180 TabSettingsLayout->setMargin( 2 ); 181 TabSettingsLayout->setMargin( 2 );
181 182
182 FrameSettings = new QFrame( TabSettings, "FrameSettings" ); 183 FrameSettings = new QFrame( TabSettings, "FrameSettings" );
183 FrameSettings->setFrameShape( QFrame::StyledPanel ); 184 FrameSettings->setFrameShape( QFrame::StyledPanel );
184 FrameSettings->setFrameShadow( QFrame::Raised ); 185 FrameSettings->setFrameShadow( QFrame::Raised );
185 FrameSettingsLayout = new QGridLayout( FrameSettings ); 186 FrameSettingsLayout = new QVBoxLayout( FrameSettings );
186 FrameSettingsLayout->setSpacing( 11 ); 187 FrameSettingsLayout->setSpacing( 6 );
187 FrameSettingsLayout->setMargin( 3 ); 188 FrameSettingsLayout->setMargin( 11 );
188 189
189 Layout6 = new QGridLayout; 190 Layout6 = new QGridLayout;
190 Layout6->setSpacing( 6 ); 191 Layout6->setSpacing( 6 );
191 Layout6->setMargin( 0 ); 192 Layout6->setMargin( 0 );
192 193
193 TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" ); 194 TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" );
194 TextLabel7_2->setText( tr( "Use" ) ); 195 TextLabel7_2->setText( tr( "Use" ) );
195 196
196 Layout6->addWidget( TextLabel7_2, 0, 0 ); 197 Layout6->addWidget( TextLabel7_2, 0, 0 );
197 198
198 TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" ); 199 TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" );
199 TextLabel2_2->setText( tr( "as" ) ); 200 TextLabel2_2->setText( tr( "as" ) );
200 201
201 Layout6->addWidget( TextLabel2_2, 0, 2 ); 202 Layout6->addWidget( TextLabel2_2, 0, 2 );
202 203
203 TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" ); 204 TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" );
204 TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) ); 205 TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) );
205 TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); 206 TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
206 207
207 Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 ); 208 Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 );
208 209
209 ComboNtpSrv = new QComboBox( FALSE, FrameSettings, "ComboNtpSrv" ); 210 ComboNtpSrv = new QComboBox( FALSE, FrameSettings, "ComboNtpSrv" );
210 ComboNtpSrv->setEditable( TRUE ); 211 ComboNtpSrv->setEditable( TRUE );
211 212
212 Layout6->addWidget( ComboNtpSrv, 0, 1 ); 213 Layout6->addWidget( ComboNtpSrv, 0, 1 );
214 FrameSettingsLayout->addLayout( Layout6 );
215 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
216 FrameSettingsLayout->addItem( spacer_2 );
213 217
214 FrameSettingsLayout->addLayout( Layout6, 0, 0 ); 218 CheckBoxAdvSettings = new QCheckBox( FrameSettings, "CheckBoxAdvSettings" );
215 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 219 CheckBoxAdvSettings->setText( tr( "Advanced features" ) );
216 FrameSettingsLayout->addItem( spacer_2, 3, 0 ); 220 FrameSettingsLayout->addWidget( CheckBoxAdvSettings );
221 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
222 FrameSettingsLayout->addItem( spacer_3 );
217 223
218 Layout7 = new QGridLayout; 224 Line1 = new QFrame( FrameSettings, "Line1" );
219 Layout7->setSpacing( 6 ); 225 Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
220 Layout7->setMargin( 0 ); 226 FrameSettingsLayout->addWidget( Line1 );
221
222 TextLabel1_2 = new QLabel( FrameSettings, "TextLabel1_2" );
223 TextLabel1_2->setText( tr( "Insure a delay of" ) );
224
225 Layout7->addWidget( TextLabel1_2, 0, 0 );
226
227 TextLabel2 = new QLabel( FrameSettings, "TextLabel2" );
228 TextLabel2->setText( tr( "minutes until" ) );
229
230 Layout7->addWidget( TextLabel2, 0, 2 );
231
232 TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" );
233 TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) );
234 TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
235
236 Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 );
237
238 SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" );
239 SpinBoxMinLookupDelay->setMaxValue( 9999999 );
240 SpinBoxMinLookupDelay->setMinValue( 42 );
241
242 Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 );
243
244 FrameSettingsLayout->addLayout( Layout7, 2, 0 );
245 227
246 Layout7_2 = new QGridLayout; 228 Layout7_2 = new QGridLayout;
247 Layout7_2->setSpacing( 6 ); 229 Layout7_2->setSpacing( 6 );
248 Layout7_2->setMargin( 0 ); 230 Layout7_2->setMargin( 0 );
249 231
250 TextLabel1_2_2 = new QLabel( FrameSettings, "TextLabel1_2_2" ); 232 TextLabel1_2_2 = new QLabel( FrameSettings, "TextLabel1_2_2" );
251 TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) ); 233 TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
252 TextLabel1_2_2->setText( tr( "Wait for " ) ); 234 TextLabel1_2_2->setText( tr( "Wait for " ) );
253 235
254 Layout7_2->addWidget( TextLabel1_2_2, 0, 0 ); 236 Layout7_2->addWidget( TextLabel1_2_2, 0, 0 );
255 237
256 TextLabel2_3 = new QLabel( FrameSettings, "TextLabel2_3" ); 238 TextLabel2_3 = new QLabel( FrameSettings, "TextLabel2_3" );
257 TextLabel2_3->setText( tr( "minutes until" ) ); 239 TextLabel2_3->setText( tr( "minutes until" ) );
258 240
259 Layout7_2->addWidget( TextLabel2_3, 0, 2 ); 241 Layout7_2->addWidget( TextLabel2_3, 0, 2 );
260 242
261 TextLabel3_3_2 = new QLabel( FrameSettings, "TextLabel3_3_2" ); 243 TextLabel3_3_2 = new QLabel( FrameSettings, "TextLabel3_3_2" );
262 TextLabel3_3_2->setText( tr( "NTP tries to syncronises the clock with the network." ) ); 244 TextLabel3_3_2->setText( tr( "NTP tries to syncronises the clock with the network." ) );
263 TextLabel3_3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); 245 TextLabel3_3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
264 246
265 Layout7_2->addMultiCellWidget( TextLabel3_3_2, 1, 1, 0, 2 ); 247 Layout7_2->addMultiCellWidget( TextLabel3_3_2, 1, 1, 0, 2 );
266 248
267 SpinBoxNtpDelay = new QSpinBox( FrameSettings, "SpinBoxNtpDelay" ); 249 SpinBoxNtpDelay = new QSpinBox( FrameSettings, "SpinBoxNtpDelay" );
250 SpinBoxNtpDelay->setWrapping( TRUE );
268 SpinBoxNtpDelay->setMaxValue( 9999999 ); 251 SpinBoxNtpDelay->setMaxValue( 9999999 );
269 SpinBoxNtpDelay->setMinValue( 0 ); 252 SpinBoxNtpDelay->setMinValue( 1 );
253 SpinBoxNtpDelay->setValue( 1440 );
270 254
271 Layout7_2->addWidget( SpinBoxNtpDelay, 0, 1 ); 255 Layout7_2->addWidget( SpinBoxNtpDelay, 0, 1 );
256 FrameSettingsLayout->addLayout( Layout7_2 );
272 257
273 FrameSettingsLayout->addLayout( Layout7_2, 1, 0 ); 258 Layout7 = new QGridLayout;
259 Layout7->setSpacing( 6 );
260 Layout7->setMargin( 0 );
261
262 TextLabel1_2 = new QLabel( FrameSettings, "TextLabel1_2" );
263 TextLabel1_2->setText( tr( "Insure a delay of" ) );
264
265 Layout7->addWidget( TextLabel1_2, 0, 0 );
266
267 TextLabel2 = new QLabel( FrameSettings, "TextLabel2" );
268 TextLabel2->setText( tr( "minutes until" ) );
269
270 Layout7->addWidget( TextLabel2, 0, 2 );
271
272 TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" );
273 TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) );
274 TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
275
276 Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 );
277
278 SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" );
279 SpinBoxMinLookupDelay->setWrapping( TRUE );
280 SpinBoxMinLookupDelay->setMaxValue( 9999999 );
281 SpinBoxMinLookupDelay->setMinValue( 42 );
282 SpinBoxMinLookupDelay->setValue( 720 );
283
284 Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 );
285 FrameSettingsLayout->addLayout( Layout7 );
274 286
275 TabSettingsLayout->addWidget( FrameSettings, 0, 0 ); 287 TabSettingsLayout->addWidget( FrameSettings, 0, 0 );
276 288
277 tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" ); 289 tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" );
278 tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime ); 290 tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime );
279 tabManualSetTimeLayout->setSpacing( 2 ); 291 tabManualSetTimeLayout->setSpacing( 2 );
280 tabManualSetTimeLayout->setMargin( 2 ); 292 tabManualSetTimeLayout->setMargin( 2 );
281 293
282 FrameSetTime = new QFrame( tabManualSetTime, "FrameSetTime" ); 294 FrameSetTime = new QFrame( tabManualSetTime, "FrameSetTime" );
283 FrameSetTime->setFrameShape( QFrame::StyledPanel ); 295 FrameSetTime->setFrameShape( QFrame::StyledPanel );
284 FrameSetTime->setFrameShadow( QFrame::Raised ); 296 FrameSetTime->setFrameShadow( QFrame::Raised );
285 tabManualSetTimeLayout->addWidget( FrameSetTime ); 297 tabManualSetTimeLayout->addWidget( FrameSetTime );
286 298
287 PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); 299 PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" );
288 PushButtonSetManualTime->setText( tr( "Set time" ) ); 300 PushButtonSetManualTime->setText( tr( "Set time" ) );
289 tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); 301 tabManualSetTimeLayout->addWidget( PushButtonSetManualTime );
290 302
291 TabWidgetMain->insertTab( tabMain, tr( "Main" ) );
292 303
304 TabWidgetMain->insertTab( tabMain, tr( "Main" ) );
293 TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); 305 TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) );
294
295 TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); 306 TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) );
296
297 TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) );
298 TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); 307 TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) );
308 TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) );
299 309
300 NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); 310 NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 );
301} 311}
302 312
303/* 313/*
304 * Destroys the object and frees any allocated resources 314 * Destroys the object and frees any allocated resources
305 */ 315 */
306NtpBase::~NtpBase() 316NtpBase::~NtpBase()
307{ 317{
308 // no need to delete child widgets, Qt does it all for us 318 // no need to delete child widgets, Qt does it all for us
309} 319}
310 320
311/* 321/*
312 * Main event handler. Reimplemented to handle application 322 * Main event handler. Reimplemented to handle application
313 * font changes 323 * font changes
314 */ 324 */
315bool NtpBase::event( QEvent* ev ) 325bool NtpBase::event( QEvent* ev )
316{ 326{
317 bool ret = QWidget::event( ev ); 327 bool ret = QWidget::event( ev );
318 if ( ev->type() == QEvent::ApplicationFontChange ) { 328 if ( ev->type() == QEvent::ApplicationFontChange ) {
319 QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); 329 QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() );
320 MultiLineEditntpOutPut_font.setPointSize( 7 ); 330 MultiLineEditntpOutPut_font.setPointSize( 7 );
321 MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); 331 MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font );
322 QFont TableLookups_font( TableLookups->font() ); 332 QFont TableLookups_font( TableLookups->font() );
323 TableLookups_font.setPointSize( 8 ); 333 TableLookups_font.setPointSize( 8 );
324 TableLookups->setFont( TableLookups_font ); 334 TableLookups->setFont( TableLookups_font );
325 } 335 }
326 return ret; 336 return ret;
327} 337}
328 338
diff --git a/noncore/settings/netsystemtime/ntpbase.h b/noncore/settings/netsystemtime/ntpbase.h
index b337822..a669601 100644
--- a/noncore/settings/netsystemtime/ntpbase.h
+++ b/noncore/settings/netsystemtime/ntpbase.h
@@ -1,93 +1,96 @@
1/**************************************************************************** 1/****************************************************************************
2** Form interface generated from reading ui file 'ntpbase.ui' 2** Form interface generated from reading ui file 'ntpbase.ui'
3** 3**
4** Created: Mon Oct 21 21:05:47 2002 4** Created: Mon Oct 21 21:32:43 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#ifndef NTPBASE_H 9#ifndef NTPBASE_H
10#define NTPBASE_H 10#define NTPBASE_H
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qwidget.h> 13#include <qwidget.h>
14class QVBoxLayout; 14class QVBoxLayout;
15class QHBoxLayout; 15class QHBoxLayout;
16class QGridLayout; 16class QGridLayout;
17class QCheckBox;
17class QComboBox; 18class QComboBox;
18class QFrame; 19class QFrame;
19class QLabel; 20class QLabel;
20class QMultiLineEdit; 21class QMultiLineEdit;
21class QPushButton; 22class QPushButton;
22class QSpinBox; 23class QSpinBox;
23class QTabWidget; 24class QTabWidget;
24class QTable; 25class QTable;
25 26
26class NtpBase : public QWidget 27class NtpBase : public QWidget
27{ 28{
28 Q_OBJECT 29 Q_OBJECT
29 30
30public: 31public:
31 NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
32 ~NtpBase(); 33 ~NtpBase();
33 34
34 QTabWidget* TabWidgetMain; 35 QTabWidget* TabWidgetMain;
35 QWidget* tabMain; 36 QWidget* tabMain;
36 QFrame* FrameSystemTime; 37 QFrame* FrameSystemTime;
37 QWidget* tabNtp; 38 QWidget* tabNtp;
38 QPushButton* runNtp; 39 QPushButton* runNtp;
39 QFrame* FrameNtp; 40 QFrame* FrameNtp;
40 QLabel* TextLabel1; 41 QLabel* TextLabel1;
41 QLabel* TextLabelStartTime; 42 QLabel* TextLabelStartTime;
42 QLabel* TextLabel3; 43 QLabel* TextLabel3;
43 QLabel* TextLabelTimeShift; 44 QLabel* TextLabelTimeShift;
44 QLabel* TextLabel5; 45 QLabel* TextLabel5;
45 QLabel* TextLabelNewTime; 46 QLabel* TextLabelNewTime;
46 QMultiLineEdit* MultiLineEditntpOutPut; 47 QMultiLineEdit* MultiLineEditntpOutPut;
47 QWidget* tabPredict; 48 QWidget* tabPredict;
48 QTable* TableLookups; 49 QTable* TableLookups;
49 QLabel* TextLabelShift; 50 QLabel* TextLabelShift;
50 QLabel* TextLabel4; 51 QLabel* TextLabel4;
51 QLabel* TextLabelEstimatedShift; 52 QLabel* TextLabelEstimatedShift;
52 QLabel* TextLabel3_2; 53 QLabel* TextLabel3_2;
53 QLabel* Mean_shift_label; 54 QLabel* Mean_shift_label;
54 QLabel* TextLabelPredTime; 55 QLabel* TextLabelPredTime;
55 QPushButton* PushButtonSetPredTime; 56 QPushButton* PushButtonSetPredTime;
56 QPushButton* PushButtonPredict; 57 QPushButton* PushButtonPredict;
57 QWidget* TabSettings; 58 QWidget* TabSettings;
58 QFrame* FrameSettings; 59 QFrame* FrameSettings;
59 QLabel* TextLabel7_2; 60 QLabel* TextLabel7_2;
60 QLabel* TextLabel2_2; 61 QLabel* TextLabel2_2;
61 QLabel* TextLabel1_3; 62 QLabel* TextLabel1_3;
62 QComboBox* ComboNtpSrv; 63 QComboBox* ComboNtpSrv;
63 QLabel* TextLabel1_2; 64 QCheckBox* CheckBoxAdvSettings;
64 QLabel* TextLabel2; 65 QFrame* Line1;
65 QLabel* TextLabel3_3;
66 QSpinBox* SpinBoxMinLookupDelay;
67 QLabel* TextLabel1_2_2; 66 QLabel* TextLabel1_2_2;
68 QLabel* TextLabel2_3; 67 QLabel* TextLabel2_3;
69 QLabel* TextLabel3_3_2; 68 QLabel* TextLabel3_3_2;
70 QSpinBox* SpinBoxNtpDelay; 69 QSpinBox* SpinBoxNtpDelay;
70 QLabel* TextLabel1_2;
71 QLabel* TextLabel2;
72 QLabel* TextLabel3_3;
73 QSpinBox* SpinBoxMinLookupDelay;
71 QWidget* tabManualSetTime; 74 QWidget* tabManualSetTime;
72 QFrame* FrameSetTime; 75 QFrame* FrameSetTime;
73 QPushButton* PushButtonSetManualTime; 76 QPushButton* PushButtonSetManualTime;
74 77
75protected: 78protected:
76 QGridLayout* NtpBaseLayout; 79 QGridLayout* NtpBaseLayout;
77 QGridLayout* tabMainLayout; 80 QGridLayout* tabMainLayout;
78 QGridLayout* tabNtpLayout; 81 QGridLayout* tabNtpLayout;
79 QGridLayout* FrameNtpLayout; 82 QGridLayout* FrameNtpLayout;
80 QVBoxLayout* Layout4; 83 QVBoxLayout* Layout4;
81 QGridLayout* tabPredictLayout; 84 QGridLayout* tabPredictLayout;
82 QGridLayout* Layout9; 85 QGridLayout* Layout9;
83 QHBoxLayout* Layout11; 86 QHBoxLayout* Layout11;
84 QGridLayout* TabSettingsLayout; 87 QGridLayout* TabSettingsLayout;
85 QGridLayout* FrameSettingsLayout; 88 QVBoxLayout* FrameSettingsLayout;
86 QGridLayout* Layout6; 89 QGridLayout* Layout6;
87 QGridLayout* Layout7;
88 QGridLayout* Layout7_2; 90 QGridLayout* Layout7_2;
91 QGridLayout* Layout7;
89 QVBoxLayout* tabManualSetTimeLayout; 92 QVBoxLayout* tabManualSetTimeLayout;
90 bool event( QEvent* ); 93 bool event( QEvent* );
91}; 94};
92 95
93#endif // NTPBASE_H 96#endif // NTPBASE_H
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui
index be2c8d3..62f736b 100644
--- a/noncore/settings/netsystemtime/ntpbase.ui
+++ b/noncore/settings/netsystemtime/ntpbase.ui
@@ -1,631 +1,842 @@
1<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> 1<!DOCTYPE UI><UI>
2<class>NtpBase</class> 2<class>NtpBase</class>
3<widget class="QWidget"> 3<widget>
4 <property name="name"> 4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
5 <cstring>NtpBase</cstring> 7 <cstring>NtpBase</cstring>
6 </property> 8 </property>
7 <property name="geometry"> 9 <property stdset="1">
10 <name>geometry</name>
8 <rect> 11 <rect>
9 <x>0</x> 12 <x>0</x>
10 <y>0</y> 13 <y>0</y>
11 <width>324</width> 14 <width>320</width>
12 <height>411</height> 15 <height>411</height>
13 </rect> 16 </rect>
14 </property> 17 </property>
15 <property name="caption"> 18 <property stdset="1">
16 <string>Set Time</string> 19 <name>caption</name>
20 <string>Network Time</string>
17 </property> 21 </property>
18 <property name="layoutMargin" stdset="0"> 22 <property>
23 <name>layoutMargin</name>
19 </property> 24 </property>
20 <property name="layoutSpacing" stdset="0"> 25 <property>
26 <name>layoutSpacing</name>
21 </property> 27 </property>
22 <grid> 28 <grid>
23 <property name="name"> 29 <property stdset="1">
24 <cstring>unnamed</cstring> 30 <name>margin</name>
25 </property>
26 <property name="margin">
27 <number>2</number> 31 <number>2</number>
28 </property> 32 </property>
29 <property name="spacing"> 33 <property stdset="1">
34 <name>spacing</name>
30 <number>2</number> 35 <number>2</number>
31 </property> 36 </property>
32 <widget class="QTabWidget" row="0" column="0"> 37 <widget row="0" column="0" >
33 <property name="name"> 38 <class>QTabWidget</class>
39 <property stdset="1">
40 <name>name</name>
34 <cstring>TabWidgetMain</cstring> 41 <cstring>TabWidgetMain</cstring>
35 </property> 42 </property>
36 <property name="layoutMargin" stdset="0"> 43 <property>
44 <name>layoutMargin</name>
37 </property> 45 </property>
38 <property name="layoutSpacing" stdset="0"> 46 <property>
47 <name>layoutSpacing</name>
39 </property> 48 </property>
40 <widget class="QWidget"> 49 <widget>
41 <property name="name"> 50 <class>QWidget</class>
51 <property stdset="1">
52 <name>name</name>
42 <cstring>tabMain</cstring> 53 <cstring>tabMain</cstring>
43 </property> 54 </property>
44 <attribute name="title"> 55 <attribute>
56 <name>title</name>
45 <string>Main</string> 57 <string>Main</string>
46 </attribute> 58 </attribute>
47 <grid> 59 <grid>
48 <property name="name"> 60 <property stdset="1">
49 <cstring>unnamed</cstring> 61 <name>margin</name>
50 </property>
51 <property name="margin">
52 <number>2</number> 62 <number>2</number>
53 </property> 63 </property>
54 <property name="spacing"> 64 <property stdset="1">
65 <name>spacing</name>
55 <number>2</number> 66 <number>2</number>
56 </property> 67 </property>
57 <widget class="QFrame" row="0" column="0"> 68 <widget row="0" column="0" >
58 <property name="name"> 69 <class>QFrame</class>
70 <property stdset="1">
71 <name>name</name>
59 <cstring>FrameSystemTime</cstring> 72 <cstring>FrameSystemTime</cstring>
60 </property> 73 </property>
61 <property name="frameShape"> 74 <property stdset="1">
75 <name>frameShape</name>
62 <enum>StyledPanel</enum> 76 <enum>StyledPanel</enum>
63 </property> 77 </property>
64 <property name="frameShadow"> 78 <property stdset="1">
79 <name>frameShadow</name>
65 <enum>Raised</enum> 80 <enum>Raised</enum>
66 </property> 81 </property>
67 </widget> 82 </widget>
68 </grid> 83 </grid>
69 </widget> 84 </widget>
70 <widget class="QWidget"> 85 <widget>
71 <property name="name"> 86 <class>QWidget</class>
72 <cstring>tabSetTime</cstring> 87 <property stdset="1">
88 <name>name</name>
89 <cstring>tabNtp</cstring>
73 </property> 90 </property>
74 <attribute name="title"> 91 <attribute>
75 <string>Manual</string> 92 <name>title</name>
93 <string>NTP</string>
76 </attribute> 94 </attribute>
77 <vbox> 95 <grid>
78 <property name="name"> 96 <property stdset="1">
79 <cstring>unnamed</cstring> 97 <name>margin</name>
80 </property> 98 <number>1</number>
81 <property name="margin">
82 <number>2</number>
83 </property> 99 </property>
84 <property name="spacing"> 100 <property stdset="1">
101 <name>spacing</name>
85 <number>2</number> 102 <number>2</number>
86 </property> 103 </property>
87 <widget class="QFrame"> 104 <widget row="1" column="0" >
88 <property name="name"> 105 <class>QPushButton</class>
89 <cstring>FrameSetTime</cstring> 106 <property stdset="1">
90 </property> 107 <name>name</name>
91 <property name="frameShape"> 108 <cstring>runNtp</cstring>
92 <enum>StyledPanel</enum>
93 </property>
94 <property name="frameShadow">
95 <enum>Raised</enum>
96 </property>
97 </widget>
98 <widget class="QPushButton">
99 <property name="name">
100 <cstring>PushButtonSetManualTime</cstring>
101 </property> 109 </property>
102 <property name="text"> 110 <property stdset="1">
103 <string>Set time</string> 111 <name>text</name>
112 <string>Get time from network</string>
104 </property> 113 </property>
105 </widget> 114 </widget>
106 </vbox> 115 <widget row="0" column="0" >
107 </widget> 116 <class>QFrame</class>
108 <widget class="QWidget"> 117 <property stdset="1">
109 <property name="name"> 118 <name>name</name>
110 <cstring>TabSettings</cstring> 119 <cstring>FrameNtp</cstring>
111 </property>
112 <attribute name="title">
113 <string>Settings</string>
114 </attribute>
115 <grid>
116 <property name="name">
117 <cstring>unnamed</cstring>
118 </property>
119 <property name="margin">
120 <number>2</number>
121 </property>
122 <property name="spacing">
123 <number>2</number>
124 </property>
125 <widget class="QFrame" row="0" column="0">
126 <property name="name">
127 <cstring>FrameSettings</cstring>
128 </property> 120 </property>
129 <property name="frameShape"> 121 <property stdset="1">
122 <name>frameShape</name>
130 <enum>StyledPanel</enum> 123 <enum>StyledPanel</enum>
131 </property> 124 </property>
132 <property name="frameShadow"> 125 <property stdset="1">
126 <name>frameShadow</name>
133 <enum>Raised</enum> 127 <enum>Raised</enum>
134 </property> 128 </property>
135 <property name="layoutMargin" stdset="0"> 129 <property>
130 <name>layoutMargin</name>
136 </property> 131 </property>
137 <property name="layoutSpacing" stdset="0"> 132 <property>
133 <name>layoutSpacing</name>
138 </property> 134 </property>
139 <grid> 135 <grid>
140 <property name="name"> 136 <property stdset="1">
141 <cstring>unnamed</cstring> 137 <name>margin</name>
142 </property> 138 <number>2</number>
143 <property name="margin">
144 <number>3</number>
145 </property> 139 </property>
146 <property name="spacing"> 140 <property stdset="1">
147 <number>11</number> 141 <name>spacing</name>
142 <number>2</number>
148 </property> 143 </property>
149 <widget class="QLayoutWidget" row="0" column="0"> 144 <widget row="0" column="0" >
150 <property name="name"> 145 <class>QLayoutWidget</class>
151 <cstring>Layout6</cstring> 146 <property stdset="1">
147 <name>name</name>
148 <cstring>Layout4</cstring>
152 </property> 149 </property>
153 <grid> 150 <vbox>
154 <property name="name"> 151 <property stdset="1">
155 <cstring>unnamed</cstring> 152 <name>margin</name>
156 </property>
157 <property name="margin">
158 <number>0</number> 153 <number>0</number>
159 </property> 154 </property>
160 <property name="spacing"> 155 <property stdset="1">
156 <name>spacing</name>
161 <number>6</number> 157 <number>6</number>
162 </property> 158 </property>
163 <widget class="QLabel" row="0" column="0"> 159 <widget>
164 <property name="name"> 160 <class>QLabel</class>
165 <cstring>TextLabel7_2</cstring> 161 <property stdset="1">
166 </property> 162 <name>name</name>
167 <property name="text"> 163 <cstring>TextLabel1</cstring>
168 <string>Use</string>
169 </property> 164 </property>
170 </widget> 165 <property stdset="1">
171 <widget class="QLabel" row="0" column="2"> 166 <name>autoMask</name>
172 <property name="name"> 167 <bool>false</bool>
173 <cstring>TextLabel2_2</cstring>
174 </property> 168 </property>
175 <property name="text"> 169 <property stdset="1">
176 <string>as</string> 170 <name>text</name>
171 <string>Start Time:</string>
177 </property> 172 </property>
178 </widget> 173 </widget>
179 <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> 174 <widget>
180 <property name="name"> 175 <class>QLabel</class>
181 <cstring>TextLabel1_3</cstring> 176 <property stdset="1">
182 </property> 177 <name>name</name>
183 <property name="text"> 178 <cstring>TextLabelStartTime</cstring>
184 <string>NTP server to get the time from the network.</string>
185 </property>
186 <property name="alignment">
187 <set>WordBreak|AlignVCenter|AlignLeft</set>
188 </property> 179 </property>
189 <property name="wordwrap" stdset="0"> 180 <property stdset="1">
181 <name>text</name>
182 <string>nan</string>
190 </property> 183 </property>
191 </widget> 184 </widget>
192 <widget class="QComboBox" row="0" column="1"> 185 <widget>
193 <property name="name"> 186 <class>QLabel</class>
194 <cstring>ComboNtpSrv</cstring> 187 <property stdset="1">
188 <name>name</name>
189 <cstring>TextLabel3</cstring>
195 </property> 190 </property>
196 <property name="editable"> 191 <property stdset="1">
197 <bool>true</bool> 192 <name>text</name>
193 <string>Time Shift:</string>
198 </property> 194 </property>
199 </widget> 195 </widget>
200 </grid> 196 <widget>
201 </widget> 197 <class>QLabel</class>
202 <spacer row="3" column="0"> 198 <property stdset="1">
203 <property name="name"> 199 <name>name</name>
204 <cstring>Spacer2</cstring> 200 <cstring>TextLabelTimeShift</cstring>
205 </property>
206 <property name="orientation">
207 <enum>Vertical</enum>
208 </property>
209 <property name="sizeType">
210 <enum>Expanding</enum>
211 </property>
212 <property name="sizeHint">
213 <size>
214 <width>0</width>
215 <height>20</height>
216 </size>
217 </property>
218 </spacer>
219 <widget class="QLayoutWidget" row="2" column="0">
220 <property name="name">
221 <cstring>Layout7</cstring>
222 </property>
223 <grid>
224 <property name="name">
225 <cstring>unnamed</cstring>
226 </property>
227 <property name="margin">
228 <number>0</number>
229 </property>
230 <property name="spacing">
231 <number>6</number>
232 </property>
233 <widget class="QLabel" row="0" column="0">
234 <property name="name">
235 <cstring>TextLabel1_2</cstring>
236 </property> 201 </property>
237 <property name="text"> 202 <property stdset="1">
238 <string>Insure a delay of</string> 203 <name>text</name>
204 <string>nan</string>
239 </property> 205 </property>
240 </widget> 206 </widget>
241 <widget class="QLabel" row="0" column="2"> 207 <widget>
242 <property name="name"> 208 <class>QLabel</class>
243 <cstring>TextLabel2</cstring> 209 <property stdset="1">
210 <name>name</name>
211 <cstring>TextLabel5</cstring>
244 </property> 212 </property>
245 <property name="text"> 213 <property stdset="1">
246 <string>minutes until</string> 214 <name>text</name>
215 <string>New Time:</string>
247 </property> 216 </property>
248 </widget> 217 </widget>
249 <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3"> 218 <widget>
250 <property name="name"> 219 <class>QLabel</class>
251 <cstring>TextLabel3_3</cstring> 220 <property stdset="1">
252 </property> 221 <name>name</name>
253 <property name="text"> 222 <cstring>TextLabelNewTime</cstring>
254 <string>a new NTP lookup will be used to predict the time.</string>
255 </property>
256 <property name="alignment">
257 <set>WordBreak|AlignVCenter|AlignLeft</set>
258 </property> 223 </property>
259 <property name="wordwrap" stdset="0"> 224 <property stdset="1">
225 <name>text</name>
226 <string>nan</string>
260 </property> 227 </property>
261 </widget> 228 </widget>
262 <widget class="QSpinBox" row="0" column="1"> 229 <spacer>
263 <property name="name"> 230 <property>
264 <cstring>SpinBoxMinLookupDelay</cstring> 231 <name>name</name>
232 <cstring>Spacer1</cstring>
265 </property> 233 </property>
266 <property name="maxValue"> 234 <property stdset="1">
267 <number>9999999</number> 235 <name>orientation</name>
236 <enum>Vertical</enum>
268 </property> 237 </property>
269 <property name="minValue"> 238 <property stdset="1">
270 <number>42</number> 239 <name>sizeType</name>
240 <enum>Expanding</enum>
271 </property> 241 </property>
272 </widget> 242 <property>
273 </grid> 243 <name>sizeHint</name>
244 <size>
245 <width>20</width>
246 <height>20</height>
247 </size>
248 </property>
249 </spacer>
250 </vbox>
274 </widget> 251 </widget>
275 <widget class="QLayoutWidget" row="1" column="0"> 252 <widget row="1" column="0" >
276 <property name="name"> 253 <class>QMultiLineEdit</class>
277 <cstring>Layout7_2</cstring> 254 <property stdset="1">
255 <name>name</name>
256 <cstring>MultiLineEditntpOutPut</cstring>
257 </property>
258 <property stdset="1">
259 <name>font</name>
260 <font>
261 <pointsize>7</pointsize>
262 </font>
263 </property>
264 <property stdset="1">
265 <name>wordWrap</name>
266 <enum>WidgetWidth</enum>
267 </property>
268 <property stdset="1">
269 <name>text</name>
270 <string></string>
278 </property> 271 </property>
279 <grid>
280 <property name="name">
281 <cstring>unnamed</cstring>
282 </property>
283 <property name="margin">
284 <number>0</number>
285 </property>
286 <property name="spacing">
287 <number>6</number>
288 </property>
289 <widget class="QLabel" row="0" column="0">
290 <property name="name">
291 <cstring>TextLabel1_2_2</cstring>
292 </property>
293 <property name="sizePolicy">
294 <sizepolicy>
295 <hsizetype>1</hsizetype>
296 <vsizetype>1</vsizetype>
297 <horstretch>0</horstretch>
298 <verstretch>0</verstretch>
299 </sizepolicy>
300 </property>
301 <property name="text">
302 <string>Wait for </string>
303 </property>
304 </widget>
305 <widget class="QLabel" row="0" column="2">
306 <property name="name">
307 <cstring>TextLabel2_3</cstring>
308 </property>
309 <property name="text">
310 <string>minutes until</string>
311 </property>
312 </widget>
313 <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3">
314 <property name="name">
315 <cstring>TextLabel3_3_2</cstring>
316 </property>
317 <property name="text">
318 <string>NTP tries to syncronises the clock with the network.</string>
319 </property>
320 <property name="alignment">
321 <set>WordBreak|AlignVCenter|AlignLeft</set>
322 </property>
323 <property name="wordwrap" stdset="0">
324 </property>
325 </widget>
326 <widget class="QSpinBox" row="0" column="1">
327 <property name="name">
328 <cstring>SpinBoxNtpDelay</cstring>
329 </property>
330 <property name="maxValue">
331 <number>9999999</number>
332 </property>
333 <property name="minValue">
334 <number>0</number>
335 </property>
336 </widget>
337 </grid>
338 </widget> 272 </widget>
339 </grid> 273 </grid>
340 </widget> 274 </widget>
341 </grid> 275 </grid>
342 </widget> 276 </widget>
343 <widget class="QWidget"> 277 <widget>
344 <property name="name"> 278 <class>QWidget</class>
345 <cstring>tab</cstring> 279 <property stdset="1">
280 <name>name</name>
281 <cstring>tabPredict</cstring>
346 </property> 282 </property>
347 <attribute name="title"> 283 <attribute>
284 <name>title</name>
348 <string>Predict</string> 285 <string>Predict</string>
349 </attribute> 286 </attribute>
350 <grid> 287 <grid>
351 <property name="name"> 288 <property stdset="1">
352 <cstring>unnamed</cstring> 289 <name>margin</name>
353 </property>
354 <property name="margin">
355 <number>5</number> 290 <number>5</number>
356 </property> 291 </property>
357 <property name="spacing"> 292 <property stdset="1">
293 <name>spacing</name>
358 <number>6</number> 294 <number>6</number>
359 </property> 295 </property>
360 <widget class="QTable" row="0" column="0"> 296 <widget row="0" column="0" >
361 <property name="name"> 297 <class>QTable</class>
298 <property stdset="1">
299 <name>name</name>
362 <cstring>TableLookups</cstring> 300 <cstring>TableLookups</cstring>
363 </property> 301 </property>
364 <property name="font"> 302 <property stdset="1">
303 <name>font</name>
365 <font> 304 <font>
366 <pointsize>8</pointsize> 305 <pointsize>8</pointsize>
367 </font> 306 </font>
368 </property> 307 </property>
369 <property name="numRows"> 308 <property stdset="1">
309 <name>numRows</name>
370 <number>2</number> 310 <number>2</number>
371 </property> 311 </property>
372 <property name="numCols"> 312 <property stdset="1">
313 <name>numCols</name>
373 <number>2</number> 314 <number>2</number>
374 </property> 315 </property>
375 </widget> 316 </widget>
376 <widget class="QLayoutWidget" row="1" column="0"> 317 <widget row="1" column="0" >
377 <property name="name"> 318 <class>QLayoutWidget</class>
319 <property stdset="1">
320 <name>name</name>
378 <cstring>Layout9</cstring> 321 <cstring>Layout9</cstring>
379 </property> 322 </property>
380 <grid> 323 <grid>
381 <property name="name"> 324 <property stdset="1">
382 <cstring>unnamed</cstring> 325 <name>margin</name>
383 </property>
384 <property name="margin">
385 <number>0</number> 326 <number>0</number>
386 </property> 327 </property>
387 <property name="spacing"> 328 <property stdset="1">
329 <name>spacing</name>
388 <number>6</number> 330 <number>6</number>
389 </property> 331 </property>
390 <widget class="QLabel" row="0" column="1"> 332 <widget row="0" column="1" >
391 <property name="name"> 333 <class>QLabel</class>
334 <property stdset="1">
335 <name>name</name>
392 <cstring>TextLabelShift</cstring> 336 <cstring>TextLabelShift</cstring>
393 </property> 337 </property>
394 <property name="text"> 338 <property stdset="1">
339 <name>text</name>
395 <string>nan</string> 340 <string>nan</string>
396 </property> 341 </property>
397 </widget> 342 </widget>
398 <widget class="QLabel" row="1" column="0"> 343 <widget row="1" column="0" >
399 <property name="name"> 344 <class>QLabel</class>
345 <property stdset="1">
346 <name>name</name>
400 <cstring>TextLabel4</cstring> 347 <cstring>TextLabel4</cstring>
401 </property> 348 </property>
402 <property name="text"> 349 <property stdset="1">
350 <name>text</name>
403 <string>Esimated Shift:</string> 351 <string>Esimated Shift:</string>
404 </property> 352 </property>
405 </widget> 353 </widget>
406 <widget class="QLabel" row="1" column="1"> 354 <widget row="1" column="1" >
407 <property name="name"> 355 <class>QLabel</class>
356 <property stdset="1">
357 <name>name</name>
408 <cstring>TextLabelEstimatedShift</cstring> 358 <cstring>TextLabelEstimatedShift</cstring>
409 </property> 359 </property>
410 <property name="text"> 360 <property stdset="1">
361 <name>text</name>
411 <string>nan</string> 362 <string>nan</string>
412 </property> 363 </property>
413 </widget> 364 </widget>
414 <widget class="QLabel" row="2" column="0"> 365 <widget row="2" column="0" >
415 <property name="name"> 366 <class>QLabel</class>
367 <property stdset="1">
368 <name>name</name>
416 <cstring>TextLabel3_2</cstring> 369 <cstring>TextLabel3_2</cstring>
417 </property> 370 </property>
418 <property name="text"> 371 <property stdset="1">
372 <name>text</name>
419 <string>Predicted Time:</string> 373 <string>Predicted Time:</string>
420 </property> 374 </property>
421 </widget> 375 </widget>
422 <widget class="QLabel" row="0" column="0"> 376 <widget row="0" column="0" >
423 <property name="name"> 377 <class>QLabel</class>
378 <property stdset="1">
379 <name>name</name>
424 <cstring>Mean_shift_label</cstring> 380 <cstring>Mean_shift_label</cstring>
425 </property> 381 </property>
426 <property name="text"> 382 <property stdset="1">
383 <name>text</name>
427 <string>Mean shift:</string> 384 <string>Mean shift:</string>
428 </property> 385 </property>
429 </widget> 386 </widget>
430 <widget class="QLabel" row="2" column="1"> 387 <widget row="2" column="1" >
431 <property name="name"> 388 <class>QLabel</class>
389 <property stdset="1">
390 <name>name</name>
432 <cstring>TextLabelPredTime</cstring> 391 <cstring>TextLabelPredTime</cstring>
433 </property> 392 </property>
434 <property name="text"> 393 <property stdset="1">
394 <name>text</name>
435 <string>nan</string> 395 <string>nan</string>
436 </property> 396 </property>
437 </widget> 397 </widget>
438 </grid> 398 </grid>
439 </widget> 399 </widget>
440 <widget class="QLayoutWidget" row="2" column="0"> 400 <widget row="2" column="0" >
441 <property name="name"> 401 <class>QLayoutWidget</class>
402 <property stdset="1">
403 <name>name</name>
442 <cstring>Layout11</cstring> 404 <cstring>Layout11</cstring>
443 </property> 405 </property>
444 <hbox> 406 <hbox>
445 <property name="name"> 407 <property stdset="1">
446 <cstring>unnamed</cstring> 408 <name>margin</name>
447 </property>
448 <property name="margin">
449 <number>0</number> 409 <number>0</number>
450 </property> 410 </property>
451 <property name="spacing"> 411 <property stdset="1">
412 <name>spacing</name>
452 <number>6</number> 413 <number>6</number>
453 </property> 414 </property>
454 <widget class="QPushButton"> 415 <widget>
455 <property name="name"> 416 <class>QPushButton</class>
417 <property stdset="1">
418 <name>name</name>
456 <cstring>PushButtonSetPredTime</cstring> 419 <cstring>PushButtonSetPredTime</cstring>
457 </property> 420 </property>
458 <property name="text"> 421 <property stdset="1">
422 <name>text</name>
459 <string>Set predicted time</string> 423 <string>Set predicted time</string>
460 </property> 424 </property>
461 </widget> 425 </widget>
462 <widget class="QPushButton"> 426 <widget>
463 <property name="name"> 427 <class>QPushButton</class>
428 <property stdset="1">
429 <name>name</name>
464 <cstring>PushButtonPredict</cstring> 430 <cstring>PushButtonPredict</cstring>
465 </property> 431 </property>
466 <property name="text"> 432 <property stdset="1">
433 <name>text</name>
467 <string>Predict time</string> 434 <string>Predict time</string>
468 </property> 435 </property>
469 </widget> 436 </widget>
470 </hbox> 437 </hbox>
471 </widget> 438 </widget>
472 </grid> 439 </grid>
473 </widget> 440 </widget>
474 <widget class="QWidget"> 441 <widget>
475 <property name="name"> 442 <class>QWidget</class>
476 <cstring>tabNtp</cstring> 443 <property stdset="1">
444 <name>name</name>
445 <cstring>TabSettings</cstring>
477 </property> 446 </property>
478 <attribute name="title"> 447 <attribute>
479 <string>NTP</string> 448 <name>title</name>
449 <string>Settings</string>
480 </attribute> 450 </attribute>
481 <grid> 451 <grid>
482 <property name="name"> 452 <property stdset="1">
483 <cstring>unnamed</cstring> 453 <name>margin</name>
484 </property> 454 <number>2</number>
485 <property name="margin">
486 <number>1</number>
487 </property> 455 </property>
488 <property name="spacing"> 456 <property stdset="1">
457 <name>spacing</name>
489 <number>2</number> 458 <number>2</number>
490 </property> 459 </property>
491 <widget class="QPushButton" row="1" column="0"> 460 <widget row="0" column="0" >
492 <property name="name"> 461 <class>QFrame</class>
493 <cstring>runNtp</cstring> 462 <property stdset="1">
494 </property> 463 <name>name</name>
495 <property name="text"> 464 <cstring>FrameSettings</cstring>
496 <string>Get time from network</string>
497 </property>
498 </widget>
499 <widget class="QFrame" row="0" column="0">
500 <property name="name">
501 <cstring>FrameNtp</cstring>
502 </property> 465 </property>
503 <property name="frameShape"> 466 <property stdset="1">
467 <name>frameShape</name>
504 <enum>StyledPanel</enum> 468 <enum>StyledPanel</enum>
505 </property> 469 </property>
506 <property name="frameShadow"> 470 <property stdset="1">
471 <name>frameShadow</name>
507 <enum>Raised</enum> 472 <enum>Raised</enum>
508 </property> 473 </property>
509 <property name="layoutMargin" stdset="0"> 474 <property>
475 <name>layoutMargin</name>
510 </property> 476 </property>
511 <property name="layoutSpacing" stdset="0"> 477 <property>
478 <name>layoutSpacing</name>
512 </property> 479 </property>
513 <grid> 480 <vbox>
514 <property name="name"> 481 <property stdset="1">
515 <cstring>unnamed</cstring> 482 <name>margin</name>
516 </property> 483 <number>11</number>
517 <property name="margin">
518 <number>2</number>
519 </property> 484 </property>
520 <property name="spacing"> 485 <property stdset="1">
521 <number>2</number> 486 <name>spacing</name>
487 <number>6</number>
522 </property> 488 </property>
523 <widget class="QLayoutWidget" row="0" column="0"> 489 <widget>
524 <property name="name"> 490 <class>QLayoutWidget</class>
525 <cstring>Layout4</cstring> 491 <property stdset="1">
492 <name>name</name>
493 <cstring>Layout6</cstring>
526 </property> 494 </property>
527 <vbox> 495 <grid>
528 <property name="name"> 496 <property stdset="1">
529 <cstring>unnamed</cstring> 497 <name>margin</name>
530 </property>
531 <property name="margin">
532 <number>0</number> 498 <number>0</number>
533 </property> 499 </property>
534 <property name="spacing"> 500 <property stdset="1">
501 <name>spacing</name>
535 <number>6</number> 502 <number>6</number>
536 </property> 503 </property>
537 <widget class="QLabel"> 504 <widget row="0" column="0" >
538 <property name="name"> 505 <class>QLabel</class>
539 <cstring>TextLabel1</cstring> 506 <property stdset="1">
507 <name>name</name>
508 <cstring>TextLabel7_2</cstring>
540 </property> 509 </property>
541 <property name="autoMask"> 510 <property stdset="1">
542 <bool>false</bool> 511 <name>text</name>
512 <string>Use</string>
543 </property> 513 </property>
544 <property name="text"> 514 </widget>
545 <string>Start Time:</string> 515 <widget row="0" column="2" >
516 <class>QLabel</class>
517 <property stdset="1">
518 <name>name</name>
519 <cstring>TextLabel2_2</cstring>
520 </property>
521 <property stdset="1">
522 <name>text</name>
523 <string>as</string>
546 </property> 524 </property>
547 </widget> 525 </widget>
548 <widget class="QLabel"> 526 <widget row="1" column="0" rowspan="1" colspan="2" >
549 <property name="name"> 527 <class>QLabel</class>
550 <cstring>TextLabelStartTime</cstring> 528 <property stdset="1">
529 <name>name</name>
530 <cstring>TextLabel1_3</cstring>
551 </property> 531 </property>
552 <property name="text"> 532 <property stdset="1">
553 <string>nan</string> 533 <name>text</name>
534 <string>NTP server to get the time from the network.</string>
535 </property>
536 <property stdset="1">
537 <name>alignment</name>
538 <set>WordBreak|AlignVCenter|AlignLeft</set>
539 </property>
540 <property>
541 <name>wordwrap</name>
554 </property> 542 </property>
555 </widget> 543 </widget>
556 <widget class="QLabel"> 544 <widget row="0" column="1" >
557 <property name="name"> 545 <class>QComboBox</class>
558 <cstring>TextLabel3</cstring> 546 <property stdset="1">
547 <name>name</name>
548 <cstring>ComboNtpSrv</cstring>
559 </property> 549 </property>
560 <property name="text"> 550 <property stdset="1">
561 <string>Time Shift:</string> 551 <name>editable</name>
552 <bool>true</bool>
562 </property> 553 </property>
563 </widget> 554 </widget>
564 <widget class="QLabel"> 555 </grid>
565 <property name="name"> 556 </widget>
566 <cstring>TextLabelTimeShift</cstring> 557 <spacer>
558 <property>
559 <name>name</name>
560 <cstring>Spacer3</cstring>
561 </property>
562 <property stdset="1">
563 <name>orientation</name>
564 <enum>Vertical</enum>
565 </property>
566 <property stdset="1">
567 <name>sizeType</name>
568 <enum>Minimum</enum>
569 </property>
570 <property>
571 <name>sizeHint</name>
572 <size>
573 <width>20</width>
574 <height>20</height>
575 </size>
576 </property>
577 </spacer>
578 <widget>
579 <class>QCheckBox</class>
580 <property stdset="1">
581 <name>name</name>
582 <cstring>CheckBoxAdvSettings</cstring>
583 </property>
584 <property stdset="1">
585 <name>text</name>
586 <string>Advanced settings</string>
587 </property>
588 </widget>
589 <spacer>
590 <property>
591 <name>name</name>
592 <cstring>Spacer4</cstring>
593 </property>
594 <property stdset="1">
595 <name>orientation</name>
596 <enum>Vertical</enum>
597 </property>
598 <property stdset="1">
599 <name>sizeType</name>
600 <enum>Expanding</enum>
601 </property>
602 <property>
603 <name>sizeHint</name>
604 <size>
605 <width>20</width>
606 <height>20</height>
607 </size>
608 </property>
609 </spacer>
610 <widget>
611 <class>Line</class>
612 <property stdset="1">
613 <name>name</name>
614 <cstring>Line1</cstring>
615 </property>
616 <property stdset="1">
617 <name>orientation</name>
618 <enum>Horizontal</enum>
619 </property>
620 </widget>
621 <widget>
622 <class>QLayoutWidget</class>
623 <property stdset="1">
624 <name>name</name>
625 <cstring>Layout7_2</cstring>
626 </property>
627 <grid>
628 <property stdset="1">
629 <name>margin</name>
630 <number>0</number>
631 </property>
632 <property stdset="1">
633 <name>spacing</name>
634 <number>6</number>
635 </property>
636 <widget row="0" column="0" >
637 <class>QLabel</class>
638 <property stdset="1">
639 <name>name</name>
640 <cstring>TextLabel1_2_2</cstring>
567 </property> 641 </property>
568 <property name="text"> 642 <property stdset="1">
569 <string>nan</string> 643 <name>sizePolicy</name>
644 <sizepolicy>
645 <hsizetype>1</hsizetype>
646 <vsizetype>1</vsizetype>
647 </sizepolicy>
648 </property>
649 <property stdset="1">
650 <name>text</name>
651 <string>Wait for </string>
570 </property> 652 </property>
571 </widget> 653 </widget>
572 <widget class="QLabel"> 654 <widget row="0" column="2" >
573 <property name="name"> 655 <class>QLabel</class>
574 <cstring>TextLabel5</cstring> 656 <property stdset="1">
657 <name>name</name>
658 <cstring>TextLabel2_3</cstring>
575 </property> 659 </property>
576 <property name="text"> 660 <property stdset="1">
577 <string>New Time:</string> 661 <name>text</name>
662 <string>minutes until</string>
578 </property> 663 </property>
579 </widget> 664 </widget>
580 <widget class="QLabel"> 665 <widget row="1" column="0" rowspan="1" colspan="3" >
581 <property name="name"> 666 <class>QLabel</class>
582 <cstring>TextLabelNewTime</cstring> 667 <property stdset="1">
668 <name>name</name>
669 <cstring>TextLabel3_3_2</cstring>
583 </property> 670 </property>
584 <property name="text"> 671 <property stdset="1">
585 <string>nan</string> 672 <name>text</name>
673 <string>NTP tries to syncronises the clock with the network.</string>
674 </property>
675 <property stdset="1">
676 <name>alignment</name>
677 <set>WordBreak|AlignVCenter|AlignLeft</set>
678 </property>
679 <property>
680 <name>wordwrap</name>
586 </property> 681 </property>
587 </widget> 682 </widget>
588 <spacer> 683 <widget row="0" column="1" >
589 <property name="name"> 684 <class>QSpinBox</class>
590 <cstring>Spacer1</cstring> 685 <property stdset="1">
686 <name>name</name>
687 <cstring>SpinBoxNtpDelay</cstring>
591 </property> 688 </property>
592 <property name="orientation"> 689 <property stdset="1">
593 <enum>Vertical</enum> 690 <name>wrapping</name>
691 <bool>true</bool>
594 </property> 692 </property>
595 <property name="sizeType"> 693 <property stdset="1">
596 <enum>Expanding</enum> 694 <name>maxValue</name>
695 <number>9999999</number>
597 </property> 696 </property>
598 <property name="sizeHint"> 697 <property stdset="1">
599 <size> 698 <name>minValue</name>
600 <width>0</width> 699 <number>1</number>
601 <height>20</height>
602 </size>
603 </property> 700 </property>
604 </spacer> 701 <property stdset="1">
605 </vbox> 702 <name>value</name>
703 <number>1440</number>
704 </property>
705 </widget>
706 </grid>
606 </widget> 707 </widget>
607 <widget class="QMultiLineEdit" row="1" column="0"> 708 <widget>
608 <property name="name"> 709 <class>QLayoutWidget</class>
609 <cstring>MultiLineEditntpOutPut</cstring> 710 <property stdset="1">
610 </property> 711 <name>name</name>
611 <property name="font"> 712 <cstring>Layout7</cstring>
612 <font>
613 <pointsize>7</pointsize>
614 </font>
615 </property>
616 <property name="text">
617 <string></string>
618 </property>
619 <property name="wordWrap">
620 <enum>WidgetWidth</enum>
621 </property> 713 </property>
714 <grid>
715 <property stdset="1">
716 <name>margin</name>
717 <number>0</number>
718 </property>
719 <property stdset="1">
720 <name>spacing</name>
721 <number>6</number>
722 </property>
723 <widget row="0" column="0" >
724 <class>QLabel</class>
725 <property stdset="1">
726 <name>name</name>
727 <cstring>TextLabel1_2</cstring>
728 </property>
729 <property stdset="1">
730 <name>text</name>
731 <string>Insure a delay of</string>
732 </property>
733 </widget>
734 <widget row="0" column="2" >
735 <class>QLabel</class>
736 <property stdset="1">
737 <name>name</name>
738 <cstring>TextLabel2</cstring>
739 </property>
740 <property stdset="1">
741 <name>text</name>
742 <string>minutes until</string>
743 </property>
744 </widget>
745 <widget row="1" column="0" rowspan="1" colspan="3" >
746 <class>QLabel</class>
747 <property stdset="1">
748 <name>name</name>
749 <cstring>TextLabel3_3</cstring>
750 </property>
751 <property stdset="1">
752 <name>text</name>
753 <string>a new NTP lookup will be used to predict the time.</string>
754 </property>
755 <property stdset="1">
756 <name>alignment</name>
757 <set>WordBreak|AlignVCenter|AlignLeft</set>
758 </property>
759 <property>
760 <name>wordwrap</name>
761 </property>
762 </widget>
763 <widget row="0" column="1" >
764 <class>QSpinBox</class>
765 <property stdset="1">
766 <name>name</name>
767 <cstring>SpinBoxMinLookupDelay</cstring>
768 </property>
769 <property stdset="1">
770 <name>wrapping</name>
771 <bool>true</bool>
772 </property>
773 <property stdset="1">
774 <name>maxValue</name>
775 <number>9999999</number>
776 </property>
777 <property stdset="1">
778 <name>minValue</name>
779 <number>42</number>
780 </property>
781 <property stdset="1">
782 <name>value</name>
783 <number>720</number>
784 </property>
785 </widget>
786 </grid>
622 </widget> 787 </widget>
623 </grid> 788 </vbox>
624 </widget> 789 </widget>
625 </grid> 790 </grid>
626 </widget> 791 </widget>
792 <widget>
793 <class>QWidget</class>
794 <property stdset="1">
795 <name>name</name>
796 <cstring>tabManualSetTime</cstring>
797 </property>
798 <attribute>
799 <name>title</name>
800 <string>Manual</string>
801 </attribute>
802 <vbox>
803 <property stdset="1">
804 <name>margin</name>
805 <number>2</number>
806 </property>
807 <property stdset="1">
808 <name>spacing</name>
809 <number>2</number>
810 </property>
811 <widget>
812 <class>QFrame</class>
813 <property stdset="1">
814 <name>name</name>
815 <cstring>FrameSetTime</cstring>
816 </property>
817 <property stdset="1">
818 <name>frameShape</name>
819 <enum>StyledPanel</enum>
820 </property>
821 <property stdset="1">
822 <name>frameShadow</name>
823 <enum>Raised</enum>
824 </property>
825 </widget>
826 <widget>
827 <class>QPushButton</class>
828 <property stdset="1">
829 <name>name</name>
830 <cstring>PushButtonSetManualTime</cstring>
831 </property>
832 <property stdset="1">
833 <name>text</name>
834 <string>Set time</string>
835 </property>
836 </widget>
837 </vbox>
838 </widget>
627 </widget> 839 </widget>
628 </grid> 840 </grid>
629</widget> 841</widget>
630<layoutdefaults spacing="6" margin="11"/>
631</UI> 842</UI>