ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 23 skipping to change at line 23
* 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 "AddRemoveLandscapesDialog.hpp"
#include "AtmosphereDialog.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 54 skipping to change at line 55
#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; addRemoveLandscapesDialog = NULL;
atmosphereDialog=NULL;
} }
ViewDialog::~ViewDialog() ViewDialog::~ViewDialog()
{ {
delete ui; delete ui;
ui=NULL; ui=NULL;
delete addRemoveLandscapesDialog; delete addRemoveLandscapesDialog;
addRemoveLandscapesDialog = NULL; addRemoveLandscapesDialog = NULL;
delete atmosphereDialog;
atmosphereDialog = 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 85 skipping to change at line 89
{ {
if (dialog) if (dialog)
{ {
populateLists(); populateLists();
} }
} }
void ViewDialog::createDialogContent() void ViewDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(languageChanged()));
// Set the Sky tab activated by default // Set the Sky tab activated by default
ui->stackedWidget->setCurrentIndex(0); ui->stackedWidget->setCurrentIndex(0);
ui->stackListWidget->setCurrentRow(0); ui->stackListWidget->setCurrentRow(0);
//ui->viewTabWidget->removeTab(4); //ui->viewTabWidget->removeTab(4);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
populateLists(); populateLists();
skipping to change at line 198 skipping to change at line 203
connect(a, SIGNAL(toggled(bool)), ui->showAtmosphereCheckBox, SLOT(s etChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showAtmosphereCheckBox, SLOT(s etChecked(bool)));
connect(ui->showAtmosphereCheckBox, SIGNAL(toggled(bool)), a, SLOT(s etChecked(bool))); connect(ui->showAtmosphereCheckBox, SIGNAL(toggled(bool)), a, SLOT(s etChecked(bool)));
ui->landscapePositionCheckBox->setChecked(lmgr->getFlagLandscapeSets Location()); ui->landscapePositionCheckBox->setChecked(lmgr->getFlagLandscapeSets Location());
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)));
// GZ: changes for refraction
//ui->pressureDoubleSpinBox->setValue(StelApp::getInstance().getCor
e()->getSkyDrawer()->getAtmospherePressure());
//connect(ui->pressureDoubleSpinBox, SIGNAL(valueChanged(double)),
StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setAtmospherePressur
e(double)));
//ui->temperatureDoubleSpinBox->setValue(StelApp::getInstance().get
Core()->getSkyDrawer()->getAtmosphereTemperature());
//connect(ui->temperatureDoubleSpinBox, SIGNAL(valueChanged(double)
), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setAtmosphereTemp
erature(double)));
//ui->extinctionDoubleSpinBox->setValue(StelApp::getInstance().getC
ore()->getSkyDrawer()->getExtinctionCoefficient());
//connect(ui->extinctionDoubleSpinBox, SIGNAL(valueChanged(double))
, StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setExtinctionCoeff
icient(double)));
//// instead
connect(ui->pushButtonAtmosphereDetails, SIGNAL(clicked()), this, S
LOT(showAtmosphereDialog()));
// GZ: Done
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(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), th is, SLOT(populateLists()));
connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog())); 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()) ;
skipping to change at line 222 skipping to change at line 238
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)));
connect(ui->showEclipticLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool))); connect(ui->showEclipticLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool)));
ui->showMeridianLineCheckBox->setChecked(glmgr->getFlagMeridianLine( )); ui->showMeridianLineCheckBox->setChecked(glmgr->getFlagMeridianLine( ));
a = gui->getGuiActions("actionShow_Meridian_Line"); a = gui->getGuiActions("actionShow_Meridian_Line");
connect(a, SIGNAL(toggled(bool)), ui->showMeridianLineCheckBox, SLOT (setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showMeridianLineCheckBox, SLOT (setChecked(bool)));
connect(ui->showMeridianLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool))); connect(ui->showMeridianLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool)));
ui->showHorizonLineCheckBox->setChecked(glmgr->getFlagHorizonLine())
;
a = gui->getGuiActions("actionShow_Horizon_Line");
connect(a, SIGNAL(toggled(bool)), ui->showHorizonLineCheckBox, SLOT(
setChecked(bool)));
connect(ui->showHorizonLineCheckBox, SIGNAL(toggled(bool)), a, SLOT(
setChecked(bool)));
ui->showEquatorialGridCheckBox->setChecked(glmgr->getFlagEquatorGrid ()); ui->showEquatorialGridCheckBox->setChecked(glmgr->getFlagEquatorGrid ());
a = gui->getGuiActions("actionShow_Equatorial_Grid"); a = gui->getGuiActions("actionShow_Equatorial_Grid");
connect(a, SIGNAL(toggled(bool)), ui->showEquatorialGridCheckBox, SL OT(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEquatorialGridCheckBox, SL OT(setChecked(bool)));
connect(ui->showEquatorialGridCheckBox, SIGNAL(toggled(bool)), a, SL OT(setChecked(bool))); connect(ui->showEquatorialGridCheckBox, SIGNAL(toggled(bool)), a, SL OT(setChecked(bool)));
ui->showAzimuthalGridCheckBox->setChecked(glmgr->getFlagAzimuthalGri d()); ui->showAzimuthalGridCheckBox->setChecked(glmgr->getFlagAzimuthalGri d());
a = gui->getGuiActions("actionShow_Azimuthal_Grid"); a = gui->getGuiActions("actionShow_Azimuthal_Grid");
connect(a, SIGNAL(toggled(bool)), ui->showAzimuthalGridCheckBox, SLO T(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showAzimuthalGridCheckBox, SLO T(setChecked(bool)));
connect(ui->showAzimuthalGridCheckBox, SIGNAL(toggled(bool)), a, SLO T(setChecked(bool))); connect(ui->showAzimuthalGridCheckBox, SIGNAL(toggled(bool)), a, SLO T(setChecked(bool)));
skipping to change at line 428 skipping to change at line 449
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());
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());
//StelSkyDrawer *drawer=StelApp::getInstance().getSkyDrawer();
// GZ: Reset values that might have changed.
ui->showFogCheckBox->setChecked(lmgr->getFlagFog());
ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore()
->getSkyDrawer()->getBortleScale());
} }
void ViewDialog::showAddRemoveLandscapesDialog() void ViewDialog::showAddRemoveLandscapesDialog()
{ {
if(addRemoveLandscapesDialog == NULL) if(addRemoveLandscapesDialog == NULL)
addRemoveLandscapesDialog = new AddRemoveLandscapesDialog(); addRemoveLandscapesDialog = new AddRemoveLandscapesDialog();
addRemoveLandscapesDialog->setVisible(true); addRemoveLandscapesDialog->setVisible(true);
} }
void ViewDialog::showAtmosphereDialog()
{
if(atmosphereDialog == NULL)
atmosphereDialog = new AtmosphereDialog();
//ui->temperatureDoubleSpinBox->setValue(StelApp::getInstance().get
Core()->getSkyDrawer()->getAtmosphereTemperature());
//ui->extinctionDoubleSpinBox->setValue(StelApp::getInstance().getC
ore()->getSkyDrawer()->getExtinctionCoefficient());
//ui->pressureDoubleSpinBox->setValue(StelApp::getInstance().getCor
e()->getSkyDrawer()->getAtmospherePressure());
atmosphereDialog->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. 8 change blocks. 
0 lines changed or deleted 53 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/