ExoplanetsDialog.cpp   ExoplanetsDialog.cpp 
skipping to change at line 75 skipping to change at line 75
// Initialize the dialog widgets and connect the signals/slots // Initialize the dialog widgets and connect the signals/slots
void ExoplanetsDialog::createDialogContent() void ExoplanetsDialog::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(Exoplanets)->getDi
splayMode());
connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SL
OT(setDistributionEnabled(int)));
ui->timelineModeCheckBox->setChecked(GETSTELMODULE(Exoplanets)->getT
imelineMode());
connect(ui->timelineModeCheckBox, SIGNAL(stateChanged(int)), this, S
LOT(setTimelineEnabled(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(Exoplanets), SIGNAL(updateStateChanged(Exoplan ets::UpdateState)), this, SLOT(updateStateReceiver(Exoplanets::UpdateState) )); connect(GETSTELMODULE(Exoplanets), SIGNAL(updateStateChanged(Exoplan ets::UpdateState)), this, SLOT(updateStateReceiver(Exoplanets::UpdateState) ));
connect(GETSTELMODULE(Exoplanets), SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompleteReceiver(void))); connect(GETSTELMODULE(Exoplanets), SIGNAL(jsonUpdateComplete(void)), this, 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 156 skipping to change at line 160
else else
ui->nextUpdateLabel->setText(QString(q_("Next update: %1 hou rs")).arg((secondsToUpdate/3600)+1)); ui->nextUpdateLabel->setText(QString(q_("Next update: %1 hou rs")).arg((secondsToUpdate/3600)+1));
} }
void ExoplanetsDialog::setUpdateValues(int hours) void ExoplanetsDialog::setUpdateValues(int hours)
{ {
GETSTELMODULE(Exoplanets)->setUpdateFrequencyHours(hours); GETSTELMODULE(Exoplanets)->setUpdateFrequencyHours(hours);
refreshUpdateValues(); refreshUpdateValues();
} }
void ExoplanetsDialog::setDistributionEnabled(int checkState)
{
bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Exoplanets)->setDisplayMode(b);
}
void ExoplanetsDialog::setTimelineEnabled(int checkState)
{
bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Exoplanets)->setTimelineMode(b);
}
void ExoplanetsDialog::setUpdatesEnabled(int checkState) void ExoplanetsDialog::setUpdatesEnabled(int checkState)
{ {
bool b = checkState != Qt::Unchecked; bool b = checkState != Qt::Unchecked;
GETSTELMODULE(Exoplanets)->setUpdatesEnabled(b); GETSTELMODULE(Exoplanets)->setUpdatesEnabled(b);
ui->updateFrequencySpinBox->setEnabled(b); ui->updateFrequencySpinBox->setEnabled(b);
if(b) if(b)
ui->updateButton->setText(q_("Update now")); ui->updateButton->setText(q_("Update now"));
else else
ui->updateButton->setText(q_("Update from files")); ui->updateButton->setText(q_("Update from files"));
 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/