SearchDialog.cpp   SearchDialog.cpp 
skipping to change at line 135 skipping to change at line 135
} }
// Start of members for class SearchDialog // Start of members for class SearchDialog
const char* SearchDialog::DEF_SIMBAD_URL = "http://simbad.u-strasbg.fr/"; const char* SearchDialog::DEF_SIMBAD_URL = "http://simbad.u-strasbg.fr/";
SearchDialog::SearchDialogStaticData SearchDialog::staticData; SearchDialog::SearchDialogStaticData SearchDialog::staticData;
QString SearchDialog::extSearchText = ""; QString SearchDialog::extSearchText = "";
SearchDialog::SearchDialog(QObject* parent) SearchDialog::SearchDialog(QObject* parent)
: StelDialog("Search", parent) : StelDialog("Search", parent)
, simbadReply(NULL) , simbadReply(Q_NULLPTR)
, flagHasSelectedText(false) , flagHasSelectedText(false)
{ {
ui = new Ui_searchDialogForm; ui = new Ui_searchDialogForm;
simbadSearcher = new SimbadSearcher(this); simbadSearcher = new SimbadSearcher(this);
objectMgr = GETSTELMODULE(StelObjectMgr); objectMgr = GETSTELMODULE(StelObjectMgr);
Q_ASSERT(objectMgr); Q_ASSERT(objectMgr);
conf = StelApp::getInstance().getSettings(); conf = StelApp::getInstance().getSettings();
useSimbad = conf->value("search/flag_search_online", true).toBool(); useSimbad = conf->value("search/flag_search_online", true).toBool();
useStartOfWords = conf->value("search/flag_start_words", false).toBo ol(); useStartOfWords = conf->value("search/flag_start_words", false).toBo ol();
skipping to change at line 157 skipping to change at line 157
simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD _URL).toString(); simbadServerUrl = conf->value("search/simbad_server_url", DEF_SIMBAD _URL).toString();
setCurrentCoordinateSystemKey(conf->value("search/coordinate_system" , "equatorialJ2000").toString()); setCurrentCoordinateSystemKey(conf->value("search/coordinate_system" , "equatorialJ2000").toString());
} }
SearchDialog::~SearchDialog() SearchDialog::~SearchDialog()
{ {
delete ui; delete ui;
if (simbadReply) if (simbadReply)
{ {
simbadReply->deleteLater(); simbadReply->deleteLater();
simbadReply = NULL; simbadReply = Q_NULLPTR;
} }
} }
void SearchDialog::retranslate() void SearchDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
QString text(ui->lineEditSearchSkyObject->text()); QString text(ui->lineEditSearchSkyObject->text());
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
ui->lineEditSearchSkyObject->setText(text); ui->lineEditSearchSkyObject->setText(text);
skipping to change at line 408 skipping to change at line 408
void SearchDialog::setHasSelectedFlag() void SearchDialog::setHasSelectedFlag()
{ {
flagHasSelectedText = true; flagHasSelectedText = true;
} }
void SearchDialog::enableSimbadSearch(bool enable) void SearchDialog::enableSimbadSearch(bool enable)
{ {
useSimbad = enable; useSimbad = enable;
conf->setValue("search/flag_search_online", useSimbad); conf->setValue("search/flag_search_online", useSimbad);
ui->simbadStatusLabel->clear();
} }
void SearchDialog::enableStartOfWordsAutofill(bool enable) void SearchDialog::enableStartOfWordsAutofill(bool enable)
{ {
useStartOfWords = enable; useStartOfWords = enable;
conf->setValue("search/flag_start_words", useStartOfWords); conf->setValue("search/flag_start_words", useStartOfWords);
} }
void SearchDialog::enableLockPosition(bool enable) void SearchDialog::enableLockPosition(bool enable)
{ {
skipping to change at line 549 skipping to change at line 550
{ {
// This block needs to go before the trimmedText.isEmpty() or the SI MBAD result does not // This block needs to go before the trimmedText.isEmpty() or the SI MBAD result does not
// get properly cleared. // get properly cleared.
if (useSimbad) { if (useSimbad) {
if (simbadReply) { if (simbadReply) {
disconnect(simbadReply, disconnect(simbadReply,
SIGNAL(statusChanged()), SIGNAL(statusChanged()),
this, this,
SLOT(onSimbadStatusChanged())); SLOT(onSimbadStatusChanged()));
delete simbadReply; delete simbadReply;
simbadReply=NULL; simbadReply=Q_NULLPTR;
} }
simbadResults.clear(); simbadResults.clear();
} }
QString trimmedText = text.trimmed().toLower(); QString trimmedText = text.trimmed().toLower();
if (trimmedText.isEmpty()) { if (trimmedText.isEmpty()) {
ui->completionLabel->clearValues(); ui->completionLabel->clearValues();
ui->completionLabel->selectFirst(); ui->completionLabel->selectFirst();
ui->simbadStatusLabel->setText(""); ui->simbadStatusLabel->setText("");
ui->pushButtonGotoSearchSkyObject->setEnabled(false); ui->pushButtonGotoSearchSkyObject->setEnabled(false);
skipping to change at line 633 skipping to change at line 634
simbadResults = simbadReply->getResults(); simbadResults = simbadReply->getResults();
ui->completionLabel->appendValues(simbadResults.keys()); ui->completionLabel->appendValues(simbadResults.keys());
// Update push button enabled state // Update push button enabled state
ui->pushButtonGotoSearchSkyObject->setEnabled(!ui->completio nLabel->isEmpty()); ui->pushButtonGotoSearchSkyObject->setEnabled(!ui->completio nLabel->isEmpty());
} }
if (simbadReply->getCurrentStatus()!=SimbadLookupReply::SimbadLookup Querying) if (simbadReply->getCurrentStatus()!=SimbadLookupReply::SimbadLookup Querying)
{ {
disconnect(simbadReply, SIGNAL(statusChanged()), this, SLOT( onSimbadStatusChanged())); disconnect(simbadReply, SIGNAL(statusChanged()), this, SLOT( onSimbadStatusChanged()));
delete simbadReply; delete simbadReply;
simbadReply=NULL; simbadReply=Q_NULLPTR;
// Update push button enabled state // Update push button enabled state
ui->pushButtonGotoSearchSkyObject->setEnabled(!ui->completio nLabel->isEmpty()); ui->pushButtonGotoSearchSkyObject->setEnabled(!ui->completio nLabel->isEmpty());
} }
} }
void SearchDialog::greekLetterClicked() void SearchDialog::greekLetterClicked()
{ {
QPushButton *sender = reinterpret_cast<QPushButton *>(this->sender() ); QPushButton *sender = reinterpret_cast<QPushButton *>(this->sender() );
QLineEdit* sso = ui->lineEditSearchSkyObject; QLineEdit* sso = ui->lineEditSearchSkyObject;
 End of changes. 5 change blocks. 
4 lines changed or deleted 5 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/