TelescopeConfigurationDialog.cpp   TelescopeConfigurationDialog.cpp 
skipping to change at line 118 skipping to change at line 118
plist->append(fileInfo.absoluteFilePath()); plist->append(fileInfo.absoluteFilePath());
} }
#endif #endif
return plist; return plist;
} }
void TelescopeConfigurationDialog::retranslate() void TelescopeConfigurationDialog::retranslate()
{ {
if (dialog) if (dialog)
{
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
populateToolTips();
}
} }
// Initialize the dialog widgets and connect the signals/slots // Initialize the dialog widgets and connect the signals/slots
void TelescopeConfigurationDialog::createDialogContent() void TelescopeConfigurationDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
//Inherited connect //Inherited connect
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(buttonDis cardPressed())); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(buttonDis cardPressed()));
skipping to change at line 148 skipping to change at line 151
connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSave Pressed())); connect(ui->pushButtonSave, SIGNAL(clicked()), this, SLOT(buttonSave Pressed()));
connect(ui->pushButtonDiscard, SIGNAL(clicked()), this, SLOT(buttonD iscardPressed())); connect(ui->pushButtonDiscard, SIGNAL(clicked()), this, SLOT(buttonD iscardPressed()));
connect(ui->comboBoxDeviceModel, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(deviceModelSelected(const QString&))); connect(ui->comboBoxDeviceModel, SIGNAL(currentIndexChanged(const QS tring&)), this, SLOT(deviceModelSelected(const QString&)));
//Setting validators //Setting validators
ui->lineEditTelescopeName->setValidator(telescopeNameValidator); ui->lineEditTelescopeName->setValidator(telescopeNameValidator);
ui->lineEditHostName->setValidator(hostNameValidator); ui->lineEditHostName->setValidator(hostNameValidator);
ui->lineEditCircleList->setValidator(circleListValidator); ui->lineEditCircleList->setValidator(circleListValidator);
ui->comboSerialPort->setValidator(serialPortValidator); ui->comboSerialPort->setValidator(serialPortValidator);
populateToolTips();
}
void TelescopeConfigurationDialog::populateToolTips()
{
ui->doubleSpinBoxTelescopeDelay->setToolTip(QString("<p>%1</p>").arg
(q_("The approximate time it takes for the signals from the telescope to re
ach Stellarium. Increase this value if the reticle is skipping.")));
ui->doubleSpinBoxRTS2Refresh->setToolTip(QString("<p>%1</p>").arg(q_
("Refresh rate of the RTS2 telescope. Delay before sending next telescope s
tatus request. The default value of 0.5 second works fine with most setups.
")));
} }
//Set the configuration panel in a predictable state //Set the configuration panel in a predictable state
void TelescopeConfigurationDialog::initConfigurationDialog() void TelescopeConfigurationDialog::initConfigurationDialog()
{ {
ui->groupBoxConnectionSettings->hide(); ui->groupBoxConnectionSettings->hide();
ui->groupBoxDeviceSettings->hide(); ui->groupBoxDeviceSettings->hide();
ui->groupBoxRTS2Settings->hide(); ui->groupBoxRTS2Settings->hide();
//Reusing code used in both methods that call this one //Reusing code used in both methods that call this one
skipping to change at line 236 skipping to change at line 247
QString host; QString host;
int portTCP; int portTCP;
int delay; int delay;
bool connectAtStartup; bool connectAtStartup;
QList<double> circles; QList<double> circles;
QString deviceModelName; QString deviceModelName;
QString serialPortName; QString serialPortName;
QString rts2Url; QString rts2Url;
QString rts2Username; QString rts2Username;
QString rts2Password; QString rts2Password;
if(!telescopeManager->getTelescopeAtSlot(slot, connectionType, name, int rts2Refresh;
equinox, host, portTCP, delay, connectAtStartup, circles, deviceModelName, if(!telescopeManager->getTelescopeAtSlot(slot, connectionType, name,
serialPortName, rts2Url, rts2Username, rts2Password)) equinox, host, portTCP, delay, connectAtStartup, circles, deviceModelName,
serialPortName, rts2Url, rts2Username, rts2Password, rts2Refresh))
{ {
//TODO: Add debug //TODO: Add debug
return; return;
} }
ui->lineEditTelescopeName->setText(name); ui->lineEditTelescopeName->setText(name);
if(!deviceModelName.isEmpty()) if(!deviceModelName.isEmpty())
{ {
ui->radioButtonTelescopeLocal->setChecked(true); ui->radioButtonTelescopeLocal->setChecked(true);
skipping to change at line 286 skipping to change at line 298
else if (connectionType == ConnectionVirtual) else if (connectionType == ConnectionVirtual)
{ {
ui->radioButtonTelescopeVirtual->setChecked(true); ui->radioButtonTelescopeVirtual->setChecked(true);
} }
else if (connectionType == ConnectionRTS2) else if (connectionType == ConnectionRTS2)
{ {
ui->radioButtonTelescopeRTS2->setChecked(true); ui->radioButtonTelescopeRTS2->setChecked(true);
ui->lineEditRTS2Url->setText(rts2Url); ui->lineEditRTS2Url->setText(rts2Url);
ui->lineEditRTS2Username->setText(rts2Username); ui->lineEditRTS2Username->setText(rts2Username);
ui->lineEditRTS2Password->setText(rts2Password); ui->lineEditRTS2Password->setText(rts2Password);
ui->doubleSpinBoxRTS2Refresh->setValue(SECONDS_FROM_MICROSEC ONDS(rts2Refresh));
} }
//Equinox //Equinox
if (equinox == "JNow") if (equinox == "JNow")
ui->radioButtonJNow->setChecked(true); ui->radioButtonJNow->setChecked(true);
else else
ui->radioButtonJ2000->setChecked(true); ui->radioButtonJ2000->setChecked(true);
//Circles //Circles
if(!circles.isEmpty()) if(!circles.isEmpty())
skipping to change at line 447 skipping to change at line 460
telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, host, portTCP, delay, connectAtStartup, circles); telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, host, portTCP, delay, connectAtStartup, circles);
} }
else if (ui->radioButtonTelescopeVirtual->isChecked()) else if (ui->radioButtonTelescopeVirtual->isChecked())
{ {
type = ConnectionVirtual; type = ConnectionVirtual;
telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, QString(), portTCP, delay, connectAtStartup, circles); telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, QString(), portTCP, delay, connectAtStartup, circles);
} }
else if (ui->radioButtonTelescopeRTS2->isChecked()) else if (ui->radioButtonTelescopeRTS2->isChecked())
{ {
type = ConnectionRTS2; type = ConnectionRTS2;
telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, host, portTCP, delay, connectAtStartup, circles, QString(), Q String(), ui->lineEditRTS2Url->text(), ui->lineEditRTS2Username->text(), ui ->lineEditRTS2Password->text()); telescopeManager->addTelescopeAtSlot(configuredSlot, type, n ame, equinox, host, portTCP, delay, connectAtStartup, circles, QString(), Q String(), ui->lineEditRTS2Url->text(), ui->lineEditRTS2Username->text(), ui ->lineEditRTS2Password->text(), MICROSECONDS_FROM_SECONDS(ui->doubleSpinBox RTS2Refresh->value()));
} }
emit changesSaved(name, type); emit changesSaved(name, type);
} }
void TelescopeConfigurationDialog::buttonDiscardPressed() void TelescopeConfigurationDialog::buttonDiscardPressed()
{ {
emit changesDiscarded(); emit changesDiscarded();
} }
 End of changes. 6 change blocks. 
4 lines changed or deleted 22 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/