~ubuntu-branches/debian/sid/stellarium/sid

« back to all changes in this revision

Viewing changes to src/gui/ConfigurationDialog.cpp

  • Committer: Package Import Robot
  • Author(s): Tomasz Buchert
  • Date: 2013-08-04 15:06:55 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130804150655-iji0vb5navh3lk13
Tags: 0.12.2-1
* Imported Upstream version 0.12.2
* Added dependency to phonon (to enable video/sound)
* Fixed VCS links
* Removed unused lintian tag (embedded-library glee)
* Dropped obsolete patch
* Update copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
#include <QFile>
63
63
#include <QFileDialog>
64
64
#include <QComboBox>
 
65
#include <QDir>
65
66
 
66
67
ConfigurationDialog::ConfigurationDialog(StelGui* agui) : StelDialog(agui), starCatalogDownloadReply(NULL), currentDownloadFile(NULL), progressBar(NULL), gui(agui)
67
68
{
836
837
 
837
838
void ConfigurationDialog::setFixedDateTimeToCurrent(void)
838
839
{
839
 
        ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(StelApp::getInstance().getCore()->getJDay()));
 
840
        StelCore* core = StelApp::getInstance().getCore();
 
841
        double JD = core->getJDay();
 
842
        ui->fixedDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(JD+StelUtils::getGMTShiftFromQT(JD)/24-core->getDeltaT(JD)/86400));
840
843
        ui->fixedTimeRadio->setChecked(true);
841
844
        setStartupTimeMode();
842
845
}
953
956
        currentDownloadFile = new QFile(path);
954
957
        if (!currentDownloadFile->open(QIODevice::WriteOnly))
955
958
        {
956
 
                qWarning() << "Can't open a writable file for storing new star catalog: " << path;
 
959
                qWarning() << "Can't open a writable file for storing new star catalog: " << QDir::toNativeSeparators(path);
957
960
                currentDownloadFile->deleteLater();
958
961
                currentDownloadFile = NULL;
959
962
                ui->downloadLabel->setText(q_("Error downloading %1:\n%2").arg(nextStarCatalogToDownload.value("id").toString()).arg(QString("Can't open a writable file for storing new star catalog: %1").arg(path)));
1160
1163
        // Espenak & Meeus (2006) used by default
1161
1164
        algorithms->addItem(q_("Espenak & Meeus (2006)").append(" *"), "EspenakMeeus");
1162
1165
        algorithms->addItem(q_("Reijs (2006)"), "Reijs");
 
1166
        algorithms->addItem(q_("Banjevic (2006)"), "Banjevic");
 
1167
        algorithms->addItem(q_("Islam, Sadiq & Qureshi (2008, 2013)"), "IslamSadiqQureshi");
1163
1168
        algorithms->addItem(q_("Custom equation of %1T").arg(QChar(0x0394)), "Custom");
1164
1169
 
1165
1170
        //Restore the selection