-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,13 +1,13 @@ | |||
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 \ |
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 | |||
@@ -45,8 +45,25 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) | |||
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 ) ), |
@@ -111,9 +128,9 @@ QString Ntp::getNtpServer() | |||
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 ")+ |
@@ -132,15 +149,18 @@ void Ntp::slotRunNtp() | |||
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) |
@@ -152,12 +172,18 @@ void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) | |||
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(); |
@@ -306,8 +332,9 @@ void Ntp::slotNtpDelayChanged(int delay) | |||
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 | ||
@@ -337,14 +364,15 @@ void Ntp::receive(const QCString &msg, const QByteArray &arg) | |||
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(); |
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 | |||
@@ -14,40 +14,40 @@ class Ntp : public SetDateTime | |||
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,8 +1,8 @@ | |||
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 | ****************************************************************************/ |
@@ -30,9 +30,9 @@ 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 ); |
@@ -43,13 +43,12 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 ); |
@@ -60,10 +59,8 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -109,8 +106,9 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 ); |
@@ -173,17 +171,16 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -215,9 +212,9 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -284,29 +281,25 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
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,8 +1,8 @@ | |||
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 | ****************************************************************************/ |
@@ -33,9 +33,9 @@ public: | |||
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; |
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 | |||
@@ -10,9 +10,9 @@ | |||
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"> |
@@ -70,16 +70,8 @@ | |||
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> |
@@ -117,16 +109,8 @@ | |||
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> |
@@ -462,16 +446,8 @@ | |||
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> |
@@ -801,27 +777,26 @@ | |||
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> |
@@ -833,8 +808,29 @@ | |||
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> |