StelGui.cpp   StelGui.cpp 
skipping to change at line 30 skipping to change at line 30
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "SkyGui.hpp" #include "SkyGui.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelIniParser.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelMainWindow.hpp" #include "StelMainWindow.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "GridLinesMgr.hpp" #include "GridLinesMgr.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelShortcutMgr.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "MeteorMgr.hpp" #include "MeteorMgr.hpp"
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
skipping to change at line 62 skipping to change at line 64
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#endif #endif
#include "StelAppGraphicsWidget.hpp" #include "StelAppGraphicsWidget.hpp"
#include "ConfigurationDialog.hpp" #include "ConfigurationDialog.hpp"
#include "DateTimeDialog.hpp" #include "DateTimeDialog.hpp"
#include "HelpDialog.hpp" #include "HelpDialog.hpp"
#include "LocationDialog.hpp" #include "LocationDialog.hpp"
#include "SearchDialog.hpp" #include "SearchDialog.hpp"
#include "ViewDialog.hpp" #include "ViewDialog.hpp"
#include "ShortcutsDialog.hpp"
#include <QDebug> #include <QDebug>
#include <QTimeLine> #include <QTimeLine>
#include <QFontDatabase> #include <QFontDatabase>
#include <QMouseEvent> #include <QMouseEvent>
#include <QAction> #include <QAction>
#include <QApplication> #include <QApplication>
#include <QFile> #include <QFile>
#include <QTextBrowser> #include <QTextBrowser>
#include <QGraphicsWidget> #include <QGraphicsWidget>
skipping to change at line 87 skipping to change at line 90
StelGuiBase* StelStandardGuiPluginInterface::getStelGuiBase() const StelGuiBase* StelStandardGuiPluginInterface::getStelGuiBase() const
{ {
// Allow to load the resources when used as a static plugin // Allow to load the resources when used as a static plugin
Q_INIT_RESOURCE(guiRes); Q_INIT_RESOURCE(guiRes);
return new StelGui(); return new StelGui();
} }
Q_EXPORT_PLUGIN2(StelGui, StelStandardGuiPluginInterface) Q_EXPORT_PLUGIN2(StelGui, StelStandardGuiPluginInterface)
StelGui::StelGui() : StelGui::StelGui() :
topLevelGraphicsWidget(NULL), topLevelGraphicsWidget(NULL),
locationDialog(0), locationDialog(0),
helpDialog(0), helpDialog(0),
dateTimeDialog(0), dateTimeDialog(0),
searchDialog(0), searchDialog(0),
viewDialog(0), viewDialog(0),
configurationDialog(0), shortcutsDialog(0),
configurationDialog(0),
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
scriptConsole(0), scriptConsole(0),
#endif #endif
initDone(false) initDone(false)
{ {
// QPixmapCache::setCacheLimit(30000); ? // QPixmapCache::setCacheLimit(30000); ?
flipHoriz = NULL; flipHoriz = NULL;
flipVert = NULL; flipVert = NULL;
btShowNebulaeBackground = NULL; btShowNebulaeBackground = NULL;
} }
skipping to change at line 135 skipping to change at line 139
if (searchDialog) if (searchDialog)
{ {
delete searchDialog; delete searchDialog;
searchDialog = 0; searchDialog = 0;
} }
if (viewDialog) if (viewDialog)
{ {
delete viewDialog; delete viewDialog;
viewDialog = 0; viewDialog = 0;
} }
if (shortcutsDialog)
{
delete shortcutsDialog;
shortcutsDialog = NULL;
}
// configurationDialog is automatically deleted with its parent widg et. // configurationDialog is automatically deleted with its parent widg et.
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
if (scriptConsole) if (scriptConsole)
{ {
delete scriptConsole; delete scriptConsole;
scriptConsole = 0; scriptConsole = 0;
} }
#endif #endif
} }
skipping to change at line 157 skipping to change at line 166
qDebug() << "Creating GUI ..."; qDebug() << "Creating GUI ...";
StelGuiBase::init(atopLevelGraphicsWidget, astelAppGraphicsWidget); StelGuiBase::init(atopLevelGraphicsWidget, astelAppGraphicsWidget);
skyGui = new SkyGui(atopLevelGraphicsWidget); skyGui = new SkyGui(atopLevelGraphicsWidget);
locationDialog = new LocationDialog(); locationDialog = new LocationDialog();
helpDialog = new HelpDialog(); helpDialog = new HelpDialog();
dateTimeDialog = new DateTimeDialog(); dateTimeDialog = new DateTimeDialog();
searchDialog = new SearchDialog(); searchDialog = new SearchDialog();
viewDialog = new ViewDialog(); viewDialog = new ViewDialog();
shortcutsDialog = new ShortcutsDialog();
configurationDialog = new ConfigurationDialog(this); configurationDialog = new ConfigurationDialog(this);
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
scriptConsole = new ScriptConsole(); scriptConsole = new ScriptConsole();
#endif #endif
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// Create all the main actions of the program, associated with short cuts // Create all the main actions of the program, associated with short cuts
QString group = N_("Display Options"); StelApp::getInstance().getStelShortcutManager()->loadShortcuts();
addGuiActions("actionShow_Constellation_Lines", N_("Constellation li
nes"), "C", group, true, false);
addGuiActions("actionShow_Constellation_Art", N_("Constellation art"
), "R", group, true, false);
addGuiActions("actionShow_Constellation_Labels", N_("Constellation l
abels"), "V", group, true, false);
addGuiActions("actionShow_Constellation_Boundaries", N_("Constellati
on boundaries"), "B", group, true, false);
addGuiActions("actionShow_Azimuthal_Grid", N_("Azimuthal grid"), "Z"
, group, true, false);
addGuiActions("actionShow_Equatorial_Grid", N_("Equatorial grid"), "
E", group, true, false);
addGuiActions("actionShow_Equatorial_J2000_Grid", N_("Equatorial J20
00 grid"), "", group, true, false);
addGuiActions("actionShow_Ecliptic_J2000_Grid", N_("Ecliptic J2000 g
rid"), "", group, true, false);
addGuiActions("actionShow_Galactic_Grid", N_("Galactic grid"), "", g
roup, true, false);
addGuiActions("actionShow_Galactic_Plane_Line", N_("Galactic plane")
, "", group, true, false);
addGuiActions("actionShow_Ecliptic_Line", N_("Ecliptic line"), ",",
group, true, false);
addGuiActions("actionShow_Equator_Line", N_("Equator line"), ".", gr
oup, true, false);
addGuiActions("actionShow_Meridian_Line", N_("Meridian line"), ";",
group, true, false);
addGuiActions("actionShow_Horizon_Line", N_("Horizon line"), "", gro
up, true, false);
addGuiActions("actionShow_Cardinal_Points", N_("Cardinal points"), "
Q", group, true, false);
addGuiActions("actionShow_Ground", N_("Ground"), "G", group, true, f
alse);
addGuiActions("actionShow_Atmosphere", N_("Atmosphere"), "A", group,
true, false);
addGuiActions("actionShow_Fog", N_("Fog"), "F", group, true, false);
addGuiActions("actionShow_Nebulas", N_("Nebulas"), "N", group, true,
false);
addGuiActions("actionShow_DSS", N_("Nebulas background images"), "",
group, true, false);
addGuiActions("actionShow_Stars", N_("Stars"), "S", group, true, fal
se);
addGuiActions("actionShow_Stars_Labels", N_("Stars labels"), "Alt+S"
, group, true, false);
addGuiActions("actionShow_Planets_Labels", N_("Planet labels"), "P",
group, true, false);
addGuiActions("actionShow_Planets_Orbits", N_("Planet orbits"), "O",
group, true, false);
addGuiActions("actionShow_Planets_Trails", N_("Planet trails"), "Shi
ft+T", group, true, false);
addGuiActions("actionShow_Night_Mode", N_("Night vision mode"), "Ctr
l+N", group, true, false);
addGuiActions("actionSet_Full_Screen_Global", N_("Full-screen mode")
, "F11", group, true, false, true);
addGuiActions("actionHorizontal_Flip", N_("Flip scene horizontally")
, "Ctrl+Shift+H", group, true, false);
addGuiActions("actionVertical_Flip", N_("Flip scene vertically"), "C
trl+Shift+V", group, true, false);
group = N_("Windows");
addGuiActions("actionShow_Help_Window_Global", N_("Help window"), "F
1", group, true, false, true);
addGuiActions("actionShow_Configuration_Window_Global", N_("Configur
ation window"), "F2", group, true, false, true);
addGuiActions("actionShow_Search_Window_Global", N_("Search window")
, "F3, Ctrl+F", group, true, false, true);
addGuiActions("actionShow_SkyView_Window_Global", N_("Sky and viewin
g options window"), "F4", group, true, false, true);
addGuiActions("actionShow_DateTime_Window_Global", N_("Date/time win
dow"), "F5", group, true, false, true);
addGuiActions("actionShow_Location_Window_Global", N_("Location wind
ow"), "F6", group, true, false, true);
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
addGuiActions("actionShow_ScriptConsole_Window_Global", N_("Script c StelApp::getInstance().getStelShortcutManager()->
onsole window"), "F12", group, true, false, true); addGuiAction("actionShow_ScriptConsole_Window_Global
", true, N_("Script console window"), "F12", "", N_("Windows"), true, false
, true);
#endif #endif
group = N_("Date and Time");
addGuiActions("actionDecrease_Script_Speed", N_("Slow down the scrip
t execution rate"), "", group, false, false);
addGuiActions("actionIncrease_Script_Speed", N_("Speed up the script
execution rate"), "", group, false, false);
addGuiActions("actionSet_Real_Script_Speed", N_("Set the normal scri
pt execution rate"), "", group, false, false);
addGuiActions("actionStop_Script", N_("Stop script execution"), "",
group, false, false);
addGuiActions("actionPause_Script", N_("Pause script execution"), ""
, group, false, false);
addGuiActions("actionResume_Script", N_("Resume script execution"),
"", group, false, false);
addGuiActions("actionDecrease_Time_Speed", N_("Decrease time speed")
, "J", group, false, false);
addGuiActions("actionIncrease_Time_Speed", N_("Increase time speed")
, "L", group, false, false);
addGuiActions("actionSet_Real_Time_Speed", N_("Set normal time rate"
), "K", group, false, false);
addGuiActions("actionDecrease_Time_Speed_Less", N_("Decrease time sp
eed (a little)"), "Shift+J", group, false, false);
addGuiActions("actionIncrease_Time_Speed_Less", N_("Increase time sp
eed (a little)"), "Shift+L", group, false, false);
addGuiActions("actionSet_Time_Rate_Zero", N_("Set time rate to zero"
), "7", group, false, false);
addGuiActions("actionReturn_To_Current_Time", N_("Set time to now"),
"8", group, false, false);
addGuiActions("actionAdd_Solar_Hour", N_("Add 1 solar hour"), "Ctrl+
=", group, false, true);
addGuiActions("actionSubtract_Solar_Hour", N_("Subtract 1 solar hour
"), "Ctrl+-", group, false, true);
addGuiActions("actionAdd_Solar_Day", N_("Add 1 solar day"), "=", gro
up, false, true);
addGuiActions("actionSubtract_Solar_Day", N_("Subtract 1 solar day")
, "-", group, false, true);
addGuiActions("actionAdd_Solar_Week", N_("Add 1 solar week"), "]", g
roup, false, true);
addGuiActions("actionSubtract_Solar_Week", N_("Subtract 1 solar week
"), "[", group, false, true);
addGuiActions("actionAdd_Sidereal_Day", N_("Add 1 sidereal day"), "A
lt+=", group, false, true);
addGuiActions("actionSubtract_Sidereal_Day", N_("Subtract 1 sidereal
day"), "Alt+-", group, false, true);
addGuiActions("actionAdd_Sidereal_Week", N_("Add 1 sidereal week"),
"Alt+]", group, false, true);
addGuiActions("actionSubtract_Sidereal_Week", N_("Subtract 1 siderea
l week"), "Alt+[", group, false, true);
addGuiActions("actionAdd_Sidereal_Month", N_("Add 1 sidereal month")
, "Alt+Shift+]", group, false, true);
addGuiActions("actionSubtract_Sidereal_Month", N_("Subtract 1 sidere
al month"), "Alt+Shift+[", group, false, true);
addGuiActions("actionAdd_Sidereal_Year", N_("Add 1 sidereal year"),
"Ctrl+Alt+Shift+]", group, false, true);
addGuiActions("actionSubtract_Sidereal_Year", N_("Subtract 1 siderea
l year"), "Ctrl+Alt+Shift+[", group, false, true);
group = N_("Movement and Selection");
addGuiActions("actionGoto_Selected_Object", N_("Center on selected o
bject"), "Space", group, false, false);
addGuiActions("actionSet_Tracking", N_("Track object"), "T", group,
true, false);
addGuiActions("actionZoom_In_Auto", N_("Zoom in on selected object")
, "/", group, false, false);
addGuiActions("actionZoom_Out_Auto", N_("Zoom out"), "\\", group, fa
lse, false);
addGuiActions("actionSet_Home_Planet_To_Selected", N_("Set home plan
et to selected planet"), "Ctrl+G", group, false, false);
group = N_("Miscellaneous");
addGuiActions("actionSwitch_Equatorial_Mount", N_("Switch between eq
uatorial and azimuthal mount"), "Ctrl+M", group, true, false);
addGuiActions("actionQuit_Global", N_("Quit"), "Ctrl+Q", group, fals
e, false, true);
addGuiActions("actionSave_Screenshot_Global", N_("Save screenshot"),
"Ctrl+S", group, false, false, true);
addGuiActions("actionSave_Copy_Object_Information_Global", N_("Copy
selected object information to clipboard"), "Ctrl+C", group, false, false,
true);
addGuiActions("actionGo_Home_Global", N_("Go to home"), "Ctrl+H", gr
oup, false, false, true);
addGuiActions("actionAutoHideHorizontalButtonBar", N_("Auto hide hor
izontal button bar"), "", group, true, false);
addGuiActions("actionAutoHideVerticalButtonBar", N_("Auto hide verti
cal button bar"), "", group, true, false);
addGuiActions("actionToggle_GuiHidden_Global", N_("Toggle visibility
of GUI"), "Ctrl+T", group, true, false, true);
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// 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(quit())); connect(getGuiAction("actionQuit_Global"), SIGNAL(triggered()), this , SLOT(quit()));
initConstellationMgr(); initConstellationMgr();
initGrindLineMgr(); initGrindLineMgr();
initLandscapeMgr(); initLandscapeMgr();
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
connect(getGuiActions("actionShow_Nebulas"), SIGNAL(toggled(bool)), connect(getGuiAction("actionShow_Nebulas"), SIGNAL(toggled(bool)), n
nmgr, SLOT(setFlagHints(bool))); mgr, SLOT(setFlagHints(bool)));
getGuiActions("actionShow_Nebulas")->setChecked(nmgr->getFlagHints() getGuiAction("actionShow_Nebulas")->setChecked(nmgr->getFlagHints())
); ;
StelSkyLayerMgr* imgr = GETSTELMODULE(StelSkyLayerMgr); StelSkyLayerMgr* imgr = GETSTELMODULE(StelSkyLayerMgr);
connect(getGuiActions("actionShow_DSS"), SIGNAL(toggled(bool)), imgr connect(getGuiAction("actionShow_DSS"), SIGNAL(toggled(bool)), imgr,
, SLOT(setFlagShow(bool))); SLOT(setFlagShow(bool)));
getGuiActions("actionShow_DSS")->setChecked(imgr->getFlagShow()); getGuiAction("actionShow_DSS")->setChecked(imgr->getFlagShow());
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr); StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr);
connect(getGuiActions("actionIncrease_Script_Speed"), SIGNAL(trigger connect(getGuiAction("actionIncrease_Script_Speed"), SIGNAL(triggere
ed()), this, SLOT(increaseScriptSpeed())); d()), this, SLOT(increaseScriptSpeed()));
connect(getGuiActions("actionDecrease_Script_Speed"), SIGNAL(trigger connect(getGuiAction("actionDecrease_Script_Speed"), SIGNAL(triggere
ed()), this, SLOT(decreaseScriptSpeed())); d()), this, SLOT(decreaseScriptSpeed()));
connect(getGuiActions("actionSet_Real_Script_Speed"), SIGNAL(trigger connect(getGuiAction("actionSet_Real_Script_Speed"), SIGNAL(triggere
ed()), this, SLOT(setRealScriptSpeed())); d()), this, SLOT(setRealScriptSpeed()));
connect(getGuiActions("actionStop_Script"), SIGNAL(triggered()), thi connect(getGuiAction("actionStop_Script"), SIGNAL(triggered()), this
s, SLOT(stopScript())); , SLOT(stopScript()));
connect(getGuiActions("actionPause_Script"), SIGNAL(triggered()), th connect(getGuiAction("actionPause_Script"), SIGNAL(triggered()), thi
is, SLOT(pauseScript())); s, SLOT(pauseScript()));
connect(getGuiActions("actionResume_Script"), SIGNAL(triggered()), t connect(getGuiAction("actionResume_Script"), SIGNAL(triggered()), th
his, SLOT(resumeScript())); is, SLOT(resumeScript()));
connect(getGuiActions("actionIncrease_Time_Speed"), SIGNAL(triggered connect(getGuiAction("actionIncrease_Time_Speed"), SIGNAL(triggered(
()), core, SLOT(increaseTimeSpeed())); )), core, SLOT(increaseTimeSpeed()));
connect(getGuiActions("actionDecrease_Time_Speed"), SIGNAL(triggered connect(getGuiAction("actionDecrease_Time_Speed"), SIGNAL(triggered(
()), core, SLOT(decreaseTimeSpeed())); )), core, SLOT(decreaseTimeSpeed()));
connect(getGuiActions("actionIncrease_Time_Speed_Less"), SIGNAL(trig connect(getGuiAction("actionIncrease_Time_Speed_Less"), SIGNAL(trigg
gered()), core, SLOT(increaseTimeSpeedLess())); ered()), core, SLOT(increaseTimeSpeedLess()));
connect(getGuiActions("actionDecrease_Time_Speed_Less"), SIGNAL(trig connect(getGuiAction("actionDecrease_Time_Speed_Less"), SIGNAL(trigg
gered()), core, SLOT(decreaseTimeSpeedLess())); ered()), core, SLOT(decreaseTimeSpeedLess()));
connect(getGuiActions("actionSet_Real_Time_Speed"), SIGNAL(triggered connect(getGuiAction("actionSet_Real_Time_Speed"), SIGNAL(triggered(
()), core, SLOT(toggleRealTimeSpeed())); )), core, SLOT(toggleRealTimeSpeed()));
connect(getGuiActions("actionSet_Time_Rate_Zero"), SIGNAL(triggered( connect(getGuiAction("actionSet_Time_Rate_Zero"), SIGNAL(triggered()
)), core, SLOT(setZeroTimeSpeed())); ), core, SLOT(setZeroTimeSpeed()));
connect(getGuiActions("actionReturn_To_Current_Time"), SIGNAL(trigge connect(getGuiAction("actionReturn_To_Current_Time"), SIGNAL(trigger
red()), core, SLOT(setTimeNow())); ed()), core, SLOT(setTimeNow()));
connect(getGuiActions("actionSwitch_Equatorial_Mount"), SIGNAL(toggl connect(getGuiAction("actionSwitch_Equatorial_Mount"), SIGNAL(toggle
ed(bool)), mmgr, SLOT(setEquatorialMount(bool))); d(bool)), mmgr, SLOT(setEquatorialMount(bool)));
getGuiActions("actionSwitch_Equatorial_Mount")->setChecked(mmgr->get getGuiAction("actionSwitch_Equatorial_Mount")->setChecked(mmgr->getM
MountMode() != StelMovementMgr::MountAltAzimuthal); ountMode() != StelMovementMgr::MountAltAzimuthal);
connect(getGuiActions("actionAdd_Solar_Hour"), SIGNAL(triggered()), connect(getGuiAction("actionAdd_Solar_Hour"), SIGNAL(triggered()), c
core, SLOT(addHour())); ore, SLOT(addHour()));
connect(getGuiActions("actionAdd_Solar_Day"), SIGNAL(triggered()), c connect(getGuiAction("actionAdd_Solar_Day"), SIGNAL(triggered()), co
ore, SLOT(addDay())); re, SLOT(addDay()));
connect(getGuiActions("actionAdd_Solar_Week"), SIGNAL(triggered()), connect(getGuiAction("actionAdd_Solar_Week"), SIGNAL(triggered()), c
core, SLOT(addWeek())); ore, SLOT(addWeek()));
connect(getGuiActions("actionSubtract_Solar_Hour"), SIGNAL(triggered connect(getGuiAction("actionSubtract_Solar_Hour"), SIGNAL(triggered(
()), core, SLOT(subtractHour())); )), core, SLOT(subtractHour()));
connect(getGuiActions("actionSubtract_Solar_Day"), SIGNAL(triggered( connect(getGuiAction("actionSubtract_Solar_Day"), SIGNAL(triggered()
)), core, SLOT(subtractDay())); ), core, SLOT(subtractDay()));
connect(getGuiActions("actionSubtract_Solar_Week"), SIGNAL(triggered connect(getGuiAction("actionSubtract_Solar_Week"), SIGNAL(triggered(
()), core, SLOT(subtractWeek())); )), core, SLOT(subtractWeek()));
connect(getGuiActions("actionAdd_Sidereal_Day"), SIGNAL(triggered()) connect(getGuiAction("actionAdd_Sidereal_Day"), SIGNAL(triggered()),
, core, SLOT(addSiderealDay())); core, SLOT(addSiderealDay()));
connect(getGuiActions("actionAdd_Sidereal_Week"), SIGNAL(triggered() connect(getGuiAction("actionAdd_Sidereal_Week"), SIGNAL(triggered())
), core, SLOT(addSiderealWeek())); , core, SLOT(addSiderealWeek()));
connect(getGuiActions("actionAdd_Sidereal_Month"), SIGNAL(triggered( connect(getGuiAction("actionAdd_Sidereal_Month"), SIGNAL(triggered()
)), core, SLOT(addSiderealMonth())); ), core, SLOT(addSiderealMonth()));
connect(getGuiActions("actionAdd_Sidereal_Year"), SIGNAL(triggered() connect(getGuiAction("actionAdd_Sidereal_Year"), SIGNAL(triggered())
), core, SLOT(addSiderealYear())); , core, SLOT(addSiderealYear()));
connect(getGuiActions("actionSubtract_Sidereal_Day"), SIGNAL(trigger connect(getGuiAction("actionAdd_Sidereal_Century"), SIGNAL(triggered
ed()), core, SLOT(subtractSiderealDay())); ()), core, SLOT(addSiderealCentury()));
connect(getGuiActions("actionSubtract_Sidereal_Week"), SIGNAL(trigge connect(getGuiAction("actionAdd_Synodic_Month"), SIGNAL(triggered())
red()), core, SLOT(subtractSiderealWeek())); , core, SLOT(addSynodicMonth()));
connect(getGuiActions("actionSubtract_Sidereal_Month"), SIGNAL(trigg connect(getGuiAction("actionAdd_Draconic_Month"), SIGNAL(triggered()
ered()), core, SLOT(subtractSiderealMonth())); ), core, SLOT(addDraconicMonth()));
connect(getGuiActions("actionSubtract_Sidereal_Year"), SIGNAL(trigge connect(getGuiAction("actionAdd_Draconic_Year"), SIGNAL(triggered())
red()), core, SLOT(subtractSiderealYear())); , core, SLOT(addDraconicYear()));
connect(getGuiActions("actionSet_Home_Planet_To_Selected"), SIGNAL(t connect(getGuiAction("actionAdd_Anomalistic_Month"), SIGNAL(triggere
riggered()), core, SLOT(moveObserverToSelected())); d()), core, SLOT(addAnomalisticMonth()));
connect(getGuiActions("actionGo_Home_Global"), SIGNAL(triggered()), connect(getGuiAction("actionAdd_Tropical_Month"), SIGNAL(triggered()
core, SLOT(returnToHome())); ), core, SLOT(addTropicalMonth()));
connect(getGuiAction("actionAdd_Tropical_Year"), SIGNAL(triggered())
, core, SLOT(addTropicalYear()));
connect(getGuiAction("actionAdd_Tropical_Century"), SIGNAL(triggered
()), core, SLOT(addTropicalCentury()));
connect(getGuiAction("actionSubtract_Sidereal_Day"), SIGNAL(triggere
d()), core, SLOT(subtractSiderealDay()));
connect(getGuiAction("actionSubtract_Sidereal_Week"), SIGNAL(trigger
ed()), core, SLOT(subtractSiderealWeek()));
connect(getGuiAction("actionSubtract_Sidereal_Month"), SIGNAL(trigge
red()), core, SLOT(subtractSiderealMonth()));
connect(getGuiAction("actionSubtract_Sidereal_Year"), SIGNAL(trigger
ed()), core, SLOT(subtractSiderealYear()));
connect(getGuiAction("actionSubtract_Sidereal_Century"), SIGNAL(trig
gered()), core, SLOT(subtractSiderealCentury()));
connect(getGuiAction("actionSubtract_Synodic_Month"), SIGNAL(trigger
ed()), core, SLOT(subtractSynodicMonth()));
connect(getGuiAction("actionSubtract_Draconic_Month"), SIGNAL(trigge
red()), core, SLOT(subtractDraconicMonth()));
connect(getGuiAction("actionSubtract_Draconic_Year"), SIGNAL(trigger
ed()), core, SLOT(subtractDraconicYear()));
connect(getGuiAction("actionSubtract_Anomalistic_Month"), SIGNAL(tri
ggered()), core, SLOT(subtractAnomalisticMonth()));
connect(getGuiAction("actionSubtract_Tropical_Month"), SIGNAL(trigge
red()), core, SLOT(subtractTropicalMonth()));
connect(getGuiAction("actionSubtract_Tropical_Year"), SIGNAL(trigger
ed()), core, SLOT(subtractTropicalYear()));
connect(getGuiAction("actionSubtract_Tropical_Century"), SIGNAL(trig
gered()), core, SLOT(subtractTropicalCentury()));
connect(getGuiAction("actionSet_Home_Planet_To_Selected"), SIGNAL(tr
iggered()), core, SLOT(moveObserverToSelected()));
connect(getGuiAction("actionGo_Home_Global"), SIGNAL(triggered()), c
ore, SLOT(returnToHome()));
// connect the actor after setting the nightmode. // connect the actor after setting the nightmode.
// StelApp::init() already set flagNightMode for us, don't do it twi ce! // StelApp::init() already set flagNightMode for us, don't do it twi ce!
getGuiActions("actionShow_Night_Mode")->setChecked(StelApp::getInsta getGuiAction("actionShow_Night_Mode")->setChecked(StelApp::getInstan
nce().getVisionModeNight()); ce().getVisionModeNight());
connect(getGuiActions("actionShow_Night_Mode"), SIGNAL(toggled(bool) connect(getGuiAction("actionShow_Night_Mode"), SIGNAL(toggled(bool))
), &StelApp::getInstance(), SLOT(setVisionModeNight(bool))); , &StelApp::getInstance(), SLOT(setVisionModeNight(bool)));
connect(getGuiActions("actionGoto_Selected_Object"), SIGNAL(triggere connect(getGuiAction("actionGoto_Selected_Object"), SIGNAL(triggered
d()), mmgr, SLOT(setFlagTracking())); ()), mmgr, SLOT(setFlagTracking()));
connect(getGuiActions("actionZoom_In_Auto"), SIGNAL(triggered()), mm connect(getGuiAction("actionZoom_In_Auto"), SIGNAL(triggered()), mmg
gr, SLOT(autoZoomIn())); r, SLOT(autoZoomIn()));
connect(getGuiActions("actionZoom_Out_Auto"), SIGNAL(triggered()), m connect(getGuiAction("actionZoom_Out_Auto"), SIGNAL(triggered()), mm
mgr, SLOT(autoZoomOut())); gr, SLOT(autoZoomOut()));
connect(getGuiActions("actionSet_Tracking"), SIGNAL(toggled(bool)), connect(getGuiAction("actionSet_Tracking"), SIGNAL(toggled(bool)), m
mmgr, SLOT(setFlagTracking(bool))); mgr, SLOT(setFlagTracking(bool)));
getGuiActions("actionSet_Tracking")->setChecked(mmgr->getFlagTrackin getGuiAction("actionSet_Tracking")->setChecked(mmgr->getFlagTracking
g()); ());
connect(getGuiActions("actionSet_Full_Screen_Global"), SIGNAL(toggle connect(getGuiAction("actionSet_Full_Screen_Global"), SIGNAL(toggled
d(bool)), &StelMainWindow::getInstance(), SLOT(setFullScreen(bool))); (bool)), &StelMainWindow::getInstance(), SLOT(setFullScreen(bool)));
getGuiActions("actionSet_Full_Screen_Global")->setChecked(StelMainWi getGuiAction("actionSet_Full_Screen_Global")->setChecked(StelMainWin
ndow::getInstance().isFullScreen()); dow::getInstance().isFullScreen());
QAction* tempAction = getGuiActions("actionShow_Location_Window_Glob al"); QAction* tempAction = getGuiAction("actionShow_Location_Window_Globa l");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
locationDialog, SLOT(setVisible(bool))); locationDialog, SLOT(setVisible(bool)));
connect(locationDialog, SIGNAL(visibleChanged(bool)), connect(locationDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
tempAction = getGuiActions("actionShow_ScriptConsole_Window_Global") ; tempAction = getGuiAction("actionShow_ScriptConsole_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
scriptConsole, SLOT(setVisible(bool))); scriptConsole, SLOT(setVisible(bool)));
connect(scriptConsole, SIGNAL(visibleChanged(bool)), connect(scriptConsole, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
#endif #endif
tempAction = getGuiActions("actionShow_Configuration_Window_Global") ; tempAction = getGuiAction("actionShow_Configuration_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
configurationDialog, SLOT(setVisible(bool))); configurationDialog, SLOT(setVisible(bool)));
connect(configurationDialog, SIGNAL(visibleChanged(bool)), connect(configurationDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
tempAction = getGuiActions("actionShow_SkyView_Window_Global"); tempAction = getGuiAction("actionShow_SkyView_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
viewDialog, SLOT(setVisible(bool))); viewDialog, SLOT(setVisible(bool)));
connect(viewDialog, SIGNAL(visibleChanged(bool)), connect(viewDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
tempAction = getGuiActions("actionShow_Help_Window_Global"); tempAction = getGuiAction("actionShow_Help_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
helpDialog, SLOT(setVisible(bool))); helpDialog, SLOT(setVisible(bool)));
connect(helpDialog, SIGNAL(visibleChanged(bool)), connect(helpDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
tempAction = getGuiActions("actionShow_DateTime_Window_Global"); tempAction = getGuiAction("actionShow_DateTime_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
dateTimeDialog, SLOT(setVisible(bool))); dateTimeDialog, SLOT(setVisible(bool)));
connect(dateTimeDialog, SIGNAL(visibleChanged(bool)), connect(dateTimeDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
tempAction = getGuiActions("actionShow_Search_Window_Global"); tempAction = getGuiAction("actionShow_Search_Window_Global");
connect(tempAction, SIGNAL(toggled(bool)), connect(tempAction, SIGNAL(toggled(bool)),
searchDialog, SLOT(setVisible(bool))); searchDialog, SLOT(setVisible(bool)));
connect(searchDialog, SIGNAL(visibleChanged(bool)), connect(searchDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool))); tempAction, SLOT(setChecked(bool)));
connect(getGuiActions("actionSave_Screenshot_Global"), SIGNAL(trigge tempAction = getGuiAction("actionShow_Shortcuts_Window_Global");
red()), &StelMainGraphicsView::getInstance(), SLOT(saveScreenShot())); connect(tempAction, SIGNAL(toggled(bool)),
connect(getGuiActions("actionSave_Copy_Object_Information_Global"), shortcutsDialog, SLOT(setVisible(bool)));
SIGNAL(triggered()), this, SLOT(copySelectedObjectInfo())); connect(shortcutsDialog, SIGNAL(visibleChanged(bool)),
tempAction, SLOT(setChecked(bool)));
getGuiActions("actionToggle_GuiHidden_Global")->setChecked(true);
connect(getGuiActions("actionToggle_GuiHidden_Global"), SIGNAL(toggl connect(getGuiAction("actionSave_Screenshot_Global"), SIGNAL(trigger
ed(bool)), this, SLOT(setGuiVisible(bool))); ed()), &StelMainGraphicsView::getInstance(), SLOT(saveScreenShot()));
connect(getGuiAction("actionSave_Copy_Object_Information_Global"), S
connect(getGuiActions("actionHorizontal_Flip"), SIGNAL(toggled(bool) IGNAL(triggered()), this, SLOT(copySelectedObjectInfo()));
), StelApp::getInstance().getCore(), SLOT(setFlipHorz(bool)));
getGuiActions("actionHorizontal_Flip")->setChecked(StelApp::getInsta getGuiAction("actionToggle_GuiHidden_Global")->setChecked(true);
nce().getCore()->getFlipHorz()); connect(getGuiAction("actionToggle_GuiHidden_Global"), SIGNAL(toggle
connect(getGuiActions("actionVertical_Flip"), SIGNAL(toggled(bool)), d(bool)), this, SLOT(setGuiVisible(bool)));
StelApp::getInstance().getCore(), SLOT(setFlipVert(bool)));
getGuiActions("actionVertical_Flip")->setChecked(StelApp::getInstanc connect(getGuiAction("actionHorizontal_Flip"), SIGNAL(toggled(bool))
e().getCore()->getFlipVert()); , StelApp::getInstance().getCore(), SLOT(setFlipHorz(bool)));
getGuiAction("actionHorizontal_Flip")->setChecked(StelApp::getInstan
ce().getCore()->getFlipHorz());
connect(getGuiAction("actionVertical_Flip"), SIGNAL(toggled(bool)),
StelApp::getInstance().getCore(), SLOT(setFlipVert(bool)));
getGuiAction("actionVertical_Flip")->setChecked(StelApp::getInstance
().getCore()->getFlipVert());
StarMgr* smgr = GETSTELMODULE(StarMgr); StarMgr* smgr = GETSTELMODULE(StarMgr);
connect(getGuiActions("actionShow_Stars"), SIGNAL(toggled(bool)), sm connect(getGuiAction("actionShow_Stars"), SIGNAL(toggled(bool)), smg
gr, SLOT(setFlagStars(bool))); r, SLOT(setFlagStars(bool)));
getGuiActions("actionShow_Stars")->setChecked(smgr->getFlagStars()); getGuiAction("actionShow_Stars")->setChecked(smgr->getFlagStars());
connect(getGuiActions("actionShow_Stars_Labels"), SIGNAL(toggled(boo connect(getGuiAction("actionShow_Stars_Labels"), SIGNAL(toggled(bool
l)), smgr, SLOT(setFlagLabels(bool))); )), smgr, SLOT(setFlagLabels(bool)));
getGuiActions("actionShow_Stars_Labels")->setChecked(smgr->getFlagLa getGuiAction("actionShow_Stars_Labels")->setChecked(smgr->getFlagLab
bels()); els());
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
connect(getGuiActions("actionShow_Planets_Labels"), SIGNAL(toggled(b connect(getGuiAction("actionShow_Planets_Labels"), SIGNAL(toggled(bo
ool)), ssmgr, SLOT(setFlagLabels(bool))); ol)), ssmgr, SLOT(setFlagLabels(bool)));
getGuiActions("actionShow_Planets_Labels")->setChecked(ssmgr->getFla getGuiAction("actionShow_Planets_Labels")->setChecked(ssmgr->getFlag
gLabels()); Labels());
connect(getGuiActions("actionShow_Planets_Orbits"), SIGNAL(toggled(b connect(getGuiAction("actionShow_Planets_Orbits"), SIGNAL(toggled(bo
ool)), ssmgr, SLOT(setFlagOrbits(bool))); ol)), ssmgr, SLOT(setFlagOrbits(bool)));
getGuiActions("actionShow_Planets_Orbits")->setChecked(ssmgr->getFla getGuiAction("actionShow_Planets_Orbits")->setChecked(ssmgr->getFlag
gOrbits()); Orbits());
connect(getGuiActions("actionShow_Planets_Trails"), SIGNAL(toggled(b connect(getGuiAction("actionShow_Planets_Trails"), SIGNAL(toggled(bo
ool)), ssmgr, SLOT(setFlagTrails(bool))); ol)), ssmgr, SLOT(setFlagTrails(bool)));
getGuiActions("actionShow_Planets_Trails")->setChecked(ssmgr->getFla getGuiAction("actionShow_Planets_Trails")->setChecked(ssmgr->getFlag
gTrails()); Trails());
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
setAutoHideHorizontalButtonBar(conf->value("gui/auto_hide_horizontal _toolbar", true).toBool()); setAutoHideHorizontalButtonBar(conf->value("gui/auto_hide_horizontal _toolbar", true).toBool());
setAutoHideVerticalButtonBar(conf->value("gui/auto_hide_vertical_too lbar", true).toBool()); setAutoHideVerticalButtonBar(conf->value("gui/auto_hide_vertical_too lbar", true).toBool());
connect(getGuiActions("actionAutoHideHorizontalButtonBar"), SIGNAL(t connect(getGuiAction("actionAutoHideHorizontalButtonBar"), SIGNAL(to
oggled(bool)), this, SLOT(setAutoHideHorizontalButtonBar(bool))); ggled(bool)), this, SLOT(setAutoHideHorizontalButtonBar(bool)));
getGuiActions("actionAutoHideHorizontalButtonBar")->setChecked(getAu getGuiAction("actionAutoHideHorizontalButtonBar")->setChecked(getAut
toHideHorizontalButtonBar()); oHideHorizontalButtonBar());
connect(getGuiActions("actionAutoHideVerticalButtonBar"), SIGNAL(tog connect(getGuiAction("actionAutoHideVerticalButtonBar"), SIGNAL(togg
gled(bool)), this, SLOT(setAutoHideVerticalButtonBar(bool))); led(bool)), this, SLOT(setAutoHideVerticalButtonBar(bool)));
getGuiActions("actionAutoHideVerticalButtonBar")->setChecked(getAuto getGuiAction("actionAutoHideVerticalButtonBar")->setChecked(getAutoH
HideVerticalButtonBar()); ideVerticalButtonBar());
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr(); StelScriptMgr& scriptMgr = StelMainGraphicsView::getInstance().getSc riptMgr();
connect(&scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarte d())); connect(&scriptMgr, SIGNAL(scriptRunning()), this, SLOT(scriptStarte d()));
connect(&scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStoppe d())); connect(&scriptMgr, SIGNAL(scriptStopped()), this, SLOT(scriptStoppe d()));
#endif #endif
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
//// QGraphicsView based GUI //// QGraphicsView based GUI
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Add everything // Add everything
QPixmap pxmapDefault; QPixmap pxmapDefault;
QPixmap pxmapGlow(":/graphicGui/glow.png"); QPixmap pxmapGlow(":/graphicGui/glow.png");
QPixmap pxmapOn(":/graphicGui/2-on-location.png"); QPixmap pxmapOn(":/graphicGui/2-on-location.png");
QPixmap pxmapOff(":/graphicGui/2-off-location.png"); QPixmap pxmapOff(":/graphicGui/2-off-location.png");
StelButton* b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions("actionShow_Location_Window_Global")); StelButton* b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction("actionShow_Location_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
pxmapOn = QPixmap(":/graphicGui/1-on-time.png"); pxmapOn = QPixmap(":/graphicGui/1-on-time.png");
pxmapOff = QPixmap(":/graphicGui/1-off-time.png"); pxmapOff = QPixmap(":/graphicGui/1-off-time.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions ("actionShow_DateTime_Window_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction( "actionShow_DateTime_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
pxmapOn = QPixmap(":/graphicGui/5-on-labels.png"); pxmapOn = QPixmap(":/graphicGui/5-on-labels.png");
pxmapOff = QPixmap(":/graphicGui/5-off-labels.png"); pxmapOff = QPixmap(":/graphicGui/5-off-labels.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions ("actionShow_SkyView_Window_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction( "actionShow_SkyView_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
pxmapOn = QPixmap(":/graphicGui/6-on-search.png"); pxmapOn = QPixmap(":/graphicGui/6-on-search.png");
pxmapOff = QPixmap(":/graphicGui/6-off-search.png"); pxmapOff = QPixmap(":/graphicGui/6-off-search.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions ("actionShow_Search_Window_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction( "actionShow_Search_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
pxmapOn = QPixmap(":/graphicGui/8-on-settings.png"); pxmapOn = QPixmap(":/graphicGui/8-on-settings.png");
pxmapOff = QPixmap(":/graphicGui/8-off-settings.png"); pxmapOff = QPixmap(":/graphicGui/8-off-settings.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions ("actionShow_Configuration_Window_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction( "actionShow_Configuration_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
pxmapOn = QPixmap(":/graphicGui/9-on-help.png"); pxmapOn = QPixmap(":/graphicGui/9-on-help.png");
pxmapOff = QPixmap(":/graphicGui/9-off-help.png"); pxmapOff = QPixmap(":/graphicGui/9-off-help.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiActions ("actionShow_Help_Window_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow, getGuiAction( "actionShow_Help_Window_Global"));
skyGui->winBar->addButton(b); skyGui->winBar->addButton(b);
QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png"); QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png");
pxmapOn = QPixmap(":/graphicGui/btConstellationLines-on.png"); pxmapOn = QPixmap(":/graphicGui/btConstellationLines-on.png");
pxmapOff = QPixmap(":/graphicGui/btConstellationLines-off.png"); pxmapOff = QPixmap(":/graphicGui/btConstellationLines-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Constellation_Lines")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Constellation_Lines"));
skyGui->buttonBar->addButton(b, "010-constellationsGroup"); skyGui->buttonBar->addButton(b, "010-constellationsGroup");
pxmapOn = QPixmap(":/graphicGui/btConstellationLabels-on.png"); pxmapOn = QPixmap(":/graphicGui/btConstellationLabels-on.png");
pxmapOff = QPixmap(":/graphicGui/btConstellationLabels-off.png"); pxmapOff = QPixmap(":/graphicGui/btConstellationLabels-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Constellation_Labels")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Constellation_Labels"));
skyGui->buttonBar->addButton(b, "010-constellationsGroup"); skyGui->buttonBar->addButton(b, "010-constellationsGroup");
pxmapOn = QPixmap(":/graphicGui/btConstellationArt-on.png"); pxmapOn = QPixmap(":/graphicGui/btConstellationArt-on.png");
pxmapOff = QPixmap(":/graphicGui/btConstellationArt-off.png"); pxmapOff = QPixmap(":/graphicGui/btConstellationArt-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Constellation_Art")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Constellation_Art"));
skyGui->buttonBar->addButton(b, "010-constellationsGroup"); skyGui->buttonBar->addButton(b, "010-constellationsGroup");
pxmapOn = QPixmap(":/graphicGui/btEquatorialGrid-on.png"); pxmapOn = QPixmap(":/graphicGui/btEquatorialGrid-on.png");
pxmapOff = QPixmap(":/graphicGui/btEquatorialGrid-off.png"); pxmapOff = QPixmap(":/graphicGui/btEquatorialGrid-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Equatorial_Grid")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Equatorial_Grid"));
skyGui->buttonBar->addButton(b, "020-gridsGroup"); skyGui->buttonBar->addButton(b, "020-gridsGroup");
pxmapOn = QPixmap(":/graphicGui/btAzimuthalGrid-on.png"); pxmapOn = QPixmap(":/graphicGui/btAzimuthalGrid-on.png");
pxmapOff = QPixmap(":/graphicGui/btAzimuthalGrid-off.png"); pxmapOff = QPixmap(":/graphicGui/btAzimuthalGrid-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Azimuthal_Grid")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Azimuthal_Grid"));
skyGui->buttonBar->addButton(b, "020-gridsGroup"); skyGui->buttonBar->addButton(b, "020-gridsGroup");
pxmapOn = QPixmap(":/graphicGui/btGround-on.png"); pxmapOn = QPixmap(":/graphicGui/btGround-on.png");
pxmapOff = QPixmap(":/graphicGui/btGround-off.png"); pxmapOff = QPixmap(":/graphicGui/btGround-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Ground")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Ground"));
skyGui->buttonBar->addButton(b, "030-landscapeGroup"); skyGui->buttonBar->addButton(b, "030-landscapeGroup");
pxmapOn = QPixmap(":/graphicGui/btCardinalPoints-on.png"); pxmapOn = QPixmap(":/graphicGui/btCardinalPoints-on.png");
pxmapOff = QPixmap(":/graphicGui/btCardinalPoints-off.png"); pxmapOff = QPixmap(":/graphicGui/btCardinalPoints-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Cardinal_Points")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Cardinal_Points"));
skyGui->buttonBar->addButton(b, "030-landscapeGroup"); skyGui->buttonBar->addButton(b, "030-landscapeGroup");
pxmapOn = QPixmap(":/graphicGui/btAtmosphere-on.png"); pxmapOn = QPixmap(":/graphicGui/btAtmosphere-on.png");
pxmapOff = QPixmap(":/graphicGui/btAtmosphere-off.png"); pxmapOff = QPixmap(":/graphicGui/btAtmosphere-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Atmosphere")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Atmosphere"));
skyGui->buttonBar->addButton(b, "030-landscapeGroup"); skyGui->buttonBar->addButton(b, "030-landscapeGroup");
pxmapOn = QPixmap(":/graphicGui/btNebula-on.png"); pxmapOn = QPixmap(":/graphicGui/btNebula-on.png");
pxmapOff = QPixmap(":/graphicGui/btNebula-off.png"); pxmapOff = QPixmap(":/graphicGui/btNebula-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Nebulas")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Nebulas"));
skyGui->buttonBar->addButton(b, "040-nebulaeGroup"); skyGui->buttonBar->addButton(b, "040-nebulaeGroup");
pxmapOn = QPixmap(":/graphicGui/btPlanets-on.png"); pxmapOn = QPixmap(":/graphicGui/btPlanets-on.png");
pxmapOff = QPixmap(":/graphicGui/btPlanets-off.png"); pxmapOff = QPixmap(":/graphicGui/btPlanets-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Planets_Labels")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Planets_Labels"));
skyGui->buttonBar->addButton(b, "040-nebulaeGroup"); skyGui->buttonBar->addButton(b, "040-nebulaeGroup");
pxmapOn = QPixmap(":/graphicGui/btEquatorialMount-on.png"); pxmapOn = QPixmap(":/graphicGui/btEquatorialMount-on.png");
pxmapOff = QPixmap(":/graphicGui/btEquatorialMount-off.png"); pxmapOff = QPixmap(":/graphicGui/btEquatorialMount-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc
tions("actionSwitch_Equatorial_Mount")); tion("actionSwitch_Equatorial_Mount"));
b->setChecked(getGuiActions("actionSwitch_Equatorial_Mount")->isChec b->setChecked(getGuiAction("actionSwitch_Equatorial_Mount")->isCheck
ked()); ed());
skyGui->buttonBar->addButton(b, "060-othersGroup"); skyGui->buttonBar->addButton(b, "060-othersGroup");
pxmapOn = QPixmap(":/graphicGui/btGotoSelectedObject-on.png"); pxmapOn = QPixmap(":/graphicGui/btGotoSelectedObject-on.png");
pxmapOff = QPixmap(":/graphicGui/btGotoSelectedObject-off.png"); pxmapOff = QPixmap(":/graphicGui/btGotoSelectedObject-off.png");
buttonGotoSelectedObject = new StelButton(NULL, pxmapOn, pxmapOff, p xmapGlow32x32, getGuiActions("actionGoto_Selected_Object")); buttonGotoSelectedObject = new StelButton(NULL, pxmapOn, pxmapOff, p xmapGlow32x32, getGuiAction("actionGoto_Selected_Object"));
skyGui->buttonBar->addButton(buttonGotoSelectedObject, "060-othersGr oup"); skyGui->buttonBar->addButton(buttonGotoSelectedObject, "060-othersGr oup");
pxmapOn = QPixmap(":/graphicGui/btNightView-on.png"); pxmapOn = QPixmap(":/graphicGui/btNightView-on.png");
pxmapOff = QPixmap(":/graphicGui/btNightView-off.png"); pxmapOff = QPixmap(":/graphicGui/btNightView-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionShow_Night_Mode")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionShow_Night_Mode"));
skyGui->buttonBar->addButton(b, "060-othersGroup"); skyGui->buttonBar->addButton(b, "060-othersGroup");
pxmapOn = QPixmap(":/graphicGui/btFullScreen-on.png"); pxmapOn = QPixmap(":/graphicGui/btFullScreen-on.png");
pxmapOff = QPixmap(":/graphicGui/btFullScreen-off.png"); pxmapOff = QPixmap(":/graphicGui/btFullScreen-off.png");
b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tions("actionSet_Full_Screen_Global")); b = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow32x32, getGuiAc tion("actionSet_Full_Screen_Global"));
skyGui->buttonBar->addButton(b, "060-othersGroup"); skyGui->buttonBar->addButton(b, "060-othersGroup");
pxmapOn = QPixmap(":/graphicGui/btTimeRewind-on.png"); pxmapOn = QPixmap(":/graphicGui/btTimeRewind-on.png");
pxmapOff = QPixmap(":/graphicGui/btTimeRewind-off.png"); pxmapOff = QPixmap(":/graphicGui/btTimeRewind-off.png");
buttonTimeRewind = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow 32x32, getGuiActions("actionDecrease_Time_Speed")); buttonTimeRewind = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlow 32x32, getGuiAction("actionDecrease_Time_Speed"));
skyGui->buttonBar->addButton(buttonTimeRewind, "070-timeGroup"); skyGui->buttonBar->addButton(buttonTimeRewind, "070-timeGroup");
pxmapOn = QPixmap(":/graphicGui/btTimeRealtime-on.png"); pxmapOn = QPixmap(":/graphicGui/btTimeRealtime-on.png");
pxmapOff = QPixmap(":/graphicGui/btTimeRealtime-off.png"); pxmapOff = QPixmap(":/graphicGui/btTimeRealtime-off.png");
pxmapDefault = QPixmap(":/graphicGui/btTimePause-on.png"); pxmapDefault = QPixmap(":/graphicGui/btTimePause-on.png");
buttonTimeRealTimeSpeed = new StelButton(NULL, pxmapOn, pxmapOff, px mapDefault, pxmapGlow32x32, getGuiActions("actionSet_Real_Time_Speed")); buttonTimeRealTimeSpeed = new StelButton(NULL, pxmapOn, pxmapOff, px mapDefault, pxmapGlow32x32, getGuiAction("actionSet_Real_Time_Speed"));
skyGui->buttonBar->addButton(buttonTimeRealTimeSpeed, "070-timeGroup "); skyGui->buttonBar->addButton(buttonTimeRealTimeSpeed, "070-timeGroup ");
pxmapOn = QPixmap(":/graphicGui/btTimeNow-on.png"); pxmapOn = QPixmap(":/graphicGui/btTimeNow-on.png");
pxmapOff = QPixmap(":/graphicGui/btTimeNow-off.png"); pxmapOff = QPixmap(":/graphicGui/btTimeNow-off.png");
buttonTimeCurrent = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlo w32x32, getGuiActions("actionReturn_To_Current_Time")); buttonTimeCurrent = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlo w32x32, getGuiAction("actionReturn_To_Current_Time"));
skyGui->buttonBar->addButton(buttonTimeCurrent, "070-timeGroup"); skyGui->buttonBar->addButton(buttonTimeCurrent, "070-timeGroup");
pxmapOn = QPixmap(":/graphicGui/btTimeForward-on.png"); pxmapOn = QPixmap(":/graphicGui/btTimeForward-on.png");
pxmapOff = QPixmap(":/graphicGui/btTimeForward-off.png"); pxmapOff = QPixmap(":/graphicGui/btTimeForward-off.png");
buttonTimeForward = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlo w32x32, getGuiActions("actionIncrease_Time_Speed")); buttonTimeForward = new StelButton(NULL, pxmapOn, pxmapOff, pxmapGlo w32x32, getGuiAction("actionIncrease_Time_Speed"));
skyGui->buttonBar->addButton(buttonTimeForward, "070-timeGroup"); skyGui->buttonBar->addButton(buttonTimeForward, "070-timeGroup");
skyGui->buttonBar->setGroupMargin("070-timeGroup", 32, 0); skyGui->buttonBar->setGroupMargin("070-timeGroup", 32, 0);
pxmapOn = QPixmap(":/graphicGui/btQuit.png"); pxmapOn = QPixmap(":/graphicGui/btQuit.png");
b = new StelButton(NULL, pxmapOn, pxmapOn, pxmapGlow32x32, getGuiAct ions("actionQuit_Global")); b = new StelButton(NULL, pxmapOn, pxmapOn, pxmapGlow32x32, getGuiAct ion("actionQuit_Global"));
skyGui->buttonBar->addButton(b, "080-quitGroup"); skyGui->buttonBar->addButton(b, "080-quitGroup");
// add the flip buttons if requested in the config // add the flip buttons if requested in the config
setFlagShowFlipButtons(conf->value("gui/flag_show_flip_buttons", fal se).toBool()); setFlagShowFlipButtons(conf->value("gui/flag_show_flip_buttons", fal se).toBool());
setFlagShowNebulaBackgroundButton(conf->value("gui/flag_show_nebulae _background_button", false).toBool()); setFlagShowNebulaBackgroundButton(conf->value("gui/flag_show_nebulae _background_button", false).toBool());
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// Create the main base widget // Create the main base widget
skyGui->init(this); skyGui->init(this);
QGraphicsGridLayout* l = new QGraphicsGridLayout(); QGraphicsGridLayout* l = new QGraphicsGridLayout();
skipping to change at line 573 skipping to change at line 518
// The disabled text for checkboxes is embossed with the QPalette::L ight setting for the ColorGroup Disabled. // The disabled text for checkboxes is embossed with the QPalette::L ight setting for the ColorGroup Disabled.
// It doesn't appear to be possible to set this from the stylesheet. Instead we'll make it 100% transparent // It doesn't appear to be possible to set this from the stylesheet. Instead we'll make it 100% transparent
// and set the text color for disabled in the stylesheets. // and set the text color for disabled in the stylesheets.
QPalette p = QApplication::palette(); QPalette p = QApplication::palette();
p.setColor(QPalette::Disabled, QPalette::Light, QColor(0,0,0,0)); p.setColor(QPalette::Disabled, QPalette::Light, QColor(0,0,0,0));
// And this is for the focus... apparently the focus indicator is t he inverted value for Active/Button. // And this is for the focus... apparently the focus indicator is t he inverted value for Active/Button.
p.setColor(QPalette::Active, QPalette::Button, QColor(255,255,255)); p.setColor(QPalette::Active, QPalette::Button, QColor(255,255,255));
QApplication::setPalette(p); QApplication::setPalette(p);
// FIXME: Workaround for set UI language when app is started --AW
updateI18n();
StelApp *app = &StelApp::getInstance(); StelApp *app = &StelApp::getInstance();
connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n())); connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n()));
connect(app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT( setStelStyle(const QString&))); connect(app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT( setStelStyle(const QString&)));
initDone = true; initDone = true;
} }
void StelGui::initConstellationMgr() void StelGui::initConstellationMgr()
{ {
ConstellationMgr* constellationMgr = GETSTELMODULE(ConstellationMgr) ; ConstellationMgr* constellationMgr = GETSTELMODULE(ConstellationMgr) ;
getGuiActions("actionShow_Constellation_Lines")->setChecked(constell getGuiAction("actionShow_Constellation_Lines")->setChecked(constella
ationMgr->getFlagLines()); tionMgr->getFlagLines());
connect(getGuiActions("actionShow_Constellation_Lines"), connect(getGuiAction("actionShow_Constellation_Lines"),
SIGNAL(toggled(bool)), SIGNAL(toggled(bool)),
constellationMgr, constellationMgr,
SLOT(setFlagLines(bool))); SLOT(setFlagLines(bool)));
connect(constellationMgr, connect(constellationMgr,
SIGNAL(linesDisplayedChanged(const bool)), SIGNAL(linesDisplayedChanged(const b
this, ool)),
SLOT(linesDisplayedUpdated(const bool))); this,
SLOT(linesDisplayedUpdated(const boo
getGuiActions("actionShow_Constellation_Art")->setChecked(constellat l)));
ionMgr->getFlagArt());
connect(getGuiActions("actionShow_Constellation_Art"), getGuiAction("actionShow_Constellation_Art")->setChecked(constellati
SIGNAL(toggled(bool)), onMgr->getFlagArt());
constellationMgr, connect(getGuiAction("actionShow_Constellation_Art"),
SLOT(setFlagArt(bool))); SIGNAL(toggled(bool)),
constellationMgr,
SLOT(setFlagArt(bool)));
connect(constellationMgr, connect(constellationMgr,
SIGNAL(artDisplayedChanged(const bool)), SIGNAL(artDisplayedChanged(const boo
this, l)),
SLOT(artDisplayedUpdated(const bool))); this,
SLOT(artDisplayedUpdated(const bool)
getGuiActions("actionShow_Constellation_Labels")->setChecked(constel ));
lationMgr->getFlagLabels());
connect(getGuiActions("actionShow_Constellation_Labels"), getGuiAction("actionShow_Constellation_Labels")->setChecked(constell
SIGNAL(toggled(bool)), ationMgr->getFlagLabels());
constellationMgr, connect(getGuiAction("actionShow_Constellation_Labels"),
SLOT(setFlagLabels(bool))); SIGNAL(toggled(bool)),
constellationMgr,
SLOT(setFlagLabels(bool)));
connect(constellationMgr, connect(constellationMgr,
SIGNAL(namesDisplayedChanged(const bool)), SIGNAL(namesDisplayedChanged(const b
this, ool)),
SLOT(namesDisplayedUpdated(const bool))); this,
SLOT(namesDisplayedUpdated(const boo
getGuiActions("actionShow_Constellation_Boundaries")->setChecked(con l)));
stellationMgr->getFlagBoundaries());
connect(getGuiActions("actionShow_Constellation_Boundaries"), getGuiAction("actionShow_Constellation_Boundaries")->setChecked(cons
SIGNAL(toggled(bool)), tellationMgr->getFlagBoundaries());
constellationMgr, connect(getGuiAction("actionShow_Constellation_Boundaries"),
SLOT(setFlagBoundaries(bool))); SIGNAL(toggled(bool)),
constellationMgr,
SLOT(setFlagBoundaries(bool)));
connect(constellationMgr, connect(constellationMgr,
SIGNAL(boundariesDisplayedChanged(const bool)), SIGNAL(boundariesDisplayedChanged(co
this, nst bool)),
SLOT(boundariesDisplayedUpdated(const bool))); this,
SLOT(boundariesDisplayedUpdated(cons
t bool)));
} }
void StelGui::initGrindLineMgr() void StelGui::initGrindLineMgr()
{ {
GridLinesMgr* gridLineManager = GETSTELMODULE(GridLinesMgr); GridLinesMgr* gridLineManager = GETSTELMODULE(GridLinesMgr);
getGuiActions("actionShow_Equatorial_Grid")->setChecked(gridLineMana getGuiAction("actionShow_Equatorial_Grid")->setChecked(gridLineManag
ger->getFlagEquatorGrid()); er->getFlagEquatorGrid());
connect(getGuiActions("actionShow_Equatorial_Grid"), connect(getGuiAction("actionShow_Equatorial_Grid"),
SIGNAL(toggled(bool)), SIGNAL(toggled(bool)),
gridLineManager, gridLineManager,
SLOT(setFlagEquatorGrid(bool))); SLOT(setFlagEquatorGrid(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(equatorGridDisplayedChanged(const bool)), SIGNAL(equatorGridDisplayedChanged(c
this, onst bool)),
SLOT(equatorGridDisplayedUpdated(const bool))); this,
SLOT(equatorGridDisplayedUpdated(con
getGuiActions("actionShow_Azimuthal_Grid")->setChecked(gridLineManag st bool)));
er->getFlagAzimuthalGrid());
connect(getGuiActions("actionShow_Azimuthal_Grid"), getGuiAction("actionShow_Azimuthal_Grid")->setChecked(gridLineManage
SIGNAL(toggled(bool)), r->getFlagAzimuthalGrid());
gridLineManager, connect(getGuiAction("actionShow_Azimuthal_Grid"),
SLOT(setFlagAzimuthalGrid(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagAzimuthalGrid(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(azimuthalGridDisplayedChanged(const bool)), SIGNAL(azimuthalGridDisplayedChanged
this, (const bool)),
SLOT(azimuthalGridDisplayedUpdated(const bool))); this,
SLOT(azimuthalGridDisplayedUpdated(c
getGuiActions("actionShow_Ecliptic_Line")->setChecked(gridLineManage onst bool)));
r->getFlagEclipticLine());
connect(getGuiActions("actionShow_Ecliptic_Line"), getGuiAction("actionShow_Ecliptic_Line")->setChecked(gridLineManager
SIGNAL(toggled(bool)), ->getFlagEclipticLine());
gridLineManager, connect(getGuiAction("actionShow_Ecliptic_Line"),
SLOT(setFlagEclipticLine(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagEclipticLine(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(eclipticLineDisplayedChanged(const bool)), SIGNAL(eclipticLineDisplayedChanged(
this, const bool)),
SLOT(eclipticLineDisplayedUpdated(const bool))); this,
SLOT(eclipticLineDisplayedUpdated(co
getGuiActions("actionShow_Equator_Line")->setChecked(gridLineManager nst bool)));
->getFlagEquatorLine());
connect(getGuiActions("actionShow_Equator_Line"), getGuiAction("actionShow_Equator_Line")->setChecked(gridLineManager-
SIGNAL(toggled(bool)), >getFlagEquatorLine());
gridLineManager, connect(getGuiAction("actionShow_Equator_Line"),
SLOT(setFlagEquatorLine(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagEquatorLine(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(equatorLineDisplayedChanged(const bool)), SIGNAL(equatorLineDisplayedChanged(c
this, onst bool)),
SLOT(equatorLineDisplayedUpdated(const bool))); this,
SLOT(equatorLineDisplayedUpdated(con
getGuiActions("actionShow_Meridian_Line")->setChecked(gridLineManage st bool)));
r->getFlagMeridianLine());
connect(getGuiActions("actionShow_Meridian_Line"), getGuiAction("actionShow_Meridian_Line")->setChecked(gridLineManager
SIGNAL(toggled(bool)), ->getFlagMeridianLine());
gridLineManager, connect(getGuiAction("actionShow_Meridian_Line"),
SLOT(setFlagMeridianLine(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagMeridianLine(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(meridianLineDisplayedChanged(const bool)), SIGNAL(meridianLineDisplayedChanged(
this, const bool)),
SLOT(meridianLineDisplayedUpdated(const bool))); this,
SLOT(meridianLineDisplayedUpdated(co
getGuiActions("actionShow_Horizon_Line")->setChecked(gridLineManager nst bool)));
->getFlagHorizonLine());
connect(getGuiActions("actionShow_Horizon_Line"), getGuiAction("actionShow_Horizon_Line")->setChecked(gridLineManager-
SIGNAL(toggled(bool)), >getFlagHorizonLine());
gridLineManager, connect(getGuiAction("actionShow_Horizon_Line"),
SLOT(setFlagHorizonLine(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagHorizonLine(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(horizonLineDisplayedChanged(const bool)), SIGNAL(horizonLineDisplayedChanged(c
this, onst bool)),
SLOT(horizonLineDisplayedUpdated(const bool))); this,
SLOT(horizonLineDisplayedUpdated(con
getGuiActions("actionShow_Equatorial_J2000_Grid")->setChecked(gridLi st bool)));
neManager->getFlagEquatorJ2000Grid());
connect(getGuiActions("actionShow_Equatorial_J2000_Grid"), getGuiAction("actionShow_Equatorial_J2000_Grid")->setChecked(gridLin
SIGNAL(toggled(bool)), eManager->getFlagEquatorJ2000Grid());
gridLineManager, connect(getGuiAction("actionShow_Equatorial_J2000_Grid"),
SLOT(setFlagEquatorJ2000Grid(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagEquatorJ2000Grid(bool)))
;
connect(gridLineManager, connect(gridLineManager,
SIGNAL(equatorJ2000GridDisplayedChanged(const bool)) SIGNAL(equatorJ2000GridDisplayedChan
, ged(const bool)),
this, this,
SLOT(equatorJ2000GridDisplayedUpdated(const bool))); SLOT(equatorJ2000GridDisplayedUpdate
d(const bool)));
getGuiActions("actionShow_Ecliptic_J2000_Grid")->setChecked(gridLine
Manager->getFlagEclipticJ2000Grid()); getGuiAction("actionShow_Ecliptic_J2000_Grid")->setChecked(gridLineM
connect(getGuiActions("actionShow_Ecliptic_J2000_Grid"), anager->getFlagEclipticJ2000Grid());
SIGNAL(toggled(bool)), connect(getGuiAction("actionShow_Ecliptic_J2000_Grid"),
gridLineManager, SIGNAL(toggled(bool)),
SLOT(setFlagEclipticJ2000Grid(bool))); gridLineManager,
SLOT(setFlagEclipticJ2000Grid(bool))
);
connect(gridLineManager, connect(gridLineManager,
SIGNAL(eclipticJ2000GridDisplayedChanged(const bool) SIGNAL(eclipticJ2000GridDisplayedCha
), nged(const bool)),
this, this,
SLOT(eclipticJ2000GridDisplayedUpdated(const bool))) SLOT(eclipticJ2000GridDisplayedUpdat
; ed(const bool)));
getGuiActions("actionShow_Galactic_Grid")->setChecked(gridLineManage getGuiAction("actionShow_Galactic_Grid")->setChecked(gridLineManager
r->getFlagGalacticGrid()); ->getFlagGalacticGrid());
connect(getGuiActions("actionShow_Galactic_Grid"), connect(getGuiAction("actionShow_Galactic_Grid"),
SIGNAL(toggled(bool)), SIGNAL(toggled(bool)),
gridLineManager, gridLineManager,
SLOT(setFlagGalacticGrid(bool))); SLOT(setFlagGalacticGrid(bool)));
connect(gridLineManager, connect(gridLineManager,
SIGNAL(galacticGridDisplayedChanged(const bool)), SIGNAL(galacticGridDisplayedChanged(
this, const bool)),
SLOT(galacticGridDisplayedUpdated(const bool))); this,
SLOT(galacticGridDisplayedUpdated(co
getGuiActions("actionShow_Galactic_Plane_Line")->setChecked(gridLine nst bool)));
Manager->getFlagGalacticPlaneLine());
connect(getGuiActions("actionShow_Galactic_Plane_Line"), getGuiAction("actionShow_Galactic_Plane_Line")->setChecked(gridLineM
SIGNAL(toggled(bool)), anager->getFlagGalacticPlaneLine());
gridLineManager, connect(getGuiAction("actionShow_Galactic_Plane_Line"),
SLOT(setFlagGalacticPlaneLine(bool))); SIGNAL(toggled(bool)),
gridLineManager,
SLOT(setFlagGalacticPlaneLine(bool))
);
connect(gridLineManager, connect(gridLineManager,
SIGNAL(galacticPlaneLineDisplayedChanged(const bool) SIGNAL(galacticPlaneLineDisplayedCha
), nged(const bool)),
this, this,
SLOT(galacticPlaneLineDisplayedUpdated(const bool))) SLOT(galacticPlaneLineDisplayedUpdat
; ed(const bool)));
} }
void StelGui::initLandscapeMgr() void StelGui::initLandscapeMgr()
{ {
LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr);
getGuiActions("actionShow_Ground")->setChecked(landscapeMgr->getFlag getGuiAction("actionShow_Ground")->setChecked(landscapeMgr->getFlagL
Landscape()); andscape());
connect(getGuiActions("actionShow_Ground"), connect(getGuiAction("actionShow_Ground"),
SIGNAL(toggled(bool)), SIGNAL(toggled(bool)),
landscapeMgr, landscapeMgr,
SLOT(setFlagLandscape(bool))); SLOT(setFlagLandscape(bool)));
connect(landscapeMgr, connect(landscapeMgr,
SIGNAL(landscapeDisplayedChanged(const bool)), SIGNAL(landscapeDisplayedChanged(con
this, st bool)),
SLOT(landscapeDisplayedUpdated(const bool))); this,
SLOT(landscapeDisplayedUpdated(const
getGuiActions("actionShow_Cardinal_Points")->setChecked(landscapeMgr bool)));
->getFlagCardinalsPoints());
connect(getGuiActions("actionShow_Cardinal_Points"), getGuiAction("actionShow_Cardinal_Points")->setChecked(landscapeMgr-
SIGNAL(toggled(bool)), >getFlagCardinalsPoints());
landscapeMgr, connect(getGuiAction("actionShow_Cardinal_Points"),
SLOT(setFlagCardinalsPoints(bool))); SIGNAL(toggled(bool)),
landscapeMgr,
SLOT(setFlagCardinalsPoints(bool)));
connect(landscapeMgr, connect(landscapeMgr,
SIGNAL(cardinalsPointsDisplayedChanged(const bool)), SIGNAL(cardinalsPointsDisplayedChang
this, ed(const bool)),
SLOT(cardinalsPointsDisplayedUpdated(const bool))); this,
SLOT(cardinalsPointsDisplayedUpdated
getGuiActions("actionShow_Atmosphere")->setChecked(landscapeMgr->get (const bool)));
FlagAtmosphere());
connect(getGuiActions("actionShow_Atmosphere"), getGuiAction("actionShow_Atmosphere")->setChecked(landscapeMgr->getF
SIGNAL(toggled(bool)), lagAtmosphere());
landscapeMgr, connect(getGuiAction("actionShow_Atmosphere"),
SLOT(setFlagAtmosphere(bool))); SIGNAL(toggled(bool)),
landscapeMgr,
SLOT(setFlagAtmosphere(bool)));
connect(landscapeMgr, connect(landscapeMgr,
SIGNAL(atmosphereDisplayedChanged(const bool)), SIGNAL(atmosphereDisplayedChanged(co
this, nst bool)),
SLOT(atmosphereDisplayedUpdated(const bool))); this,
SLOT(atmosphereDisplayedUpdated(cons
getGuiActions("actionShow_Fog")->setChecked(landscapeMgr->getFlagFog t bool)));
());
connect(getGuiActions("actionShow_Fog"), getGuiAction("actionShow_Fog")->setChecked(landscapeMgr->getFlagFog(
SIGNAL(toggled(bool)), ));
landscapeMgr, connect(getGuiAction("actionShow_Fog"),
SLOT(setFlagFog(bool))); SIGNAL(toggled(bool)),
landscapeMgr,
SLOT(setFlagFog(bool)));
connect(landscapeMgr, connect(landscapeMgr,
SIGNAL(fogDisplayedChanged(const bool)), SIGNAL(fogDisplayedChanged(const boo
this, l)),
SLOT(fogDisplayedUpdated(const bool))); this,
SLOT(fogDisplayedUpdated(const bool)
));
} }
void StelGui::quit() void StelGui::quit()
{ {
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
StelMainGraphicsView::getInstance().getScriptMgr().stopScript(); StelMainGraphicsView::getInstance().getScriptMgr().stopScript();
#endif #endif
QCoreApplication::exit(); QCoreApplication::exit();
} }
//! Reload the current Qt Style Sheet (Debug only) //! Reload the current Qt Style Sheet (Debug only)
void StelGui::reloadStyle() void StelGui::reloadStyle()
{ {
setStelStyle(StelApp::getInstance().getCurrentStelStyle()); setStelStyle(StelApp::getInstance().getCurrentStelStyle());
} }
//! Load color scheme from the given ini file and section name //! Load color scheme from the given ini file and section name
skipping to change at line 872 skipping to change at line 820
if (buttonTimeCurrent->isChecked()!=isTimeNow) { if (buttonTimeCurrent->isChecked()!=isTimeNow) {
buttonTimeCurrent->setChecked(isTimeNow); buttonTimeCurrent->setChecked(isTimeNow);
} }
StelMovementMgr* mmgr = GETSTELMODULE(StelMovementMgr); 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);
} }
bool flag = GETSTELMODULE(StarMgr)->getFlagStars(); bool flag = GETSTELMODULE(StarMgr)->getFlagStars();
if (getGuiActions("actionShow_Stars")->isChecked() != flag) { if (getGuiAction("actionShow_Stars")->isChecked() != flag) {
getGuiActions("actionShow_Stars")->setChecked(flag); getGuiAction("actionShow_Stars")->setChecked(flag);
} }
flag = GETSTELMODULE(NebulaMgr)->getFlagHints(); flag = GETSTELMODULE(NebulaMgr)->getFlagHints();
if (getGuiActions("actionShow_Nebulas")->isChecked() != flag) if (getGuiAction("actionShow_Nebulas")->isChecked() != flag)
getGuiActions("actionShow_Nebulas")->setChecked(flag); getGuiAction("actionShow_Nebulas")->setChecked(flag);
flag = GETSTELMODULE(StelSkyLayerMgr)->getFlagShow(); flag = GETSTELMODULE(StelSkyLayerMgr)->getFlagShow();
if (getGuiActions("actionShow_DSS")->isChecked() != flag) if (getGuiAction("actionShow_DSS")->isChecked() != flag)
getGuiActions("actionShow_DSS")->setChecked(flag); getGuiAction("actionShow_DSS")->setChecked(flag);
flag = mmgr->getMountMode() != StelMovementMgr::MountAltAzimuthal; flag = mmgr->getMountMode() != StelMovementMgr::MountAltAzimuthal;
if (getGuiActions("actionSwitch_Equatorial_Mount")->isChecked() != f if (getGuiAction("actionSwitch_Equatorial_Mount")->isChecked() != fl
lag) ag)
getGuiActions("actionSwitch_Equatorial_Mount")->setChecked(f getGuiAction("actionSwitch_Equatorial_Mount")->setChecked(fl
lag); ag);
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
flag = ssmgr->getFlagLabels(); flag = ssmgr->getFlagLabels();
if (getGuiActions("actionShow_Planets_Labels")->isChecked() != flag) if (getGuiAction("actionShow_Planets_Labels")->isChecked() != flag)
getGuiActions("actionShow_Planets_Labels")->setChecked(flag) getGuiAction("actionShow_Planets_Labels")->setChecked(flag);
;
flag = ssmgr->getFlagOrbits(); flag = ssmgr->getFlagOrbits();
if (getGuiActions("actionShow_Planets_Orbits")->isChecked() != flag) if (getGuiAction("actionShow_Planets_Orbits")->isChecked() != flag)
getGuiActions("actionShow_Planets_Orbits")->setChecked(flag) getGuiAction("actionShow_Planets_Orbits")->setChecked(flag);
;
flag = ssmgr->getFlagTrails(); flag = ssmgr->getFlagTrails();
if (getGuiActions("actionShow_Planets_Trails")->isChecked() != flag) if (getGuiAction("actionShow_Planets_Trails")->isChecked() != flag)
getGuiActions("actionShow_Planets_Trails")->setChecked(flag) getGuiAction("actionShow_Planets_Trails")->setChecked(flag);
;
flag = StelApp::getInstance().getVisionModeNight(); flag = StelApp::getInstance().getVisionModeNight();
if (getGuiActions("actionShow_Night_Mode")->isChecked() != flag) if (getGuiAction("actionShow_Night_Mode")->isChecked() != flag)
getGuiActions("actionShow_Night_Mode")->setChecked(flag); getGuiAction("actionShow_Night_Mode")->setChecked(flag);
flag = StelMainWindow::getInstance().isFullScreen(); flag = StelMainWindow::getInstance().isFullScreen();
if (getGuiActions("actionSet_Full_Screen_Global")->isChecked() != fl if (getGuiAction("actionSet_Full_Screen_Global")->isChecked() != fla
ag) g)
getGuiActions("actionSet_Full_Screen_Global")->setChecked(fl getGuiAction("actionSet_Full_Screen_Global")->setChecked(fla
ag); g);
skyGui->infoPanel->setTextFromObjects(GETSTELMODULE(StelObjectMgr)-> getSelectedObject()); skyGui->infoPanel->setTextFromObjects(GETSTELMODULE(StelObjectMgr)-> getSelectedObject());
// Check if the progressbar window changed, if yes update the whole view // Check if the progressbar window changed, if yes update the whole view
if (savedProgressBarSize!=skyGui->progressBarMgr->boundingRect().siz e()) if (savedProgressBarSize!=skyGui->progressBarMgr->boundingRect().siz e())
{ {
savedProgressBarSize=skyGui->progressBarMgr->boundingRect(). size(); savedProgressBarSize=skyGui->progressBarMgr->boundingRect(). size();
skyGui->updateBarsPos(); skyGui->updateBarsPos();
} }
skipping to change at line 928 skipping to change at line 876
QProgressBar* StelGui::addProgressBar() QProgressBar* StelGui::addProgressBar()
{ {
return skyGui->progressBarMgr->addProgressBar(); return skyGui->progressBarMgr->addProgressBar();
} }
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
void StelGui::setScriptKeys(bool b) void StelGui::setScriptKeys(bool b)
{ {
if (b) if (b)
{ {
getGuiActions("actionDecrease_Time_Speed")->setShortcut(QKey getGuiAction("actionDecrease_Time_Speed")->setShortcut(QKeyS
Sequence()); equence());
getGuiActions("actionIncrease_Time_Speed")->setShortcut(QKey getGuiAction("actionIncrease_Time_Speed")->setShortcut(QKeyS
Sequence()); equence());
getGuiActions("actionSet_Real_Time_Speed")->setShortcut(QKey getGuiAction("actionSet_Real_Time_Speed")->setShortcut(QKeyS
Sequence()); equence());
getGuiActions("actionDecrease_Script_Speed")->setShortcut(QK getGuiAction("actionDecrease_Script_Speed")->setShortcut(QKe
eySequence("J")); ySequence("J"));
getGuiActions("actionIncrease_Script_Speed")->setShortcut(QK getGuiAction("actionIncrease_Script_Speed")->setShortcut(QKe
eySequence("L")); ySequence("L"));
getGuiActions("actionSet_Real_Script_Speed")->setShortcut(QK getGuiAction("actionSet_Real_Script_Speed")->setShortcut(QKe
eySequence("K")); ySequence("K"));
getGuiActions("actionStop_Script")->setShortcut(QKeySequence
("4"));
getGuiActions("actionPause_Script")->setShortcut(QKeySequenc
e("5"));
getGuiActions("actionResume_Script")->setShortcut(QKeySequen
ce("6"));
} }
else else
{ {
getGuiActions("actionDecrease_Script_Speed")->setShortcut(QK getGuiAction("actionDecrease_Script_Speed")->setShortcut(QKe
eySequence()); ySequence());
getGuiActions("actionIncrease_Script_Speed")->setShortcut(QK getGuiAction("actionIncrease_Script_Speed")->setShortcut(QKe
eySequence()); ySequence());
getGuiActions("actionSet_Real_Script_Speed")->setShortcut(QK getGuiAction("actionSet_Real_Script_Speed")->setShortcut(QKe
eySequence()); ySequence());
getGuiActions("actionDecrease_Time_Speed")->setShortcut(QKey getGuiAction("actionDecrease_Time_Speed")->setShortcut(QKeyS
Sequence("J")); equence("J"));
getGuiActions("actionIncrease_Time_Speed")->setShortcut(QKey getGuiAction("actionIncrease_Time_Speed")->setShortcut(QKeyS
Sequence("L")); equence("L"));
getGuiActions("actionSet_Real_Time_Speed")->setShortcut(QKey getGuiAction("actionSet_Real_Time_Speed")->setShortcut(QKeyS
Sequence("K")); equence("K"));
} }
} }
void StelGui::increaseScriptSpeed() void StelGui::increaseScriptSpeed()
{ {
StelMainGraphicsView::getInstance().getScriptMgr().setScriptRate(Ste lMainGraphicsView::getInstance().getScriptMgr().getScriptRate()*2); StelMainGraphicsView::getInstance().getScriptMgr().setScriptRate(Ste lMainGraphicsView::getInstance().getScriptMgr().getScriptRate()*2);
} }
void StelGui::decreaseScriptSpeed() void StelGui::decreaseScriptSpeed()
{ {
skipping to change at line 988 skipping to change at line 932
} }
#endif #endif
void StelGui::setFlagShowFlipButtons(bool b) void StelGui::setFlagShowFlipButtons(bool b)
{ {
if (b==true) { if (b==true) {
if (flipVert==NULL) { if (flipVert==NULL) {
// Create the vertical flip button // Create the vertical flip button
QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ; QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ;
flipVert = new StelButton(NULL, flipVert = new StelButton(NULL,
QP
ixmap(":/graphicGui/btFlipVertical-on.png"), QPixmap(":/graphicGui/b
QP tFlipVertical-on.png"),
ixmap(":/graphicGui/btFlipVertical-off.png"),
px QPixmap(":/graphicGui/b
mapGlow32x32, tFlipVertical-off.png"),
ge
tGuiActions("actionVertical_Flip")); pxmapGlow32x32,
getGuiAction("actionVer
tical_Flip"));
} }
if (flipHoriz==NULL) { if (flipHoriz==NULL) {
QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ; QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ;
flipHoriz = new StelButton(NULL, flipHoriz = new StelButton(NULL,
Q
Pixmap(":/graphicGui/btFlipHorizontal-on.png"), QPixmap(":/graphicGui/
Q btFlipHorizontal-on.png"),
Pixmap(":/graphicGui/btFlipHorizontal-off.png"),
p QPixmap(":/graphicGui/
xmapGlow32x32, btFlipHorizontal-off.png"),
g
etGuiActions("actionHorizontal_Flip")); pxmapGlow32x32,
getGuiAction("actionHo
rizontal_Flip"));
} }
getButtonBar()->addButton(flipVert, "060-othersGroup", "acti onQuit_Global"); getButtonBar()->addButton(flipVert, "060-othersGroup", "acti onQuit_Global");
getButtonBar()->addButton(flipHoriz, "060-othersGroup", "act ionVertical_Flip"); getButtonBar()->addButton(flipHoriz, "060-othersGroup", "act ionVertical_Flip");
} else { } else {
getButtonBar()->hideButton("actionVertical_Flip"); getButtonBar()->hideButton("actionVertical_Flip");
getButtonBar()->hideButton("actionHorizontal_Flip"); getButtonBar()->hideButton("actionHorizontal_Flip");
} }
flagShowFlipButtons = b; flagShowFlipButtons = b;
if (initDone) { if (initDone) {
skyGui->updateBarsPos(); skyGui->updateBarsPos();
} }
} }
// Define whether the button toggling nebulae backround images should be vi sible // Define whether the button toggling nebulae backround images should be vi sible
void StelGui::setFlagShowNebulaBackgroundButton(bool b) void StelGui::setFlagShowNebulaBackgroundButton(bool b)
{ {
if (b==true) { if (b==true) {
if (btShowNebulaeBackground==NULL) { if (btShowNebulaeBackground==NULL) {
// Create the nebulae background button // Create the nebulae background button
QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ; QPixmap pxmapGlow32x32(":/graphicGui/glow32x32.png") ;
btShowNebulaeBackground = new StelButton(NULL, QPixm ap(":/graphicGui/btDSS-on.png"), QPixmap(":/graphicGui/btDSS-off.png"), pxm apGlow32x32, getGuiActions("actionShow_DSS")); btShowNebulaeBackground = new StelButton(NULL, QPixm ap(":/graphicGui/btDSS-on.png"), QPixmap(":/graphicGui/btDSS-off.png"), pxm apGlow32x32, getGuiAction("actionShow_DSS"));
} }
getButtonBar()->addButton(btShowNebulaeBackground, "040-nebu laeGroup"); getButtonBar()->addButton(btShowNebulaeBackground, "040-nebu laeGroup");
} else { } else {
getButtonBar()->hideButton("actionShow_DSS"); getButtonBar()->hideButton("actionShow_DSS");
} }
flagShowNebulaBackgroundButton = b; flagShowNebulaBackgroundButton = b;
} }
void StelGui::setVisible(bool b) void StelGui::setVisible(bool b)
{ {
skipping to change at line 1114 skipping to change at line 1058
return flagShowNebulaBackgroundButton; return flagShowNebulaBackgroundButton;
} }
bool StelGui::initComplete(void) const bool StelGui::initComplete(void) const
{ {
return initDone; return initDone;
} }
void StelGui::forceRefreshGui() void StelGui::forceRefreshGui()
{ {
skyGui->updateBarsPos(); skyGui->updateBarsPos();
} }
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
void StelGui::scriptStarted() void StelGui::scriptStarted()
{ {
setScriptKeys(true); setScriptKeys(true);
} }
void StelGui::scriptStopped() void StelGui::scriptStopped()
{ {
setScriptKeys(false); setScriptKeys(false);
} }
#endif #endif
void StelGui::setGuiVisible(bool b) void StelGui::setGuiVisible(bool b)
{ {
setVisible(b); setVisible(b);
} }
QAction* StelGui::addGuiActions(const QString& actionName, const QString& t ext, const QString& shortCut, const QString& helpGroup, bool checkable, boo l autoRepeat, bool global) QAction *StelGui::getGuiAction(const QString &actionName)
{ {
if (!shortCut.isEmpty()) StelShortcutMgr* shortcutMgr = StelApp::getInstance().getStelShortcu
helpDialog->setKey(helpGroup, "", shortCut, text); tManager();
return StelGuiBase::addGuiActions(actionName, text, shortCut, helpGr return shortcutMgr->getGuiAction(actionName);
oup, checkable, autoRepeat, global);
} }
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Process changes from the ConstellationMgr #pragma mark Process changes from the ConstellationMgr
#endif #endif
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
void StelGui::artDisplayedUpdated(const bool displayed) void StelGui::artDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Constellation_Art")->isChecked() != di if (getGuiAction("actionShow_Constellation_Art")->isChecked() != dis
splayed) { played) {
getGuiActions("actionShow_Constellation_Art")->setChecked(di getGuiAction("actionShow_Constellation_Art")->setChecked(dis
splayed); played);
} }
} }
void StelGui::boundariesDisplayedUpdated(const bool displayed) void StelGui::boundariesDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Constellation_Boundaries")->isChecked( if (getGuiAction("actionShow_Constellation_Boundaries")->isChecked()
) != displayed) { != displayed) {
getGuiActions("actionShow_Constellation_Boundaries")->setChe getGuiAction("actionShow_Constellation_Boundaries")->setChec
cked(displayed); ked(displayed);
} }
} }
void StelGui::linesDisplayedUpdated(const bool displayed) void StelGui::linesDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Constellation_Lines")->isChecked() != if (getGuiAction("actionShow_Constellation_Lines")->isChecked() != d
displayed) { isplayed) {
getGuiActions("actionShow_Constellation_Lines")->setChecked( getGuiAction("actionShow_Constellation_Lines")->setChecked(d
displayed); isplayed);
} }
} }
void StelGui::namesDisplayedUpdated(const bool displayed) void StelGui::namesDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Constellation_Labels")->isChecked() != if (getGuiAction("actionShow_Constellation_Labels")->isChecked() !=
displayed) { displayed) {
getGuiActions("actionShow_Constellation_Labels")->setChecked getGuiAction("actionShow_Constellation_Labels")->setChecked(
(displayed); displayed);
} }
} }
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Process changes from the GridLinesMgr #pragma mark Process changes from the GridLinesMgr
#endif #endif
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
void StelGui::azimuthalGridDisplayedUpdated(const bool displayed) void StelGui::azimuthalGridDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Azimuthal_Grid")->isChecked() != displ if (getGuiAction("actionShow_Azimuthal_Grid")->isChecked() != displa
ayed) { yed) {
getGuiActions("actionShow_Azimuthal_Grid")->setChecked(displ getGuiAction("actionShow_Azimuthal_Grid")->setChecked(displa
ayed); yed);
} }
} }
void StelGui::equatorGridDisplayedUpdated(const bool displayed) void StelGui::equatorGridDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Equatorial_Grid")->isChecked() != disp if (getGuiAction("actionShow_Equatorial_Grid")->isChecked() != displ
layed) { ayed) {
getGuiActions("actionShow_Equatorial_Grid")->setChecked(disp getGuiAction("actionShow_Equatorial_Grid")->setChecked(displ
layed); ayed);
} }
} }
void StelGui::equatorJ2000GridDisplayedUpdated(const bool displayed) void StelGui::equatorJ2000GridDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Equatorial_J2000_Grid")->isChecked() ! if (getGuiAction("actionShow_Equatorial_J2000_Grid")->isChecked() !=
= displayed) { displayed) {
getGuiActions("actionShow_Equatorial_J2000_Grid")->setChecke getGuiAction("actionShow_Equatorial_J2000_Grid")->setChecked
d(displayed); (displayed);
} }
} }
void StelGui::eclipticJ2000GridDisplayedUpdated(const bool displayed) void StelGui::eclipticJ2000GridDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Ecliptic_J2000_Grid")->isChecked() != if (getGuiAction("actionShow_Ecliptic_J2000_Grid")->isChecked() != d
displayed) { isplayed) {
getGuiActions("actionShow_Ecliptic_J2000_Grid")->setChecked( getGuiAction("actionShow_Ecliptic_J2000_Grid")->setChecked(d
displayed); isplayed);
} }
} }
void StelGui::galacticGridDisplayedUpdated(const bool displayed) void StelGui::galacticGridDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Galactic_Grid")->isChecked() != displa if (getGuiAction("actionShow_Galactic_Grid")->isChecked() != display
yed) { ed) {
getGuiActions("actionShow_Galactic_Grid")->setChecked(displa getGuiAction("actionShow_Galactic_Grid")->setChecked(display
yed); ed);
} }
} }
void StelGui::equatorLineDisplayedUpdated(const bool displayed) void StelGui::equatorLineDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Equator_Line")->isChecked() != display if (getGuiAction("actionShow_Equator_Line")->isChecked() != displaye
ed) { d) {
getGuiActions("actionShow_Equator_Line")->setChecked(display getGuiAction("actionShow_Equator_Line")->setChecked(displaye
ed); d);
} }
} }
void StelGui::eclipticLineDisplayedUpdated(const bool displayed) void StelGui::eclipticLineDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Ecliptic_Line")->isChecked() != displa if (getGuiAction("actionShow_Ecliptic_Line")->isChecked() != display
yed) { ed) {
getGuiActions("actionShow_Ecliptic_Line")->setChecked(displa getGuiAction("actionShow_Ecliptic_Line")->setChecked(display
yed); ed);
} }
} }
void StelGui::meridianLineDisplayedUpdated(const bool displayed) void StelGui::meridianLineDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Meridian_Line")->isChecked() != displa if (getGuiAction("actionShow_Meridian_Line")->isChecked() != display
yed) { ed) {
getGuiActions("actionShow_Meridian_Line")->setChecked(displa getGuiAction("actionShow_Meridian_Line")->setChecked(display
yed); ed);
} }
} }
void StelGui::horizonLineDisplayedUpdated(const bool displayed) void StelGui::horizonLineDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Horizon_Line")->isChecked() != display if (getGuiAction("actionShow_Horizon_Line")->isChecked() != displaye
ed) { d) {
getGuiActions("actionShow_Horizon_Line")->setChecked(display getGuiAction("actionShow_Horizon_Line")->setChecked(displaye
ed); d);
} }
} }
void StelGui::galacticPlaneLineDisplayedUpdated(const bool displayed) void StelGui::galacticPlaneLineDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Galactic_Plane_Line")->isChecked() != if (getGuiAction("actionShow_Galactic_Plane_Line")->isChecked() != d
displayed) { isplayed) {
getGuiActions("actionShow_Galactic_Plane_Line")->setChecked( getGuiAction("actionShow_Galactic_Plane_Line")->setChecked(d
displayed); isplayed);
} }
} }
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Process changes from the GridLinesMgr #pragma mark Process changes from the GridLinesMgr
#endif #endif
/* ************************************************************************ ****************************************** */ /* ************************************************************************ ****************************************** */
void StelGui::atmosphereDisplayedUpdated(const bool displayed) void StelGui::atmosphereDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Atmosphere")->isChecked() != displayed if (getGuiAction("actionShow_Atmosphere")->isChecked() != displayed)
) { {
getGuiActions("actionShow_Atmosphere")->setChecked(displayed getGuiAction("actionShow_Atmosphere")->setChecked(displayed)
); ;
} }
} }
void StelGui::cardinalsPointsDisplayedUpdated(const bool displayed) void StelGui::cardinalsPointsDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Cardinal_Points")->isChecked() != disp if (getGuiAction("actionShow_Cardinal_Points")->isChecked() != displ
layed) { ayed) {
getGuiActions("actionShow_Cardinal_Points")->setChecked(disp getGuiAction("actionShow_Cardinal_Points")->setChecked(displ
layed); ayed);
} }
} }
void StelGui::fogDisplayedUpdated(const bool displayed) void StelGui::fogDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Fog")->isChecked() != displayed) { if (getGuiAction("actionShow_Fog")->isChecked() != displayed) {
getGuiActions("actionShow_Fog")->setChecked(displayed); getGuiAction("actionShow_Fog")->setChecked(displayed);
} }
} }
void StelGui::landscapeDisplayedUpdated(const bool displayed) void StelGui::landscapeDisplayedUpdated(const bool displayed)
{ {
if (getGuiActions("actionShow_Ground")->isChecked() != displayed) { if (getGuiAction("actionShow_Ground")->isChecked() != displayed) {
getGuiActions("actionShow_Ground")->setChecked(displayed); getGuiAction("actionShow_Ground")->setChecked(displayed);
} }
} }
void StelGui::copySelectedObjectInfo(void) void StelGui::copySelectedObjectInfo(void)
{ {
QApplication::clipboard()->setText(skyGui->infoPanel->getSelectedTex t()); QApplication::clipboard()->setText(skyGui->infoPanel->getSelectedTex t());
} }
 End of changes. 115 change blocks. 
673 lines changed or deleted 592 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/