ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 40 skipping to change at line 40
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "MeteorMgr.hpp" #include "MeteorMgr.hpp"
#include "GridLinesMgr.hpp" #include "GridLinesMgr.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include "StelGuiBase.hpp" #include "StelGuiBase.hpp"
#include "StelGui.hpp"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QFile> #include <QFile>
#include <QSettings> #include <QSettings>
#include <QTimer> #include <QTimer>
#include <QDialog> #include <QDialog>
ViewDialog::ViewDialog() ViewDialog::ViewDialog()
{ {
skipping to change at line 302 skipping to change at line 303
l = ui->projectionListWidget; l = ui->projectionListWidget;
l->blockSignals(true); l->blockSignals(true);
l->clear(); l->clear();
const QStringList mappings = core->getAllProjectionTypeKeys(); const QStringList mappings = core->getAllProjectionTypeKeys();
foreach (QString s, mappings) foreach (QString s, mappings)
{ {
l->addItem(core->projectionTypeKeyToNameI18n(s)); l->addItem(core->projectionTypeKeyToNameI18n(s));
} }
l->setCurrentItem(l->findItems(core->projectionTypeKeyToNameI18n(cor e->getCurrentProjectionTypeKey()), Qt::MatchExactly).at(0)); l->setCurrentItem(l->findItems(core->projectionTypeKeyToNameI18n(cor e->getCurrentProjectionTypeKey()), Qt::MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get HtmlSummary()); ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra meJ2000)->getHtmlSummary());
// Fill the landscape list // Fill the landscape list
l = ui->landscapesListWidget; l = ui->landscapesListWidget;
l->blockSignals(true); l->blockSignals(true);
l->clear(); l->clear();
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
l->addItems(lmgr->getAllLandscapeNames()); l->addItems(lmgr->getAllLandscapeNames());
l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt:: MatchExactly).at(0)); l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt:: MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption()); ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption());
skipping to change at line 382 skipping to change at line 383
} }
QStringList searchPaths; QStringList searchPaths;
try try
{ {
searchPaths << StelFileMgr::findFile("skycultures/" + StelAp p::getInstance().getSkyCultureMgr().getCurrentSkyCultureID()); searchPaths << StelFileMgr::findFile("skycultures/" + StelAp p::getInstance().getSkyCultureMgr().getCurrentSkyCultureID());
} }
catch (std::runtime_error& e) {} catch (std::runtime_error& e) {}
ui->skyCultureTextBrowser->setSearchPaths(searchPaths); ui->skyCultureTextBrowser->setSearchPaths(searchPaths);
ui->skyCultureTextBrowser->document()->setDefaultStyleSheet(QString( StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
StelApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); ));
Q_ASSERT(gui);
ui->skyCultureTextBrowser->document()->setDefaultStyleSheet(QString(
gui->getStelStyle().htmlStyleSheet));
if (descPath.isEmpty()) if (descPath.isEmpty())
{ {
ui->skyCultureTextBrowser->setHtml(q_("No description")); ui->skyCultureTextBrowser->setHtml(q_("No description"));
} }
else else
{ {
QFile f(descPath); QFile f(descPath);
f.open(QIODevice::ReadOnly); f.open(QIODevice::ReadOnly);
ui->skyCultureTextBrowser->setHtml(QString::fromUtf8(f.readA ll())); ui->skyCultureTextBrowser->setHtml(QString::fromUtf8(f.readA ll()));
} }
} }
void ViewDialog::projectionChanged(const QString& projectionNameI18n) void ViewDialog::projectionChanged(const QString& projectionNameI18n)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n)); core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n));
ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString( StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
StelApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); ));
ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get Q_ASSERT(gui);
HtmlSummary()); ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString(
gui->getStelStyle().htmlStyleSheet));
ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra
meJ2000)->getHtmlSummary());
} }
void ViewDialog::landscapeChanged(QListWidgetItem* item) void ViewDialog::landscapeChanged(QListWidgetItem* item)
{ {
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setCurrentLandscapeName(item->text()); lmgr->setCurrentLandscapeName(item->text());
ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(S StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui(
telApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); ));
Q_ASSERT(gui);
ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(g
ui->getStelStyle().htmlStyleSheet));
ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption()); ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption());
ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getDefaultLandsc apeID()==lmgr->getCurrentLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getDefaultLandsc apeID()==lmgr->getCurrentLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandsc apeID()!=lmgr->getCurrentLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandsc apeID()!=lmgr->getCurrentLandscapeID());
} }
void ViewDialog::shootingStarsZHRChanged() void ViewDialog::shootingStarsZHRChanged()
{ {
MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr); MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);
int zhr=-1; int zhr=-1;
if (ui->zhrNone->isChecked()) if (ui->zhrNone->isChecked())
 End of changes. 5 change blocks. 
9 lines changed or deleted 19 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/