ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 22 skipping to change at line 22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "ViewDialog.hpp" #include "ViewDialog.hpp"
#include "ui_viewDialog.h" #include "ui_viewDialog.h"
#include "AddRemoveLandscapesDialog.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
skipping to change at line 52 skipping to change at line 53
#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()
{ {
ui = new Ui_viewDialogForm; ui = new Ui_viewDialogForm;
addRemoveLandscapesDialog = NULL;
} }
ViewDialog::~ViewDialog() ViewDialog::~ViewDialog()
{ {
delete ui; delete ui;
ui=NULL; ui=NULL;
delete addRemoveLandscapesDialog;
addRemoveLandscapesDialog = NULL;
} }
void ViewDialog::languageChanged() void ViewDialog::languageChanged()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
shootingStarsZHRChanged(); shootingStarsZHRChanged();
populateLists(); populateLists();
} }
skipping to change at line 198 skipping to change at line 202
connect(ui->landscapePositionCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsLocation(bool))); connect(ui->landscapePositionCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsLocation(bool)));
ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScale()); ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScale());
connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), lmgr, SLOT(setAtmosphereBortleLightPollution(int))); connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), lmgr, SLOT(setAtmosphereBortleLightPollution(int)));
connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), StelAp p::getInstance().getCore()->getSkyDrawer(), SLOT(setBortleScale(int))); connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), StelAp p::getInstance().getCore()->getSkyDrawer(), SLOT(setBortleScale(int)));
ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getCurrentLandsc apeID()==lmgr->getDefaultLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getCurrentLandsc apeID()==lmgr->getDefaultLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandsc apeID()!=lmgr->getDefaultLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandsc apeID()!=lmgr->getDefaultLandscapeID());
connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault())); connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault()));
connect(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), th
is, SLOT(populateLists()));
connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this,
SLOT(showAddRemoveLandscapesDialog()));
// Grid and lines // Grid and lines
GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr); GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr);
ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()) ; ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()) ;
a = gui->getGuiActions("actionShow_Equator_Line"); a = gui->getGuiActions("actionShow_Equator_Line");
connect(a, SIGNAL(toggled(bool)), ui->showEquatorLineCheckBox, SLOT( setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEquatorLineCheckBox, SLOT( setChecked(bool)));
connect(ui->showEquatorLineCheckBox, SIGNAL(toggled(bool)), a, SLOT( setChecked(bool))); connect(ui->showEquatorLineCheckBox, SIGNAL(toggled(bool)), a, SLOT( setChecked(bool)));
ui->showEclipticLineCheckBox->setChecked(glmgr->getFlagEclipticLine( )); ui->showEclipticLineCheckBox->setChecked(glmgr->getFlagEclipticLine( ));
a = gui->getGuiActions("actionShow_Ecliptic_Line"); a = gui->getGuiActions("actionShow_Ecliptic_Line");
connect(a, SIGNAL(toggled(bool)), ui->showEclipticLineCheckBox, SLOT (setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEclipticLineCheckBox, SLOT (setChecked(bool)));
skipping to change at line 314 skipping to change at line 321
// 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());
ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getDefaultLandsc
apeID()==lmgr->getCurrentLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandsc
apeID()!=lmgr->getCurrentLandscapeID());
} }
void ViewDialog::populateSkyLayersList() void ViewDialog::populateSkyLayersList()
{ {
ui->skyLayerListWidget->clear(); ui->skyLayerListWidget->clear();
StelSkyLayerMgr* skyLayerMgr = GETSTELMODULE(StelSkyLayerMgr); StelSkyLayerMgr* skyLayerMgr = GETSTELMODULE(StelSkyLayerMgr);
ui->skyLayerListWidget->addItems(skyLayerMgr->getAllKeys()); ui->skyLayerListWidget->addItems(skyLayerMgr->getAllKeys());
} }
void ViewDialog::skyLayersSelectionChanged(const QString& s) void ViewDialog::skyLayersSelectionChanged(const QString& s)
skipping to change at line 421 skipping to change at line 430
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setCurrentLandscapeName(item->text()); lmgr->setCurrentLandscapeName(item->text());
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(g ui->getStelStyle().htmlStyleSheet)); 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::showAddRemoveLandscapesDialog()
{
if(addRemoveLandscapesDialog == NULL)
addRemoveLandscapesDialog = new AddRemoveLandscapesDialog();
addRemoveLandscapesDialog->setVisible(true);
}
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())
{ {
mmgr->setFlagShow(false); mmgr->setFlagShow(false);
zhr = 0; zhr = 0;
} }
else else
 End of changes. 6 change blocks. 
0 lines changed or deleted 21 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/