StelGui.cpp   StelGui.cpp 
skipping to change at line 63 skipping to change at line 63
#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 "AstroCalcDialog.hpp"
#include "BookmarksDialog.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 98 skipping to change at line 99
, 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) , astroCalcDialog(0)
, bookmarksDialog(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)
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
// We use a QStringList to save the user-configured buttons while script is running, and restore them later. // We use a QStringList to save the user-configured buttons while script is running, and restore them later.
, scriptSaveSpeedbuttons() , scriptSaveSpeedbuttons()
#endif #endif
skipping to change at line 161 skipping to change at line 163
{ {
delete scriptConsole; delete scriptConsole;
scriptConsole = 0; scriptConsole = 0;
} }
#endif #endif
if (astroCalcDialog) if (astroCalcDialog)
{ {
delete astroCalcDialog; delete astroCalcDialog;
astroCalcDialog = NULL; astroCalcDialog = NULL;
} }
if (bookmarksDialog)
{
delete bookmarksDialog;
bookmarksDialog = 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(atopLevelGraphicsWidget); scriptConsole = new ScriptConsole(atopLevelGraphicsWidget);
#endif #endif
astroCalcDialog = new AstroCalcDialog(atopLevelGraphicsWidget); astroCalcDialog = new AstroCalcDialog(atopLevelGraphicsWidget);
bookmarksDialog = new BookmarksDialog(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 212 skipping to change at line 220
#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("actionShow_AstroCalc_Window_Global", windowsG roup, N_("AstroCalc window"), astroCalcDialog, "visible", "F10", "Alt+A", t rue);
actionsMgr->addAction("actionShow_Bookmarks_Window_Global", windowsG roup, N_("Bookmarks window"), bookmarksDialog, "visible", "Alt+B", "", true );
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 675 skipping to change at line 684
if (searchDialog->visible()) if (searchDialog->visible())
{ {
// Update format of input fields if Search Dialog is open // Update format of input fields if Search Dialog is open
searchDialog->populateCoordinateAxis(); searchDialog->populateCoordinateAxis();
} }
} }
void StelGui::setVisible(bool b) void StelGui::setVisible(bool b)
{ {
skyGui->setVisible(b); skyGui->setVisible(b);
emit visibleChanged(b);
} }
bool StelGui::getVisible() const bool StelGui::getVisible() const
{ {
return skyGui->isVisible(); return skyGui->isVisible();
} }
bool StelGui::isCurrentlyUsed() const bool StelGui::isCurrentlyUsed() const
{ {
return skyGui->buttonBar->isUnderMouse() || skyGui->winBar->isUnderM ouse(); return skyGui->buttonBar->isUnderMouse() || skyGui->winBar->isUnderM ouse();
skipping to change at line 727 skipping to change at line 737
return skyGui; return skyGui;
} }
bool StelGui::getAutoHideHorizontalButtonBar() const bool StelGui::getAutoHideHorizontalButtonBar() const
{ {
return skyGui->autoHideHorizontalButtonBar; return skyGui->autoHideHorizontalButtonBar;
} }
void StelGui::setAutoHideHorizontalButtonBar(bool b) void StelGui::setAutoHideHorizontalButtonBar(bool b)
{ {
skyGui->autoHideHorizontalButtonBar=b; if (skyGui->autoHideHorizontalButtonBar!=b)
{
skyGui->autoHideHorizontalButtonBar=b;
emit autoHideHorizontalButtonBarChanged(b);
}
} }
bool StelGui::getAutoHideVerticalButtonBar() const bool StelGui::getAutoHideVerticalButtonBar() const
{ {
return skyGui->autoHideVerticalButtonBar; return skyGui->autoHideVerticalButtonBar;
} }
void StelGui::setAutoHideVerticalButtonBar(bool b) void StelGui::setAutoHideVerticalButtonBar(bool b)
{ {
skyGui->autoHideVerticalButtonBar=b; if (skyGui->autoHideVerticalButtonBar!=b)
{
skyGui->autoHideVerticalButtonBar=b;
emit autoHideVerticalButtonBarChanged(b);
}
} }
bool StelGui::getFlagShowFlipButtons() const bool StelGui::getFlagShowFlipButtons() const
{ {
return flagShowFlipButtons; return flagShowFlipButtons;
} }
bool StelGui::getFlagShowNebulaBackgroundButton() const bool StelGui::getFlagShowNebulaBackgroundButton() const
{ {
return flagShowNebulaBackgroundButton; return flagShowNebulaBackgroundButton;
skipping to change at line 807 skipping to change at line 825
#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::copySelectedObjectInfo(void) void StelGui::copySelectedObjectInfo(void)
{ {
QGuiApplication::clipboard()->setText(skyGui->infoPanel->getSelected Text()); QGuiApplication::clipboard()->setText(skyGui->infoPanel->getSelected Text());
} }
bool StelGui::getAstroCalcVisible()
{
return astroCalcDialog && astroCalcDialog->visible();
}
 End of changes. 9 change blocks. 
2 lines changed or deleted 20 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/