summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/ntpbase.cpp
Unidiff
Diffstat (limited to 'noncore/settings/netsystemtime/ntpbase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/ntpbase.cpp33
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,16 +1,16 @@
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>
@@ -22,56 +22,53 @@
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 */
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( 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 );
@@ -101,24 +98,25 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
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 );
@@ -165,33 +163,32 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
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 );
@@ -207,25 +204,25 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
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
@@ -276,45 +273,41 @@ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl )
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 */
316NtpBase::~NtpBase() 309NtpBase::~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