Diffstat (limited to 'noncore/settings/netsystemtime/ntpbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntpbase.cpp | 33 |
1 files changed, 13 insertions, 20 deletions
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 |