StelGui.cpp   StelGui.cpp 
skipping to change at line 41 skipping to change at line 41
#include "StelMainView.hpp" #include "StelMainView.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 "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "SporadicMeteorMgr.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "StelObject.hpp" #include "StelObject.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"
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
#include "ScriptConsole.hpp" #include "ScriptConsole.hpp"
#endif #endif
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#endif #endif
#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 "ShortcutsDialog.hpp"
#include "AstroCalcDialog.hpp"
#include <QDebug> #include <QDebug>
#include <QTimeLine> #include <QTimeLine>
#include <QFontDatabase> #include <QFontDatabase>
#include <QMouseEvent> #include <QMouseEvent>
#include <QGuiApplication> #include <QGuiApplication>
#include <QFile> #include <QFile>
#include <QTextBrowser> #include <QTextBrowser>
#include <QGraphicsWidget> #include <QGraphicsWidget>
#include <QGraphicsGridLayout> #include <QGraphicsGridLayout>
skipping to change at line 95 skipping to change at line 96
, locationDialog(0) , locationDialog(0)
, helpDialog(0) , helpDialog(0)
, dateTimeDialog(0) , dateTimeDialog(0)
, searchDialog(0) , searchDialog(0)
, viewDialog(0) , viewDialog(0)
, shortcutsDialog(0) , shortcutsDialog(0)
, configurationDialog(0) , configurationDialog(0)
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
, scriptConsole(0) , scriptConsole(0)
#endif #endif
, astroCalcDialog(0)
, flagShowFlipButtons(false) , flagShowFlipButtons(false)
, flipVert(NULL) , flipVert(NULL)
, flipHoriz(NULL) , flipHoriz(NULL)
, flagShowNebulaBackgroundButton(false) , flagShowNebulaBackgroundButton(false)
, btShowNebulaeBackground(NULL) , btShowNebulaeBackground(NULL)
, initDone(false) , initDone(false)
{ {
// QPixmapCache::setCacheLimit(30000); ? // QPixmapCache::setCacheLimit(30000); ?
} }
skipping to change at line 148 skipping to change at line 150
shortcutsDialog = NULL; 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
if (astroCalcDialog)
{
delete astroCalcDialog;
astroCalcDialog = NULL;
}
} }
void StelGui::init(QGraphicsWidget *atopLevelGraphicsWidget) void StelGui::init(QGraphicsWidget *atopLevelGraphicsWidget)
{ {
qDebug() << "Creating GUI ..."; qDebug() << "Creating GUI ...";
StelGuiBase::init(atopLevelGraphicsWidget); StelGuiBase::init(atopLevelGraphicsWidget);
skyGui = new SkyGui(atopLevelGraphicsWidget); skyGui = new SkyGui(atopLevelGraphicsWidget);
locationDialog = new LocationDialog(atopLevelGraphicsWidget); locationDialog = new LocationDialog(atopLevelGraphicsWidget);
helpDialog = new HelpDialog(atopLevelGraphicsWidget); helpDialog = new HelpDialog(atopLevelGraphicsWidget);
dateTimeDialog = new DateTimeDialog(atopLevelGraphicsWidget); dateTimeDialog = new DateTimeDialog(atopLevelGraphicsWidget);
searchDialog = new SearchDialog(atopLevelGraphicsWidget); searchDialog = new SearchDialog(atopLevelGraphicsWidget);
viewDialog = new ViewDialog(atopLevelGraphicsWidget); viewDialog = new ViewDialog(atopLevelGraphicsWidget);
shortcutsDialog = new ShortcutsDialog(atopLevelGraphicsWidget); shortcutsDialog = new ShortcutsDialog(atopLevelGraphicsWidget);
configurationDialog = new ConfigurationDialog(this, atopLevelGraphic sWidget); configurationDialog = new ConfigurationDialog(this, atopLevelGraphic sWidget);
#ifdef ENABLE_SCRIPT_CONSOLE #ifdef ENABLE_SCRIPT_CONSOLE
scriptConsole = new ScriptConsole(); scriptConsole = new ScriptConsole(atopLevelGraphicsWidget);
#endif #endif
astroCalcDialog = new AstroCalcDialog(atopLevelGraphicsWidget);
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// Create all the main actions of the program, associated with short cuts // Create all the main actions of the program, associated with short cuts
//////////////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////////////// ///
// Connect all the GUI actions signals with the Core of Stellarium // Connect all the GUI actions signals with the Core of Stellarium
StelActionMgr* actionsMgr = StelApp::getInstance().getStelActionMana ger(); StelActionMgr* actionsMgr = StelApp::getInstance().getStelActionMana ger();
// XXX: this should probably go into the script manager. // XXX: this should probably go into the script manager.
QString datetimeGroup = N_("Date and Time"); QString datetimeGroup = N_("Date and Time");
skipping to change at line 197 skipping to change at line 205
actionsMgr->addAction("actionShow_ScriptConsole_Window_Global", wind owsGroup, N_("Script console window"), scriptConsole, "visible", "F12", "", true); actionsMgr->addAction("actionShow_ScriptConsole_Window_Global", wind owsGroup, N_("Script console window"), scriptConsole, "visible", "F12", "", true);
#endif #endif
actionsMgr->addAction("actionShow_Help_Window_Global", windowsGroup, N_("Help window"), helpDialog, "visible", "F1", "", true); actionsMgr->addAction("actionShow_Help_Window_Global", windowsGroup, N_("Help window"), helpDialog, "visible", "F1", "", true);
actionsMgr->addAction("actionShow_Configuration_Window_Global", wind owsGroup, N_("Configuration window"), configurationDialog, "visible", "F2", "", true); actionsMgr->addAction("actionShow_Configuration_Window_Global", wind owsGroup, N_("Configuration window"), configurationDialog, "visible", "F2", "", true);
actionsMgr->addAction("actionShow_Search_Window_Global", windowsGrou p, N_("Search window"), searchDialog, "visible", "F3", "Ctrl+F", true); actionsMgr->addAction("actionShow_Search_Window_Global", windowsGrou p, N_("Search window"), searchDialog, "visible", "F3", "Ctrl+F", true);
actionsMgr->addAction("actionShow_SkyView_Window_Global", windowsGro up, N_("Sky and viewing options window"), viewDialog, "visible", "F4", "", true); actionsMgr->addAction("actionShow_SkyView_Window_Global", windowsGro up, N_("Sky and viewing options window"), viewDialog, "visible", "F4", "", true);
actionsMgr->addAction("actionShow_DateTime_Window_Global", windowsGr oup, N_("Date/time window"), dateTimeDialog, "visible", "F5", "", true); actionsMgr->addAction("actionShow_DateTime_Window_Global", windowsGr oup, N_("Date/time window"), dateTimeDialog, "visible", "F5", "", true);
actionsMgr->addAction("actionShow_Location_Window_Global", windowsGr oup, N_("Location window"), locationDialog, "visible", "F6", "", true); actionsMgr->addAction("actionShow_Location_Window_Global", windowsGr oup, N_("Location window"), locationDialog, "visible", "F6", "", true);
actionsMgr->addAction("actionShow_Shortcuts_Window_Global", windowsG roup, N_("Shortcuts window"), shortcutsDialog, "visible", "F7", "", true); actionsMgr->addAction("actionShow_Shortcuts_Window_Global", windowsG roup, N_("Shortcuts window"), shortcutsDialog, "visible", "F7", "", true);
actionsMgr->addAction("actionShow_AstroCalc_Window_Global", windowsG roup, N_("AstroCalc window"), astroCalcDialog, "visible", "F10", "Alt+A", t rue);
actionsMgr->addAction("actionSave_Copy_Object_Information_Global", m iscGroup, N_("Copy selected object information to clipboard"), this, "copyS electedObjectInfo()", "Ctrl+C", "", true); actionsMgr->addAction("actionSave_Copy_Object_Information_Global", m iscGroup, N_("Copy selected object information to clipboard"), this, "copyS electedObjectInfo()", "Ctrl+C", "", true);
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());
actionsMgr->addAction("actionAutoHideHorizontalButtonBar", miscGroup , N_("Auto hide horizontal button bar"), this, "autoHideHorizontalButtonBar "); actionsMgr->addAction("actionAutoHideHorizontalButtonBar", miscGroup , N_("Auto hide horizontal button bar"), this, "autoHideHorizontalButtonBar ");
actionsMgr->addAction("actionAutoHideVerticalButtonBar", miscGroup, N_("Auto hide vertical button bar"), this, "autoHideVerticalButtonBar"); actionsMgr->addAction("actionAutoHideVerticalButtonBar", miscGroup, N_("Auto hide vertical button bar"), this, "autoHideVerticalButtonBar");
setGuiVisible(conf->value("gui/flag_show_gui", true).toBool()); setGuiVisible(conf->value("gui/flag_show_gui", true).toBool());
skipping to change at line 407 skipping to change at line 416
} }
//! Load color scheme from the given ini file and section name //! Load color scheme from the given ini file and section name
void StelGui::setStelStyle(const QString& section) void StelGui::setStelStyle(const QString& section)
{ {
if (currentStelStyle.confSectionName!=section) if (currentStelStyle.confSectionName!=section)
{ {
// Load the style sheets // Load the style sheets
currentStelStyle.confSectionName = section; currentStelStyle.confSectionName = section;
QString qtStyleFileName; QString qtStyleFileName = ":/graphicGui/normalStyle.css";
QString htmlStyleFileName; QString htmlStyleFileName = ":/graphicGui/normalHtml.css";
if (section=="night_color")
{
qtStyleFileName = ":/graphicGui/nightStyle.css";
htmlStyleFileName = ":/graphicGui/nightHtml.css";
}
else if (section=="color")
{
qtStyleFileName = ":/graphicGui/normalStyle.css";
htmlStyleFileName = ":/graphicGui/normalHtml.css";
}
// Load Qt style sheet // Load Qt style sheet
QFile styleFile(qtStyleFileName); QFile styleFile(qtStyleFileName);
if(styleFile.open(QIODevice::ReadOnly)) if(styleFile.open(QIODevice::ReadOnly))
{ {
currentStelStyle.qtStyleSheet = styleFile.readAll(); currentStelStyle.qtStyleSheet = styleFile.readAll();
styleFile.close(); styleFile.close();
} }
QFile htmlStyleFile(htmlStyleFileName); QFile htmlStyleFile(htmlStyleFileName);
skipping to change at line 525 skipping to change at line 523
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();
forceRefreshGui(); forceRefreshGui();
} }
dateTimeDialog->setDateTime(core->getJDay()); dateTimeDialog->setDateTime(core->getJD());
} }
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
void StelGui::setScriptKeys(bool b) void StelGui::setScriptKeys(bool b)
{ {
if (b) if (b)
{ {
getAction("actionDecrease_Time_Speed")->setShortcut(""); getAction("actionDecrease_Time_Speed")->setShortcut("");
getAction("actionIncrease_Time_Speed")->setShortcut(""); getAction("actionIncrease_Time_Speed")->setShortcut("");
getAction("actionSet_Real_Time_Speed")->setShortcut(""); getAction("actionSet_Real_Time_Speed")->setShortcut("");
 End of changes. 10 change blocks. 
16 lines changed or deleted 14 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/