![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <StelGui.hpp>
Inherits StelModule.
Public Slots | |
void | setFlagShowFlipButtons (bool b) |
void | setFlagShowNebulaBackgroundButton (bool b) |
bool | getAutoHideHorizontalButtonBar () const |
void | setAutoHideHorizontalButtonBar (bool b) |
bool | getAutoHideVerticalButtonBar () const |
void | setAutoHideVerticalButtonBar (bool b) |
void | setHideGui (bool b) |
bool | getHideGui () |
void | toggleHideGui (void) |
void | quitStellarium () |
Public Member Functions | |
virtual void | init () |
virtual void | draw (StelCore *core) |
virtual void | update (double deltaTime) |
virtual void | updateI18n () |
virtual double | getCallOrder (StelModuleActionName actionName) const |
virtual void | glWindowHasBeenResized (int w, int h) |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
virtual void | setStelStyle (const StelStyle &style) |
void | loadStyle (const QString &fileName) |
InfoPanel * | getInfoPanel (void) |
class QProgressBar * | addProgressBar () |
QAction * | addGuiActions (const QString &actionName, const QString &text, const QString &shortCut, const QString &helpGroup, bool checkable=true, bool autoRepeat=false, const QString &persistenceName=QString()) |
QAction * | getGuiActions (const QString &actionName) |
BottomStelBar * | getButtonBar () |
bool | getFlagShowFlipButtons () |
bool | getFlagShowNebulaBackgroundButton () |
bool | initComplete (void) |
DownloadPopup * | getDownloadPopup () |
Static Public Member Functions | |
static QPixmap | makeRed (const QPixmap &p) |
It manages the various qt configuration windows, the buttons bars, the list of QAction/shortcuts.
virtual void StelGui::init | ( | ) | [virtual] |
virtual void StelGui::draw | ( | StelCore * | core | ) | [inline, virtual] |
Execute all the drawing functions for this module.
core | the core to use for the drawing |
Implements StelModule.
virtual void StelGui::update | ( | double | deltaTime | ) | [virtual] |
Update the module with respect to the time.
deltaTime | the time increment in second since last call. |
Implements StelModule.
virtual void StelGui::updateI18n | ( | ) | [virtual] |
Update i18n strings from english names according to current global sky and application language.
This method also reload the proper fonts depending on the language. The translation shall be done using the StelTranslator provided by the StelApp singleton instance.
Reimplemented from StelModule.
virtual double StelGui::getCallOrder | ( | StelModuleActionName | actionName | ) | const [virtual] |
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
actionName | the name of the action for which we want the call order |
Reimplemented from StelModule.
virtual void StelGui::glWindowHasBeenResized | ( | int | w, | |
int | h | |||
) | [virtual] |
This method is called for all StelModules when the GL window is resized.
Reimplemented from StelModule.
virtual bool StelGui::handleMouseMoves | ( | int | x, | |
int | y, | |||
Qt::MouseButtons | b | |||
) | [virtual] |
Handle mouse moves.
Please note that most of the interactions will be done through the GUI module.
Reimplemented from StelModule.
virtual void StelGui::setStelStyle | ( | const StelStyle & | style | ) | [virtual] |
void StelGui::loadStyle | ( | const QString & | fileName | ) |
Load a Qt style sheet to define the widgets style.
InfoPanel* StelGui::getInfoPanel | ( | void | ) | [inline] |
Get a pointer on the info panel used to display selected object info.
class QProgressBar* StelGui::addProgressBar | ( | ) |
Add a new progress bar in the lower right corner of the screen.
When the progress bar is deleted with removeProgressBar() the layout is automatically rearranged.
QAction* StelGui::addGuiActions | ( | const QString & | actionName, | |
const QString & | text, | |||
const QString & | shortCut, | |||
const QString & | helpGroup, | |||
bool | checkable = true , |
|||
bool | autoRepeat = false , |
|||
const QString & | persistenceName = QString() | |||
) |
Add a new action managed by the GUI.
This method should be used to add new shortcuts to the program
actionName | qt object name. Used as a reference for later uses | |
text | the text to display when hovering, or in the help window | |
shortCut | the qt shortcut to use | |
helpGroup | hint on how to group the text in the help window | |
checkable | whether the action should be checkable | |
autoRepeat | whether the action should be autorepeated | |
persistenceName | name of the attribute for persistence in the config.ini. Not persistent if empty. |
QAction* StelGui::getGuiActions | ( | const QString & | actionName | ) |
Get a pointer on an action managed by the GUI.
actionName | qt object name for this action |
BottomStelBar* StelGui::getButtonBar | ( | ) | [inline] |
Get the button bar at the bottom of the screen.
static QPixmap StelGui::makeRed | ( | const QPixmap & | p | ) | [static] |
Transform the pixmap so that it look red for night vision mode.
bool StelGui::getFlagShowFlipButtons | ( | ) | [inline] |
Get whether the buttons toggling image flip are visible.
bool StelGui::getFlagShowNebulaBackgroundButton | ( | ) | [inline] |
Get whether the button toggling nebulae background is visible.
bool StelGui::initComplete | ( | void | ) | [inline] |
returns true if the gui has complted init process.
void StelGui::setFlagShowFlipButtons | ( | bool | b | ) | [slot] |
Define whether the buttons toggling image flip should be visible.
void StelGui::setFlagShowNebulaBackgroundButton | ( | bool | b | ) | [slot] |
Define whether the button toggling nebulae background should be visible.
bool StelGui::getAutoHideHorizontalButtonBar | ( | ) | const [inline, slot] |
Get the auto-hide status of the horizontal toolbar.
void StelGui::setAutoHideHorizontalButtonBar | ( | bool | b | ) | [inline, slot] |
Set the auto-hide status of the horizontal toolbar.
When set to true, the horizontal toolbar will auto-hide itself, only making an appearance when the mouse is nearby. When false, it will remain on screen.
b | to hide or not to hide |
bool StelGui::getAutoHideVerticalButtonBar | ( | ) | const [inline, slot] |
Get the auto-hide status of the vertical toolbar.
void StelGui::setAutoHideVerticalButtonBar | ( | bool | b | ) | [inline, slot] |
Set the auto-hide status of the vertical toolbar.
When set to true, the vertical toolbar will auto-hide itself, only making an appearance when the mouse is nearby. When false, it will remain on screen.
b | to hide or not to hide |
void StelGui::setHideGui | ( | bool | b | ) | [slot] |
show or hide the toolbars
b | when true, toolbars will be shown, else they will be hidden. |
bool StelGui::getHideGui | ( | ) | [slot] |
get the current visible status of the toolbars
void StelGui::toggleHideGui | ( | void | ) | [inline, slot] |
toggle the status of the toolbars