-rw-r--r-- | noncore/settings/netsystemtime/netsystemtime.pro | 6 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 38 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntp.h | 52 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntpbase.cpp | 33 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntpbase.h | 4 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntpbase.ui | 62 |
6 files changed, 106 insertions, 89 deletions
diff --git a/noncore/settings/netsystemtime/netsystemtime.pro b/noncore/settings/netsystemtime/netsystemtime.pro index 898e400..a849431 100644 --- a/noncore/settings/netsystemtime/netsystemtime.pro +++ b/noncore/settings/netsystemtime/netsystemtime.pro | |||
@@ -1,26 +1,26 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on debug | 2 | CONFIG = qt warn_on debug |
3 | #CONFIG = qt warn_on release | 3 | #CONFIG = qt warn_on release |
4 | HEADERS = ntp.h settime.h ntpbase.h | 4 | HEADERS = ntp.h settime.h |
5 | SOURCES = main.cpp ntp.cpp settime.cpp ntpbase.cpp | 5 | SOURCES = main.cpp ntp.cpp settime.cpp |
6 | INCLUDEPATH+= $(OPIEDIR)/include | 6 | INCLUDEPATH+= $(OPIEDIR)/include |
7 | DEPENDPATH+= $(OPIEDIR)/include | 7 | DEPENDPATH+= $(OPIEDIR)/include |
8 | LIBS += -lqpe -lopie | 8 | LIBS += -lqpe -lopie |
9 | INTERFACES= | 9 | INTERFACES= ntpbase.ui |
10 | DESTDIR = $(OPIEDIR)/bin | 10 | DESTDIR = $(OPIEDIR)/bin |
11 | TARGET = systemtime | 11 | TARGET = systemtime |
12 | 12 | ||
13 | TRANSLATIONS = ../../../i18n/de/systemtime.ts \ | 13 | TRANSLATIONS = ../../../i18n/de/systemtime.ts \ |
14 | ../../../i18n/en/systemtime.ts \ | 14 | ../../../i18n/en/systemtime.ts \ |
15 | ../../../i18n/es/systemtime.ts \ | 15 | ../../../i18n/es/systemtime.ts \ |
16 | ../../../i18n/fr/systemtime.ts \ | 16 | ../../../i18n/fr/systemtime.ts \ |
17 | ../../../i18n/hu/systemtime.ts \ | 17 | ../../../i18n/hu/systemtime.ts \ |
18 | ../../../i18n/ja/systemtime.ts \ | 18 | ../../../i18n/ja/systemtime.ts \ |
19 | ../../../i18n/ko/systemtime.ts \ | 19 | ../../../i18n/ko/systemtime.ts \ |
20 | ../../../i18n/no/systemtime.ts \ | 20 | ../../../i18n/no/systemtime.ts \ |
21 | ../../../i18n/pl/systemtime.ts \ | 21 | ../../../i18n/pl/systemtime.ts \ |
22 | ../../../i18n/pt/systemtime.ts \ | 22 | ../../../i18n/pt/systemtime.ts \ |
23 | ../../../i18n/pt_BR/systemtime.ts \ | 23 | ../../../i18n/pt_BR/systemtime.ts \ |
24 | ../../../i18n/sl/systemtime.ts \ | 24 | ../../../i18n/sl/systemtime.ts \ |
25 | ../../../i18n/zh_CN/systemtime.ts \ | 25 | ../../../i18n/zh_CN/systemtime.ts \ |
26 | ../../../i18n/zh_TW/systemtime.ts | 26 | ../../../i18n/zh_TW/systemtime.ts |
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index 40805a0..111f7d4 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp | |||
@@ -1,207 +1,233 @@ | |||
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> | 10 | #include <qcheckbox.h> |
11 | #include <qtabwidget.h> | 11 | #include <qtabwidget.h> |
12 | #include <qlayout.h> | 12 | #include <qlayout.h> |
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | #include <qmultilineedit.h> | 14 | #include <qmultilineedit.h> |
15 | #include <opie/oprocess.h> | 15 | #include <opie/oprocess.h> |
16 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qpe/global.h> | 18 | #include <qpe/global.h> |
19 | #include <qpe/timeconversion.h> | 19 | #include <qpe/timeconversion.h> |
20 | #include <qpe/tzselect.h> | 20 | #include <qpe/tzselect.h> |
21 | #include <qpe/timestring.h> | 21 | #include <qpe/timestring.h> |
22 | #include <qpe/qpedialog.h> | 22 | #include <qpe/qpedialog.h> |
23 | #include <qpe/datebookdb.h> | 23 | #include <qpe/datebookdb.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <sys/time.h> | 25 | #include <sys/time.h> |
26 | #include <time.h> | 26 | #include <time.h> |
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | 28 | ||
29 | 29 | ||
30 | Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) | 30 | Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) |
31 | : SetDateTime( parent, name, fl ) | 31 | : SetDateTime( parent, name, fl ) |
32 | { | 32 | { |
33 | Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File); | 33 | Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File); |
34 | ntpSrvs.setGroup("servers"); | 34 | ntpSrvs.setGroup("servers"); |
35 | int srvCount = ntpSrvs.readNumEntry("count", 0 ); | 35 | int srvCount = ntpSrvs.readNumEntry("count", 0 ); |
36 | for (int i = 0; i < srvCount; i++) | 36 | for (int i = 0; i < srvCount; i++) |
37 | { | 37 | { |
38 | ntpSrvs.setGroup(QString::number(i)); | 38 | ntpSrvs.setGroup(QString::number(i)); |
39 | ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") ); | 39 | ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") ); |
40 | } | 40 | } |
41 | if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de")); | 41 | if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de")); |
42 | 42 | ||
43 | Config cfg("ntp",Config::User); | 43 | Config cfg("ntp",Config::User); |
44 | cfg.setGroup("settings"); | 44 | cfg.setGroup("settings"); |
45 | SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",720) ); | 45 | SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",720) ); |
46 | SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",1440) ); | 46 | SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",1440) ); |
47 | ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) ); | 47 | ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) ); |
48 | 48 | ||
49 | //make tab order | ||
50 | |||
51 | TabWidgetMain->removePage( tabMain ); | ||
52 | TabWidgetMain->removePage( tabManualSetTime ); | ||
53 | TabWidgetMain->removePage( TabSettings ); | ||
54 | TabWidgetMain->removePage( tabPredict ); | ||
55 | TabWidgetMain->removePage( tabNtp ); | ||
56 | |||
57 | TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); | ||
58 | TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); | ||
59 | TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); | ||
60 | TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); | ||
61 | TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); | ||
62 | NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); | ||
63 | |||
64 | |||
65 | |||
49 | bool advMode = cfg.readBoolEntry("advancedFeatures", false ); | 66 | bool advMode = cfg.readBoolEntry("advancedFeatures", false ); |
50 | showAdvancedFeatures(advMode); | 67 | showAdvancedFeatures(advMode); |
51 | CheckBoxAdvSettings->setChecked( advMode ); | 68 | CheckBoxAdvSettings->setChecked( advMode ); |
52 | connect( CheckBoxAdvSettings, SIGNAL( toggled( bool ) ), | 69 | connect( CheckBoxAdvSettings, SIGNAL( toggled( bool ) ), |
53 | SLOT( showAdvancedFeatures( bool ) ) ); | 70 | SLOT( showAdvancedFeatures( bool ) ) ); |
54 | 71 | ||
55 | makeChannel(); | 72 | makeChannel(); |
56 | 73 | ||
57 | ntpTimer = new QTimer(this); | 74 | ntpTimer = new QTimer(this); |
58 | 75 | ||
59 | ntpProcess = new OProcess( ); | 76 | ntpProcess = new OProcess( ); |
60 | connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ), | 77 | connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ), |
61 | SLOT(slotNtpDelayChanged(int)) ); | 78 | SLOT(slotNtpDelayChanged(int)) ); |
62 | 79 | ||
63 | ntpSock = new QSocket( this ); | 80 | ntpSock = new QSocket( this ); |
64 | connect( ntpSock, SIGNAL( error(int) ), | 81 | connect( ntpSock, SIGNAL( error(int) ), |
65 | SLOT(slotCheckNtp(int)) ); | 82 | SLOT(slotCheckNtp(int)) ); |
66 | slotProbeNtpServer(); | 83 | slotProbeNtpServer(); |
67 | 84 | ||
68 | connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), | 85 | connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), |
69 | this, SLOT(getNtpOutput(OProcess*,char*,int))); | 86 | this, SLOT(getNtpOutput(OProcess*,char*,int))); |
70 | connect ( ntpProcess, SIGNAL(processExited(OProcess*)), | 87 | connect ( ntpProcess, SIGNAL(processExited(OProcess*)), |
71 | this, SLOT(ntpFinished(OProcess*))); | 88 | this, SLOT(ntpFinished(OProcess*))); |
72 | connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); | 89 | connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); |
73 | connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); | 90 | connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); |
74 | connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime())); | 91 | connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime())); |
75 | slotCheckNtp(-1); | 92 | slotCheckNtp(-1); |
76 | readLookups(); | 93 | readLookups(); |
77 | } | 94 | } |
78 | 95 | ||
79 | Ntp::~Ntp() | 96 | Ntp::~Ntp() |
80 | { | 97 | { |
81 | delete ntpProcess; | 98 | delete ntpProcess; |
82 | Config ntpSrvs("/etc/ntpservers",Config::File); | 99 | Config ntpSrvs("/etc/ntpservers",Config::File); |
83 | ntpSrvs.setGroup("servers"); | 100 | ntpSrvs.setGroup("servers"); |
84 | int srvCount = ComboNtpSrv->count(); | 101 | int srvCount = ComboNtpSrv->count(); |
85 | ntpSrvs.writeEntry("count", srvCount); | 102 | ntpSrvs.writeEntry("count", srvCount); |
86 | for (int i = 0; i < srvCount; i++){ | 103 | for (int i = 0; i < srvCount; i++){ |
87 | ntpSrvs.setGroup(QString::number(i)); | 104 | ntpSrvs.setGroup(QString::number(i)); |
88 | ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) ); | 105 | ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) ); |
89 | } | 106 | } |
90 | Config cfg("ntp",Config::User); | 107 | Config cfg("ntp",Config::User); |
91 | cfg.setGroup("settings"); | 108 | cfg.setGroup("settings"); |
92 | cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem()); | 109 | cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem()); |
93 | cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() ); | 110 | cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() ); |
94 | cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() ); | 111 | cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() ); |
95 | cfg.writeEntry( "advancedFeatures", CheckBoxAdvSettings->isChecked() ); | 112 | cfg.writeEntry( "advancedFeatures", CheckBoxAdvSettings->isChecked() ); |
96 | } | 113 | } |
97 | 114 | ||
98 | bool Ntp::ntpDelayElapsed() | 115 | bool Ntp::ntpDelayElapsed() |
99 | { | 116 | { |
100 | Config cfg("ntp",Config::User); | 117 | Config cfg("ntp",Config::User); |
101 | cfg.setGroup("lookups"); | 118 | cfg.setGroup("lookups"); |
102 | _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); | 119 | _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); |
103 | if (_lookupDiff < 0) return true; | 120 | if (_lookupDiff < 0) return true; |
104 | int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); | 121 | int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); |
105 | return i > -60; | 122 | return i > -60; |
106 | } | 123 | } |
107 | 124 | ||
108 | QString Ntp::getNtpServer() | 125 | QString Ntp::getNtpServer() |
109 | { | 126 | { |
110 | return ComboNtpSrv->currentText(); | 127 | return ComboNtpSrv->currentText(); |
111 | } | 128 | } |
112 | 129 | ||
113 | void Ntp::slotRunNtp() | 130 | void Ntp::slotRunNtp() |
114 | { | 131 | { |
115 | if ( !ntpDelayElapsed() ) | 132 | if ( !ntpDelayElapsed() && CheckBoxAdvSettings->isChecked() ) |
116 | { | 133 | { |
117 | switch ( | 134 | switch ( |
118 | QMessageBox::warning(this, tr("Run NTP?"), | 135 | QMessageBox::warning(this, tr("Run NTP?"), |
119 | tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+ | 136 | tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+ |
120 | QString::number(_lookupDiff/60)+tr(" minutes elapsed since last lookup.")+ | 137 | QString::number(_lookupDiff/60)+tr(" minutes elapsed since last lookup.")+ |
121 | "<br>"+tr("Rerun NTP?"), | 138 | "<br>"+tr("Rerun NTP?"), |
122 | QMessageBox::Ok,QMessageBox::Cancel) | 139 | QMessageBox::Ok,QMessageBox::Cancel) |
123 | ) { | 140 | ) { |
124 | case QMessageBox::Ok: break; | 141 | case QMessageBox::Ok: break; |
125 | case QMessageBox::Cancel: return; | 142 | case QMessageBox::Cancel: return; |
126 | default: return; | 143 | default: return; |
127 | } | 144 | } |
128 | } | 145 | } |
129 | TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); | 146 | TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); |
130 | ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); | 147 | ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); |
131 | 148 | ||
132 | ntpProcess->clearArguments(); | 149 | ntpProcess->clearArguments(); |
133 | *ntpProcess << "ntpdate" << getNtpServer(); | 150 | *ntpProcess << "ntpdate" << getNtpServer(); |
134 | bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); | 151 | bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); |
135 | if ( !ret ) { | 152 | if ( !ret ) { |
153 | QMessageBox::critical(this, tr("ntp error"), | ||
154 | tr("Error while getting time form network!")); | ||
136 | qDebug("Error while executing ntpdate"); | 155 | qDebug("Error while executing ntpdate"); |
137 | ntpOutPut( tr("Error while executing ntpdate")); | 156 | ntpOutPut( tr("Error while executing ntpdate")); |
138 | } | 157 | } |
139 | } | 158 | } |
140 | 159 | ||
141 | void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) | 160 | void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) |
142 | { | 161 | { |
162 | if (! proc ) qDebug("Ntp::getNtpOutput OProcess is null"); | ||
143 | QString lineStr, lineStrOld; | 163 | QString lineStr, lineStrOld; |
144 | lineStr = buffer; | 164 | lineStr = buffer; |
145 | lineStr=lineStr.left(buflen); | 165 | lineStr=lineStr.left(buflen); |
146 | if (lineStr!=lineStrOld) | 166 | if (lineStr!=lineStrOld) |
147 | { | 167 | { |
148 | ntpOutPut(lineStr); | 168 | ntpOutPut(lineStr); |
149 | _ntpOutput += lineStr; | 169 | _ntpOutput += lineStr; |
150 | } | 170 | } |
151 | lineStrOld = lineStr; | 171 | lineStrOld = lineStr; |
152 | } | 172 | } |
153 | 173 | ||
154 | void Ntp::ntpFinished(OProcess *p) | 174 | void Ntp::ntpFinished(OProcess *p) |
155 | { | 175 | { |
156 | //qDebug("p->exitStatus() %i",p->exitStatus()); | 176 | qDebug("p->exitStatus() %i",p->exitStatus()); |
157 | if (p->exitStatus()!=0 || !p->normalExit()) | 177 | if (p->exitStatus()!=0 || !p->normalExit()) |
158 | { | 178 | { |
159 | slotProbeNtpServer(); | 179 | QMessageBox::critical(this, tr("ntp error"), |
180 | tr("Error while getting time form\n server")+ | ||
181 | getNtpServer()+"\n"+ | ||
182 | _ntpOutput ); | ||
183 | // TabWidgetMain->setCurrentPage( 1 ); | ||
184 | TabWidgetMain->showPage( tabManualSetTime ); | ||
185 | |||
160 | return; | 186 | return; |
161 | } | 187 | } |
162 | 188 | ||
163 | Global::writeHWClock(); | 189 | Global::writeHWClock(); |
164 | // since time has changed quickly load in the datebookdb | 190 | // since time has changed quickly load in the datebookdb |
165 | // to allow the alarm server to get a better grip on itself | 191 | // to allow the alarm server to get a better grip on itself |
166 | // (example re-trigger alarms for when we travel back in time) | 192 | // (example re-trigger alarms for when we travel back in time) |
167 | DateBookDB db; | 193 | DateBookDB db; |
168 | 194 | ||
169 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); | 195 | // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); |
170 | // timeApplet << ""; | 196 | // timeApplet << ""; |
171 | 197 | ||
172 | Config cfg("ntp",Config::User); | 198 | Config cfg("ntp",Config::User); |
173 | cfg.setGroup("lookups"); | 199 | cfg.setGroup("lookups"); |
174 | int lastLookup = cfg.readNumEntry("time",0); | 200 | int lastLookup = cfg.readNumEntry("time",0); |
175 | int lookupCount = cfg.readNumEntry("count",0); | 201 | int lookupCount = cfg.readNumEntry("count",0); |
176 | bool lastNtp = cfg.readBoolEntry("lastNtp",false); | 202 | bool lastNtp = cfg.readBoolEntry("lastNtp",false); |
177 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); | 203 | int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); |
178 | cfg.writeEntry("time", time); | 204 | cfg.writeEntry("time", time); |
179 | 205 | ||
180 | float timeShift = getTimeShift(); | 206 | float timeShift = getTimeShift(); |
181 | if (timeShift == 0.0) return; | 207 | if (timeShift == 0.0) return; |
182 | int secsSinceLast = time - lastLookup; | 208 | int secsSinceLast = time - lastLookup; |
183 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); | 209 | TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); |
184 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); | 210 | TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); |
185 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) | 211 | if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) |
186 | { | 212 | { |
187 | cfg.setGroup("lookup_"+QString::number(lookupCount)); | 213 | cfg.setGroup("lookup_"+QString::number(lookupCount)); |
188 | lookupCount++; | 214 | lookupCount++; |
189 | _shiftPerSec = timeShift / secsSinceLast; | 215 | _shiftPerSec = timeShift / secsSinceLast; |
190 | qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); | 216 | qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); |
191 | cfg.writeEntry("secsSinceLast",secsSinceLast); | 217 | cfg.writeEntry("secsSinceLast",secsSinceLast); |
192 | cfg.writeEntry("timeShift",QString::number(timeShift)); | 218 | cfg.writeEntry("timeShift",QString::number(timeShift)); |
193 | cfg.setGroup("lookups"); | 219 | cfg.setGroup("lookups"); |
194 | cfg.writeEntry("count",lookupCount); | 220 | cfg.writeEntry("count",lookupCount); |
195 | cfg.writeEntry("lastNtp",true); | 221 | cfg.writeEntry("lastNtp",true); |
196 | } | 222 | } |
197 | } | 223 | } |
198 | 224 | ||
199 | 225 | ||
200 | float Ntp::getTimeShift() | 226 | float Ntp::getTimeShift() |
201 | { | 227 | { |
202 | QString _offset = "offset"; | 228 | QString _offset = "offset"; |
203 | QString _sec = "sec"; | 229 | QString _sec = "sec"; |
204 | QRegExp _reOffset = QRegExp(_offset); | 230 | QRegExp _reOffset = QRegExp(_offset); |
205 | QRegExp _reEndOffset = QRegExp(_sec); | 231 | QRegExp _reEndOffset = QRegExp(_sec); |
206 | int posOffset = _reOffset.match( _ntpOutput ); | 232 | int posOffset = _reOffset.match( _ntpOutput ); |
207 | int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset ); | 233 | int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset ); |
@@ -262,111 +288,113 @@ void Ntp::preditctTime() | |||
262 | predictedTime = QDateTime::currentDateTime().addSecs(corr); | 288 | predictedTime = QDateTime::currentDateTime().addSecs(corr); |
263 | TextLabelPredTime->setText(predictedTime.toString()); | 289 | TextLabelPredTime->setText(predictedTime.toString()); |
264 | TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); | 290 | TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); |
265 | } | 291 | } |
266 | 292 | ||
267 | void Ntp::setPredictTime() | 293 | void Ntp::setPredictTime() |
268 | { | 294 | { |
269 | preditctTime(); | 295 | preditctTime(); |
270 | setTime( predictedTime ); | 296 | setTime( predictedTime ); |
271 | } | 297 | } |
272 | 298 | ||
273 | void Ntp::slotCheckNtp(int i) | 299 | void Ntp::slotCheckNtp(int i) |
274 | { | 300 | { |
275 | if (i == 0) | 301 | if (i == 0) |
276 | { | 302 | { |
277 | TextLabelMainPredTime->hide(); | 303 | TextLabelMainPredTime->hide(); |
278 | ButtonSetTime->setText( tr("Get time from network") ); | 304 | ButtonSetTime->setText( tr("Get time from network") ); |
279 | connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); | 305 | connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); |
280 | if ( ntpDelayElapsed() ) | 306 | if ( ntpDelayElapsed() ) |
281 | { | 307 | { |
282 | slotRunNtp(); | 308 | slotRunNtp(); |
283 | disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); | 309 | disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); |
284 | connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); | 310 | connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); |
285 | }else{ | 311 | }else{ |
286 | disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); | 312 | disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); |
287 | connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); | 313 | connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); |
288 | } | 314 | } |
289 | }else{ | 315 | }else{ |
290 | preditctTime(); | 316 | preditctTime(); |
291 | ButtonSetTime->setText( tr("Set predicted time: ")+predictedTime.toString() ); | 317 | ButtonSetTime->setText( tr("Set predicted time: ")+predictedTime.toString() ); |
292 | if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); | 318 | if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); |
293 | connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); | 319 | connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); |
294 | connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); | 320 | connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); |
295 | } | 321 | } |
296 | } | 322 | } |
297 | 323 | ||
298 | void Ntp::slotProbeNtpServer() | 324 | void Ntp::slotProbeNtpServer() |
299 | { | 325 | { |
300 | ntpSock->connectToHost( getNtpServer() ,123); | 326 | ntpSock->connectToHost( getNtpServer() ,123); |
301 | } | 327 | } |
302 | 328 | ||
303 | void Ntp::slotNtpDelayChanged(int delay) | 329 | void Ntp::slotNtpDelayChanged(int delay) |
304 | { | 330 | { |
305 | ntpTimer->changeInterval( delay*1000*60 ); | 331 | ntpTimer->changeInterval( delay*1000*60 ); |
306 | } | 332 | } |
307 | 333 | ||
308 | void Ntp::ntpOutPut(QString out) | 334 | void Ntp::ntpOutPut(QString out) |
309 | { | 335 | { |
336 | |||
310 | MultiLineEditntpOutPut->append(out); | 337 | MultiLineEditntpOutPut->append(out); |
311 | MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); | 338 | MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); |
312 | } | 339 | } |
313 | 340 | ||
314 | 341 | ||
315 | void Ntp::makeChannel() | 342 | void Ntp::makeChannel() |
316 | { | 343 | { |
317 | channel = new QCopChannel( "QPE/Application/netsystemtime", this ); | 344 | channel = new QCopChannel( "QPE/Application/netsystemtime", this ); |
318 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 345 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
319 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 346 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
320 | } | 347 | } |
321 | 348 | ||
322 | 349 | ||
323 | 350 | ||
324 | void Ntp::receive(const QCString &msg, const QByteArray &arg) | 351 | void Ntp::receive(const QCString &msg, const QByteArray &arg) |
325 | { | 352 | { |
326 | qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); | 353 | qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); |
327 | if ( msg == "ntpLookup(QString)" ) | 354 | if ( msg == "ntpLookup(QString)" ) |
328 | { | 355 | { |
329 | slotRunNtp(); | 356 | slotRunNtp(); |
330 | } | 357 | } |
331 | if ( msg == "setPredictedTime(QString)" ) | 358 | if ( msg == "setPredictedTime(QString)" ) |
332 | { | 359 | { |
333 | setPredictTime(); | 360 | setPredictTime(); |
334 | }else{ | 361 | }else{ |
335 | qDebug("Ntp::receive: Huh what do ya want"); | 362 | qDebug("Ntp::receive: Huh what do ya want"); |
336 | } | 363 | } |
337 | } | 364 | } |
338 | 365 | ||
339 | void Ntp::setDocument(const QString &fileName) | 366 | void Ntp::setDocument(const QString &fileName) |
340 | { | 367 | { |
341 | 368 | qDebug("Ntp::setDocument( %s )",fileName.latin1()); | |
342 | } | 369 | } |
343 | 370 | ||
344 | void Ntp::showAdvancedFeatures(bool advMode) | 371 | void Ntp::showAdvancedFeatures(bool advMode) |
345 | { | 372 | { |
346 | if (advMode) { | 373 | if (advMode) { |
374 | |||
347 | TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); | 375 | TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); |
348 | TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); | 376 | TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); |
349 | TextLabel1_2_2->show(); | 377 | TextLabel1_2_2->show(); |
350 | TextLabel2_3->show(); | 378 | TextLabel2_3->show(); |
351 | TextLabel3_3_2->show(); | 379 | TextLabel3_3_2->show(); |
352 | TextLabel1_2->show(); | 380 | TextLabel1_2->show(); |
353 | SpinBoxMinLookupDelay->show(); | 381 | SpinBoxMinLookupDelay->show(); |
354 | TextLabel2->show(); | 382 | TextLabel2->show(); |
355 | TextLabel3_3->show(); | 383 | TextLabel3_3->show(); |
356 | SpinBoxNtpDelay->show(); | 384 | SpinBoxNtpDelay->show(); |
357 | Line1->show(); | 385 | Line1->show(); |
358 | }else{ | 386 | }else{ |
359 | TabWidgetMain->removePage( tabPredict ); | 387 | TabWidgetMain->removePage( tabPredict ); |
360 | TabWidgetMain->removePage( tabNtp ); | 388 | TabWidgetMain->removePage( tabNtp ); |
361 | TextLabel1_2_2->hide(); | 389 | TextLabel1_2_2->hide(); |
362 | TextLabel2_3->hide(); | 390 | TextLabel2_3->hide(); |
363 | TextLabel3_3_2->hide(); | 391 | TextLabel3_3_2->hide(); |
364 | TextLabel1_2->hide(); | 392 | TextLabel1_2->hide(); |
365 | SpinBoxMinLookupDelay->hide(); | 393 | SpinBoxMinLookupDelay->hide(); |
366 | TextLabel2->hide(); | 394 | TextLabel2->hide(); |
367 | TextLabel3_3->hide(); | 395 | TextLabel3_3->hide(); |
368 | SpinBoxNtpDelay->hide(); | 396 | SpinBoxNtpDelay->hide(); |
369 | Line1->hide(); | 397 | Line1->hide(); |
370 | }; | 398 | }; |
371 | TabWidgetMain->show(); | 399 | TabWidgetMain->show(); |
372 | } | 400 | } |
diff --git a/noncore/settings/netsystemtime/ntp.h b/noncore/settings/netsystemtime/ntp.h index fe0bae6..f6694c9 100644 --- a/noncore/settings/netsystemtime/ntp.h +++ b/noncore/settings/netsystemtime/ntp.h | |||
@@ -1,53 +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 | ||
6 | class OProcess; | 6 | class OProcess; |
7 | class QString; | 7 | class QString; |
8 | class QTimer; | 8 | class QTimer; |
9 | class QSocket; | 9 | class QSocket; |
10 | class QCopChannel; | 10 | class QCopChannel; |
11 | 11 | ||
12 | class Ntp : public SetDateTime | 12 | class Ntp : public SetDateTime |
13 | { | 13 | { |
14 | Q_OBJECT | 14 | Q_OBJECT |
15 | 15 | ||
16 | public: | 16 | public: |
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 | ||
20 | public slots: | 20 | public slots: |
21 | void setDocument (const QString &); | 21 | void setDocument (const QString &); |
22 | protected: | 22 | protected: |
23 | QDateTime predictedTime; | 23 | QDateTime predictedTime; |
24 | void makeChannel(); | 24 | void makeChannel(); |
25 | protected slots: | 25 | protected slots: |
26 | void receive(const QCString &msg, const QByteArray &arg); | 26 | void receive(const QCString &msg, const QByteArray &arg); |
27 | private: | 27 | private: |
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(); |
41 | private slots: | 41 | private 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 showAdvancedFeatures(bool); |
49 | void slotProbeNtpServer(); | 49 | void slotProbeNtpServer(); |
50 | void slotNtpDelayChanged(int); | 50 | void slotNtpDelayChanged(int); |
51 | }; | 51 | }; |
52 | 52 | ||
53 | #endif | 53 | #endif |
diff --git a/noncore/settings/netsystemtime/ntpbase.cpp b/noncore/settings/netsystemtime/ntpbase.cpp index 8d44f17..0a7a57e 100644 --- a/noncore/settings/netsystemtime/ntpbase.cpp +++ b/noncore/settings/netsystemtime/ntpbase.cpp | |||
@@ -1,338 +1,331 @@ | |||
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:32:47 2002 | 4 | ** Created: Sun Nov 10 17:59:14 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 <qcheckbox.h> |
12 | #include <qcombobox.h> | 12 | #include <qcombobox.h> |
13 | #include <qframe.h> | 13 | #include <qframe.h> |
14 | #include <qlabel.h> | 14 | #include <qlabel.h> |
15 | #include <qmultilineedit.h> | 15 | #include <qmultilineedit.h> |
16 | #include <qpushbutton.h> | 16 | #include <qpushbutton.h> |
17 | #include <qspinbox.h> | 17 | #include <qspinbox.h> |
18 | #include <qtable.h> | 18 | #include <qtable.h> |
19 | #include <qtabwidget.h> | 19 | #include <qtabwidget.h> |
20 | #include <qlayout.h> | 20 | #include <qlayout.h> |
21 | #include <qvariant.h> | 21 | #include <qvariant.h> |
22 | #include <qtooltip.h> | 22 | #include <qtooltip.h> |
23 | #include <qwhatsthis.h> | 23 | #include <qwhatsthis.h> |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Constructs a NtpBase which is a child of 'parent', with the | 26 | * Constructs a NtpBase which is a child of 'parent', with the |
27 | * name 'name' and widget flags set to 'f' | 27 | * name 'name' and widget flags set to 'f' |
28 | */ | 28 | */ |
29 | NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | 29 | NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) |
30 | : QWidget( parent, name, fl ) | 30 | : QWidget( parent, name, fl ) |
31 | { | 31 | { |
32 | if ( !name ) | 32 | if ( !name ) |
33 | setName( "NtpBase" ); | 33 | setName( "NtpBase" ); |
34 | resize( 320, 411 ); | 34 | resize( 317, 411 ); |
35 | setCaption( tr( "Network Time" ) ); | 35 | setCaption( tr( "Network Time" ) ); |
36 | NtpBaseLayout = new QGridLayout( this ); | 36 | NtpBaseLayout = new QGridLayout( this ); |
37 | NtpBaseLayout->setSpacing( 2 ); | 37 | NtpBaseLayout->setSpacing( 2 ); |
38 | NtpBaseLayout->setMargin( 2 ); | 38 | NtpBaseLayout->setMargin( 2 ); |
39 | 39 | ||
40 | TabWidgetMain = new QTabWidget( this, "TabWidgetMain" ); | 40 | TabWidgetMain = new QTabWidget( this, "TabWidgetMain" ); |
41 | 41 | ||
42 | tabMain = new QWidget( TabWidgetMain, "tabMain" ); | 42 | tabMain = new QWidget( TabWidgetMain, "tabMain" ); |
43 | tabMainLayout = new QGridLayout( tabMain ); | 43 | tabMainLayout = new QGridLayout( tabMain ); |
44 | tabMainLayout->setSpacing( 2 ); | 44 | tabMainLayout->setSpacing( 2 ); |
45 | tabMainLayout->setMargin( 2 ); | 45 | tabMainLayout->setMargin( 2 ); |
46 | 46 | ||
47 | FrameSystemTime = new QWidget( tabMain, "FrameSystemTime" ); | 47 | FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" ); |
48 | // FrameSystemTime->setFrameShape( QFrame::StyledPanel ); | ||
49 | //FrameSystemTime->setFrameShadow( QFrame::Raised ); | ||
50 | 48 | ||
51 | tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); | 49 | tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); |
50 | TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); | ||
52 | 51 | ||
53 | tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); | 52 | tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); |
54 | tabNtpLayout = new QGridLayout( tabNtp ); | 53 | tabNtpLayout = new QGridLayout( tabNtp ); |
55 | tabNtpLayout->setSpacing( 2 ); | 54 | tabNtpLayout->setSpacing( 2 ); |
56 | tabNtpLayout->setMargin( 1 ); | 55 | tabNtpLayout->setMargin( 1 ); |
57 | 56 | ||
58 | runNtp = new QPushButton( tabNtp, "runNtp" ); | 57 | runNtp = new QPushButton( tabNtp, "runNtp" ); |
59 | runNtp->setText( tr( "Get time from network" ) ); | 58 | runNtp->setText( tr( "Get time from network" ) ); |
60 | 59 | ||
61 | tabNtpLayout->addWidget( runNtp, 1, 0 ); | 60 | tabNtpLayout->addWidget( runNtp, 1, 0 ); |
62 | 61 | ||
63 | FrameNtp = new QWidget( tabNtp, "FrameNtp" ); | 62 | FrameNtp = new QWidget( tabNtp, "FrameNtp" ); |
64 | // FrameNtp->setFrameShape( QFrame::StyledPanel ); | ||
65 | // FrameNtp->setFrameShadow( QFrame::Raised ); | ||
66 | FrameNtpLayout = new QGridLayout( FrameNtp ); | 63 | FrameNtpLayout = new QGridLayout( FrameNtp ); |
67 | FrameNtpLayout->setSpacing( 2 ); | 64 | FrameNtpLayout->setSpacing( 2 ); |
68 | FrameNtpLayout->setMargin( 2 ); | 65 | FrameNtpLayout->setMargin( 2 ); |
69 | 66 | ||
70 | Layout4 = new QVBoxLayout; | 67 | Layout4 = new QVBoxLayout; |
71 | Layout4->setSpacing( 6 ); | 68 | Layout4->setSpacing( 6 ); |
72 | Layout4->setMargin( 0 ); | 69 | Layout4->setMargin( 0 ); |
73 | 70 | ||
74 | TextLabel1 = new QLabel( FrameNtp, "TextLabel1" ); | 71 | TextLabel1 = new QLabel( FrameNtp, "TextLabel1" ); |
75 | TextLabel1->setAutoMask( FALSE ); | 72 | TextLabel1->setAutoMask( FALSE ); |
76 | TextLabel1->setText( tr( "Start Time:" ) ); | 73 | TextLabel1->setText( tr( "Start Time:" ) ); |
77 | Layout4->addWidget( TextLabel1 ); | 74 | Layout4->addWidget( TextLabel1 ); |
78 | 75 | ||
79 | TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" ); | 76 | TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" ); |
80 | TextLabelStartTime->setText( tr( "nan" ) ); | 77 | TextLabelStartTime->setText( tr( "nan" ) ); |
81 | Layout4->addWidget( TextLabelStartTime ); | 78 | Layout4->addWidget( TextLabelStartTime ); |
82 | 79 | ||
83 | TextLabel3 = new QLabel( FrameNtp, "TextLabel3" ); | 80 | TextLabel3 = new QLabel( FrameNtp, "TextLabel3" ); |
84 | TextLabel3->setText( tr( "Time Shift:" ) ); | 81 | TextLabel3->setText( tr( "Time Shift:" ) ); |
85 | Layout4->addWidget( TextLabel3 ); | 82 | Layout4->addWidget( TextLabel3 ); |
86 | 83 | ||
87 | TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" ); | 84 | TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" ); |
88 | TextLabelTimeShift->setText( tr( "nan" ) ); | 85 | TextLabelTimeShift->setText( tr( "nan" ) ); |
89 | Layout4->addWidget( TextLabelTimeShift ); | 86 | Layout4->addWidget( TextLabelTimeShift ); |
90 | 87 | ||
91 | TextLabel5 = new QLabel( FrameNtp, "TextLabel5" ); | 88 | TextLabel5 = new QLabel( FrameNtp, "TextLabel5" ); |
92 | TextLabel5->setText( tr( "New Time:" ) ); | 89 | TextLabel5->setText( tr( "New Time:" ) ); |
93 | Layout4->addWidget( TextLabel5 ); | 90 | Layout4->addWidget( TextLabel5 ); |
94 | 91 | ||
95 | TextLabelNewTime = new QLabel( FrameNtp, "TextLabelNewTime" ); | 92 | TextLabelNewTime = new QLabel( FrameNtp, "TextLabelNewTime" ); |
96 | TextLabelNewTime->setText( tr( "nan" ) ); | 93 | TextLabelNewTime->setText( tr( "nan" ) ); |
97 | Layout4->addWidget( TextLabelNewTime ); | 94 | Layout4->addWidget( TextLabelNewTime ); |
98 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 95 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
99 | Layout4->addItem( spacer ); | 96 | Layout4->addItem( spacer ); |
100 | 97 | ||
101 | FrameNtpLayout->addLayout( Layout4, 0, 0 ); | 98 | FrameNtpLayout->addLayout( Layout4, 0, 0 ); |
102 | 99 | ||
103 | MultiLineEditntpOutPut = new QMultiLineEdit( FrameNtp, "MultiLineEditntpOutPut" ); | 100 | MultiLineEditntpOutPut = new QMultiLineEdit( FrameNtp, "MultiLineEditntpOutPut" ); |
104 | QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); | 101 | QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); |
105 | MultiLineEditntpOutPut_font.setPointSize( 7 ); | 102 | MultiLineEditntpOutPut_font.setPointSize( 7 ); |
106 | MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); | 103 | MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); |
107 | MultiLineEditntpOutPut->setWordWrap( QMultiLineEdit::WidgetWidth ); | 104 | MultiLineEditntpOutPut->setWordWrap( QMultiLineEdit::WidgetWidth ); |
108 | MultiLineEditntpOutPut->setText( tr( "" ) ); | 105 | MultiLineEditntpOutPut->setText( tr( "" ) ); |
109 | 106 | ||
110 | FrameNtpLayout->addWidget( MultiLineEditntpOutPut, 1, 0 ); | 107 | FrameNtpLayout->addWidget( MultiLineEditntpOutPut, 1, 0 ); |
111 | 108 | ||
112 | tabNtpLayout->addWidget( FrameNtp, 0, 0 ); | 109 | tabNtpLayout->addWidget( FrameNtp, 0, 0 ); |
110 | TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); | ||
113 | 111 | ||
114 | tabPredict = new QWidget( TabWidgetMain, "tabPredict" ); | 112 | tabPredict = new QWidget( TabWidgetMain, "tabPredict" ); |
115 | tabPredictLayout = new QGridLayout( tabPredict ); | 113 | tabPredictLayout = new QGridLayout( tabPredict ); |
116 | tabPredictLayout->setSpacing( 6 ); | 114 | tabPredictLayout->setSpacing( 6 ); |
117 | tabPredictLayout->setMargin( 5 ); | 115 | tabPredictLayout->setMargin( 5 ); |
118 | 116 | ||
119 | TableLookups = new QTable( tabPredict, "TableLookups" ); | 117 | TableLookups = new QTable( tabPredict, "TableLookups" ); |
120 | QFont TableLookups_font( TableLookups->font() ); | 118 | QFont TableLookups_font( TableLookups->font() ); |
121 | TableLookups_font.setPointSize( 8 ); | 119 | TableLookups_font.setPointSize( 8 ); |
122 | TableLookups->setFont( TableLookups_font ); | 120 | TableLookups->setFont( TableLookups_font ); |
123 | TableLookups->setNumRows( 2 ); | 121 | TableLookups->setNumRows( 2 ); |
124 | TableLookups->setNumCols( 2 ); | 122 | TableLookups->setNumCols( 2 ); |
125 | 123 | ||
126 | tabPredictLayout->addWidget( TableLookups, 0, 0 ); | 124 | tabPredictLayout->addWidget( TableLookups, 0, 0 ); |
127 | 125 | ||
128 | Layout9 = new QGridLayout; | 126 | Layout9 = new QGridLayout; |
129 | Layout9->setSpacing( 6 ); | 127 | Layout9->setSpacing( 6 ); |
130 | Layout9->setMargin( 0 ); | 128 | Layout9->setMargin( 0 ); |
131 | 129 | ||
132 | TextLabelShift = new QLabel( tabPredict, "TextLabelShift" ); | 130 | TextLabelShift = new QLabel( tabPredict, "TextLabelShift" ); |
133 | TextLabelShift->setText( tr( "nan" ) ); | 131 | TextLabelShift->setText( tr( "nan" ) ); |
134 | 132 | ||
135 | Layout9->addWidget( TextLabelShift, 0, 1 ); | 133 | Layout9->addWidget( TextLabelShift, 0, 1 ); |
136 | 134 | ||
137 | TextLabel4 = new QLabel( tabPredict, "TextLabel4" ); | 135 | TextLabel4 = new QLabel( tabPredict, "TextLabel4" ); |
138 | TextLabel4->setText( tr( "Esimated Shift:" ) ); | 136 | TextLabel4->setText( tr( "Esimated Shift:" ) ); |
139 | 137 | ||
140 | Layout9->addWidget( TextLabel4, 1, 0 ); | 138 | Layout9->addWidget( TextLabel4, 1, 0 ); |
141 | 139 | ||
142 | TextLabelEstimatedShift = new QLabel( tabPredict, "TextLabelEstimatedShift" ); | 140 | TextLabelEstimatedShift = new QLabel( tabPredict, "TextLabelEstimatedShift" ); |
143 | TextLabelEstimatedShift->setText( tr( "nan" ) ); | 141 | TextLabelEstimatedShift->setText( tr( "nan" ) ); |
144 | 142 | ||
145 | Layout9->addWidget( TextLabelEstimatedShift, 1, 1 ); | 143 | Layout9->addWidget( TextLabelEstimatedShift, 1, 1 ); |
146 | 144 | ||
147 | TextLabel3_2 = new QLabel( tabPredict, "TextLabel3_2" ); | 145 | TextLabel3_2 = new QLabel( tabPredict, "TextLabel3_2" ); |
148 | TextLabel3_2->setText( tr( "Predicted Time:" ) ); | 146 | TextLabel3_2->setText( tr( "Predicted Time:" ) ); |
149 | 147 | ||
150 | Layout9->addWidget( TextLabel3_2, 2, 0 ); | 148 | Layout9->addWidget( TextLabel3_2, 2, 0 ); |
151 | 149 | ||
152 | Mean_shift_label = new QLabel( tabPredict, "Mean_shift_label" ); | 150 | Mean_shift_label = new QLabel( tabPredict, "Mean_shift_label" ); |
153 | Mean_shift_label->setText( tr( "Mean shift:" ) ); | 151 | Mean_shift_label->setText( tr( "Mean shift:" ) ); |
154 | 152 | ||
155 | Layout9->addWidget( Mean_shift_label, 0, 0 ); | 153 | Layout9->addWidget( Mean_shift_label, 0, 0 ); |
156 | 154 | ||
157 | TextLabelPredTime = new QLabel( tabPredict, "TextLabelPredTime" ); | 155 | TextLabelPredTime = new QLabel( tabPredict, "TextLabelPredTime" ); |
158 | TextLabelPredTime->setText( tr( "nan" ) ); | 156 | TextLabelPredTime->setText( tr( "nan" ) ); |
159 | 157 | ||
160 | Layout9->addWidget( TextLabelPredTime, 2, 1 ); | 158 | Layout9->addWidget( TextLabelPredTime, 2, 1 ); |
161 | 159 | ||
162 | tabPredictLayout->addLayout( Layout9, 1, 0 ); | 160 | tabPredictLayout->addLayout( Layout9, 1, 0 ); |
163 | 161 | ||
164 | Layout11 = new QHBoxLayout; | 162 | Layout11 = new QHBoxLayout; |
165 | Layout11->setSpacing( 6 ); | 163 | Layout11->setSpacing( 6 ); |
166 | Layout11->setMargin( 0 ); | 164 | Layout11->setMargin( 0 ); |
167 | 165 | ||
168 | PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" ); | 166 | PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" ); |
169 | PushButtonSetPredTime->setText( tr( "Set predicted time" ) ); | 167 | PushButtonSetPredTime->setText( tr( "Set predicted time" ) ); |
170 | Layout11->addWidget( PushButtonSetPredTime ); | 168 | Layout11->addWidget( PushButtonSetPredTime ); |
171 | 169 | ||
172 | PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" ); | 170 | PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" ); |
173 | PushButtonPredict->setText( tr( "Predict time" ) ); | 171 | PushButtonPredict->setText( tr( "Predict time" ) ); |
174 | Layout11->addWidget( PushButtonPredict ); | 172 | Layout11->addWidget( PushButtonPredict ); |
175 | 173 | ||
176 | tabPredictLayout->addLayout( Layout11, 2, 0 ); | 174 | tabPredictLayout->addLayout( Layout11, 2, 0 ); |
175 | TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); | ||
177 | 176 | ||
178 | TabSettings = new QWidget( TabWidgetMain, "TabSettings" ); | 177 | TabSettings = new QWidget( TabWidgetMain, "TabSettings" ); |
179 | TabSettingsLayout = new QGridLayout( TabSettings ); | 178 | TabSettingsLayout = new QGridLayout( TabSettings ); |
180 | TabSettingsLayout->setSpacing( 2 ); | 179 | TabSettingsLayout->setSpacing( 2 ); |
181 | TabSettingsLayout->setMargin( 2 ); | 180 | TabSettingsLayout->setMargin( 2 ); |
182 | 181 | ||
183 | FrameSettings = new QWidget( TabSettings, "FrameSettings" ); | 182 | FrameSettings = new QWidget( TabSettings, "FrameSettings" ); |
184 | // FrameSettings->setFrameShape( QFrame::StyledPanel ); | ||
185 | // FrameSettings->setFrameShadow( QFrame::Raised ); | ||
186 | FrameSettingsLayout = new QVBoxLayout( FrameSettings ); | 183 | FrameSettingsLayout = new QVBoxLayout( FrameSettings ); |
187 | FrameSettingsLayout->setSpacing( 6 ); | 184 | FrameSettingsLayout->setSpacing( 6 ); |
188 | FrameSettingsLayout->setMargin( 11 ); | 185 | FrameSettingsLayout->setMargin( 11 ); |
189 | 186 | ||
190 | Layout6 = new QGridLayout; | 187 | Layout6 = new QGridLayout; |
191 | Layout6->setSpacing( 6 ); | 188 | Layout6->setSpacing( 6 ); |
192 | Layout6->setMargin( 0 ); | 189 | Layout6->setMargin( 0 ); |
193 | 190 | ||
194 | TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" ); | 191 | TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" ); |
195 | TextLabel7_2->setText( tr( "Use" ) ); | 192 | TextLabel7_2->setText( tr( "Use" ) ); |
196 | 193 | ||
197 | Layout6->addWidget( TextLabel7_2, 0, 0 ); | 194 | Layout6->addWidget( TextLabel7_2, 0, 0 ); |
198 | 195 | ||
199 | TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" ); | 196 | TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" ); |
200 | TextLabel2_2->setText( tr( "as" ) ); | 197 | TextLabel2_2->setText( tr( "as" ) ); |
201 | 198 | ||
202 | Layout6->addWidget( TextLabel2_2, 0, 2 ); | 199 | Layout6->addWidget( TextLabel2_2, 0, 2 ); |
203 | 200 | ||
204 | TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" ); | 201 | TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" ); |
205 | TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) ); | 202 | TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) ); |
206 | TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); | 203 | TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); |
207 | 204 | ||
208 | Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 ); | 205 | Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 ); |
209 | 206 | ||
210 | ComboNtpSrv = new QComboBox( FALSE, FrameSettings, "ComboNtpSrv" ); | 207 | ComboNtpSrv = new QComboBox( FALSE, FrameSettings, "ComboNtpSrv" ); |
211 | ComboNtpSrv->setEditable( TRUE ); | 208 | ComboNtpSrv->setEditable( TRUE ); |
212 | 209 | ||
213 | Layout6->addWidget( ComboNtpSrv, 0, 1 ); | 210 | Layout6->addWidget( ComboNtpSrv, 0, 1 ); |
214 | FrameSettingsLayout->addLayout( Layout6 ); | 211 | FrameSettingsLayout->addLayout( Layout6 ); |
215 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); | 212 | QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); |
216 | FrameSettingsLayout->addItem( spacer_2 ); | 213 | FrameSettingsLayout->addItem( spacer_2 ); |
217 | 214 | ||
218 | CheckBoxAdvSettings = new QCheckBox( FrameSettings, "CheckBoxAdvSettings" ); | 215 | CheckBoxAdvSettings = new QCheckBox( FrameSettings, "CheckBoxAdvSettings" ); |
219 | CheckBoxAdvSettings->setText( tr( "Advanced features" ) ); | 216 | CheckBoxAdvSettings->setText( tr( "Advanced settings" ) ); |
220 | FrameSettingsLayout->addWidget( CheckBoxAdvSettings ); | 217 | FrameSettingsLayout->addWidget( CheckBoxAdvSettings ); |
221 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 218 | QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
222 | FrameSettingsLayout->addItem( spacer_3 ); | 219 | FrameSettingsLayout->addItem( spacer_3 ); |
223 | 220 | ||
224 | Line1 = new QFrame( FrameSettings, "Line1" ); | 221 | Line1 = new QFrame( FrameSettings, "Line1" ); |
225 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 222 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
226 | FrameSettingsLayout->addWidget( Line1 ); | 223 | FrameSettingsLayout->addWidget( Line1 ); |
227 | 224 | ||
228 | Layout7_2 = new QGridLayout; | 225 | Layout7_2 = new QGridLayout; |
229 | Layout7_2->setSpacing( 6 ); | 226 | Layout7_2->setSpacing( 6 ); |
230 | Layout7_2->setMargin( 0 ); | 227 | Layout7_2->setMargin( 0 ); |
231 | 228 | ||
232 | TextLabel1_2_2 = new QLabel( FrameSettings, "TextLabel1_2_2" ); | 229 | TextLabel1_2_2 = new QLabel( FrameSettings, "TextLabel1_2_2" ); |
233 | TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) ); | 230 | TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) ); |
234 | TextLabel1_2_2->setText( tr( "Wait for " ) ); | 231 | TextLabel1_2_2->setText( tr( "Wait for " ) ); |
235 | 232 | ||
236 | Layout7_2->addWidget( TextLabel1_2_2, 0, 0 ); | 233 | Layout7_2->addWidget( TextLabel1_2_2, 0, 0 ); |
237 | 234 | ||
238 | TextLabel2_3 = new QLabel( FrameSettings, "TextLabel2_3" ); | 235 | TextLabel2_3 = new QLabel( FrameSettings, "TextLabel2_3" ); |
239 | TextLabel2_3->setText( tr( "minutes until" ) ); | 236 | TextLabel2_3->setText( tr( "minutes until" ) ); |
240 | 237 | ||
241 | Layout7_2->addWidget( TextLabel2_3, 0, 2 ); | 238 | Layout7_2->addWidget( TextLabel2_3, 0, 2 ); |
242 | 239 | ||
243 | TextLabel3_3_2 = new QLabel( FrameSettings, "TextLabel3_3_2" ); | 240 | TextLabel3_3_2 = new QLabel( FrameSettings, "TextLabel3_3_2" ); |
244 | TextLabel3_3_2->setText( tr( "NTP tries to syncronises the clock with the network." ) ); | 241 | TextLabel3_3_2->setText( tr( "NTP tries to syncronises the clock with the network." ) ); |
245 | TextLabel3_3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); | 242 | TextLabel3_3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); |
246 | 243 | ||
247 | Layout7_2->addMultiCellWidget( TextLabel3_3_2, 1, 1, 0, 2 ); | 244 | Layout7_2->addMultiCellWidget( TextLabel3_3_2, 1, 1, 0, 2 ); |
248 | 245 | ||
249 | SpinBoxNtpDelay = new QSpinBox( FrameSettings, "SpinBoxNtpDelay" ); | 246 | SpinBoxNtpDelay = new QSpinBox( FrameSettings, "SpinBoxNtpDelay" ); |
250 | SpinBoxNtpDelay->setWrapping( TRUE ); | 247 | SpinBoxNtpDelay->setWrapping( TRUE ); |
251 | SpinBoxNtpDelay->setMaxValue( 9999999 ); | 248 | SpinBoxNtpDelay->setMaxValue( 9999999 ); |
252 | SpinBoxNtpDelay->setMinValue( 1 ); | 249 | SpinBoxNtpDelay->setMinValue( 1 ); |
253 | SpinBoxNtpDelay->setValue( 1440 ); | 250 | SpinBoxNtpDelay->setValue( 1440 ); |
254 | 251 | ||
255 | Layout7_2->addWidget( SpinBoxNtpDelay, 0, 1 ); | 252 | Layout7_2->addWidget( SpinBoxNtpDelay, 0, 1 ); |
256 | FrameSettingsLayout->addLayout( Layout7_2 ); | 253 | FrameSettingsLayout->addLayout( Layout7_2 ); |
257 | 254 | ||
258 | Layout7 = new QGridLayout; | 255 | Layout7 = new QGridLayout; |
259 | Layout7->setSpacing( 6 ); | 256 | Layout7->setSpacing( 6 ); |
260 | Layout7->setMargin( 0 ); | 257 | Layout7->setMargin( 0 ); |
261 | 258 | ||
262 | TextLabel1_2 = new QLabel( FrameSettings, "TextLabel1_2" ); | 259 | TextLabel1_2 = new QLabel( FrameSettings, "TextLabel1_2" ); |
263 | TextLabel1_2->setText( tr( "Insure a delay of" ) ); | 260 | TextLabel1_2->setText( tr( "Insure a delay of" ) ); |
264 | 261 | ||
265 | Layout7->addWidget( TextLabel1_2, 0, 0 ); | 262 | Layout7->addWidget( TextLabel1_2, 0, 0 ); |
266 | 263 | ||
267 | TextLabel2 = new QLabel( FrameSettings, "TextLabel2" ); | 264 | TextLabel2 = new QLabel( FrameSettings, "TextLabel2" ); |
268 | TextLabel2->setText( tr( "minutes until" ) ); | 265 | TextLabel2->setText( tr( "minutes until" ) ); |
269 | 266 | ||
270 | Layout7->addWidget( TextLabel2, 0, 2 ); | 267 | Layout7->addWidget( TextLabel2, 0, 2 ); |
271 | 268 | ||
272 | TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" ); | 269 | TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" ); |
273 | TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) ); | 270 | 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 ) ); | 271 | TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); |
275 | 272 | ||
276 | Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 ); | 273 | Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 ); |
277 | 274 | ||
278 | SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" ); | 275 | SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" ); |
279 | SpinBoxMinLookupDelay->setWrapping( TRUE ); | 276 | SpinBoxMinLookupDelay->setWrapping( TRUE ); |
280 | SpinBoxMinLookupDelay->setMaxValue( 9999999 ); | 277 | SpinBoxMinLookupDelay->setMaxValue( 9999999 ); |
281 | SpinBoxMinLookupDelay->setMinValue( 42 ); | 278 | SpinBoxMinLookupDelay->setMinValue( 42 ); |
282 | SpinBoxMinLookupDelay->setValue( 720 ); | 279 | SpinBoxMinLookupDelay->setValue( 720 ); |
283 | 280 | ||
284 | Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 ); | 281 | Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 ); |
285 | FrameSettingsLayout->addLayout( Layout7 ); | 282 | FrameSettingsLayout->addLayout( Layout7 ); |
286 | 283 | ||
287 | TabSettingsLayout->addWidget( FrameSettings, 0, 0 ); | 284 | TabSettingsLayout->addWidget( FrameSettings, 0, 0 ); |
285 | TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); | ||
288 | 286 | ||
289 | tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" ); | 287 | tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" ); |
290 | tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime ); | 288 | tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime ); |
291 | tabManualSetTimeLayout->setSpacing( 2 ); | 289 | tabManualSetTimeLayout->setSpacing( 6 ); |
292 | tabManualSetTimeLayout->setMargin( 2 ); | 290 | tabManualSetTimeLayout->setMargin( 11 ); |
293 | 291 | ||
294 | FrameSetTime = new QWidget( tabManualSetTime, "FrameSetTime" ); | 292 | FrameSetTime = new QWidget( tabManualSetTime, "FrameSetTime" ); |
295 | // FrameSetTime->setFrameShape( QFrame::StyledPanel ); | 293 | FrameSetTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, FrameSetTime->sizePolicy().hasHeightForWidth() ) ); |
296 | // FrameSetTime->setFrameShadow( QFrame::Raised ); | ||
297 | tabManualSetTimeLayout->addWidget( FrameSetTime ); | 294 | tabManualSetTimeLayout->addWidget( FrameSetTime ); |
298 | 295 | ||
299 | PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); | 296 | PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); |
300 | PushButtonSetManualTime->setText( tr( "Set time" ) ); | 297 | PushButtonSetManualTime->setText( tr( "Set time" ) ); |
301 | tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); | 298 | tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); |
302 | 299 | QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | |
303 | 300 | tabManualSetTimeLayout->addItem( spacer_4 ); | |
304 | TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); | ||
305 | TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); | 301 | TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); |
306 | TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); | ||
307 | TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); | ||
308 | TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); | ||
309 | 302 | ||
310 | NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); | 303 | NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); |
311 | } | 304 | } |
312 | 305 | ||
313 | /* | 306 | /* |
314 | * Destroys the object and frees any allocated resources | 307 | * Destroys the object and frees any allocated resources |
315 | */ | 308 | */ |
316 | NtpBase::~NtpBase() | 309 | NtpBase::~NtpBase() |
317 | { | 310 | { |
318 | // no need to delete child widgets, Qt does it all for us | 311 | // no need to delete child widgets, Qt does it all for us |
319 | } | 312 | } |
320 | 313 | ||
321 | /* | 314 | /* |
322 | * Main event handler. Reimplemented to handle application | 315 | * Main event handler. Reimplemented to handle application |
323 | * font changes | 316 | * font changes |
324 | */ | 317 | */ |
325 | bool NtpBase::event( QEvent* ev ) | 318 | bool NtpBase::event( QEvent* ev ) |
326 | { | 319 | { |
327 | bool ret = QWidget::event( ev ); | 320 | bool ret = QWidget::event( ev ); |
328 | if ( ev->type() == QEvent::ApplicationFontChange ) { | 321 | if ( ev->type() == QEvent::ApplicationFontChange ) { |
329 | QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); | 322 | QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); |
330 | MultiLineEditntpOutPut_font.setPointSize( 7 ); | 323 | MultiLineEditntpOutPut_font.setPointSize( 7 ); |
331 | MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); | 324 | MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); |
332 | QFont TableLookups_font( TableLookups->font() ); | 325 | QFont TableLookups_font( TableLookups->font() ); |
333 | TableLookups_font.setPointSize( 8 ); | 326 | TableLookups_font.setPointSize( 8 ); |
334 | TableLookups->setFont( TableLookups_font ); | 327 | TableLookups->setFont( TableLookups_font ); |
335 | } | 328 | } |
336 | return ret; | 329 | return ret; |
337 | } | 330 | } |
338 | 331 | ||
diff --git a/noncore/settings/netsystemtime/ntpbase.h b/noncore/settings/netsystemtime/ntpbase.h index a443495..543cac1 100644 --- a/noncore/settings/netsystemtime/ntpbase.h +++ b/noncore/settings/netsystemtime/ntpbase.h | |||
@@ -1,85 +1,85 @@ | |||
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:32:43 2002 | 4 | ** Created: Sun Nov 10 17:58:48 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> |
14 | class QVBoxLayout; | 14 | class QVBoxLayout; |
15 | class QHBoxLayout; | 15 | class QHBoxLayout; |
16 | class QGridLayout; | 16 | class QGridLayout; |
17 | class QCheckBox; | 17 | class QCheckBox; |
18 | class QComboBox; | 18 | class QComboBox; |
19 | class QFrame; | 19 | class QFrame; |
20 | class QLabel; | 20 | class QLabel; |
21 | class QMultiLineEdit; | 21 | class QMultiLineEdit; |
22 | class QPushButton; | 22 | class QPushButton; |
23 | class QSpinBox; | 23 | class QSpinBox; |
24 | class QTabWidget; | 24 | class QTabWidget; |
25 | class QTable; | 25 | class QTable; |
26 | 26 | ||
27 | class NtpBase : public QWidget | 27 | class NtpBase : public QWidget |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | 30 | ||
31 | public: | 31 | public: |
32 | NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 32 | NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
33 | ~NtpBase(); | 33 | ~NtpBase(); |
34 | 34 | ||
35 | QTabWidget* TabWidgetMain; | 35 | QTabWidget* TabWidgetMain; |
36 | QWidget* tabMain; | 36 | QWidget* tabMain; |
37 | QWidget* FrameSystemTime; | 37 | QFrame* FrameSystemTime; |
38 | QWidget* tabNtp; | 38 | QWidget* tabNtp; |
39 | QPushButton* runNtp; | 39 | QPushButton* runNtp; |
40 | QWidget* FrameNtp; | 40 | QWidget* FrameNtp; |
41 | QLabel* TextLabel1; | 41 | QLabel* TextLabel1; |
42 | QLabel* TextLabelStartTime; | 42 | QLabel* TextLabelStartTime; |
43 | QLabel* TextLabel3; | 43 | QLabel* TextLabel3; |
44 | QLabel* TextLabelTimeShift; | 44 | QLabel* TextLabelTimeShift; |
45 | QLabel* TextLabel5; | 45 | QLabel* TextLabel5; |
46 | QLabel* TextLabelNewTime; | 46 | QLabel* TextLabelNewTime; |
47 | QMultiLineEdit* MultiLineEditntpOutPut; | 47 | QMultiLineEdit* MultiLineEditntpOutPut; |
48 | QWidget* tabPredict; | 48 | QWidget* tabPredict; |
49 | QTable* TableLookups; | 49 | QTable* TableLookups; |
50 | QLabel* TextLabelShift; | 50 | QLabel* TextLabelShift; |
51 | QLabel* TextLabel4; | 51 | QLabel* TextLabel4; |
52 | QLabel* TextLabelEstimatedShift; | 52 | QLabel* TextLabelEstimatedShift; |
53 | QLabel* TextLabel3_2; | 53 | QLabel* TextLabel3_2; |
54 | QLabel* Mean_shift_label; | 54 | QLabel* Mean_shift_label; |
55 | QLabel* TextLabelPredTime; | 55 | QLabel* TextLabelPredTime; |
56 | QPushButton* PushButtonSetPredTime; | 56 | QPushButton* PushButtonSetPredTime; |
57 | QPushButton* PushButtonPredict; | 57 | QPushButton* PushButtonPredict; |
58 | QWidget* TabSettings; | 58 | QWidget* TabSettings; |
59 | QWidget* FrameSettings; | 59 | QWidget* FrameSettings; |
60 | QLabel* TextLabel7_2; | 60 | QLabel* TextLabel7_2; |
61 | QLabel* TextLabel2_2; | 61 | QLabel* TextLabel2_2; |
62 | QLabel* TextLabel1_3; | 62 | QLabel* TextLabel1_3; |
63 | QComboBox* ComboNtpSrv; | 63 | QComboBox* ComboNtpSrv; |
64 | QCheckBox* CheckBoxAdvSettings; | 64 | QCheckBox* CheckBoxAdvSettings; |
65 | QFrame* Line1; | 65 | QFrame* Line1; |
66 | QLabel* TextLabel1_2_2; | 66 | QLabel* TextLabel1_2_2; |
67 | QLabel* TextLabel2_3; | 67 | QLabel* TextLabel2_3; |
68 | QLabel* TextLabel3_3_2; | 68 | QLabel* TextLabel3_3_2; |
69 | QSpinBox* SpinBoxNtpDelay; | 69 | QSpinBox* SpinBoxNtpDelay; |
70 | QLabel* TextLabel1_2; | 70 | QLabel* TextLabel1_2; |
71 | QLabel* TextLabel2; | 71 | QLabel* TextLabel2; |
72 | QLabel* TextLabel3_3; | 72 | QLabel* TextLabel3_3; |
73 | QSpinBox* SpinBoxMinLookupDelay; | 73 | QSpinBox* SpinBoxMinLookupDelay; |
74 | QWidget* tabManualSetTime; | 74 | QWidget* tabManualSetTime; |
75 | QWidget* FrameSetTime; | 75 | QWidget* FrameSetTime; |
76 | QPushButton* PushButtonSetManualTime; | 76 | QPushButton* PushButtonSetManualTime; |
77 | 77 | ||
78 | protected: | 78 | protected: |
79 | QGridLayout* NtpBaseLayout; | 79 | QGridLayout* NtpBaseLayout; |
80 | QGridLayout* tabMainLayout; | 80 | QGridLayout* tabMainLayout; |
81 | QGridLayout* tabNtpLayout; | 81 | QGridLayout* tabNtpLayout; |
82 | QGridLayout* FrameNtpLayout; | 82 | QGridLayout* FrameNtpLayout; |
83 | QVBoxLayout* Layout4; | 83 | QVBoxLayout* Layout4; |
84 | QGridLayout* tabPredictLayout; | 84 | QGridLayout* tabPredictLayout; |
85 | QGridLayout* Layout9; | 85 | QGridLayout* Layout9; |
diff --git a/noncore/settings/netsystemtime/ntpbase.ui b/noncore/settings/netsystemtime/ntpbase.ui index 465bba0..6c38588 100644 --- a/noncore/settings/netsystemtime/ntpbase.ui +++ b/noncore/settings/netsystemtime/ntpbase.ui | |||
@@ -1,176 +1,160 @@ | |||
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>320</width> | 14 | <width>317</width> |
15 | <height>411</height> | 15 | <height>411</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>2</number> | 35 | <number>2</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>tabMain</cstring> | 53 | <cstring>tabMain</cstring> |
54 | </property> | 54 | </property> |
55 | <attribute> | 55 | <attribute> |
56 | <name>title</name> | 56 | <name>title</name> |
57 | <string>Main</string> | 57 | <string>Main</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>2</number> | 62 | <number>2</number> |
63 | </property> | 63 | </property> |
64 | <property stdset="1"> | 64 | <property stdset="1"> |
65 | <name>spacing</name> | 65 | <name>spacing</name> |
66 | <number>2</number> | 66 | <number>2</number> |
67 | </property> | 67 | </property> |
68 | <widget row="0" column="0" > | 68 | <widget row="0" column="0" > |
69 | <class>QFrame</class> | 69 | <class>QFrame</class> |
70 | <property stdset="1"> | 70 | <property stdset="1"> |
71 | <name>name</name> | 71 | <name>name</name> |
72 | <cstring>FrameSystemTime</cstring> | 72 | <cstring>FrameSystemTime</cstring> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | ||
75 | <name>frameShape</name> | ||
76 | <enum>StyledPanel</enum> | ||
77 | </property> | ||
78 | <property stdset="1"> | ||
79 | <name>frameShadow</name> | ||
80 | <enum>Raised</enum> | ||
81 | </property> | ||
82 | </widget> | 74 | </widget> |
83 | </grid> | 75 | </grid> |
84 | </widget> | 76 | </widget> |
85 | <widget> | 77 | <widget> |
86 | <class>QWidget</class> | 78 | <class>QWidget</class> |
87 | <property stdset="1"> | 79 | <property stdset="1"> |
88 | <name>name</name> | 80 | <name>name</name> |
89 | <cstring>tabNtp</cstring> | 81 | <cstring>tabNtp</cstring> |
90 | </property> | 82 | </property> |
91 | <attribute> | 83 | <attribute> |
92 | <name>title</name> | 84 | <name>title</name> |
93 | <string>NTP</string> | 85 | <string>NTP</string> |
94 | </attribute> | 86 | </attribute> |
95 | <grid> | 87 | <grid> |
96 | <property stdset="1"> | 88 | <property stdset="1"> |
97 | <name>margin</name> | 89 | <name>margin</name> |
98 | <number>1</number> | 90 | <number>1</number> |
99 | </property> | 91 | </property> |
100 | <property stdset="1"> | 92 | <property stdset="1"> |
101 | <name>spacing</name> | 93 | <name>spacing</name> |
102 | <number>2</number> | 94 | <number>2</number> |
103 | </property> | 95 | </property> |
104 | <widget row="1" column="0" > | 96 | <widget row="1" column="0" > |
105 | <class>QPushButton</class> | 97 | <class>QPushButton</class> |
106 | <property stdset="1"> | 98 | <property stdset="1"> |
107 | <name>name</name> | 99 | <name>name</name> |
108 | <cstring>runNtp</cstring> | 100 | <cstring>runNtp</cstring> |
109 | </property> | 101 | </property> |
110 | <property stdset="1"> | 102 | <property stdset="1"> |
111 | <name>text</name> | 103 | <name>text</name> |
112 | <string>Get time from network</string> | 104 | <string>Get time from network</string> |
113 | </property> | 105 | </property> |
114 | </widget> | 106 | </widget> |
115 | <widget row="0" column="0" > | 107 | <widget row="0" column="0" > |
116 | <class>QWidget</class> | 108 | <class>QWidget</class> |
117 | <property stdset="1"> | 109 | <property stdset="1"> |
118 | <name>name</name> | 110 | <name>name</name> |
119 | <cstring>FrameNtp</cstring> | 111 | <cstring>FrameNtp</cstring> |
120 | </property> | 112 | </property> |
121 | <property stdset="1"> | ||
122 | <name>frameShape</name> | ||
123 | <enum>StyledPanel</enum> | ||
124 | </property> | ||
125 | <property stdset="1"> | ||
126 | <name>frameShadow</name> | ||
127 | <enum>Raised</enum> | ||
128 | </property> | ||
129 | <property> | 113 | <property> |
130 | <name>layoutMargin</name> | 114 | <name>layoutMargin</name> |
131 | </property> | 115 | </property> |
132 | <property> | 116 | <property> |
133 | <name>layoutSpacing</name> | 117 | <name>layoutSpacing</name> |
134 | </property> | 118 | </property> |
135 | <grid> | 119 | <grid> |
136 | <property stdset="1"> | 120 | <property stdset="1"> |
137 | <name>margin</name> | 121 | <name>margin</name> |
138 | <number>2</number> | 122 | <number>2</number> |
139 | </property> | 123 | </property> |
140 | <property stdset="1"> | 124 | <property stdset="1"> |
141 | <name>spacing</name> | 125 | <name>spacing</name> |
142 | <number>2</number> | 126 | <number>2</number> |
143 | </property> | 127 | </property> |
144 | <widget row="0" column="0" > | 128 | <widget row="0" column="0" > |
145 | <class>QLayoutWidget</class> | 129 | <class>QLayoutWidget</class> |
146 | <property stdset="1"> | 130 | <property stdset="1"> |
147 | <name>name</name> | 131 | <name>name</name> |
148 | <cstring>Layout4</cstring> | 132 | <cstring>Layout4</cstring> |
149 | </property> | 133 | </property> |
150 | <vbox> | 134 | <vbox> |
151 | <property stdset="1"> | 135 | <property stdset="1"> |
152 | <name>margin</name> | 136 | <name>margin</name> |
153 | <number>0</number> | 137 | <number>0</number> |
154 | </property> | 138 | </property> |
155 | <property stdset="1"> | 139 | <property stdset="1"> |
156 | <name>spacing</name> | 140 | <name>spacing</name> |
157 | <number>6</number> | 141 | <number>6</number> |
158 | </property> | 142 | </property> |
159 | <widget> | 143 | <widget> |
160 | <class>QLabel</class> | 144 | <class>QLabel</class> |
161 | <property stdset="1"> | 145 | <property stdset="1"> |
162 | <name>name</name> | 146 | <name>name</name> |
163 | <cstring>TextLabel1</cstring> | 147 | <cstring>TextLabel1</cstring> |
164 | </property> | 148 | </property> |
165 | <property stdset="1"> | 149 | <property stdset="1"> |
166 | <name>autoMask</name> | 150 | <name>autoMask</name> |
167 | <bool>false</bool> | 151 | <bool>false</bool> |
168 | </property> | 152 | </property> |
169 | <property stdset="1"> | 153 | <property stdset="1"> |
170 | <name>text</name> | 154 | <name>text</name> |
171 | <string>Start Time:</string> | 155 | <string>Start Time:</string> |
172 | </property> | 156 | </property> |
173 | </widget> | 157 | </widget> |
174 | <widget> | 158 | <widget> |
175 | <class>QLabel</class> | 159 | <class>QLabel</class> |
176 | <property stdset="1"> | 160 | <property stdset="1"> |
@@ -418,104 +402,96 @@ | |||
418 | <name>name</name> | 402 | <name>name</name> |
419 | <cstring>PushButtonSetPredTime</cstring> | 403 | <cstring>PushButtonSetPredTime</cstring> |
420 | </property> | 404 | </property> |
421 | <property stdset="1"> | 405 | <property stdset="1"> |
422 | <name>text</name> | 406 | <name>text</name> |
423 | <string>Set predicted time</string> | 407 | <string>Set predicted time</string> |
424 | </property> | 408 | </property> |
425 | </widget> | 409 | </widget> |
426 | <widget> | 410 | <widget> |
427 | <class>QPushButton</class> | 411 | <class>QPushButton</class> |
428 | <property stdset="1"> | 412 | <property stdset="1"> |
429 | <name>name</name> | 413 | <name>name</name> |
430 | <cstring>PushButtonPredict</cstring> | 414 | <cstring>PushButtonPredict</cstring> |
431 | </property> | 415 | </property> |
432 | <property stdset="1"> | 416 | <property stdset="1"> |
433 | <name>text</name> | 417 | <name>text</name> |
434 | <string>Predict time</string> | 418 | <string>Predict time</string> |
435 | </property> | 419 | </property> |
436 | </widget> | 420 | </widget> |
437 | </hbox> | 421 | </hbox> |
438 | </widget> | 422 | </widget> |
439 | </grid> | 423 | </grid> |
440 | </widget> | 424 | </widget> |
441 | <widget> | 425 | <widget> |
442 | <class>QWidget</class> | 426 | <class>QWidget</class> |
443 | <property stdset="1"> | 427 | <property stdset="1"> |
444 | <name>name</name> | 428 | <name>name</name> |
445 | <cstring>TabSettings</cstring> | 429 | <cstring>TabSettings</cstring> |
446 | </property> | 430 | </property> |
447 | <attribute> | 431 | <attribute> |
448 | <name>title</name> | 432 | <name>title</name> |
449 | <string>Settings</string> | 433 | <string>Settings</string> |
450 | </attribute> | 434 | </attribute> |
451 | <grid> | 435 | <grid> |
452 | <property stdset="1"> | 436 | <property stdset="1"> |
453 | <name>margin</name> | 437 | <name>margin</name> |
454 | <number>2</number> | 438 | <number>2</number> |
455 | </property> | 439 | </property> |
456 | <property stdset="1"> | 440 | <property stdset="1"> |
457 | <name>spacing</name> | 441 | <name>spacing</name> |
458 | <number>2</number> | 442 | <number>2</number> |
459 | </property> | 443 | </property> |
460 | <widget row="0" column="0" > | 444 | <widget row="0" column="0" > |
461 | <class>QWidget</class> | 445 | <class>QWidget</class> |
462 | <property stdset="1"> | 446 | <property stdset="1"> |
463 | <name>name</name> | 447 | <name>name</name> |
464 | <cstring>FrameSettings</cstring> | 448 | <cstring>FrameSettings</cstring> |
465 | </property> | 449 | </property> |
466 | <property stdset="1"> | ||
467 | <name>frameShape</name> | ||
468 | <enum>StyledPanel</enum> | ||
469 | </property> | ||
470 | <property stdset="1"> | ||
471 | <name>frameShadow</name> | ||
472 | <enum>Raised</enum> | ||
473 | </property> | ||
474 | <property> | 450 | <property> |
475 | <name>layoutMargin</name> | 451 | <name>layoutMargin</name> |
476 | </property> | 452 | </property> |
477 | <property> | 453 | <property> |
478 | <name>layoutSpacing</name> | 454 | <name>layoutSpacing</name> |
479 | </property> | 455 | </property> |
480 | <vbox> | 456 | <vbox> |
481 | <property stdset="1"> | 457 | <property stdset="1"> |
482 | <name>margin</name> | 458 | <name>margin</name> |
483 | <number>11</number> | 459 | <number>11</number> |
484 | </property> | 460 | </property> |
485 | <property stdset="1"> | 461 | <property stdset="1"> |
486 | <name>spacing</name> | 462 | <name>spacing</name> |
487 | <number>6</number> | 463 | <number>6</number> |
488 | </property> | 464 | </property> |
489 | <widget> | 465 | <widget> |
490 | <class>QLayoutWidget</class> | 466 | <class>QLayoutWidget</class> |
491 | <property stdset="1"> | 467 | <property stdset="1"> |
492 | <name>name</name> | 468 | <name>name</name> |
493 | <cstring>Layout6</cstring> | 469 | <cstring>Layout6</cstring> |
494 | </property> | 470 | </property> |
495 | <grid> | 471 | <grid> |
496 | <property stdset="1"> | 472 | <property stdset="1"> |
497 | <name>margin</name> | 473 | <name>margin</name> |
498 | <number>0</number> | 474 | <number>0</number> |
499 | </property> | 475 | </property> |
500 | <property stdset="1"> | 476 | <property stdset="1"> |
501 | <name>spacing</name> | 477 | <name>spacing</name> |
502 | <number>6</number> | 478 | <number>6</number> |
503 | </property> | 479 | </property> |
504 | <widget row="0" column="0" > | 480 | <widget row="0" column="0" > |
505 | <class>QLabel</class> | 481 | <class>QLabel</class> |
506 | <property stdset="1"> | 482 | <property stdset="1"> |
507 | <name>name</name> | 483 | <name>name</name> |
508 | <cstring>TextLabel7_2</cstring> | 484 | <cstring>TextLabel7_2</cstring> |
509 | </property> | 485 | </property> |
510 | <property stdset="1"> | 486 | <property stdset="1"> |
511 | <name>text</name> | 487 | <name>text</name> |
512 | <string>Use</string> | 488 | <string>Use</string> |
513 | </property> | 489 | </property> |
514 | </widget> | 490 | </widget> |
515 | <widget row="0" column="2" > | 491 | <widget row="0" column="2" > |
516 | <class>QLabel</class> | 492 | <class>QLabel</class> |
517 | <property stdset="1"> | 493 | <property stdset="1"> |
518 | <name>name</name> | 494 | <name>name</name> |
519 | <cstring>TextLabel2_2</cstring> | 495 | <cstring>TextLabel2_2</cstring> |
520 | </property> | 496 | </property> |
521 | <property stdset="1"> | 497 | <property stdset="1"> |
@@ -757,86 +733,106 @@ | |||
757 | <set>WordBreak|AlignVCenter|AlignLeft</set> | 733 | <set>WordBreak|AlignVCenter|AlignLeft</set> |
758 | </property> | 734 | </property> |
759 | <property> | 735 | <property> |
760 | <name>wordwrap</name> | 736 | <name>wordwrap</name> |
761 | </property> | 737 | </property> |
762 | </widget> | 738 | </widget> |
763 | <widget row="0" column="1" > | 739 | <widget row="0" column="1" > |
764 | <class>QSpinBox</class> | 740 | <class>QSpinBox</class> |
765 | <property stdset="1"> | 741 | <property stdset="1"> |
766 | <name>name</name> | 742 | <name>name</name> |
767 | <cstring>SpinBoxMinLookupDelay</cstring> | 743 | <cstring>SpinBoxMinLookupDelay</cstring> |
768 | </property> | 744 | </property> |
769 | <property stdset="1"> | 745 | <property stdset="1"> |
770 | <name>wrapping</name> | 746 | <name>wrapping</name> |
771 | <bool>true</bool> | 747 | <bool>true</bool> |
772 | </property> | 748 | </property> |
773 | <property stdset="1"> | 749 | <property stdset="1"> |
774 | <name>maxValue</name> | 750 | <name>maxValue</name> |
775 | <number>9999999</number> | 751 | <number>9999999</number> |
776 | </property> | 752 | </property> |
777 | <property stdset="1"> | 753 | <property stdset="1"> |
778 | <name>minValue</name> | 754 | <name>minValue</name> |
779 | <number>42</number> | 755 | <number>42</number> |
780 | </property> | 756 | </property> |
781 | <property stdset="1"> | 757 | <property stdset="1"> |
782 | <name>value</name> | 758 | <name>value</name> |
783 | <number>720</number> | 759 | <number>720</number> |
784 | </property> | 760 | </property> |
785 | </widget> | 761 | </widget> |
786 | </grid> | 762 | </grid> |
787 | </widget> | 763 | </widget> |
788 | </vbox> | 764 | </vbox> |
789 | </widget> | 765 | </widget> |
790 | </grid> | 766 | </grid> |
791 | </widget> | 767 | </widget> |
792 | <widget> | 768 | <widget> |
793 | <class>QWidget</class> | 769 | <class>QWidget</class> |
794 | <property stdset="1"> | 770 | <property stdset="1"> |
795 | <name>name</name> | 771 | <name>name</name> |
796 | <cstring>tabManualSetTime</cstring> | 772 | <cstring>tabManualSetTime</cstring> |
797 | </property> | 773 | </property> |
798 | <attribute> | 774 | <attribute> |
799 | <name>title</name> | 775 | <name>title</name> |
800 | <string>Manual</string> | 776 | <string>Manual</string> |
801 | </attribute> | 777 | </attribute> |
802 | <vbox> | 778 | <vbox> |
803 | <property stdset="1"> | 779 | <property stdset="1"> |
804 | <name>margin</name> | 780 | <name>margin</name> |
805 | <number>2</number> | 781 | <number>11</number> |
806 | </property> | 782 | </property> |
807 | <property stdset="1"> | 783 | <property stdset="1"> |
808 | <name>spacing</name> | 784 | <name>spacing</name> |
809 | <number>2</number> | 785 | <number>6</number> |
810 | </property> | 786 | </property> |
811 | <widget> | 787 | <widget> |
812 | <class>QWidget</class> | 788 | <class>QWidget</class> |
813 | <property stdset="1"> | 789 | <property stdset="1"> |
814 | <name>name</name> | 790 | <name>name</name> |
815 | <cstring>FrameSetTime</cstring> | 791 | <cstring>FrameSetTime</cstring> |
816 | </property> | 792 | </property> |
817 | <property stdset="1"> | 793 | <property stdset="1"> |
818 | <name>frameShape</name> | 794 | <name>sizePolicy</name> |
819 | <enum>StyledPanel</enum> | 795 | <sizepolicy> |
820 | </property> | 796 | <hsizetype>5</hsizetype> |
821 | <property stdset="1"> | 797 | <vsizetype>3</vsizetype> |
822 | <name>frameShadow</name> | 798 | </sizepolicy> |
823 | <enum>Raised</enum> | ||
824 | </property> | 799 | </property> |
825 | </widget> | 800 | </widget> |
826 | <widget> | 801 | <widget> |
827 | <class>QPushButton</class> | 802 | <class>QPushButton</class> |
828 | <property stdset="1"> | 803 | <property stdset="1"> |
829 | <name>name</name> | 804 | <name>name</name> |
830 | <cstring>PushButtonSetManualTime</cstring> | 805 | <cstring>PushButtonSetManualTime</cstring> |
831 | </property> | 806 | </property> |
832 | <property stdset="1"> | 807 | <property stdset="1"> |
833 | <name>text</name> | 808 | <name>text</name> |
834 | <string>Set time</string> | 809 | <string>Set time</string> |
835 | </property> | 810 | </property> |
836 | </widget> | 811 | </widget> |
812 | <spacer> | ||
813 | <property> | ||
814 | <name>name</name> | ||
815 | <cstring>Spacer4_2</cstring> | ||
816 | </property> | ||
817 | <property stdset="1"> | ||
818 | <name>orientation</name> | ||
819 | <enum>Vertical</enum> | ||
820 | </property> | ||
821 | <property stdset="1"> | ||
822 | <name>sizeType</name> | ||
823 | <enum>Expanding</enum> | ||
824 | </property> | ||
825 | <property> | ||
826 | <name>sizeHint</name> | ||
827 | <size> | ||
828 | <width>20</width> | ||
829 | <height>20</height> | ||
830 | </size> | ||
831 | </property> | ||
832 | </spacer> | ||
837 | </vbox> | 833 | </vbox> |
838 | </widget> | 834 | </widget> |
839 | </widget> | 835 | </widget> |
840 | </grid> | 836 | </grid> |
841 | </widget> | 837 | </widget> |
842 | </UI> | 838 | </UI> |