author | tille <tille> | 2002-11-10 17:01:05 (UTC) |
---|---|---|
committer | tille <tille> | 2002-11-10 17:01:05 (UTC) |
commit | 8394ee8e5fc0014605256b243909709864afdc9b (patch) (unidiff) | |
tree | 02718093edeb4c2df58ef8611fbf3db11abcf574 /noncore/settings | |
parent | 81e63be3c1e21da2a2f97df1fc38417e7ca814e1 (diff) | |
download | opie-8394ee8e5fc0014605256b243909709864afdc9b.zip opie-8394ee8e5fc0014605256b243909709864afdc9b.tar.gz opie-8394ee8e5fc0014605256b243909709864afdc9b.tar.bz2 |
usability improvments
-rw-r--r-- | noncore/settings/netsystemtime/netsystemtime.pro | 6 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 36 | ||||
-rw-r--r-- | noncore/settings/netsystemtime/ntp.h | 0 | ||||
-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, 79 insertions, 62 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,15 +1,15 @@ | |||
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 \ |
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 | |||
@@ -43,12 +43,29 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -109,13 +126,13 @@ 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?"), |
@@ -130,19 +147,22 @@ void Ntp::slotRunNtp() | |||
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); |
@@ -150,16 +170,22 @@ void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) | |||
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 |
@@ -304,12 +330,13 @@ 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() |
@@ -335,18 +362,19 @@ void Ntp::receive(const QCString &msg, const QByteArray &arg) | |||
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(); |
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 | |||
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,10 +1,10 @@ | |||
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 | ||
@@ -28,44 +28,41 @@ | |||
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 ); |
@@ -107,12 +104,13 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -171,21 +169,20 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 ); |
@@ -213,13 +210,13 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 ); |
@@ -282,33 +279,29 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) | |||
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 |
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,10 +1,10 @@ | |||
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 |
@@ -31,13 +31,13 @@ class NtpBase : public QWidget | |||
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; |
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 | |||
@@ -8,13 +8,13 @@ | |||
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> |
@@ -68,20 +68,12 @@ | |||
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"> |
@@ -115,20 +107,12 @@ | |||
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> |
@@ -460,20 +444,12 @@ | |||
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> |
@@ -799,31 +775,30 @@ | |||
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> |
@@ -831,12 +806,33 @@ | |||
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> |