PulsarsDialog.cpp   PulsarsDialog.cpp 
skipping to change at line 45 skipping to change at line 45
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
PulsarsDialog::PulsarsDialog() PulsarsDialog::PulsarsDialog()
: psr(NULL) : psr(NULL)
, updateTimer(NULL) , updateTimer(NULL)
{ {
ui = new Ui_pulsarsDialog; ui = new Ui_pulsarsDialog;
dialogName = "Pulsars";
} }
PulsarsDialog::~PulsarsDialog() PulsarsDialog::~PulsarsDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = NULL;
} }
skipping to change at line 97 skipping to change at line 98
ui->displayAtStartupCheckBox->setChecked(psr->getEnableAtStartup()); ui->displayAtStartupCheckBox->setChecked(psr->getEnableAtStartup());
connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int))); connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int)));
ui->displayShowPulsarsButton->setChecked(psr->getFlagShowPulsarsButt on()); ui->displayShowPulsarsButton->setChecked(psr->getFlagShowPulsarsButt on());
ui->displaySeparateColorsCheckBox->setChecked(psr->getGlitchFlag()); ui->displaySeparateColorsCheckBox->setChecked(psr->getGlitchFlag());
connect(ui->displaySeparateColorsCheckBox, SIGNAL(stateChanged(int)) , this, SLOT(setSeparateColorsFlag(int))); connect(ui->displaySeparateColorsCheckBox, SIGNAL(stateChanged(int)) , this, SLOT(setSeparateColorsFlag(int)));
connect(ui->displayShowPulsarsButton, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayShowPulsarsButton(int))); connect(ui->displayShowPulsarsButton, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayShowPulsarsButton(int)));
connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this , SLOT(setUpdatesEnabled(int))); connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this , SLOT(setUpdatesEnabled(int)));
connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON() )); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON() ));
connect(psr, SIGNAL(updateStateChanged(Pulsars::UpdateState)), this, SLOT(updateStateReceiver(Pulsars::UpdateState))); connect(psr, SIGNAL(updateStateChanged(Pulsars::UpdateState)), this, SLOT(updateStateReceiver(Pulsars::UpdateState)));
connect(psr, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateComp leteReceiver(void))); connect(psr, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateComp leteReceiver(void)));
connect(psr, SIGNAL(jsonUpdateComplete(void)), psr, SLOT(reloadCatal og()));
connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int)));
refreshUpdateValues(); // fetch values for last updated and so on refreshUpdateValues(); // fetch values for last updated and so on
// if the state didn't change, setUpdatesEnabled will not be called, so we force it // if the state didn't change, setUpdatesEnabled will not be called, so we force it
setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState()); setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState());
updateTimer = new QTimer(this); updateTimer = new QTimer(this);
connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValu es())); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValu es()));
updateTimer->start(7000); updateTimer->start(7000);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res toreDefaults())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res toreDefaults()));
connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSe ttings())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSe ttings()));
// About tab // About tab
setAboutHtml(); setAboutHtml();
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
if(gui!=NULL) if(gui!=NULL)
ui->aboutTextBrowser->document()->setDefaultStyleSheet(QStri ng(gui->getStelStyle().htmlStyleSheet)); ui->aboutTextBrowser->document()->setDefaultStyleSheet(QStri ng(gui->getStelStyle().htmlStyleSheet));
skipping to change at line 259 skipping to change at line 262
ui->nextUpdateLabel->setText(QString(q_("Pulsars is updated"))); ui->nextUpdateLabel->setText(QString(q_("Pulsars is updated")));
// display the status for another full interval before refreshing st atus // display the status for another full interval before refreshing st atus
updateTimer->start(); updateTimer->start();
ui->lastUpdateDateTimeEdit->setDateTime(psr->getLastUpdate()); ui->lastUpdateDateTimeEdit->setDateTime(psr->getLastUpdate());
QTimer *timer = new QTimer(this); QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())) ; connect(timer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())) ;
} }
void PulsarsDialog::restoreDefaults(void) void PulsarsDialog::restoreDefaults(void)
{ {
qDebug() << "Pulsars::restoreDefaults"; qDebug() << "[Pulsars] Restore defaults...";
psr->restoreDefaults(); psr->restoreDefaults();
psr->readSettingsFromConfig(); psr->readSettingsFromConfig();
updateGuiFromSettings(); updateGuiFromSettings();
} }
void PulsarsDialog::updateGuiFromSettings(void) void PulsarsDialog::updateGuiFromSettings(void)
{ {
ui->internetUpdatesCheckbox->setChecked(psr->getUpdatesEnabled()); ui->internetUpdatesCheckbox->setChecked(psr->getUpdatesEnabled());
refreshUpdateValues(); refreshUpdateValues();
} }
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/