Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelGui Class Reference

Main class for the GUI based on QGraphicView. More...

#include <StelGui.hpp>

Inherits StelModule.

List of all members.

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 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)
InfoPanelgetInfoPanel (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 ()
class LeftStelBar * getWindowsButtonBar ()
bool getFlagShowFlipButtons ()
bool getFlagShowNebulaBackgroundButton ()
bool initComplete (void)
DownloadPopup * getDownloadPopup ()

Static Public Member Functions

static QPixmap makeRed (const QPixmap &p)


Detailed Description

Main class for the GUI based on QGraphicView.

It manages the various qt configuration windows, the buttons bars, the list of QAction/shortcuts.


Member Function Documentation

virtual void StelGui::init (  )  [virtual]

Initialize the StelGui object.

Implements StelModule.

virtual void StelGui::draw ( StelCore core  )  [inline, virtual]

Execute all the drawing functions for this module.

Parameters:
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.

Parameters:
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.

Parameters:
actionName the name of the action for which we want the call order
Returns:
the value defining the order. The closer to 0 the earlier the module's action will be called

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.

Returns:
true if the event was intercepted

Reimplemented from StelModule.

virtual void StelGui::setStelStyle ( const StelStyle style  )  [virtual]

Load color scheme from the given ini file and section name.

Reimplemented from StelModule.

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.

Returns:
a pointer to the progress bar

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

Parameters:
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.

Parameters:
actionName qt object name for this action
Returns:
a pointer on the QAction object or NULL if don't exist

BottomStelBar* StelGui::getButtonBar (  )  [inline]

Get the button bar at the bottom of the screen.

class LeftStelBar* StelGui::getWindowsButtonBar (  )  [inline]

Get the button bar of the left 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.

Parameters:
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.

Parameters:
b to hide or not to hide

void StelGui::setHideGui ( bool  b  )  [slot]

show or hide the toolbars

Parameters:
b when true, toolbars will be shown, else they will be hidden.

bool StelGui::getHideGui (  )  [slot]

get the current visible status of the toolbars


Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5