Stellarium  1.2
Public Slots | Signals | Public Member Functions | Properties
MilkyWay Class Reference

#include <MilkyWay.hpp>

Public Slots

double getIntensity () const
 Get Milky Way intensity (brightness).
 
void setIntensity (double aintensity)
 Set Milky Way intensity. Default value: 1.
 
double getSaturation () const
 Get Milky Way saturation (color strength).
 
void setSaturation (double sat)
 Set Milky Way saturation (color strength).
 
Vec3f getColor () const
 Get the color used for rendering the Milky Way. It is modulated by intensity, light pollution and atmospheric extinction.
 
void setColor (const Vec3f &c)
 Sets the color to use for rendering the Milky Way. More...
 
void setFlagShow (bool b)
 Sets whether to show the Milky Way.
 
bool getFlagShow (void) const
 Gets whether the Milky Way is displayed.
 

Signals

void milkyWayDisplayedChanged (const bool displayed)
 
void intensityChanged (double intensity)
 
void saturationChanged (double saturation)
 
void colorChanged (Vec3f color)
 

Public Member Functions

virtual void init () Q_DECL_OVERRIDE
 Initialize the class. More...
 
virtual void draw (StelCore *core) Q_DECL_OVERRIDE
 Draw the Milky Way.
 
virtual void update (double deltaTime) Q_DECL_OVERRIDE
 Update and time-dependent state. More...
 
virtual double getCallOrder (StelModuleActionName actionName) const Q_DECL_OVERRIDE
 actionDraw returns 1 (because this is background, very early drawing). More...
 
- Public Member Functions inherited from StelModule
 StelModule ()
 Constructor. Every derived class MUST call setObjectName(className) in its constructor.
 
virtual void deinit ()
 Called before the module will be deleted, and before the OpenGL context is suppressed. More...
 
virtual QSettings * getSettings ()
 Return module-specific settings. More...
 
virtual QString getModuleVersion () const
 Get the version of the module, default is stellarium main version.
 
virtual QString getAuthorName () const
 Get the name of the module author.
 
virtual QString getAuthorEmail () const
 Get the email address of the module author.
 
virtual void handleMouseClicks (class QMouseEvent *)
 Handle mouse clicks. More...
 
virtual void handleMouseWheel (class QWheelEvent *)
 Handle mouse wheel. More...
 
virtual bool handleMouseMoves (int x, int y, Qt::MouseButtons b)
 Handle mouse moves. More...
 
virtual void handleKeys (class QKeyEvent *e)
 Handle key events. More...
 
virtual bool handlePinch (qreal scale, bool started)
 Handle pinch gesture events. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

Properties

bool flagMilkyWayDisplayed
 
double intensity
 
Vec3f color
 
double saturation = 1.0
 

Additional Inherited Members

- Public Types inherited from StelModule
enum  StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection }
 Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
 
enum  StelModuleActionName {
  ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves,
  ActionHandleKeys
}
 Define the possible action for which an order is defined. More...
 
- Protected Member Functions inherited from StelModule
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to slot) to the StelActionMgr object. More...
 
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
 
StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More...
 

Detailed Description

Manages the displaying of the Milky Way.

Member Function Documentation

◆ getCallOrder()

virtual double MilkyWay::getCallOrder ( StelModuleActionName  actionName) const
virtual

Other actions return 0 for no action.

Reimplemented from StelModule.

◆ init()

virtual void MilkyWay::init ( )
virtual

Here we load the texture for the Milky Way and get the display settings from application settings, namely the flag which determines if the Milky Way is displayed or not, and the intensity setting.

Implements StelModule.

◆ setColor

void MilkyWay::setColor ( const Vec3f c)
inlineslot
Parameters
cThe color to use for rendering the Milky Way. Default (1.0, 1.0, 1.0)
// example of usage in scripts
MilkyWay.setColor(Vec3f(0.7,1.0,0.8));

◆ update()

virtual void MilkyWay::update ( double  deltaTime)
virtual

Updates the fade level while the Milky way rendering is being changed from on to off or off to on.

Reimplemented from StelModule.