-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,26 +1,26 @@ TEMPLATE = app CONFIG = qt warn_on debug #CONFIG = qt warn_on release -HEADERS = ntp.h settime.h ntpbase.h -SOURCES = main.cpp ntp.cpp settime.cpp ntpbase.cpp +HEADERS = ntp.h settime.h +SOURCES = main.cpp ntp.cpp settime.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -INTERFACES = +INTERFACES = ntpbase.ui DESTDIR = $(OPIEDIR)/bin TARGET = systemtime TRANSLATIONS = ../../../i18n/de/systemtime.ts \ ../../../i18n/en/systemtime.ts \ ../../../i18n/es/systemtime.ts \ ../../../i18n/fr/systemtime.ts \ ../../../i18n/hu/systemtime.ts \ ../../../i18n/ja/systemtime.ts \ ../../../i18n/ko/systemtime.ts \ ../../../i18n/no/systemtime.ts \ ../../../i18n/pl/systemtime.ts \ ../../../i18n/pt/systemtime.ts \ ../../../i18n/pt_BR/systemtime.ts \ ../../../i18n/sl/systemtime.ts \ ../../../i18n/zh_CN/systemtime.ts \ ../../../i18n/zh_TW/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 @@ -1,372 +1,400 @@ #include "ntp.h" #include <qpushbutton.h> #include <qregexp.h> #include <qtimer.h> #include <qtable.h> #include <qlabel.h> #include <qsocket.h> #include <qlineedit.h> #include <qspinbox.h> #include <qcheckbox.h> #include <qtabwidget.h> #include <qlayout.h> #include <qmessagebox.h> #include <qmultilineedit.h> #include <opie/oprocess.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/global.h> #include <qpe/timeconversion.h> #include <qpe/tzselect.h> #include <qpe/timestring.h> #include <qpe/qpedialog.h> #include <qpe/datebookdb.h> #include <qpe/qcopenvelope_qws.h> #include <sys/time.h> #include <time.h> #include <stdlib.h> Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) : SetDateTime( parent, name, fl ) { Config ntpSrvs(QPEApplication::qpeDir()+"etc/ntpservers",Config::File); ntpSrvs.setGroup("servers"); int srvCount = ntpSrvs.readNumEntry("count", 0 ); for (int i = 0; i < srvCount; i++) { ntpSrvs.setGroup(QString::number(i)); ComboNtpSrv->insertItem( ntpSrvs.readEntry("name") ); } if ( srvCount==0 ) ComboNtpSrv->insertItem(tr("time.fu-berlin.de")); Config cfg("ntp",Config::User); cfg.setGroup("settings"); SpinBoxMinLookupDelay->setValue( cfg.readNumEntry("minLookupDiff",720) ); SpinBoxNtpDelay->setValue( cfg.readNumEntry("ntpRefreshFreq",1440) ); ComboNtpSrv->setCurrentItem( cfg.readNumEntry("ntpServer", 0) ); + //make tab order + + TabWidgetMain->removePage( tabMain ); + TabWidgetMain->removePage( tabManualSetTime ); + TabWidgetMain->removePage( TabSettings ); + TabWidgetMain->removePage( tabPredict ); + TabWidgetMain->removePage( tabNtp ); + + TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); + TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); + TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); + TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); + TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); + NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); + + + bool advMode = cfg.readBoolEntry("advancedFeatures", false ); showAdvancedFeatures(advMode); CheckBoxAdvSettings->setChecked( advMode ); connect( CheckBoxAdvSettings, SIGNAL( toggled( bool ) ), SLOT( showAdvancedFeatures( bool ) ) ); makeChannel(); ntpTimer = new QTimer(this); ntpProcess = new OProcess( ); connect( SpinBoxNtpDelay, SIGNAL( valueChanged(int) ), SLOT(slotNtpDelayChanged(int)) ); ntpSock = new QSocket( this ); connect( ntpSock, SIGNAL( error(int) ), SLOT(slotCheckNtp(int)) ); slotProbeNtpServer(); connect ( ntpProcess, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(getNtpOutput(OProcess*,char*,int))); connect ( ntpProcess, SIGNAL(processExited(OProcess*)), this, SLOT(ntpFinished(OProcess*))); connect(runNtp, SIGNAL(clicked()), this, SLOT(slotRunNtp())); connect(PushButtonPredict, SIGNAL(clicked()), this, SLOT(preditctTime())); connect(PushButtonSetPredTime, SIGNAL(clicked()), this, SLOT(setPredictTime())); slotCheckNtp(-1); readLookups(); } Ntp::~Ntp() { delete ntpProcess; Config ntpSrvs("/etc/ntpservers",Config::File); ntpSrvs.setGroup("servers"); int srvCount = ComboNtpSrv->count(); ntpSrvs.writeEntry("count", srvCount); for (int i = 0; i < srvCount; i++){ ntpSrvs.setGroup(QString::number(i)); ntpSrvs.writeEntry( "name", ComboNtpSrv->text(i) ); } Config cfg("ntp",Config::User); cfg.setGroup("settings"); cfg.writeEntry("ntpServer", ComboNtpSrv->currentItem()); cfg.writeEntry( "minLookupDiff", SpinBoxMinLookupDelay->value() ); cfg.writeEntry( "ntpRefreshFreq", SpinBoxNtpDelay->value() ); cfg.writeEntry( "advancedFeatures", CheckBoxAdvSettings->isChecked() ); } bool Ntp::ntpDelayElapsed() { Config cfg("ntp",Config::User); cfg.setGroup("lookups"); _lookupDiff = TimeConversion::toUTC(QDateTime::currentDateTime()) - cfg.readNumEntry("time",0); if (_lookupDiff < 0) return true; int i =_lookupDiff - (SpinBoxNtpDelay->value()*60); return i > -60; } QString Ntp::getNtpServer() { return ComboNtpSrv->currentText(); } void Ntp::slotRunNtp() { - if ( !ntpDelayElapsed() ) + if ( !ntpDelayElapsed() && CheckBoxAdvSettings->isChecked() ) { switch ( QMessageBox::warning(this, tr("Run NTP?"), tr("You asked for a delay of ")+SpinBoxNtpDelay->text()+tr(" minutes, but only ")+ QString::number(_lookupDiff/60)+tr(" minutes elapsed since last lookup.")+ "<br>"+tr("Rerun NTP?"), QMessageBox::Ok,QMessageBox::Cancel) ) { case QMessageBox::Ok: break; case QMessageBox::Cancel: return; default: return; } } TextLabelStartTime->setText(QDateTime::currentDateTime().toString()); ntpOutPut( tr("Running:")+"\nntpdate "+getNtpServer() ); ntpProcess->clearArguments(); *ntpProcess << "ntpdate" << getNtpServer(); bool ret = ntpProcess->start(OProcess::NotifyOnExit,OProcess::AllOutput); if ( !ret ) { + QMessageBox::critical(this, tr("ntp error"), + tr("Error while getting time form network!")); qDebug("Error while executing ntpdate"); ntpOutPut( tr("Error while executing ntpdate")); } } void Ntp::getNtpOutput(OProcess *proc, char *buffer, int buflen) { + if (! proc ) qDebug("Ntp::getNtpOutput OProcess is null"); QString lineStr, lineStrOld; lineStr = buffer; lineStr=lineStr.left(buflen); if (lineStr!=lineStrOld) { ntpOutPut(lineStr); _ntpOutput += lineStr; } lineStrOld = lineStr; } void Ntp::ntpFinished(OProcess *p) { - // qDebug("p->exitStatus() %i",p->exitStatus()); + qDebug("p->exitStatus() %i",p->exitStatus()); if (p->exitStatus()!=0 || !p->normalExit()) { - slotProbeNtpServer(); + QMessageBox::critical(this, tr("ntp error"), + tr("Error while getting time form\n server")+ + getNtpServer()+"\n"+ + _ntpOutput ); + // TabWidgetMain->setCurrentPage( 1 ); + TabWidgetMain->showPage( tabManualSetTime ); + return; } Global::writeHWClock(); // since time has changed quickly load in the datebookdb // to allow the alarm server to get a better grip on itself // (example re-trigger alarms for when we travel back in time) DateBookDB db; // QCopEnvelope timeApplet( "QPE/TaskBar", "reloadApplets()" ); // timeApplet << ""; Config cfg("ntp",Config::User); cfg.setGroup("lookups"); int lastLookup = cfg.readNumEntry("time",0); int lookupCount = cfg.readNumEntry("count",0); bool lastNtp = cfg.readBoolEntry("lastNtp",false); int time = TimeConversion::toUTC( QDateTime::currentDateTime() ); cfg.writeEntry("time", time); float timeShift = getTimeShift(); if (timeShift == 0.0) return; int secsSinceLast = time - lastLookup; TextLabelNewTime->setText(QDateTime::currentDateTime().toString()); TextLabelTimeShift->setText(QString::number(timeShift)+tr(" seconds")); if ( lastNtp && lastLookup > 0 && secsSinceLast > 60* SpinBoxMinLookupDelay->value()) { cfg.setGroup("lookup_"+QString::number(lookupCount)); lookupCount++; _shiftPerSec = timeShift / secsSinceLast; qDebug("secs since last lookup %i", secsSinceLast);qDebug("timeshift since last lookup %f", timeShift);qDebug("timeshift since per sec %f", _shiftPerSec); cfg.writeEntry("secsSinceLast",secsSinceLast); cfg.writeEntry("timeShift",QString::number(timeShift)); cfg.setGroup("lookups"); cfg.writeEntry("count",lookupCount); cfg.writeEntry("lastNtp",true); } } float Ntp::getTimeShift() { QString _offset = "offset"; QString _sec = "sec"; QRegExp _reOffset = QRegExp(_offset); QRegExp _reEndOffset = QRegExp(_sec); int posOffset = _reOffset.match( _ntpOutput ); int posEndOffset = _reEndOffset.match( _ntpOutput, posOffset ); posOffset += _offset.length() + 1; QString diff = _ntpOutput.mid(posOffset, posEndOffset-posOffset-1); qDebug("%s", _ntpOutput.latin1()); qDebug("diff = >%s<",diff.latin1()); return diff.toFloat(); } void Ntp::readLookups() { Config cfg("ntp",Config::User); cfg.setGroup("lookups"); int lookupCount = cfg.readNumEntry("count",0); float last, shift, shiftPerSec; qDebug("lookupCount = %i",lookupCount); TableLookups->setNumCols( 3 ); TableLookups->setNumRows( lookupCount); TableLookups->horizontalHeader()->setLabel(1,tr("last [h]")); TableLookups->horizontalHeader()->setLabel(2,tr("offset [s]")); TableLookups->horizontalHeader()->setLabel(0,tr("shift [s/h]")); int cw = TableLookups->width()/4; qDebug("column width %i",cw); cw = 50; TableLookups->setColumnWidth( 0, cw+30 ); TableLookups->setColumnWidth( 1, cw ); TableLookups->setColumnWidth( 2, cw ); TableLookups->sortColumn(0, false, true ); // TableLookups->setSorting( true ); _shiftPerSec = 0; for (int i=0; i < lookupCount; i++) { cfg.setGroup("lookup_"+QString::number(i)); last = cfg.readEntry("secsSinceLast",0).toFloat(); shift = QString(cfg.readEntry("timeShift",0)).toFloat(); shiftPerSec = shift / last; qDebug("%i shift %f",i,shiftPerSec); _shiftPerSec += shiftPerSec; TableLookups->setText( i,0,QString::number(shiftPerSec*60*60)); TableLookups->setText( i,2,QString::number(shift)); TableLookups->setText( i,1,QString::number(last/(60*60))); } _shiftPerSec /= lookupCount; TextLabelShift->setText(QString::number(_shiftPerSec*60*60)+tr(" s/h")); } void Ntp::preditctTime() { Config cfg("ntp",Config::User); cfg.setGroup("lookups"); int lastTime = cfg.readNumEntry("time",0); cfg.writeEntry("lastNtp",true); setenv( "TZ", tz->currentZone(), 1 ); int now = TimeConversion::toUTC( QDateTime::currentDateTime() ); int corr = int((now - lastTime) * _shiftPerSec); TextLabelEstimatedShift->setText(QString::number(corr)+tr(" seconds")); predictedTime = QDateTime::currentDateTime().addSecs(corr); TextLabelPredTime->setText(predictedTime.toString()); TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); } void Ntp::setPredictTime() { preditctTime(); setTime( predictedTime ); } void Ntp::slotCheckNtp(int i) { if (i == 0) { TextLabelMainPredTime->hide(); ButtonSetTime->setText( tr("Get time from network") ); connect( ButtonSetTime, SIGNAL(clicked()), SLOT(slotRunNtp()) ); if ( ntpDelayElapsed() ) { slotRunNtp(); disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotProbeNtpServer()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotRunNtp()) ); }else{ disconnect(ntpTimer, SIGNAL( timeout() ), this, SLOT(slotRunNtp()) ); connect(ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } }else{ preditctTime(); ButtonSetTime->setText( tr("Set predicted time: ")+predictedTime.toString() ); if (i>0)ntpOutPut(tr("Could not connect to server ")+getNtpServer()); connect( ButtonSetTime, SIGNAL(clicked()), SLOT(setPredictTime()) ); connect( ntpTimer, SIGNAL( timeout() ), SLOT(slotProbeNtpServer()) ); } } void Ntp::slotProbeNtpServer() { ntpSock->connectToHost( getNtpServer() ,123); } void Ntp::slotNtpDelayChanged(int delay) { ntpTimer->changeInterval( delay*1000*60 ); } void Ntp::ntpOutPut(QString out) { + MultiLineEditntpOutPut->append(out); MultiLineEditntpOutPut->setCursorPosition(MultiLineEditntpOutPut->numLines() + 1,0,FALSE); } void Ntp::makeChannel() { channel = new QCopChannel( "QPE/Application/netsystemtime", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); } void Ntp::receive(const QCString &msg, const QByteArray &arg) { qDebug("QCop(Ntp) "+msg+" "+QCString(arg)); if ( msg == "ntpLookup(QString)" ) { slotRunNtp(); } if ( msg == "setPredictedTime(QString)" ) { setPredictTime(); }else{ qDebug("Ntp::receive: Huh what do ya want"); } } void Ntp::setDocument(const QString &fileName) { - + qDebug("Ntp::setDocument( %s )",fileName.latin1()); } void Ntp::showAdvancedFeatures(bool advMode) { if (advMode) { + TabWidgetMain->addTab( tabPredict, tr( "Predict" ) ); TabWidgetMain->addTab( tabNtp, tr( "NTP" ) ); TextLabel1_2_2->show(); TextLabel2_3->show(); TextLabel3_3_2->show(); TextLabel1_2->show(); SpinBoxMinLookupDelay->show(); TextLabel2->show(); TextLabel3_3->show(); SpinBoxNtpDelay->show(); Line1->show(); }else{ TabWidgetMain->removePage( tabPredict ); TabWidgetMain->removePage( tabNtp ); TextLabel1_2_2->hide(); TextLabel2_3->hide(); TextLabel3_3_2->hide(); TextLabel1_2->hide(); SpinBoxMinLookupDelay->hide(); TextLabel2->hide(); TextLabel3_3->hide(); SpinBoxNtpDelay->hide(); Line1->hide(); }; TabWidgetMain->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,338 +1,331 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'ntpbase.ui' ** -** Created: Mon Oct 21 21:32:47 2002 +** Created: Sun Nov 10 17:59:14 2002 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "ntpbase.h" #include <qcheckbox.h> #include <qcombobox.h> #include <qframe.h> #include <qlabel.h> #include <qmultilineedit.h> #include <qpushbutton.h> #include <qspinbox.h> #include <qtable.h> #include <qtabwidget.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> /* * Constructs a NtpBase which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ NtpBase::NtpBase( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "NtpBase" ); - resize( 320, 411 ); + resize( 317, 411 ); setCaption( tr( "Network Time" ) ); NtpBaseLayout = new QGridLayout( this ); NtpBaseLayout->setSpacing( 2 ); NtpBaseLayout->setMargin( 2 ); TabWidgetMain = new QTabWidget( this, "TabWidgetMain" ); tabMain = new QWidget( TabWidgetMain, "tabMain" ); tabMainLayout = new QGridLayout( tabMain ); tabMainLayout->setSpacing( 2 ); tabMainLayout->setMargin( 2 ); - FrameSystemTime = new QWidget( tabMain, "FrameSystemTime" ); - // FrameSystemTime->setFrameShape( QFrame::StyledPanel ); - //FrameSystemTime->setFrameShadow( QFrame::Raised ); + FrameSystemTime = new QFrame( tabMain, "FrameSystemTime" ); tabMainLayout->addWidget( FrameSystemTime, 0, 0 ); + TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); tabNtp = new QWidget( TabWidgetMain, "tabNtp" ); tabNtpLayout = new QGridLayout( tabNtp ); tabNtpLayout->setSpacing( 2 ); tabNtpLayout->setMargin( 1 ); runNtp = new QPushButton( tabNtp, "runNtp" ); runNtp->setText( tr( "Get time from network" ) ); tabNtpLayout->addWidget( runNtp, 1, 0 ); FrameNtp = new QWidget( tabNtp, "FrameNtp" ); - // FrameNtp->setFrameShape( QFrame::StyledPanel ); - // FrameNtp->setFrameShadow( QFrame::Raised ); FrameNtpLayout = new QGridLayout( FrameNtp ); FrameNtpLayout->setSpacing( 2 ); FrameNtpLayout->setMargin( 2 ); Layout4 = new QVBoxLayout; Layout4->setSpacing( 6 ); Layout4->setMargin( 0 ); TextLabel1 = new QLabel( FrameNtp, "TextLabel1" ); TextLabel1->setAutoMask( FALSE ); TextLabel1->setText( tr( "Start Time:" ) ); Layout4->addWidget( TextLabel1 ); TextLabelStartTime = new QLabel( FrameNtp, "TextLabelStartTime" ); TextLabelStartTime->setText( tr( "nan" ) ); Layout4->addWidget( TextLabelStartTime ); TextLabel3 = new QLabel( FrameNtp, "TextLabel3" ); TextLabel3->setText( tr( "Time Shift:" ) ); Layout4->addWidget( TextLabel3 ); TextLabelTimeShift = new QLabel( FrameNtp, "TextLabelTimeShift" ); TextLabelTimeShift->setText( tr( "nan" ) ); Layout4->addWidget( TextLabelTimeShift ); TextLabel5 = new QLabel( FrameNtp, "TextLabel5" ); TextLabel5->setText( tr( "New Time:" ) ); Layout4->addWidget( TextLabel5 ); TextLabelNewTime = new QLabel( FrameNtp, "TextLabelNewTime" ); TextLabelNewTime->setText( tr( "nan" ) ); Layout4->addWidget( TextLabelNewTime ); QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); Layout4->addItem( spacer ); FrameNtpLayout->addLayout( Layout4, 0, 0 ); MultiLineEditntpOutPut = new QMultiLineEdit( FrameNtp, "MultiLineEditntpOutPut" ); QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); MultiLineEditntpOutPut_font.setPointSize( 7 ); MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); MultiLineEditntpOutPut->setWordWrap( QMultiLineEdit::WidgetWidth ); MultiLineEditntpOutPut->setText( tr( "" ) ); FrameNtpLayout->addWidget( MultiLineEditntpOutPut, 1, 0 ); tabNtpLayout->addWidget( FrameNtp, 0, 0 ); + TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); tabPredict = new QWidget( TabWidgetMain, "tabPredict" ); tabPredictLayout = new QGridLayout( tabPredict ); tabPredictLayout->setSpacing( 6 ); tabPredictLayout->setMargin( 5 ); TableLookups = new QTable( tabPredict, "TableLookups" ); QFont TableLookups_font( TableLookups->font() ); TableLookups_font.setPointSize( 8 ); TableLookups->setFont( TableLookups_font ); TableLookups->setNumRows( 2 ); TableLookups->setNumCols( 2 ); tabPredictLayout->addWidget( TableLookups, 0, 0 ); Layout9 = new QGridLayout; Layout9->setSpacing( 6 ); Layout9->setMargin( 0 ); TextLabelShift = new QLabel( tabPredict, "TextLabelShift" ); TextLabelShift->setText( tr( "nan" ) ); Layout9->addWidget( TextLabelShift, 0, 1 ); TextLabel4 = new QLabel( tabPredict, "TextLabel4" ); TextLabel4->setText( tr( "Esimated Shift:" ) ); Layout9->addWidget( TextLabel4, 1, 0 ); TextLabelEstimatedShift = new QLabel( tabPredict, "TextLabelEstimatedShift" ); TextLabelEstimatedShift->setText( tr( "nan" ) ); Layout9->addWidget( TextLabelEstimatedShift, 1, 1 ); TextLabel3_2 = new QLabel( tabPredict, "TextLabel3_2" ); TextLabel3_2->setText( tr( "Predicted Time:" ) ); Layout9->addWidget( TextLabel3_2, 2, 0 ); Mean_shift_label = new QLabel( tabPredict, "Mean_shift_label" ); Mean_shift_label->setText( tr( "Mean shift:" ) ); Layout9->addWidget( Mean_shift_label, 0, 0 ); TextLabelPredTime = new QLabel( tabPredict, "TextLabelPredTime" ); TextLabelPredTime->setText( tr( "nan" ) ); Layout9->addWidget( TextLabelPredTime, 2, 1 ); tabPredictLayout->addLayout( Layout9, 1, 0 ); Layout11 = new QHBoxLayout; Layout11->setSpacing( 6 ); Layout11->setMargin( 0 ); PushButtonSetPredTime = new QPushButton( tabPredict, "PushButtonSetPredTime" ); PushButtonSetPredTime->setText( tr( "Set predicted time" ) ); Layout11->addWidget( PushButtonSetPredTime ); PushButtonPredict = new QPushButton( tabPredict, "PushButtonPredict" ); PushButtonPredict->setText( tr( "Predict time" ) ); Layout11->addWidget( PushButtonPredict ); tabPredictLayout->addLayout( Layout11, 2, 0 ); + TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); TabSettings = new QWidget( TabWidgetMain, "TabSettings" ); TabSettingsLayout = new QGridLayout( TabSettings ); TabSettingsLayout->setSpacing( 2 ); TabSettingsLayout->setMargin( 2 ); FrameSettings = new QWidget( TabSettings, "FrameSettings" ); - // FrameSettings->setFrameShape( QFrame::StyledPanel ); - // FrameSettings->setFrameShadow( QFrame::Raised ); FrameSettingsLayout = new QVBoxLayout( FrameSettings ); FrameSettingsLayout->setSpacing( 6 ); FrameSettingsLayout->setMargin( 11 ); Layout6 = new QGridLayout; Layout6->setSpacing( 6 ); Layout6->setMargin( 0 ); TextLabel7_2 = new QLabel( FrameSettings, "TextLabel7_2" ); TextLabel7_2->setText( tr( "Use" ) ); Layout6->addWidget( TextLabel7_2, 0, 0 ); TextLabel2_2 = new QLabel( FrameSettings, "TextLabel2_2" ); TextLabel2_2->setText( tr( "as" ) ); Layout6->addWidget( TextLabel2_2, 0, 2 ); TextLabel1_3 = new QLabel( FrameSettings, "TextLabel1_3" ); TextLabel1_3->setText( tr( "NTP server to get the time from the network." ) ); TextLabel1_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); Layout6->addMultiCellWidget( TextLabel1_3, 1, 1, 0, 1 ); ComboNtpSrv = new QComboBox( FALSE, FrameSettings, "ComboNtpSrv" ); ComboNtpSrv->setEditable( TRUE ); Layout6->addWidget( ComboNtpSrv, 0, 1 ); FrameSettingsLayout->addLayout( Layout6 ); QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); FrameSettingsLayout->addItem( spacer_2 ); CheckBoxAdvSettings = new QCheckBox( FrameSettings, "CheckBoxAdvSettings" ); - CheckBoxAdvSettings->setText( tr( "Advanced features" ) ); + CheckBoxAdvSettings->setText( tr( "Advanced settings" ) ); FrameSettingsLayout->addWidget( CheckBoxAdvSettings ); QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); FrameSettingsLayout->addItem( spacer_3 ); Line1 = new QFrame( FrameSettings, "Line1" ); Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); FrameSettingsLayout->addWidget( Line1 ); Layout7_2 = new QGridLayout; Layout7_2->setSpacing( 6 ); Layout7_2->setMargin( 0 ); TextLabel1_2_2 = new QLabel( FrameSettings, "TextLabel1_2_2" ); TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) ); TextLabel1_2_2->setText( tr( "Wait for " ) ); Layout7_2->addWidget( TextLabel1_2_2, 0, 0 ); TextLabel2_3 = new QLabel( FrameSettings, "TextLabel2_3" ); TextLabel2_3->setText( tr( "minutes until" ) ); Layout7_2->addWidget( TextLabel2_3, 0, 2 ); TextLabel3_3_2 = new QLabel( FrameSettings, "TextLabel3_3_2" ); TextLabel3_3_2->setText( tr( "NTP tries to syncronises the clock with the network." ) ); TextLabel3_3_2->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); Layout7_2->addMultiCellWidget( TextLabel3_3_2, 1, 1, 0, 2 ); SpinBoxNtpDelay = new QSpinBox( FrameSettings, "SpinBoxNtpDelay" ); SpinBoxNtpDelay->setWrapping( TRUE ); SpinBoxNtpDelay->setMaxValue( 9999999 ); SpinBoxNtpDelay->setMinValue( 1 ); SpinBoxNtpDelay->setValue( 1440 ); Layout7_2->addWidget( SpinBoxNtpDelay, 0, 1 ); FrameSettingsLayout->addLayout( Layout7_2 ); Layout7 = new QGridLayout; Layout7->setSpacing( 6 ); Layout7->setMargin( 0 ); TextLabel1_2 = new QLabel( FrameSettings, "TextLabel1_2" ); TextLabel1_2->setText( tr( "Insure a delay of" ) ); Layout7->addWidget( TextLabel1_2, 0, 0 ); TextLabel2 = new QLabel( FrameSettings, "TextLabel2" ); TextLabel2->setText( tr( "minutes until" ) ); Layout7->addWidget( TextLabel2, 0, 2 ); TextLabel3_3 = new QLabel( FrameSettings, "TextLabel3_3" ); TextLabel3_3->setText( tr( "a new NTP lookup will be used to predict the time." ) ); TextLabel3_3->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignLeft ) ); Layout7->addMultiCellWidget( TextLabel3_3, 1, 1, 0, 2 ); SpinBoxMinLookupDelay = new QSpinBox( FrameSettings, "SpinBoxMinLookupDelay" ); SpinBoxMinLookupDelay->setWrapping( TRUE ); SpinBoxMinLookupDelay->setMaxValue( 9999999 ); SpinBoxMinLookupDelay->setMinValue( 42 ); SpinBoxMinLookupDelay->setValue( 720 ); Layout7->addWidget( SpinBoxMinLookupDelay, 0, 1 ); FrameSettingsLayout->addLayout( Layout7 ); TabSettingsLayout->addWidget( FrameSettings, 0, 0 ); + TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); tabManualSetTime = new QWidget( TabWidgetMain, "tabManualSetTime" ); tabManualSetTimeLayout = new QVBoxLayout( tabManualSetTime ); - tabManualSetTimeLayout->setSpacing( 2 ); - tabManualSetTimeLayout->setMargin( 2 ); + tabManualSetTimeLayout->setSpacing( 6 ); + tabManualSetTimeLayout->setMargin( 11 ); FrameSetTime = new QWidget( tabManualSetTime, "FrameSetTime" ); - // FrameSetTime->setFrameShape( QFrame::StyledPanel ); - // FrameSetTime->setFrameShadow( QFrame::Raised ); + FrameSetTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)3, FrameSetTime->sizePolicy().hasHeightForWidth() ) ); tabManualSetTimeLayout->addWidget( FrameSetTime ); PushButtonSetManualTime = new QPushButton( tabManualSetTime, "PushButtonSetManualTime" ); PushButtonSetManualTime->setText( tr( "Set time" ) ); tabManualSetTimeLayout->addWidget( PushButtonSetManualTime ); - - - TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); + QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); + tabManualSetTimeLayout->addItem( spacer_4 ); TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); - TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); - TabWidgetMain->insertTab( tabPredict, tr( "Predict" ) ); - TabWidgetMain->insertTab( tabNtp, tr( "NTP" ) ); NtpBaseLayout->addWidget( TabWidgetMain, 0, 0 ); } /* * Destroys the object and frees any allocated resources */ NtpBase::~NtpBase() { // no need to delete child widgets, Qt does it all for us } /* * Main event handler. Reimplemented to handle application * font changes */ bool NtpBase::event( QEvent* ev ) { bool ret = QWidget::event( ev ); if ( ev->type() == QEvent::ApplicationFontChange ) { QFont MultiLineEditntpOutPut_font( MultiLineEditntpOutPut->font() ); MultiLineEditntpOutPut_font.setPointSize( 7 ); MultiLineEditntpOutPut->setFont( MultiLineEditntpOutPut_font ); QFont TableLookups_font( TableLookups->font() ); TableLookups_font.setPointSize( 8 ); TableLookups->setFont( TableLookups_font ); } return ret; } 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,96 +1,96 @@ /**************************************************************************** ** Form interface generated from reading ui file 'ntpbase.ui' ** -** Created: Mon Oct 21 21:32:43 2002 +** Created: Sun Nov 10 17:58:48 2002 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #ifndef NTPBASE_H #define NTPBASE_H #include <qvariant.h> #include <qwidget.h> class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QCheckBox; class QComboBox; class QFrame; class QLabel; class QMultiLineEdit; class QPushButton; class QSpinBox; class QTabWidget; class QTable; class NtpBase : public QWidget { Q_OBJECT public: NtpBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~NtpBase(); QTabWidget* TabWidgetMain; QWidget* tabMain; - QWidget* FrameSystemTime; + QFrame* FrameSystemTime; QWidget* tabNtp; QPushButton* runNtp; QWidget* FrameNtp; QLabel* TextLabel1; QLabel* TextLabelStartTime; QLabel* TextLabel3; QLabel* TextLabelTimeShift; QLabel* TextLabel5; QLabel* TextLabelNewTime; QMultiLineEdit* MultiLineEditntpOutPut; QWidget* tabPredict; QTable* TableLookups; QLabel* TextLabelShift; QLabel* TextLabel4; QLabel* TextLabelEstimatedShift; QLabel* TextLabel3_2; QLabel* Mean_shift_label; QLabel* TextLabelPredTime; QPushButton* PushButtonSetPredTime; QPushButton* PushButtonPredict; QWidget* TabSettings; QWidget* FrameSettings; QLabel* TextLabel7_2; QLabel* TextLabel2_2; QLabel* TextLabel1_3; QComboBox* ComboNtpSrv; QCheckBox* CheckBoxAdvSettings; QFrame* Line1; QLabel* TextLabel1_2_2; QLabel* TextLabel2_3; QLabel* TextLabel3_3_2; QSpinBox* SpinBoxNtpDelay; QLabel* TextLabel1_2; QLabel* TextLabel2; QLabel* TextLabel3_3; QSpinBox* SpinBoxMinLookupDelay; QWidget* tabManualSetTime; QWidget* FrameSetTime; QPushButton* PushButtonSetManualTime; protected: QGridLayout* NtpBaseLayout; QGridLayout* tabMainLayout; QGridLayout* tabNtpLayout; QGridLayout* FrameNtpLayout; QVBoxLayout* Layout4; QGridLayout* tabPredictLayout; QGridLayout* Layout9; QHBoxLayout* Layout11; QGridLayout* TabSettingsLayout; QVBoxLayout* FrameSettingsLayout; QGridLayout* Layout6; QGridLayout* Layout7_2; QGridLayout* Layout7; QVBoxLayout* tabManualSetTimeLayout; bool event( QEvent* ); }; #endif // NTPBASE_H 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 @@ -1,842 +1,838 @@ <!DOCTYPE UI><UI> <class>NtpBase</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>NtpBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>320</width> + <width>317</width> <height>411</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Network Time</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <grid> <property stdset="1"> <name>margin</name> <number>2</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="0" column="0" > <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>TabWidgetMain</cstring> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tabMain</cstring> </property> <attribute> <name>title</name> <string>Main</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>2</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="0" column="0" > <class>QFrame</class> <property stdset="1"> <name>name</name> <cstring>FrameSystemTime</cstring> </property> - <property stdset="1"> - <name>frameShape</name> - <enum>StyledPanel</enum> - </property> - <property stdset="1"> - <name>frameShadow</name> - <enum>Raised</enum> - </property> </widget> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tabNtp</cstring> </property> <attribute> <name>title</name> <string>NTP</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>1</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="1" column="0" > <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>runNtp</cstring> </property> <property stdset="1"> <name>text</name> <string>Get time from network</string> </property> </widget> <widget row="0" column="0" > <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>FrameNtp</cstring> </property> - <property stdset="1"> - <name>frameShape</name> - <enum>StyledPanel</enum> - </property> - <property stdset="1"> - <name>frameShadow</name> - <enum>Raised</enum> - </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <grid> <property stdset="1"> <name>margin</name> <number>2</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="0" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout4</cstring> </property> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1</cstring> </property> <property stdset="1"> <name>autoMask</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>Start Time:</string> </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelStartTime</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3</cstring> </property> <property stdset="1"> <name>text</name> <string>Time Shift:</string> </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelTimeShift</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel5</cstring> </property> <property stdset="1"> <name>text</name> <string>New Time:</string> </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelNewTime</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer1</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> <widget row="1" column="0" > <class>QMultiLineEdit</class> <property stdset="1"> <name>name</name> <cstring>MultiLineEditntpOutPut</cstring> </property> <property stdset="1"> <name>font</name> <font> <pointsize>7</pointsize> </font> </property> <property stdset="1"> <name>wordWrap</name> <enum>WidgetWidth</enum> </property> <property stdset="1"> <name>text</name> <string></string> </property> </widget> </grid> </widget> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tabPredict</cstring> </property> <attribute> <name>title</name> <string>Predict</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="0" column="0" > <class>QTable</class> <property stdset="1"> <name>name</name> <cstring>TableLookups</cstring> </property> <property stdset="1"> <name>font</name> <font> <pointsize>8</pointsize> </font> </property> <property stdset="1"> <name>numRows</name> <number>2</number> </property> <property stdset="1"> <name>numCols</name> <number>2</number> </property> </widget> <widget row="1" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout9</cstring> </property> <grid> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="0" column="1" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelShift</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> <widget row="1" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel4</cstring> </property> <property stdset="1"> <name>text</name> <string>Esimated Shift:</string> </property> </widget> <widget row="1" column="1" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelEstimatedShift</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> <widget row="2" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3_2</cstring> </property> <property stdset="1"> <name>text</name> <string>Predicted Time:</string> </property> </widget> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>Mean_shift_label</cstring> </property> <property stdset="1"> <name>text</name> <string>Mean shift:</string> </property> </widget> <widget row="2" column="1" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabelPredTime</cstring> </property> <property stdset="1"> <name>text</name> <string>nan</string> </property> </widget> </grid> </widget> <widget row="2" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout11</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>PushButtonSetPredTime</cstring> </property> <property stdset="1"> <name>text</name> <string>Set predicted time</string> </property> </widget> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>PushButtonPredict</cstring> </property> <property stdset="1"> <name>text</name> <string>Predict time</string> </property> </widget> </hbox> </widget> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>TabSettings</cstring> </property> <attribute> <name>title</name> <string>Settings</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>2</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="0" column="0" > <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>FrameSettings</cstring> </property> - <property stdset="1"> - <name>frameShape</name> - <enum>StyledPanel</enum> - </property> - <property stdset="1"> - <name>frameShadow</name> - <enum>Raised</enum> - </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <vbox> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout6</cstring> </property> <grid> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel7_2</cstring> </property> <property stdset="1"> <name>text</name> <string>Use</string> </property> </widget> <widget row="0" column="2" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_2</cstring> </property> <property stdset="1"> <name>text</name> <string>as</string> </property> </widget> <widget row="1" column="0" rowspan="1" colspan="2" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_3</cstring> </property> <property stdset="1"> <name>text</name> <string>NTP server to get the time from the network.</string> </property> <property stdset="1"> <name>alignment</name> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property> <name>wordwrap</name> </property> </widget> <widget row="0" column="1" > <class>QComboBox</class> <property stdset="1"> <name>name</name> <cstring>ComboNtpSrv</cstring> </property> <property stdset="1"> <name>editable</name> <bool>true</bool> </property> </widget> </grid> </widget> <spacer> <property> <name>name</name> <cstring>Spacer3</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Minimum</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBoxAdvSettings</cstring> </property> <property stdset="1"> <name>text</name> <string>Advanced settings</string> </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer4</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> <widget> <class>Line</class> <property stdset="1"> <name>name</name> <cstring>Line1</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Horizontal</enum> </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7_2</cstring> </property> <grid> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_2_2</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>1</hsizetype> <vsizetype>1</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>text</name> <string>Wait for </string> </property> </widget> <widget row="0" column="2" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_3</cstring> </property> <property stdset="1"> <name>text</name> <string>minutes until</string> </property> </widget> <widget row="1" column="0" rowspan="1" colspan="3" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3_3_2</cstring> </property> <property stdset="1"> <name>text</name> <string>NTP tries to syncronises the clock with the network.</string> </property> <property stdset="1"> <name>alignment</name> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property> <name>wordwrap</name> </property> </widget> <widget row="0" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>SpinBoxNtpDelay</cstring> </property> <property stdset="1"> <name>wrapping</name> <bool>true</bool> </property> <property stdset="1"> <name>maxValue</name> <number>9999999</number> </property> <property stdset="1"> <name>minValue</name> <number>1</number> </property> <property stdset="1"> <name>value</name> <number>1440</number> </property> </widget> </grid> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7</cstring> </property> <grid> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget row="0" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_2</cstring> </property> <property stdset="1"> <name>text</name> <string>Insure a delay of</string> </property> </widget> <widget row="0" column="2" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2</cstring> </property> <property stdset="1"> <name>text</name> <string>minutes until</string> </property> </widget> <widget row="1" column="0" rowspan="1" colspan="3" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3_3</cstring> </property> <property stdset="1"> <name>text</name> <string>a new NTP lookup will be used to predict the time.</string> </property> <property stdset="1"> <name>alignment</name> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property> <name>wordwrap</name> </property> </widget> <widget row="0" column="1" > <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>SpinBoxMinLookupDelay</cstring> </property> <property stdset="1"> <name>wrapping</name> <bool>true</bool> </property> <property stdset="1"> <name>maxValue</name> <number>9999999</number> </property> <property stdset="1"> <name>minValue</name> <number>42</number> </property> <property stdset="1"> <name>value</name> <number>720</number> </property> </widget> </grid> </widget> </vbox> </widget> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tabManualSetTime</cstring> </property> <attribute> <name>title</name> <string>Manual</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> - <number>2</number> + <number>11</number> </property> <property stdset="1"> <name>spacing</name> - <number>2</number> + <number>6</number> </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>FrameSetTime</cstring> </property> <property stdset="1"> - <name>frameShape</name> - <enum>StyledPanel</enum> - </property> - <property stdset="1"> - <name>frameShadow</name> - <enum>Raised</enum> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>3</vsizetype> + </sizepolicy> </property> </widget> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>PushButtonSetManualTime</cstring> </property> <property stdset="1"> <name>text</name> <string>Set time</string> </property> </widget> + <spacer> + <property> + <name>name</name> + <cstring>Spacer4_2</cstring> + </property> + <property stdset="1"> + <name>orientation</name> + <enum>Vertical</enum> + </property> + <property stdset="1"> + <name>sizeType</name> + <enum>Expanding</enum> + </property> + <property> + <name>sizeHint</name> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> </vbox> </widget> </widget> </grid> </widget> </UI> |