QuasarsDialog.cpp   QuasarsDialog.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"
QuasarsDialog::QuasarsDialog() QuasarsDialog::QuasarsDialog()
: qsr(NULL) : qsr(NULL)
, updateTimer(NULL) , updateTimer(NULL)
{ {
ui = new Ui_quasarsDialog; ui = new Ui_quasarsDialog;
dialogName = "Quasars";
} }
QuasarsDialog::~QuasarsDialog() QuasarsDialog::~QuasarsDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = NULL;
} }
skipping to change at line 88 skipping to change at line 89
ui->displayModeCheckBox->setChecked(qsr->getDisplayMode()); ui->displayModeCheckBox->setChecked(qsr->getDisplayMode());
connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SL OT(setDistributionEnabled(int))); connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SL OT(setDistributionEnabled(int)));
ui->displayAtStartupCheckBox->setChecked(qsr->getEnableAtStartup()); ui->displayAtStartupCheckBox->setChecked(qsr->getEnableAtStartup());
connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int))); connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int)));
ui->displayShowQuasarsButton->setChecked(qsr->getFlagShowQuasarsButt on()); ui->displayShowQuasarsButton->setChecked(qsr->getFlagShowQuasarsButt on());
connect(ui->displayShowQuasarsButton, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayShowQuasarsButton(int))); connect(ui->displayShowQuasarsButton, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayShowQuasarsButton(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(qsr, SIGNAL(updateStateChanged(Quasars::UpdateState)), this, SLOT(updateStateReceiver(Quasars::UpdateState))); connect(qsr, SIGNAL(updateStateChanged(Quasars::UpdateState)), this, SLOT(updateStateReceiver(Quasars::UpdateState)));
connect(qsr, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateComp leteReceiver(void))); connect(qsr, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateComp leteReceiver(void)));
connect(qsr, SIGNAL(jsonUpdateComplete(void)), qsr, 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 230 skipping to change at line 233
ui->nextUpdateLabel->setText(QString(q_("Quasars is updated"))); ui->nextUpdateLabel->setText(QString(q_("Quasars 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(qsr->getLastUpdate()); ui->lastUpdateDateTimeEdit->setDateTime(qsr->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 QuasarsDialog::restoreDefaults(void) void QuasarsDialog::restoreDefaults(void)
{ {
qDebug() << "Quasars::restoreDefaults"; qDebug() << "[Quasars] Restore defaults...";
qsr->restoreDefaults(); qsr->restoreDefaults();
qsr->readSettingsFromConfig(); qsr->readSettingsFromConfig();
updateGuiFromSettings(); updateGuiFromSettings();
} }
void QuasarsDialog::updateGuiFromSettings(void) void QuasarsDialog::updateGuiFromSettings(void)
{ {
ui->internetUpdatesCheckbox->setChecked(qsr->getUpdatesEnabled()); ui->internetUpdatesCheckbox->setChecked(qsr->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/