summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/ntpbase.cpp
authortille <tille>2002-10-31 17:50:26 (UTC)
committer tille <tille>2002-10-31 17:50:26 (UTC)
commit9c511809c55d48db528e6ef97ec9969fa5517381 (patch) (unidiff)
tree84f51a9b842aac6487cfd7b5ea78d3e17e1591a8 /noncore/settings/netsystemtime/ntpbase.cpp
parentd955226c2197578f69c510282a4e9ad1ea8fe771 (diff)
downloadopie-9c511809c55d48db528e6ef97ec9969fa5517381.zip
opie-9c511809c55d48db528e6ef97ec9969fa5517381.tar.gz
opie-9c511809c55d48db528e6ef97ec9969fa5517381.tar.bz2
replacement for systemtime now
Diffstat (limited to 'noncore/settings/netsystemtime/ntpbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntpbase.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/noncore/settings/netsystemtime/ntpbase.cpp b/noncore/settings/netsystemtime/ntpbase.cpp
index c10c6ae..8d44f17 100644
--- a/noncore/settings/netsystemtime/ntpbase.cpp
+++ b/noncore/settings/netsystemtime/ntpbase.cpp
@@ -23,67 +23,67 @@
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 */
29NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) 29NtpBase::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( 320, 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 QFrame( tabMain, "FrameSystemTime" ); 47 FrameSystemTime = new QWidget( tabMain, "FrameSystemTime" );
48 FrameSystemTime->setFrameShape( QFrame::StyledPanel ); 48 // FrameSystemTime->setFrameShape( QFrame::StyledPanel );
49 FrameSystemTime->setFrameShadow( QFrame::Raised ); 49 //FrameSystemTime->setFrameShadow( QFrame::Raised );
50 50
51 tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); 51 tabMainLayout->addWidget( FrameSystemTime, 0, 0 );
52 52
53 tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); 53 tabNtp = new QWidget( TabWidgetMain, "tabNtp" );
54 tabNtpLayout = new QGridLayout( tabNtp ); 54 tabNtpLayout = new QGridLayout( tabNtp );
55 tabNtpLayout->setSpacing( 2 ); 55 tabNtpLayout->setSpacing( 2 );
56 tabNtpLayout->setMargin( 1 ); 56 tabNtpLayout->setMargin( 1 );
57 57
58 runNtp = new QPushButton( tabNtp, "runNtp" ); 58 runNtp = new QPushButton( tabNtp, "runNtp" );
59 runNtp->setText( tr( "Get time from network" ) ); 59 runNtp->setText( tr( "Get time from network" ) );
60 60
61 tabNtpLayout->addWidget( runNtp, 1, 0 ); 61 tabNtpLayout->addWidget( runNtp, 1, 0 );
62 62
63 FrameNtp = new QFrame( tabNtp, "FrameNtp" ); 63 FrameNtp = new QWidget( tabNtp, "FrameNtp" );
64 FrameNtp->setFrameShape( QFrame::StyledPanel ); 64 // FrameNtp->setFrameShape( QFrame::StyledPanel );
65 FrameNtp->setFrameShadow( QFrame::Raised ); 65 // FrameNtp->setFrameShadow( QFrame::Raised );
66 FrameNtpLayout = new QGridLayout( FrameNtp ); 66 FrameNtpLayout = new QGridLayout( FrameNtp );
67 FrameNtpLayout->setSpacing( 2 ); 67 FrameNtpLayout->setSpacing( 2 );
68 FrameNtpLayout->setMargin( 2 ); 68 FrameNtpLayout->setMargin( 2 );
69 69
70 Layout4 = new QVBoxLayout; 70 Layout4 = new QVBoxLayout;
71 Layout4->setSpacing( 6 ); 71 Layout4->setSpacing( 6 );
72 Layout4->setMargin( 0 ); 72 Layout4->setMargin( 0 );
73 73
74 TextLabel1 = new QLabel( FrameNtp, "TextLabel1" ); 74 TextLabel1 = new QLabel( FrameNtp, "TextLabel1" );
75 TextLabel1->setAutoMask( FALSE ); 75 TextLabel1->setAutoMask( FALSE );
76 TextLabel1->setText( tr( "Start Time:" ) ); 76 TextLabel1->setText( tr( "Start Time:" ) );
77 Layout4->addWidget( TextLabel1 ); 77 Layout4->addWidget( TextLabel1 );
78 78
79 TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" ); 79 TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" );
80 TextLabelStartTime->setText( tr( "nan" ) ); 80 TextLabelStartTime->setText( tr( "nan" ) );
81 Layout4->addWidget( TextLabelStartTime ); 81 Layout4->addWidget( TextLabelStartTime );
82 82
83 TextLabel3 = new QLabel( FrameNtp, "TextLabel3" ); 83 TextLabel3 = new QLabel( FrameNtp, "TextLabel3" );
84 TextLabel3->setText( tr( "Time Shift:" ) ); 84 TextLabel3->setText( tr( "Time Shift:" ) );
85 Layout4->addWidget( TextLabel3 ); 85 Layout4->addWidget( TextLabel3 );
86 86
87 TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" ); 87 TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" );
88 TextLabelTimeShift->setText( tr( "nan" ) ); 88 TextLabelTimeShift->setText( tr( "nan" ) );
89 Layout4->addWidget( TextLabelTimeShift ); 89 Layout4->addWidget( TextLabelTimeShift );
@@ -159,51 +159,51 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
159 159
160 Layout9->addWidget( TextLabelPredTime, 2, 1 ); 160 Layout9->addWidget( TextLabelPredTime, 2, 1 );
161 161
162 tabPredictLayout->addLayout( Layout9, 1, 0 ); 162 tabPredictLayout->addLayout( Layout9, 1, 0 );
163 163
164 Layout11 = new QHBoxLayout; 164 Layout11 = new QHBoxLayout;
165 Layout11->setSpacing( 6 ); 165 Layout11->setSpacing( 6 );
166 Layout11->setMargin( 0 ); 166 Layout11->setMargin( 0 );
167 167
168 PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" ); 168 PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" );
169 PushButtonSetPredTime->setText( tr( "Set predicted time" ) ); 169 PushButtonSetPredTime->setText( tr( "Set predicted time" ) );
170 Layout11->addWidget( PushButtonSetPredTime ); 170 Layout11->addWidget( PushButtonSetPredTime );
171 171
172 PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" ); 172 PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" );
173 PushButtonPredict->setText( tr( "Predict time" ) ); 173 PushButtonPredict->setText( tr( "Predict time" ) );
174 Layout11->addWidget( PushButtonPredict ); 174 Layout11->addWidget( PushButtonPredict );
175 175
176 tabPredictLayout->addLayout( Layout11, 2, 0 ); 176 tabPredictLayout->addLayout( Layout11, 2, 0 );
177 177
178 TabSettings = new QWidget( TabWidgetMain, "TabSettings" ); 178 TabSettings = new QWidget( TabWidgetMain, "TabSettings" );
179 TabSettingsLayout = new QGridLayout( TabSettings ); 179 TabSettingsLayout = new QGridLayout( TabSettings );
180 TabSettingsLayout->setSpacing( 2 ); 180 TabSettingsLayout->setSpacing( 2 );
181 TabSettingsLayout->setMargin( 2 ); 181 TabSettingsLayout->setMargin( 2 );
182 182
183 FrameSettings = new QFrame( TabSettings, "FrameSettings" ); 183 FrameSettings = new QWidget( TabSettings, "FrameSettings" );
184 FrameSettings->setFrameShape( QFrame::StyledPanel ); 184 // FrameSettings->setFrameShape( QFrame::StyledPanel );
185 FrameSettings->setFrameShadow( QFrame::Raised ); 185 // FrameSettings->setFrameShadow( QFrame::Raised );
186 FrameSettingsLayout = new QVBoxLayout( FrameSettings ); 186 FrameSettingsLayout = new QVBoxLayout( FrameSettings );
187 FrameSettingsLayout->setSpacing( 6 ); 187 FrameSettingsLayout->setSpacing( 6 );
188 FrameSettingsLayout->setMargin( 11 ); 188 FrameSettingsLayout->setMargin( 11 );
189 189
190 Layout6 = new QGridLayout; 190 Layout6 = new QGridLayout;
191 Layout6->setSpacing( 6 ); 191 Layout6->setSpacing( 6 );
192 Layout6->setMargin( 0 ); 192 Layout6->setMargin( 0 );
193 193
194 TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" ); 194 TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" );
195 TextLabel7_2->setText( tr( "Use" ) ); 195 TextLabel7_2->setText( tr( "Use" ) );
196 196
197 Layout6->addWidget( TextLabel7_2, 0, 0 ); 197 Layout6->addWidget( TextLabel7_2, 0, 0 );
198 198
199 TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" ); 199 TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" );
200 TextLabel2_2->setText( tr( "as" ) ); 200 TextLabel2_2->setText( tr( "as" ) );
201 201
202 Layout6->addWidget( TextLabel2_2, 0, 2 ); 202 Layout6->addWidget( TextLabel2_2, 0, 2 );
203 203
204 TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" ); 204 TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" );
205 TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) ); 205 TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) );
206 TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); 206 TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
207 207
208 Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 ); 208 Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 );
209 209
@@ -270,51 +270,51 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
270 Layout7->addWidget( TextLabel2, 0, 2 ); 270 Layout7->addWidget( TextLabel2, 0, 2 );
271 271
272 TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" ); 272 TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" );
273 TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) ); 273 TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) );
274 TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); 274 TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) );
275 275
276 Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 ); 276 Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 );
277 277
278 SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" ); 278 SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" );
279 SpinBoxMinLookupDelay->setWrapping( TRUE ); 279 SpinBoxMinLookupDelay->setWrapping( TRUE );
280 SpinBoxMinLookupDelay->setMaxValue( 9999999 ); 280 SpinBoxMinLookupDelay->setMaxValue( 9999999 );
281 SpinBoxMinLookupDelay->setMinValue( 42 ); 281 SpinBoxMinLookupDelay->setMinValue( 42 );
282 SpinBoxMinLookupDelay->setValue( 720 ); 282 SpinBoxMinLookupDelay->setValue( 720 );
283 283
284 Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 ); 284 Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 );
285 FrameSettingsLayout->addLayout( Layout7 ); 285 FrameSettingsLayout->addLayout( Layout7 );
286 286
287 TabSettingsLayout->addWidget( FrameSettings, 0, 0 ); 287 TabSettingsLayout->addWidget( FrameSettings, 0, 0 );
288 288
289 tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" ); 289 tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" );
290 tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime ); 290 tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime );
291 tabManualSetTimeLayout->setSpacing( 2 ); 291 tabManualSetTimeLayout->setSpacing( 2 );
292 tabManualSetTimeLayout->setMargin( 2 ); 292 tabManualSetTimeLayout->setMargin( 2 );
293 293
294 FrameSetTime = new QFrame( tabManualSetTime, "FrameSetTime" ); 294 FrameSetTime = new QWidget( tabManualSetTime, "FrameSetTime" );
295 FrameSetTime->setFrameShape( QFrame::StyledPanel ); 295 // FrameSetTime->setFrameShape( QFrame::StyledPanel );
296 FrameSetTime->setFrameShadow( QFrame::Raised ); 296 // FrameSetTime->setFrameShadow( QFrame::Raised );
297 tabManualSetTimeLayout->addWidget( FrameSetTime ); 297 tabManualSetTimeLayout->addWidget( FrameSetTime );
298 298
299 PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); 299 PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" );
300 PushButtonSetManualTime->setText( tr( "Set time" ) ); 300 PushButtonSetManualTime->setText( tr( "Set time" ) );
301 tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); 301 tabManualSetTimeLayout->addWidget( PushButtonSetManualTime );
302 302
303 303
304 TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); 304 TabWidgetMain->insertTab( tabMain, tr( "Main" ) );
305 TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); 305 TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) );
306 TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); 306 TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) );
307 TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); 307 TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) );
308 TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); 308 TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) );
309 309
310 NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); 310 NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 );
311} 311}
312 312
313/* 313/*
314 * Destroys the object and frees any allocated resources 314 * Destroys the object and frees any allocated resources
315 */ 315 */
316NtpBase::~NtpBase() 316NtpBase::~NtpBase()
317{ 317{
318 // no need to delete child widgets, Qt does it all for us 318 // no need to delete child widgets, Qt does it all for us
319} 319}
320 320