Diffstat (limited to 'noncore/settings/netsystemtime/ntp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/netsystemtime/ntp.cpp | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/noncore/settings/netsystemtime/ntp.cpp b/noncore/settings/netsystemtime/ntp.cpp index c7e3b52..53dbe46 100644 --- a/noncore/settings/netsystemtime/ntp.cpp +++ b/noncore/settings/netsystemtime/ntp.cpp @@ -58,3 +58,2 @@ Ntp::Ntp( QWidget* parent, const char* name, WFlags fl ) TabWidgetMain->insertTab( tabMain, tr( "Main" ) ); - TabWidgetMain->insertTab( tabManualSetTime, tr( "Manual" ) ); TabWidgetMain->insertTab( TabSettings, tr( "Settings" ) ); @@ -98,2 +97,5 @@ Ntp::~Ntp() delete ntpProcess; +} + +void Ntp::saveConfig(){ int srvCount = ComboNtpSrv->count(); @@ -201,5 +203,4 @@ void Ntp::ntpFinished(OProcess *p) QMessageBox::critical(this, tr("ntp error"),tr("Error while getting time form\n server")+getNtpServer()+"\n"+_ntpOutput ); - TabWidgetMain->showPage( tabManualSetTime ); } - +// slotCheckNtp(-1); return; @@ -207,11 +208,2 @@ void Ntp::ntpFinished(OProcess *p) - 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); @@ -308,3 +300,3 @@ void Ntp::preditctTime() TextLabelPredTime->setText(predictedTime.toString()); - TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); +// TextLabelMainPredTime->setText(tr("Predicted time:")+"<br><b>"+predictedTime.toString()+"</b>"); } @@ -313,4 +305,5 @@ void Ntp::setPredictTime() { + qDebug("Ntp::setPredictTime"); preditctTime(); - setTime( predictedTime ); + timeButton->setTime( predictedTime ); } @@ -319,5 +312,6 @@ void Ntp::slotCheckNtp(int i) { + qDebug(" Ntp::slotCheckNtp(%i)",i); if (i == 0) { - TextLabelMainPredTime->hide(); +// TextLabelMainPredTime->hide(); ButtonSetTime->setText( tr("Get time from network") ); @@ -420 +414,13 @@ void Ntp::showAdvancedFeatures(bool advMode) } + + +void Ntp::accept( ){ + qDebug("accepted"); + //SetTimeDate + commitTime(); + writeSettings(); + updateSystem(); + // Ntp + saveConfig(); + qApp->quit(); +}
\ No newline at end of file |