StelGui.cpp   StelGui.cpp 
skipping to change at line 240 skipping to change at line 240
//QMetaObject::connectSlotsByName(Form); //QMetaObject::connectSlotsByName(Form);
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// Connect all the GUI actions signals with the Core of Stellarium // Connect all the GUI actions signals with the Core of Stellarium
connect(getGuiActions("actionQuit_Global"), SIGNAL(triggered()), thi s, SLOT(quitStellarium())); connect(getGuiActions("actionQuit_Global"), SIGNAL(triggered()), thi s, SLOT(quitStellarium()));
// Debug // Debug
connect(getGuiActions("action_Reload_Style"), SIGNAL(triggered()), t his, SLOT(reloadStyle())); connect(getGuiActions("action_Reload_Style"), SIGNAL(triggered()), t his, SLOT(reloadStyle()));
QObject* module = GETSTELMODULE("ConstellationMgr"); ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
ConstellationMgr* cmgr = (ConstellationMgr*)module; connect(getGuiActions("actionShow_Constellation_Lines"), SIGNAL(togg
connect(getGuiActions("actionShow_Constellation_Lines"), SIGNAL(togg led(bool)), cmgr, SLOT(setFlagLines(bool)));
led(bool)), module, SLOT(setFlagLines(bool)));
getGuiActions("actionShow_Constellation_Lines")->setChecked(cmgr->ge tFlagLines()); getGuiActions("actionShow_Constellation_Lines")->setChecked(cmgr->ge tFlagLines());
connect(getGuiActions("actionShow_Constellation_Art"), SIGNAL(toggle d(bool)), module, SLOT(setFlagArt(bool))); connect(getGuiActions("actionShow_Constellation_Art"), SIGNAL(toggle d(bool)), cmgr, SLOT(setFlagArt(bool)));
getGuiActions("actionShow_Constellation_Art")->setChecked(cmgr->getF lagArt()); getGuiActions("actionShow_Constellation_Art")->setChecked(cmgr->getF lagArt());
connect(getGuiActions("actionShow_Constellation_Labels"), SIGNAL(tog gled(bool)), module, SLOT(setFlagLabels(bool))); connect(getGuiActions("actionShow_Constellation_Labels"), SIGNAL(tog gled(bool)), cmgr, SLOT(setFlagLabels(bool)));
getGuiActions("actionShow_Constellation_Labels")->setChecked(cmgr->g etFlagLabels()); getGuiActions("actionShow_Constellation_Labels")->setChecked(cmgr->g etFlagLabels());
connect(getGuiActions("actionShow_Constellation_Boundaries"), SIGNAL (toggled(bool)), module, SLOT(setFlagBoundaries(bool))); connect(getGuiActions("actionShow_Constellation_Boundaries"), SIGNAL (toggled(bool)), cmgr, SLOT(setFlagBoundaries(bool)));
getGuiActions("actionShow_Constellation_Boundaries")->setChecked(cmg r->getFlagBoundaries()); getGuiActions("actionShow_Constellation_Boundaries")->setChecked(cmg r->getFlagBoundaries());
module = GETSTELMODULE("GridLinesMgr"); GridLinesMgr* gmgr = GETSTELMODULE(GridLinesMgr);
GridLinesMgr* gmgr = (GridLinesMgr*)module; connect(getGuiActions("actionShow_Equatorial_Grid"), SIGNAL(toggled(
connect(getGuiActions("actionShow_Equatorial_Grid"), SIGNAL(toggled( bool)), gmgr, SLOT(setFlagEquatorGrid(bool)));
bool)), module, SLOT(setFlagEquatorGrid(bool)));
getGuiActions("actionShow_Equatorial_Grid")->setChecked(gmgr->getFla gEquatorGrid()); getGuiActions("actionShow_Equatorial_Grid")->setChecked(gmgr->getFla gEquatorGrid());
connect(getGuiActions("actionShow_Azimuthal_Grid"), SIGNAL(toggled(b ool)), module, SLOT(setFlagAzimuthalGrid(bool))); connect(getGuiActions("actionShow_Azimuthal_Grid"), SIGNAL(toggled(b ool)), gmgr, SLOT(setFlagAzimuthalGrid(bool)));
getGuiActions("actionShow_Azimuthal_Grid")->setChecked(gmgr->getFlag AzimuthalGrid()); getGuiActions("actionShow_Azimuthal_Grid")->setChecked(gmgr->getFlag AzimuthalGrid());
connect(getGuiActions("actionShow_Ecliptic_Line"), SIGNAL(toggled(bo ol)), module, SLOT(setFlagEclipticLine(bool))); connect(getGuiActions("actionShow_Ecliptic_Line"), SIGNAL(toggled(bo ol)), gmgr, SLOT(setFlagEclipticLine(bool)));
getGuiActions("actionShow_Ecliptic_Line")->setChecked(gmgr->getFlagE clipticLine()); getGuiActions("actionShow_Ecliptic_Line")->setChecked(gmgr->getFlagE clipticLine());
connect(getGuiActions("actionShow_Equator_Line"), SIGNAL(toggled(boo l)), module, SLOT(setFlagEquatorLine(bool))); connect(getGuiActions("actionShow_Equator_Line"), SIGNAL(toggled(boo l)), gmgr, SLOT(setFlagEquatorLine(bool)));
getGuiActions("actionShow_Equator_Line")->setChecked(gmgr->getFlagEq uatorLine()); getGuiActions("actionShow_Equator_Line")->setChecked(gmgr->getFlagEq uatorLine());
module = GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
LandscapeMgr* lmgr = (LandscapeMgr*)module; connect(getGuiActions("actionShow_Ground"), SIGNAL(toggled(bool)), l
connect(getGuiActions("actionShow_Ground"), SIGNAL(toggled(bool)), m mgr, SLOT(setFlagLandscape(bool)));
odule, SLOT(setFlagLandscape(bool)));
getGuiActions("actionShow_Ground")->setChecked(lmgr->getFlagLandscap e()); getGuiActions("actionShow_Ground")->setChecked(lmgr->getFlagLandscap e());
connect(getGuiActions("actionShow_Cardinal_Points"), SIGNAL(toggled( bool)), module, SLOT(setFlagCardinalsPoints(bool))); connect(getGuiActions("actionShow_Cardinal_Points"), SIGNAL(toggled( bool)), lmgr, SLOT(setFlagCardinalsPoints(bool)));
getGuiActions("actionShow_Cardinal_Points")->setChecked(lmgr->getFla gCardinalsPoints()); getGuiActions("actionShow_Cardinal_Points")->setChecked(lmgr->getFla gCardinalsPoints());
connect(getGuiActions("actionShow_Atmosphere"), SIGNAL(toggled(bool) ), module, SLOT(setFlagAtmosphere(bool))); connect(getGuiActions("actionShow_Atmosphere"), SIGNAL(toggled(bool) ), lmgr, SLOT(setFlagAtmosphere(bool)));
getGuiActions("actionShow_Atmosphere")->setChecked(lmgr->getFlagAtmo sphere()); getGuiActions("actionShow_Atmosphere")->setChecked(lmgr->getFlagAtmo sphere());
connect(getGuiActions("actionShow_Fog"), SIGNAL(toggled(bool)), modu le, SLOT(setFlagFog(bool))); connect(getGuiActions("actionShow_Fog"), SIGNAL(toggled(bool)), lmgr , SLOT(setFlagFog(bool)));
getGuiActions("actionShow_Fog")->setChecked(lmgr->getFlagFog()); getGuiActions("actionShow_Fog")->setChecked(lmgr->getFlagFog());
module = GETSTELMODULE("NebulaMgr"); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
NebulaMgr* nmgr = (NebulaMgr*)module; connect(getGuiActions("actionShow_Nebulas"), SIGNAL(toggled(bool)),
connect(getGuiActions("actionShow_Nebulas"), SIGNAL(toggled(bool)), nmgr, SLOT(setFlagHints(bool)));
module, SLOT(setFlagHints(bool)));
getGuiActions("actionShow_Nebulas")->setChecked(nmgr->getFlagHints() ); getGuiActions("actionShow_Nebulas")->setChecked(nmgr->getFlagHints() );
StelSkyImageMgr* bmgr = &StelApp::getInstance().getSkyImageMgr(); StelSkyImageMgr* imgr = GETSTELMODULE(StelSkyImageMgr);
connect(getGuiActions("actionShow_DSS"), SIGNAL(toggled(bool)), bmgr connect(getGuiActions("actionShow_DSS"), SIGNAL(toggled(bool)), imgr
, SLOT(setFlagShow(bool))); , SLOT(setFlagShow(bool)));
getGuiActions("actionShow_DSS")->setChecked(bmgr->getFlagShow()); getGuiActions("actionShow_DSS")->setChecked(imgr->getFlagShow());
module = (QObject*)StelApp::getInstance().getCore()->getNavigator(); StelNavigator* nav = StelApp::getInstance().getCore()->getNavigator(
connect(getGuiActions("actionIncrease_Time_Speed"), SIGNAL(triggered );
()), module, SLOT(increaseTimeSpeed())); connect(getGuiActions("actionIncrease_Time_Speed"), SIGNAL(triggered
connect(getGuiActions("actionDecrease_Time_Speed"), SIGNAL(triggered ()), nav, SLOT(increaseTimeSpeed()));
()), module, SLOT(decreaseTimeSpeed())); connect(getGuiActions("actionDecrease_Time_Speed"), SIGNAL(triggered
connect(getGuiActions("actionSet_Real_Time_Speed"), SIGNAL(triggered ()), nav, SLOT(decreaseTimeSpeed()));
()), module, SLOT(setRealTimeSpeed())); connect(getGuiActions("actionSet_Real_Time_Speed"), SIGNAL(triggered
connect(getGuiActions("actionSet_Time_Rate_Zero"), SIGNAL(triggered( ()), nav, SLOT(setRealTimeSpeed()));
)), module, SLOT(setZeroTimeSpeed())); connect(getGuiActions("actionSet_Time_Rate_Zero"), SIGNAL(triggered(
connect(getGuiActions("actionReturn_To_Current_Time"), SIGNAL(trigge )), nav, SLOT(setZeroTimeSpeed()));
red()), module, SLOT(setTimeNow())); connect(getGuiActions("actionReturn_To_Current_Time"), SIGNAL(trigge
connect(getGuiActions("actionSwitch_Equatorial_Mount"), SIGNAL(toggl red()), nav, SLOT(setTimeNow()));
ed(bool)), module, SLOT(setEquatorialMount(bool))); connect(getGuiActions("actionSwitch_Equatorial_Mount"), SIGNAL(toggl
ed(bool)), nav, SLOT(setEquatorialMount(bool)));
getGuiActions("actionSwitch_Equatorial_Mount")->setChecked(StelApp:: getInstance().getCore()->getNavigator()->getMountMode() != StelNavigator::M ountAltAzimuthal); getGuiActions("actionSwitch_Equatorial_Mount")->setChecked(StelApp:: getInstance().getCore()->getNavigator()->getMountMode() != StelNavigator::M ountAltAzimuthal);
connect(getGuiActions("actionAdd_Solar_Hour"), SIGNAL(triggered()), connect(getGuiActions("actionAdd_Solar_Hour"), SIGNAL(triggered()),
module, SLOT(addHour())); nav, SLOT(addHour()));
connect(getGuiActions("actionAdd_Solar_Day"), SIGNAL(triggered()), m connect(getGuiActions("actionAdd_Solar_Day"), SIGNAL(triggered()), n
odule, SLOT(addDay())); av, SLOT(addDay()));
connect(getGuiActions("actionAdd_Solar_Week"), SIGNAL(triggered()), connect(getGuiActions("actionAdd_Solar_Week"), SIGNAL(triggered()),
module, SLOT(addWeek())); nav, SLOT(addWeek()));
connect(getGuiActions("actionSubtract_Solar_Hour"), SIGNAL(triggered connect(getGuiActions("actionSubtract_Solar_Hour"), SIGNAL(triggered
()), module, SLOT(subtractHour())); ()), nav, SLOT(subtractHour()));
connect(getGuiActions("actionSubtract_Solar_Day"), SIGNAL(triggered( connect(getGuiActions("actionSubtract_Solar_Day"), SIGNAL(triggered(
)), module, SLOT(subtractDay())); )), nav, SLOT(subtractDay()));
connect(getGuiActions("actionSubtract_Solar_Week"), SIGNAL(triggered connect(getGuiActions("actionSubtract_Solar_Week"), SIGNAL(triggered
()), module, SLOT(subtractWeek())); ()), nav, SLOT(subtractWeek()));
connect(getGuiActions("actionAdd_Sidereal_Day"), SIGNAL(triggered()) connect(getGuiActions("actionAdd_Sidereal_Day"), SIGNAL(triggered())
, module, SLOT(addSiderealDay())); , nav, SLOT(addSiderealDay()));
connect(getGuiActions("actionAdd_Sidereal_Week"), SIGNAL(triggered() connect(getGuiActions("actionAdd_Sidereal_Week"), SIGNAL(triggered()
), module, SLOT(addSiderealWeek())); ), nav, SLOT(addSiderealWeek()));
connect(getGuiActions("actionSubtract_Sidereal_Day"), SIGNAL(trigger connect(getGuiActions("actionSubtract_Sidereal_Day"), SIGNAL(trigger
ed()), module, SLOT(subtractSiderealDay())); ed()), nav, SLOT(subtractSiderealDay()));
connect(getGuiActions("actionSubtract_Sidereal_Week"), SIGNAL(trigge connect(getGuiActions("actionSubtract_Sidereal_Week"), SIGNAL(trigge
red()), module, SLOT(subtractSiderealWeek())); red()), nav, SLOT(subtractSiderealWeek()));
connect(getGuiActions("actionSet_Home_Planet_To_Selected"), SIGNAL(t connect(getGuiActions("actionSet_Home_Planet_To_Selected"), SIGNAL(t
riggered()), module, SLOT(moveObserverToSelected())); riggered()), nav, SLOT(moveObserverToSelected()));
module = GETSTELMODULE("TelescopeMgr"); TelescopeMgr* tmgr = GETSTELMODULE(TelescopeMgr);
connect(getGuiActions("actionMove_Telescope_To_Selection_0"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_0"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_1"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_1"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_2"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_2"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_3"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_3"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_4"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_4"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_5"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_5"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_6"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_6"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_7"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_7"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_8"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_8"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
connect(getGuiActions("actionMove_Telescope_To_Selection_9"), SIGNAL connect(getGuiActions("actionMove_Telescope_To_Selection_9"), SIGNAL
(triggered()), module, SLOT(moveTelescopeToSelected())); (triggered()), tmgr, SLOT(moveTelescopeToSelected()));
module = &StelApp::getInstance(); connect(getGuiActions("actionShow_Night_Mode"), SIGNAL(toggled(bool)
connect(getGuiActions("actionShow_Night_Mode"), SIGNAL(toggled(bool) ), &StelApp::getInstance(), SLOT(setVisionModeNight(bool)));
), module, SLOT(setVisionModeNight(bool)));
getGuiActions("actionShow_Night_Mode")->setChecked(StelApp::getInsta nce().getVisionModeNight()); getGuiActions("actionShow_Night_Mode")->setChecked(StelApp::getInsta nce().getVisionModeNight());
module = GETSTELMODULE("StelMovementMgr"); StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr);
connect(getGuiActions("actionGoto_Selected_Object"), SIGNAL(triggere connect(getGuiActions("actionGoto_Selected_Object"), SIGNAL(triggere
d()), module, SLOT(setFlagTracking())); d()), mmgr, SLOT(setFlagTracking()));
connect(getGuiActions("actionZoom_In_Auto"), SIGNAL(triggered()), mo connect(getGuiActions("actionZoom_In_Auto"), SIGNAL(triggered()), mm
dule, SLOT(autoZoomIn())); gr, SLOT(autoZoomIn()));
connect(getGuiActions("actionZoom_Out_Auto"), SIGNAL(triggered()), m connect(getGuiActions("actionZoom_Out_Auto"), SIGNAL(triggered()), m
odule, SLOT(autoZoomOut())); mgr, SLOT(autoZoomOut()));
connect(getGuiActions("actionSet_Tracking"), SIGNAL(toggled(bool)), connect(getGuiActions("actionSet_Tracking"), SIGNAL(toggled(bool)),
module, SLOT(setFlagTracking(bool))); mmgr, SLOT(setFlagTracking(bool)));
StelMovementMgr* mmgr = (StelMovementMgr*)module;
getGuiActions("actionSet_Tracking")->setChecked(mmgr->getFlagTrackin g()); getGuiActions("actionSet_Tracking")->setChecked(mmgr->getFlagTrackin g());
connect(getGuiActions("actionSet_Full_Screen_Global"), SIGNAL(toggle d(bool)), &StelMainWindow::getInstance(), SLOT(setFullScreen(bool))); connect(getGuiActions("actionSet_Full_Screen_Global"), SIGNAL(toggle d(bool)), &StelMainWindow::getInstance(), SLOT(setFullScreen(bool)));
getGuiActions("actionSet_Full_Screen_Global")->setChecked(StelMainWi ndow::getInstance().isFullScreen()); getGuiActions("actionSet_Full_Screen_Global")->setChecked(StelMainWi ndow::getInstance().isFullScreen());
connect(getGuiActions("actionShow_Location_Window_Global"), SIGNAL(t oggled(bool)), &locationDialog, SLOT(setVisible(bool))); connect(getGuiActions("actionShow_Location_Window_Global"), SIGNAL(t oggled(bool)), &locationDialog, SLOT(setVisible(bool)));
connect(&locationDialog, SIGNAL(visibleChanged(bool)), getGuiActions ("actionShow_Location_Window_Global"), SLOT(setChecked(bool))); connect(&locationDialog, SIGNAL(visibleChanged(bool)), getGuiActions ("actionShow_Location_Window_Global"), SLOT(setChecked(bool)));
connect(getGuiActions("actionShow_Configuration_Window_Global"), SIG NAL(toggled(bool)), &configurationDialog, SLOT(setVisible(bool))); connect(getGuiActions("actionShow_Configuration_Window_Global"), SIG NAL(toggled(bool)), &configurationDialog, SLOT(setVisible(bool)));
connect(&configurationDialog, SIGNAL(visibleChanged(bool)), getGuiAc tions("actionShow_Configuration_Window_Global"), SLOT(setChecked(bool))); connect(&configurationDialog, SIGNAL(visibleChanged(bool)), getGuiAc tions("actionShow_Configuration_Window_Global"), SLOT(setChecked(bool)));
skipping to change at line 348 skipping to change at line 342
connect(getGuiActions("actionShow_Help_Window_Global"), SIGNAL(toggl ed(bool)), &helpDialog, SLOT(setVisible(bool))); connect(getGuiActions("actionShow_Help_Window_Global"), SIGNAL(toggl ed(bool)), &helpDialog, SLOT(setVisible(bool)));
connect(&helpDialog, SIGNAL(visibleChanged(bool)), getGuiActions("ac tionShow_Help_Window_Global"), SLOT(setChecked(bool))); connect(&helpDialog, SIGNAL(visibleChanged(bool)), getGuiActions("ac tionShow_Help_Window_Global"), SLOT(setChecked(bool)));
connect(getGuiActions("actionShow_DateTime_Window_Global"), SIGNAL(t oggled(bool)), &dateTimeDialog, SLOT(setVisible(bool))); connect(getGuiActions("actionShow_DateTime_Window_Global"), SIGNAL(t oggled(bool)), &dateTimeDialog, SLOT(setVisible(bool)));
connect(&dateTimeDialog, SIGNAL(visibleChanged(bool)), getGuiActions ("actionShow_DateTime_Window_Global"), SLOT(setChecked(bool))); connect(&dateTimeDialog, SIGNAL(visibleChanged(bool)), getGuiActions ("actionShow_DateTime_Window_Global"), SLOT(setChecked(bool)));
connect(getGuiActions("actionShow_Search_Window_Global"), SIGNAL(tog gled(bool)), &searchDialog, SLOT(setVisible(bool))); connect(getGuiActions("actionShow_Search_Window_Global"), SIGNAL(tog gled(bool)), &searchDialog, SLOT(setVisible(bool)));
connect(&searchDialog, SIGNAL(visibleChanged(bool)), getGuiActions(" actionShow_Search_Window_Global"), SLOT(setChecked(bool))); connect(&searchDialog, SIGNAL(visibleChanged(bool)), getGuiActions(" actionShow_Search_Window_Global"), SLOT(setChecked(bool)));
connect(getGuiActions("actionSave_Screenshot_Global"), SIGNAL(trigge red()), &StelMainGraphicsView::getInstance(), SLOT(saveScreenShot())); connect(getGuiActions("actionSave_Screenshot_Global"), SIGNAL(trigge red()), &StelMainGraphicsView::getInstance(), SLOT(saveScreenShot()));
getGuiActions("actionToggle_GuiHidden_Global")->setChecked(false); getGuiActions("actionToggle_GuiHidden_Global")->setChecked(false);
connect(getGuiActions("actionToggle_GuiHidden_Global"), SIGNAL(trigg ered()), this, SLOT(toggleHideGui())); connect(getGuiActions("actionToggle_GuiHidden_Global"), SIGNAL(toggl ed(bool)), this, SLOT(setHideGui(bool)));
connect(getGuiActions("actionHorizontal_Flip"), SIGNAL(toggled(bool) ), StelApp::getInstance().getCore(), SLOT(setFlipHorz(bool))); connect(getGuiActions("actionHorizontal_Flip"), SIGNAL(toggled(bool) ), StelApp::getInstance().getCore(), SLOT(setFlipHorz(bool)));
getGuiActions("actionHorizontal_Flip")->setChecked(StelApp::getInsta nce().getCore()->getFlipHorz()); getGuiActions("actionHorizontal_Flip")->setChecked(StelApp::getInsta nce().getCore()->getFlipHorz());
connect(getGuiActions("actionVertical_Flip"), SIGNAL(toggled(bool)), StelApp::getInstance().getCore(), SLOT(setFlipVert(bool))); connect(getGuiActions("actionVertical_Flip"), SIGNAL(toggled(bool)), StelApp::getInstance().getCore(), SLOT(setFlipVert(bool)));
getGuiActions("actionVertical_Flip")->setChecked(StelApp::getInstanc e().getCore()->getFlipVert()); getGuiActions("actionVertical_Flip")->setChecked(StelApp::getInstanc e().getCore()->getFlipVert());
StarMgr* smgr = (StarMgr*)GETSTELMODULE("StarMgr"); StarMgr* smgr = GETSTELMODULE(StarMgr);
connect(getGuiActions("actionShow_Stars"), SIGNAL(toggled(bool)), sm gr, SLOT(setFlagStars(bool))); connect(getGuiActions("actionShow_Stars"), SIGNAL(toggled(bool)), sm gr, SLOT(setFlagStars(bool)));
getGuiActions("actionShow_Stars")->setChecked(smgr->getFlagStars()); getGuiActions("actionShow_Stars")->setChecked(smgr->getFlagStars());
SolarSystem* ssmgr = (SolarSystem*)GETSTELMODULE("SolarSystem"); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
connect(getGuiActions("actionShow_Planets_Labels"), SIGNAL(toggled(b ool)), ssmgr, SLOT(setFlagLabels(bool))); connect(getGuiActions("actionShow_Planets_Labels"), SIGNAL(toggled(b ool)), ssmgr, SLOT(setFlagLabels(bool)));
getGuiActions("actionShow_Planets_Labels")->setChecked(ssmgr->getFla gLabels()); getGuiActions("actionShow_Planets_Labels")->setChecked(ssmgr->getFla gLabels());
connect(getGuiActions("actionShow_Meridian_Line"), SIGNAL(toggled(bo ol)), gmgr, SLOT(setFlagMeridianLine(bool))); connect(getGuiActions("actionShow_Meridian_Line"), SIGNAL(toggled(bo ol)), gmgr, SLOT(setFlagMeridianLine(bool)));
getGuiActions("actionShow_Meridian_Line")->setChecked(gmgr->getFlagM eridianLine()); getGuiActions("actionShow_Meridian_Line")->setChecked(gmgr->getFlagM eridianLine());
connect(getGuiActions("actionShow_Equatorial_J2000_Grid"), SIGNAL(to ggled(bool)), gmgr, SLOT(setFlagEquatorJ2000Grid(bool))); connect(getGuiActions("actionShow_Equatorial_J2000_Grid"), SIGNAL(to ggled(bool)), gmgr, SLOT(setFlagEquatorJ2000Grid(bool)));
getGuiActions("actionShow_Equatorial_J2000_Grid")->setChecked(gmgr-> getFlagEquatorJ2000Grid()); getGuiActions("actionShow_Equatorial_J2000_Grid")->setChecked(gmgr-> getFlagEquatorJ2000Grid());
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
skipping to change at line 685 skipping to change at line 680
buttonTimeRewind->setChecked(false); buttonTimeRewind->setChecked(false);
} }
if (buttonTimeRealTimeSpeed->isChecked()!=nav->getRealTimeSpeed()) if (buttonTimeRealTimeSpeed->isChecked()!=nav->getRealTimeSpeed())
{ {
if (buttonTimeRealTimeSpeed->isChecked()!=nav->getRealTimeSp eed()) if (buttonTimeRealTimeSpeed->isChecked()!=nav->getRealTimeSp eed())
buttonTimeRealTimeSpeed->setChecked(nav->getRealTime Speed()); buttonTimeRealTimeSpeed->setChecked(nav->getRealTime Speed());
} }
const bool isTimeNow=nav->getIsTimeNow(); const bool isTimeNow=nav->getIsTimeNow();
if (buttonTimeCurrent->isChecked()!=isTimeNow) if (buttonTimeCurrent->isChecked()!=isTimeNow)
buttonTimeCurrent->setChecked(isTimeNow); buttonTimeCurrent->setChecked(isTimeNow);
StelMovementMgr* mmgr = (StelMovementMgr*)GETSTELMODULE("StelMovemen tMgr"); StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr);
const bool b = mmgr->getFlagTracking(); const bool b = mmgr->getFlagTracking();
if (buttonGotoSelectedObject->isChecked()!=b) if (buttonGotoSelectedObject->isChecked()!=b)
buttonGotoSelectedObject->setChecked(b); buttonGotoSelectedObject->setChecked(b);
StarMgr* smgr = (StarMgr*)GETSTELMODULE("StarMgr"); StarMgr* smgr = GETSTELMODULE(StarMgr);
if (getGuiActions("actionShow_Stars")->isChecked()!=smgr->getFlagSta rs()) if (getGuiActions("actionShow_Stars")->isChecked()!=smgr->getFlagSta rs())
getGuiActions("actionShow_Stars")->setChecked(smgr->getFlagS tars()); getGuiActions("actionShow_Stars")->setChecked(smgr->getFlagS tars());
infoPanel->setTextFromObjects(StelApp::getInstance().getStelObjectMg r().getSelectedObject()); infoPanel->setTextFromObjects(GETSTELMODULE(StelObjectMgr)->getSelec tedObject());
} }
bool StelGui::handleMouseMoves(int x, int y, Qt::MouseButtons b) bool StelGui::handleMouseMoves(int x, int y, Qt::MouseButtons b)
{ {
double maxX = winBar->boundingRect().width()+2.*buttonBarPath->getRo undSize(); double maxX = winBar->boundingRect().width()+2.*buttonBarPath->getRo undSize();
double maxY = winBar->boundingRect().height()+buttonBar->boundingRec t().height()+2.*buttonBarPath->getRoundSize(); double maxY = winBar->boundingRect().height()+buttonBar->boundingRec t().height()+2.*buttonBarPath->getRoundSize();
double minX = 0; double minX = 0;
if (x<=maxX && y<=maxY && b==Qt::NoButton && animLeftBarTimeLine->st ate()==QTimeLine::NotRunning && winBar->pos().x()<minX) if (x<=maxX && y<=maxY && b==Qt::NoButton && animLeftBarTimeLine->st ate()==QTimeLine::NotRunning && winBar->pos().x()<minX)
{ {
animLeftBarTimeLine->setDirection(QTimeLine::Forward); animLeftBarTimeLine->setDirection(QTimeLine::Forward);
skipping to change at line 771 skipping to change at line 766
{ {
qWarning() << "Can't find action " << actionName; qWarning() << "Can't find action " << actionName;
return NULL; return NULL;
} }
return a; return a;
} }
// Called each time a GUI action is triggered // Called each time a GUI action is triggered
void StelGui::guiActionTriggered(bool b) void StelGui::guiActionTriggered(bool b)
{ {
// can get the action name from: QObject::sender()->objectName() // can get the action name from: QObject::sender()->objectName();
// to get the config.ini key: // to get the config.ini key:
// and QObject::sender()->property("persistenceName").toString(); // and QObject::sender()->property("persistenceName").toString();
} }
void StelGui::updateBarsPos() void StelGui::updateBarsPos()
{ {
const int ww = StelMainGraphicsView::getInstance().width(); const int ww = StelMainGraphicsView::getInstance().width();
const int hh = StelMainGraphicsView::getInstance().height(); const int hh = StelMainGraphicsView::getInstance().height();
bool updatePath = false; bool updatePath = false;
skipping to change at line 808 skipping to change at line 803
buttonBar->setPos(newButtonBarX, newButtonBarY); buttonBar->setPos(newButtonBarX, newButtonBarY);
updatePath = true; updatePath = true;
} }
if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ()) if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ())
{ {
updatePath = true; updatePath = true;
lastButtonbarWidth = (int)(buttonBar->boundingRectNoHelpLabe l().width()); lastButtonbarWidth = (int)(buttonBar->boundingRectNoHelpLabe l().width());
} }
// double barOpacity = 1.-(5.+StelApp::getInstance().getCore()->getSkyD
rawer()->getLimitMagnitude())/10.;
// barOpacity = qMin(qMax(0., barOpacity), 1.);
// barOpacity = 0.2+barOpacity*0.4;
// buttonBarPath->setBackgroundOpacity(barOpacity);
if (updatePath) if (updatePath)
buttonBarPath->updatePath(buttonBar, winBar); buttonBarPath->updatePath(buttonBar, winBar);
const qreal newProgressBarX = ww-progressBarMgr->boundingRect().widt h()-5; const qreal newProgressBarX = ww-progressBarMgr->boundingRect().widt h()-5;
const qreal newProgressBarY = hh-progressBarMgr->boundingRect().heig ht()-5; const qreal newProgressBarY = hh-progressBarMgr->boundingRect().heig ht()-5;
if (progressBarMgr->pos().x()!=newProgressBarX || progressBarMgr->po s().y()!=newProgressBarY) if (progressBarMgr->pos().x()!=newProgressBarX || progressBarMgr->po s().y()!=newProgressBarY)
{ {
progressBarMgr->setPos(newProgressBarX, newProgressBarY); progressBarMgr->setPos(newProgressBarX, newProgressBarY);
updatePath = true; updatePath = true;
} }
// Update position of the auto-hide buttons // Update position of the auto-hide buttons
autoHidebts->setPos(0, hh-autoHidebts->childrenBoundingRect().height ()+1); autoHidebts->setPos(0, hh-autoHidebts->childrenBoundingRect().height ()+1);
double opacity = qMax(animLeftBarTimeLine->currentValue(), animBotto mBarTimeLine->currentValue()); double opacity = qMax(animLeftBarTimeLine->currentValue(), animBotto mBarTimeLine->currentValue());
autoHidebts->setOpacity(opacity); autoHidebts->setOpacity(opacity < 0.01 ? 0.01 : opacity); // W ork around a qt bug
} }
void StelGui::retranslateUi(QWidget *Form)
{
Form->setWindowTitle(QApplication::translate("Form", "Stellarium", 0
, QApplication::UnicodeUTF8));
} // retranslateUi
// Add a new progress bar in the lower right corner of the screen. // Add a new progress bar in the lower right corner of the screen.
QProgressBar* StelGui::addProgressBar() QProgressBar* StelGui::addProgressBar()
{ {
return progressBarMgr->addProgressBar(); return progressBarMgr->addProgressBar();
} }
void StelGui::quitStellarium() void StelGui::quitStellarium()
{ {
if(StelApp::getInstance().getDownloadMgr().blockQuit()) if(StelApp::getInstance().getDownloadMgr().blockQuit())
{ {
skipping to change at line 940 skipping to change at line 935
{ {
bool bb; bool bb;
bb = (getButtonBar()->hideButton("actionShow_DSS")==btShowNe bulaeBackground); bb = (getButtonBar()->hideButton("actionShow_DSS")==btShowNe bulaeBackground);
Q_ASSERT(bb); Q_ASSERT(bb);
} }
flagShowNebulaBackgroundButton = b; flagShowNebulaBackgroundButton = b;
} }
void StelGui::setHideGui(bool b) void StelGui::setHideGui(bool b)
{ {
qDebug() << "StelGui::setHideGui -- " << b;
buttonBar->setVisible(!b); buttonBar->setVisible(!b);
winBar->setVisible(!b); winBar->setVisible(!b);
autoHidebts->setVisible(!b); autoHidebts->setVisible(!b);
buttonBarPath->setVisible(!b); buttonBarPath->setVisible(!b);
} }
bool StelGui::getHideGui(void) bool StelGui::getHideGui(void)
{ {
return getGuiActions("actionToggle_GuiHidden_Global")->isChecked(); return getGuiActions("actionToggle_GuiHidden_Global")->isChecked();
} }
 End of changes. 29 change blocks. 
114 lines changed or deleted 111 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/