PulsarsDialog.cpp   PulsarsDialog.cpp 
skipping to change at line 77 skipping to change at line 77
void PulsarsDialog::createDialogContent() void PulsarsDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
ui->tabs->setCurrentIndex(0); ui->tabs->setCurrentIndex(0);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
this, SLOT(retranslate())); this, SLOT(retranslate()));
// Settings tab / updates group // Settings tab / updates group
ui->displayModeCheckBox->setChecked(GETSTELMODULE(Pulsars)->getDispl ayMode()); ui->displayModeCheckBox->setChecked(GETSTELMODULE(Pulsars)->getDispl ayMode());
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(GETSTELMODULE(Pulsars)->get
EnableAtStartup());
connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi
s, SLOT(setDisplayAtStartupEnabled(int)));
ui->displayShowPulsarsButton->setChecked(GETSTELMODULE(Pulsars)->get
FlagShowPulsarsButton());
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(GETSTELMODULE(Pulsars), SIGNAL(updateStateChanged(Pulsars::U pdateState)), this, SLOT(updateStateReceiver(Pulsars::UpdateState))); connect(GETSTELMODULE(Pulsars), SIGNAL(updateStateChanged(Pulsars::U pdateState)), this, SLOT(updateStateReceiver(Pulsars::UpdateState)));
connect(GETSTELMODULE(Pulsars), SIGNAL(jsonUpdateComplete(void)), th is, SLOT(updateCompleteReceiver(void))); connect(GETSTELMODULE(Pulsars), SIGNAL(jsonUpdateComplete(void)), th is, SLOT(updateCompleteReceiver(void)));
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);
skipping to change at line 198 skipping to change at line 202
refreshUpdateValues(); refreshUpdateValues();
} }
void PulsarsDialog::setDistributionEnabled(int checkState) void PulsarsDialog::setDistributionEnabled(int checkState)
{ {
bool b = checkState != Qt::Unchecked; bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Pulsars)->setDisplayMode(b); GETSTELMODULE(Pulsars)->setDisplayMode(b);
} }
void PulsarsDialog::setDisplayAtStartupEnabled(int checkState)
{
bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Pulsars)->setEnableAtStartup(b);
}
void PulsarsDialog::setDisplayShowPulsarsButton(int checkState)
{
bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Pulsars)->setFlagShowPulsarsButton(b);
}
void PulsarsDialog::updateStateReceiver(Pulsars::UpdateState state) void PulsarsDialog::updateStateReceiver(Pulsars::UpdateState state)
{ {
//qDebug() << "PulsarsDialog::updateStateReceiver got a signal"; //qDebug() << "PulsarsDialog::updateStateReceiver got a signal";
if (state==Pulsars::Updating) if (state==Pulsars::Updating)
ui->nextUpdateLabel->setText(q_("Updating now...")); ui->nextUpdateLabel->setText(q_("Updating now..."));
else if (state==Pulsars::DownloadError || state==Pulsars::OtherError ) else if (state==Pulsars::DownloadError || state==Pulsars::OtherError )
{ {
ui->nextUpdateLabel->setText(q_("Update error")); ui->nextUpdateLabel->setText(q_("Update error"));
updateTimer->start(); // make sure message is displayed for a while... updateTimer->start(); // make sure message is displayed for a while...
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 20 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/