Stellarium  1.2
Data Structures
Meteor Showers Plug-in

The Meteor Showers plugin displays meteor showers and a marker for each active and inactive radiant, showing real information about its activity. More...

Data Structures

class  MSConfigDialog
 
class  MSSearchDialog
 
class  MeteorObj
 
class  MeteorShower
 
class  MeteorShowers
 
class  MeteorShowersMgr
 

Detailed Description

Configuration

The plug-ins' configuration data is stored in Stellarium's main configuration file (section [MeteorShowers]).


Data Structure Documentation

◆ MSConfigDialog

class MSConfigDialog

Configuration window.

Author
Marcos Cardinot mcard.nosp@m.inot.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Public Slots

void retranslate () Q_DECL_OVERRIDE
 
- Public Slots inherited from StelDialog
virtual void styleChanged (const QString &style)
 Apply application style change.
 
virtual void retranslate ()=0
 Retranslate the content of the dialog. More...
 
virtual void setVisible (bool)
 On the first call with "true" populates the window contents.
 
virtual void close ()
 Closes the window (the window widget is not deleted, just not visible).
 
void handleMovedTo (QPoint newPos)
 Adds dialog location to config.ini; should be connected in createDialogContent()
 
virtual void handleDialogSizeChanged (QSizeF size)
 Stores dialog sizes into config.ini; should be connected from the proxy. More...
 

Public Member Functions

 MSConfigDialog (MeteorShowersMgr *mgr)
 Constructor.
 
 ~MSConfigDialog () Q_DECL_OVERRIDE
 Destructor.
 
void init ()
 Initializes the components based on the current settings.
 
- Public Member Functions inherited from StelDialog
 StelDialog (const QString &dialogName=QString("Default"), QObject *parent=nullptr)
 
bool visible () const
 Returns true if the dialog contents have been constructed and are currently shown.
 
QString getDialogName () const
 

Protected Member Functions

void createDialogContent () Q_DECL_OVERRIDE
 Initializes the dialog and connect the signals/slots.
 
- Protected Member Functions inherited from StelDialog
void connectColorButton (QToolButton *button, QString propertyName, QString iniName, QString moduleName="")
 Prepare a QToolButton so that it can receive and handle askColor() connections properly. More...
 

Additional Inherited Members

- Signals inherited from StelDialog
void visibleChanged (bool)
 
- Protected Slots inherited from StelDialog
bool askConfirmation ()
 
void askColor ()
 To be called by a connected QToolButton with a color background. More...
 
void enableKineticScrolling (bool b)
 enable kinetic scrolling. This should be connected to StelApp's StelGui signal flagUseKineticScrollingChanged.
 
void handleFontChanged ()
 connect from StelApp to handle font and font size changes.
 
void handleColorSchemeChanged ()
 connect from StelApp to handle CSS style changes
 
virtual void updateNightModeProperty (bool n)
 
- Static Protected Member Functions inherited from StelDialog
static void connectCheckBox (QAbstractButton *checkBox, const QString &actionName)
 Helper function to connect a checkbox to the StelAction with the specified name.
 
static void connectCheckBox (QAbstractButton *checkBox, StelAction *action)
 Helper function to connect a checkbox to the given StelAction.
 
static void connectIntProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to an integer StelProperty. More...
 
static void connectIntProperty (QSpinBox *spinBox, const QString &propName)
 Helper function to connect a QSpinBox to an integer StelProperty. More...
 
static void connectIntProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to an integer StelProperty. More...
 
static void connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName)
 Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More...
 
static void connectDoubleProperty (AngleSpinBox *spinBox, const QString &propName)
 Helper function to connect an AngleSpinBox to a double or float StelProperty representing decimal degrees. More...
 
static void connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectStringProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to a QString StelProperty. More...
 
static void connectStringProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to a QString StelProperty. More...
 
static void connectBoolProperty (QAbstractButton *checkBox, const QString &propName)
 Helper function to connect a checkbox to a bool StelProperty. More...
 
static void connectBoolProperty (QGroupBox *checkBox, const QString &propName)
 Helper function to connect a groupbox to a bool StelProperty. More...
 
- Protected Attributes inherited from StelDialog
QWidget * dialog
 The main dialog.
 
class CustomProxyproxy
 
QString dialogName
 The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations.
 
QList< QWidget * > kineticScrollingList
 A list of widgets where kinetic scrolling can be activated or deactivated The list must be filled once, in the constructor or init() of fillDialog() etc. More...
 
- Properties inherited from StelDialog
bool visible
 

◆ MSSearchDialog

class MSSearchDialog

Public Types

enum  ModelColumns {
  ColumnCode, ColumnName, ColumnZHR, ColumnDataType,
  ColumnPeak, ColumnCount
}
 Defines the number and the order of the columns in the table that lists active meteor showers. More...
 

Public Slots

void retranslate () Q_DECL_OVERRIDE
 
- Public Slots inherited from StelDialog
virtual void styleChanged (const QString &style)
 Apply application style change.
 
virtual void retranslate ()=0
 Retranslate the content of the dialog. More...
 
virtual void setVisible (bool)
 On the first call with "true" populates the window contents.
 
virtual void close ()
 Closes the window (the window widget is not deleted, just not visible).
 
void handleMovedTo (QPoint newPos)
 Adds dialog location to config.ini; should be connected in createDialogContent()
 
virtual void handleDialogSizeChanged (QSizeF size)
 Stores dialog sizes into config.ini; should be connected from the proxy. More...
 

Public Member Functions

 MSSearchDialog (MeteorShowersMgr *mgr)
 Constructor.
 
 ~MSSearchDialog () Q_DECL_OVERRIDE
 Destructor.
 
- Public Member Functions inherited from StelDialog
 StelDialog (const QString &dialogName=QString("Default"), QObject *parent=nullptr)
 
bool visible () const
 Returns true if the dialog contents have been constructed and are currently shown.
 
QString getDialogName () const
 

Protected Member Functions

void createDialogContent () Q_DECL_OVERRIDE
 Initialize the dialog and connect the signals/slots.
 
- Protected Member Functions inherited from StelDialog
void connectColorButton (QToolButton *button, QString propertyName, QString iniName, QString moduleName="")
 Prepare a QToolButton so that it can receive and handle askColor() connections properly. More...
 

Additional Inherited Members

- Signals inherited from StelDialog
void visibleChanged (bool)
 
- Protected Slots inherited from StelDialog
bool askConfirmation ()
 
void askColor ()
 To be called by a connected QToolButton with a color background. More...
 
void enableKineticScrolling (bool b)
 enable kinetic scrolling. This should be connected to StelApp's StelGui signal flagUseKineticScrollingChanged.
 
void handleFontChanged ()
 connect from StelApp to handle font and font size changes.
 
void handleColorSchemeChanged ()
 connect from StelApp to handle CSS style changes
 
virtual void updateNightModeProperty (bool n)
 
- Static Protected Member Functions inherited from StelDialog
static void connectCheckBox (QAbstractButton *checkBox, const QString &actionName)
 Helper function to connect a checkbox to the StelAction with the specified name.
 
static void connectCheckBox (QAbstractButton *checkBox, StelAction *action)
 Helper function to connect a checkbox to the given StelAction.
 
static void connectIntProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to an integer StelProperty. More...
 
static void connectIntProperty (QSpinBox *spinBox, const QString &propName)
 Helper function to connect a QSpinBox to an integer StelProperty. More...
 
static void connectIntProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to an integer StelProperty. More...
 
static void connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName)
 Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More...
 
static void connectDoubleProperty (AngleSpinBox *spinBox, const QString &propName)
 Helper function to connect an AngleSpinBox to a double or float StelProperty representing decimal degrees. More...
 
static void connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectStringProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to a QString StelProperty. More...
 
static void connectStringProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to a QString StelProperty. More...
 
static void connectBoolProperty (QAbstractButton *checkBox, const QString &propName)
 Helper function to connect a checkbox to a bool StelProperty. More...
 
static void connectBoolProperty (QGroupBox *checkBox, const QString &propName)
 Helper function to connect a groupbox to a bool StelProperty. More...
 
- Protected Attributes inherited from StelDialog
QWidget * dialog
 The main dialog.
 
class CustomProxyproxy
 
QString dialogName
 The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations.
 
QList< QWidget * > kineticScrollingList
 A list of widgets where kinetic scrolling can be activated or deactivated The list must be filled once, in the constructor or init() of fillDialog() etc. More...
 
- Properties inherited from StelDialog
bool visible
 

Member Enumeration Documentation

◆ ModelColumns

Enumerator
ColumnName 

code column

ColumnZHR 

name column

ColumnDataType 

zhr column

ColumnPeak 

data type column

ColumnCount 

peak date column

total number of columns

◆ MeteorObj

class MeteorObj

Models a single meteor.

Author
Marcos Cardinot mcard.nosp@m.inot.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Public Member Functions

 MeteorObj (const StelCore *, int speed, const float &radiantAlpha, const float &radiantDelta, const float &pidx, QList< Meteor::ColorPair > colors, const StelTextureSP &bolideTexture)
 Create a Meteor object. More...
 
- Public Member Functions inherited from Meteor
 Meteor (const StelCore *core, const StelTextureSP &bolideTexture)
 Create a Meteor object.
 
void init (const float &radiantAlpha, const float &radiantDelta, const float &speed, const QList< ColorPair > colors)
 Initialize meteor.
 
virtual bool update (double deltaTime)
 Updates the position of the meteor, and expires it if necessary. More...
 
virtual void draw (const StelCore *core, StelPainter &sPainter)
 Draws the meteor.
 
bool isAlive () const
 Indicate if the meteor still visible.
 
void setAbsMag (float mag)
 Set meteor absolute magnitude.
 
float absMag () const
 Get meteor absolute magnitude.
 

Additional Inherited Members

- Public Types inherited from Meteor
typedef QPair< QString, int > ColorPair
 <colorName, intensity>
 

Constructor & Destructor Documentation

◆ MeteorObj()

MeteorObj::MeteorObj ( const StelCore ,
int  speed,
const float &  radiantAlpha,
const float &  radiantDelta,
const float &  pidx,
QList< Meteor::ColorPair colors,
const StelTextureSP &  bolideTexture 
)
Parameters
coreStelCore instance.
speedMeteor speed in km/s.
radiantAlphaThe radiant alpha in rad.
radiantDeltaThe radiant delta in rad.
pidxPopulation index.
colorsMeteor color.
bolideTextureBolide texture.

◆ MeteorShower

class MeteorShower

A MeteorShower object represents one meteor shower on the sky. Details about the meteor showers are passed using a QVariant which contains a map of data from the json file.

Public Types

enum  Status {
  INVALID, UNDEFINED, INACTIVE, ACTIVE_CONFIRMED,
  ACTIVE_GENERIC
}
 
- Public Types inherited from StelObject
enum  InfoStringGroupFlags {
  None = 0x00000000, Name = 0x00000001, CatalogNumber = 0x00000002, Magnitude = 0x00000004,
  RaDecJ2000 = 0x00000008, RaDecOfDate = 0x00000010, AltAzi = 0x00000020, Distance = 0x00000040,
  Elongation = 0x00000080, Size = 0x00000100, Velocity = 0x00000200, ProperMotion = 0x00000400,
  Extra = 0x00000800, HourAngle = 0x00001000, AbsoluteMagnitude = 0x00002000, GalacticCoord = 0x00004000,
  SupergalacticCoord = 0x00008000, OtherCoord = 0x00010000, ObjectType = 0x00020000, EclipticCoordJ2000 = 0x00040000,
  EclipticCoordOfDate = 0x00080000, IAUConstellation = 0x00100000, SiderealTime = 0x00200000, RTSTime = 0x00400000,
  SolarLunarPosition = 0x00800000, Script = 0x01000000, DebugAid = 0x02000000, NoFont = 0x04000000,
  PlainText = 0x08000000
}
 Used as named bitfield flags as specifiers to filter results of getInfoString. More...
 

Public Member Functions

 MeteorShower (MeteorShowersMgr *mgr, const QVariantMap &map)
 Constructor. More...
 
 ~MeteorShower () Q_DECL_OVERRIDE
 Destructor.
 
void update (StelCore *core, double deltaTime)
 Update. More...
 
void draw (StelCore *core)
 Draw.
 
Activity hasGenericShower (double solLong, bool &found) const
 Checks if we have generic data for a given date. More...
 
Activity hasConfirmedShower (double solLong, bool &found) const
 Checks if we have confirmed data for a given date. More...
 
bool enabled () const
 Checks if this meteor shower is being displayed or not. More...
 
QString getDesignation () const
 Gets the meteor shower id //! More...
 
Status getStatus ()
 Gets the current meteor shower status. More...
 
int getZHR ()
 Gets the current ZHR. More...
 
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const Q_DECL_OVERRIDE
 Write I18n information about the object in QString. More...
 
virtual QVariantMap getInfoMap (const StelCore *core) const Q_DECL_OVERRIDE
 Return a map like StelObject, but with a few extra tags: More...
 
virtual QString getType (void) const Q_DECL_OVERRIDE
 Return object's type. It should be the name of the class.
 
virtual QString getObjectType (void) const Q_DECL_OVERRIDE
 Return object's type. It should be English lowercase name of the type of the object.
 
virtual QString getObjectTypeI18n (void) const Q_DECL_OVERRIDE
 Return object's type. It should be translated lowercase name of the type of the object.
 
virtual QString getID (void) const Q_DECL_OVERRIDE
 Returns a unique identifier for this object. More...
 
virtual QString getEnglishName (void) const Q_DECL_OVERRIDE
 Return object's name in english.
 
virtual QString getNameI18n (void) const Q_DECL_OVERRIDE
 Return translated object's name.
 
virtual Vec3d getJ2000EquatorialPos (const StelCore *) const Q_DECL_OVERRIDE
 Get observer-centered equatorial coordinates at equinox J2000.
 
virtual float getSelectPriority (const StelCore *) const Q_DECL_OVERRIDE
 Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.
 
virtual Vec3f getInfoColor (void) const Q_DECL_OVERRIDE
 Get a color used to display info about the object.
 
- Public Member Functions inherited from StelObject
virtual SphericalRegionP getRegion () const Q_DECL_OVERRIDE
 Default implementation of the getRegion method. More...
 
virtual Vec3d getPointInRegion () const Q_DECL_OVERRIDE
 Default implementation of the getPointInRegion method. More...
 
Vec3d getEquinoxEquatorialPos (const StelCore *core) const
 Get observer-centered equatorial coordinate at the current equinox The frame has its Z axis at the planet's current rotation axis At time 2000-01-01 this frame is almost the same as J2000, but ONLY if the observer is on earth.
 
Vec3d getEquinoxEquatorialPosApparent (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but always adds refraction correction to the position.
 
Vec3d getEquinoxEquatorialPosAuto (const StelCore *core) const
 Like getEquinoxEquatorialPos(core), but adds refraction correction to the position if atmosphere is active.
 
Vec3d getGalacticPos (const StelCore *core) const
 Get observer-centered galactic coordinates.
 
Vec3d getSupergalacticPos (const StelCore *core) const
 Get observer-centered supergalactic coordinates.
 
Vec3d getSiderealPosGeometric (const StelCore *core) const
 Get observer-centered hour angle + declination (at current equinox) It is the geometric position, i.e. More...
 
Vec3d getSiderealPosApparent (const StelCore *core) const
 Get observer-centered hour angle + declination (at current equinox) It is the apparent position, i.e. More...
 
Vec3d getAltAzPosGeometric (const StelCore *core) const
 Get observer-centered alt/az position It is the geometric position, i.e. More...
 
Vec3d getAltAzPosApparent (const StelCore *core) const
 Get observer-centered alt/az position It is the apparent position, i.e. More...
 
Vec3d getAltAzPosAuto (const StelCore *core) const
 Get observer-centered alt/az position It is the automatic position, i.e. More...
 
float getParallacticAngle (const StelCore *core) const
 Get parallactic angle, which is the deviation between zenith angle and north angle. [radians].
 
bool isAboveHorizon (const StelCore *core) const
 Checking position an object above mathematical horizon for current location. More...
 
bool isAboveRealHorizon (const StelCore *core) const
 Checking position an object above real horizon for current location. More...
 
virtual Vec4d getRTSTime (const StelCore *core, const double altitude=0.) const
 Compute time of rise, transit and set for celestial object for current location. More...
 
virtual float getVMagnitude (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer, without including extinction.
 
float getVMagnitudeWithExtinction (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer including extinction. More...
 
virtual double getCloseViewFov (const StelCore *) const
 Return the best FOV in degree to use for a close view of the object.
 
virtual double getSatellitesFov (const StelCore *) const
 Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites)
 
virtual double getParentSatellitesFov (const StelCore *) const
 
virtual double getAngularRadius (const StelCore *core) const
 Return the angular radius of a circle containing the object as seen from the observer with the circle center assumed to be at getJ2000EquatorialPos(). More...
 
virtual float getAirmass (const StelCore *core) const
 Return airmass value for the object (for atmosphere-dependent calculations) More...
 

Static Public Member Functions

static double JDfromSolarLongitude (double solarLong, int year)
 

Static Public Attributes

static const QString METEORSHOWER_TYPE
 
- Static Public Attributes inherited from StelObject
static constexpr InfoStringGroup AllInfo
 A pre-defined "all available" set of specifiers for the getInfoString flags argument to getInfoString. More...
 
static constexpr InfoStringGroup DefaultInfo
 A pre-defined "default" set of specifiers for the getInfoString flags argument to getInfoString It appears useful to propose this set as post-install settings and let users configure more on demand. More...
 
static constexpr InfoStringGroup ShortInfo = static_cast<InfoStringGroup>(Name|CatalogNumber|Magnitude|RaDecJ2000)
 A pre-defined "shortest useful" set of specifiers for the getInfoString flags argument to getInfoString.
 

Additional Inherited Members

- Public Slots inherited from StelObject
virtual void setExtraInfoString (const InfoStringGroup &flags, const QString &str)
 Allow additions to the Info String. More...
 
virtual void addToExtraInfoString (const StelObject::InfoStringGroup &flags, const QString &str)
 Add str to the extra string. More...
 
QStringList getExtraInfoStrings (const InfoStringGroup &flags) const
 Retrieve an (unsorted) QStringList of all extra info strings that match flags. More...
 
void removeExtraInfoStrings (const InfoStringGroup &flags)
 Remove the extraInfoStrings with the given flags. More...
 
- Protected Member Functions inherited from StelObject
QString getCommonInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Format the positional info string containing J2000/of date/altaz/hour angle positions and constellation, sidereal time, etc. More...
 
virtual QString getMagnitudeInfoString (const StelCore *core, const InfoStringGroup &flags, const int decimals=1) const
 Format the magnitude info string for the object. More...
 
QString getSolarLunarInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Add a section to the InfoString with just horizontal data for the Sun and Moon, when observed from Earth. More...
 
void postProcessInfoString (QString &str, const InfoStringGroup &flags) const
 Apply post processing on the info string. More...
 

Constructor & Destructor Documentation

◆ MeteorShower()

MeteorShower::MeteorShower ( MeteorShowersMgr mgr,
const QVariantMap &  map 
)
Parameters
mapQVariantMap containing all the data about a Meteor Shower.

Member Function Documentation

◆ enabled()

bool MeteorShower::enabled ( ) const
Returns
true if it's being displayed

◆ getDesignation()

QString MeteorShower::getDesignation ( ) const
Returns
designation

◆ getID()

virtual QString MeteorShower::getID ( void  ) const
inlinevirtual

The ID should be unique for all objects of the same type, but may freely conflict with IDs of other types, so getType() must also be tested.

With this it should be possible to at least identify the same object in a different instance of Stellarium running the same version, but it would even be better if the ID provides some degree of forward-compatibility. For some object types (e.g. planets) this may simply return getEnglishName(), but better candidates may be official designations or at least (stable) internal IDs.

An object may have multiple IDs (different catalog numbers, etc). StelObjectMgr::searchByID() should search through all ID variants, but this method only returns one of them.

Implements StelObject.

◆ getInfoMap()

virtual QVariantMap MeteorShower::getInfoMap ( const StelCore core) const
virtual
  • status
  • id
  • type (translated string "meteor shower")
  • speed (km/s)
  • pop-idx (population index)
  • parent
  • zhr-max (information string)

Reimplemented from StelObject.

◆ getInfoString()

virtual QString MeteorShower::getInfoString ( const StelCore core,
const InfoStringGroup &  flags 
) const
virtual
Parameters
corethe StelCore object to use
flagsa set of InfoStringGroup flags which are used to filter the return value - including specified types of information and altering the output format.
Returns
an HTML string containing information about the StelObject.

Implements StelObject.

◆ getStatus()

Status MeteorShower::getStatus ( )
inline
Returns
status

◆ getZHR()

int MeteorShower::getZHR ( )
inline
Returns
ZHR

◆ hasConfirmedShower()

Activity MeteorShower::hasConfirmedShower ( double  solLong,
bool &  found 
) const
Parameters
solLongthe Solar longitude (J2000)
Returns
Activity

◆ hasGenericShower()

Activity MeteorShower::hasGenericShower ( double  solLong,
bool &  found 
) const
Parameters
solLongthe Solar longitude (J2000)
Returns
Activity

◆ JDfromSolarLongitude()

static double MeteorShower::JDfromSolarLongitude ( double  solarLong,
int  year 
)
static
Returns
approximate Julian day calculated from solar longitude (J2000)

◆ update()

void MeteorShower::update ( StelCore core,
double  deltaTime 
)
Parameters
deltaTimethe time increment in seconds since the last call.

◆ MeteorShowers

class MeteorShowers

This class manages a collection of MeteorShower objects. It inherits from MeteorShowersMgr and is basically used to reimplement the methods defined in the StelObjectModule class.

Author
Marcos Cardinot mcard.nosp@m.inot.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Public Member Functions

 MeteorShowers (MeteorShowersMgr *mgr)
 Constructor.
 
virtual void init (void) Q_DECL_OVERRIDE
 Initialize itself. More...
 
virtual ~MeteorShowers () Q_DECL_OVERRIDE
 Destructor.
 
virtual void update (double deltaTime) Q_DECL_OVERRIDE
 Update. More...
 
virtual void draw (StelCore *core) Q_DECL_OVERRIDE
 Draw.
 
void loadMeteorShowers (const QVariantMap &map)
 Loads all meteor showers contained in a QVariantMap. More...
 
QList< SearchResultsearchEvents (int year) const
 Find all meteor_shower events in a given date interval. More...
 
virtual QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const Q_DECL_OVERRIDE
 Search for StelObject in an area around a specified point. More...
 
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const Q_DECL_OVERRIDE
 Find a StelObject by name. More...
 
virtual StelObjectP searchByName (const QString &name) const Q_DECL_OVERRIDE
 Return the matching StelObject if exists or the empty StelObject if not found. More...
 
virtual StelObjectP searchByID (const QString &id) const Q_DECL_OVERRIDE
 Return the StelObject with the given ID if exists or the empty StelObject if not found. More...
 
virtual QStringList listAllObjects (bool inEnglish) const Q_DECL_OVERRIDE
 List all StelObjects. More...
 
virtual QString getName () const Q_DECL_OVERRIDE
 Gets a user-displayable name of the object category.
 
virtual QString getStelObjectType () const Q_DECL_OVERRIDE
 Returns the name that will be returned by StelObject::getType() for the objects this module manages.
 
- Public Member Functions inherited from StelObjectModule
virtual QStringList listMatchingObjects (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
 Find and return the list of at most maxNbItem objects auto-completing passed object name. More...
 
virtual QStringList listAllObjectsByType (const QString &objType, bool inEnglish) const
 List all StelObjects by type. More...
 
bool matchObjectName (const QString &objName, const QString &objPrefix, bool useStartOfWords) const
 Auxiliary method of listMatchingObjects() 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 double getCallOrder (StelModuleActionName actionName) const
 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. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

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

Member Function Documentation

◆ init()

virtual void MeteorShowers::init ( void  )
inlinevirtual

If the initialization takes significant time, the progress should be displayed on the loading bar.

Implements StelModule.

◆ listAllObjects()

virtual QStringList MeteorShowers::listAllObjects ( bool  inEnglish) const
virtual
Parameters
inEnglishlist names in English (true) or translated (false)
Returns
a list of matching object name by order of relevance, or an empty list if nothing matches

Implements StelObjectModule.

◆ loadMeteorShowers()

void MeteorShowers::loadMeteorShowers ( const QVariantMap &  map)
Parameters
map

◆ searchAround()

virtual QList<StelObjectP> MeteorShowers::searchAround ( const Vec3d v,
double  limitFov,
const StelCore core 
) const
virtual

The function searches in a disk of diameter limitFov centered on v. Only visible objects (i.e. currently displayed on screen) should be returned.

Parameters
vequatorial position at epoch J2000 (without aberration).
limitFovangular diameter of the searching zone in degree.
corethe StelCore instance to use.
Returns
the list of all the displayed objects contained in the defined zone.

Implements StelObjectModule.

◆ searchByID()

virtual StelObjectP MeteorShowers::searchByID ( const QString &  id) const
virtual
Parameters
namethe english object name

Implements StelObjectModule.

◆ searchByName()

virtual StelObjectP MeteorShowers::searchByName ( const QString &  name) const
virtual
Parameters
namethe english object name

Implements StelObjectModule.

◆ searchByNameI18n()

virtual StelObjectP MeteorShowers::searchByNameI18n ( const QString &  nameI18n) const
virtual
Parameters
nameI18nThe translated name for the current sky locale.
Returns
The matching StelObject if exists or the empty StelObject if not found.

Implements StelObjectModule.

◆ searchEvents()

QList<SearchResult> MeteorShowers::searchEvents ( int  year) const
Parameters
dateFrom
dateTo
Returns
list

◆ update()

virtual void MeteorShowers::update ( double  deltaTime)
virtual
Parameters
deltaTimethe time increment in seconds since the last call.

Reimplemented from StelModule.

◆ MeteorShowersMgr

class MeteorShowersMgr

Main class of the Meteor Showers plugin, inherits from StelModule.

Author
Marcos Cardinot mcard.nosp@m.inot.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Public Types

enum  UpdateState {
  Updating, CompleteNoUpdates, CompleteUpdates, DownloadError,
  OtherError
}
 
- 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...
 

Public Slots

void setEnableAtStartup (const bool &b)
 Enable the meteor showers plugin at Stellarium startup. More...
 
bool getEnableAtStartup ()
 True if the plugin is enabled at Stellarium startup. More...
 
void setShowEnableButton (const bool &show)
 Show/hide the button that enable/disable the meteor showers plugin. More...
 
bool getShowEnableButton ()
 Get the status of the enable button on the toolbar. More...
 
void setShowSearchButton (const bool &show)
 Show/hide the button that opens the search dialog. More...
 
bool getShowSearchButton ()
 Get the status of the search button on the toolbar. More...
 
void setEnableMarker (const bool &b)
 Enable/disable radiant marker. More...
 
bool getEnableMarker ()
 Enable/disable radiant marker. More...
 
void setActiveRadiantOnly (const bool &b)
 True if user wants to see the active radiants only. More...
 
bool getActiveRadiantOnly ()
 True if user wants to see the active radiants only. More...
 
void setEnableLabels (const bool &b)
 Enable/disable radiant labels. More...
 
bool getEnableLabels ()
 Enable/disable radiant labels. More...
 
void setFontSize (int pixelSize)
 Set the font size (used on radiant labels). More...
 
int getFontSize ()
 Set the font size (used on radiant labels). More...
 
void setUpdateFrequencyHours (const int &hours)
 Set the update frequency in hours. More...
 
int getUpdateFrequencyHours ()
 Gets the update frequency in hours. More...
 
void setEnableAutoUpdates (const bool &b)
 Enable/disable automatic catalog updates from the internet. More...
 
bool getEnableAutoUpdates ()
 Enable/disable catalog updates from the internet. More...
 
void setColorARG (const Vec3f &rgb)
 Set the color of the active radiant based on generic data. More...
 
Vec3f getColorARG ()
 
void setColorARC (const Vec3f &rgb)
 Set the color of the active radiant based on confirmed data. More...
 
Vec3f getColorARC ()
 
void setColorIR (const Vec3f &rgb)
 Set the color of the inactive radiant. More...
 
Vec3f getColorIR ()
 
void updateCatalog ()
 Download the Meteor Showers catalog from the Internet.
 
void restoreDefaultSettings ()
 Restore default settings.
 
void displayMessage (const QString &message, const QString hexColor="#999999")
 Display a message. This is used for plugin-specific warnings and such.
 

Signals

void updateStateChanged (MeteorShowersMgr::UpdateState state)
 
void jsonUpdateComplete (void)
 Emitted after a JSON update has run.
 
void enablePluginChanged (bool b)
 
void enableLabelsChanged (bool b)
 
void colorARGChanged (Vec3f c)
 
void colorARCChanged (Vec3f c)
 
void colorIRChanged (Vec3f c)
 

Public Member Functions

 MeteorShowersMgr ()
 Constructor.
 
virtual ~MeteorShowersMgr () Q_DECL_OVERRIDE
 Destructor.
 
bool restoreDefaultCatalog (const QString &destination)
 Restore default catalog.
 
StelTextureSP getBolideTexture ()
 Gets the bolide texture. More...
 
StelTextureSP getPointerTexture ()
 Gets the pointer texture. More...
 
StelTextureSP getRadiantTexture ()
 Gets the radiant texture. More...
 
MeteorShowersgetMeteorShowers ()
 Gets the MeteorShowers instance. More...
 
void setEnablePlugin (const bool &b)
 Enable/disable the meteor showers plugin.
 
bool getEnablePlugin ()
 
QFont getFont ()
 Get the font.
 
void setUrl (const QString &url)
 Set the URL for downloading the meteor showers catalog.
 
QString getUrl ()
 
void setLastUpdate (const QDateTime &datetime)
 Set the date and time of last update.
 
QDateTime getLastUpdate ()
 
UpdateState getUpdateState (void) const
 Get the current updateState.
 
QDateTime getNextUpdate ()
 Gets the date of the next update.
 
void repaint ()
 It's useful to force the update() and draw().
 
virtual void init () Q_DECL_OVERRIDE
 Initialize itself. More...
 
virtual void deinit () Q_DECL_OVERRIDE
 Called before the module will be deleted, and before the OpenGL context is suppressed. More...
 
virtual void update (double deltaTime) Q_DECL_OVERRIDE
 Update the module with respect to the time. More...
 
virtual void draw (StelCore *core) Q_DECL_OVERRIDE
 Execute all the drawing functions for this module. More...
 
virtual double getCallOrder (StelModuleActionName actionName) const Q_DECL_OVERRIDE
 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. More...
 
virtual bool configureGui (bool show=true) Q_DECL_OVERRIDE
 Detect or show the configuration GUI elements for the module. More...
 
- Public Member Functions inherited from StelModule
 StelModule ()
 Constructor. Every derived class MUST call setObjectName(className) in its constructor.
 
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...
 

Properties

bool enablePlugin
 
bool enableLabels
 
Vec3f colorARG
 
Vec3f colorARC
 
Vec3f colorIR
 

Additional Inherited Members

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

Member Enumeration Documentation

◆ UpdateState

Used for keeping for track of the download/update status

Enumerator
Updating 

Update in progress.

CompleteNoUpdates 

Update completed, there we no updates.

CompleteUpdates 

Update completed, there were updates.

DownloadError 

Error during download phase.

OtherError 

Other error.

Member Function Documentation

◆ configureGui()

virtual bool MeteorShowersMgr::configureGui ( bool  show = true)
virtual

This is to be used with plugins to display a configuration dialog from the plugin list window.

Parameters
showif true, make the configuration GUI visible. If false, hide the config GUI if there is one.
Returns
true if the module has a configuration GUI, else false.

Reimplemented from StelModule.

◆ deinit()

virtual void MeteorShowersMgr::deinit ( )
virtual

Deinitialize all OpenGL texture in this method.

Reimplemented from StelModule.

◆ draw()

virtual void MeteorShowersMgr::draw ( StelCore core)
virtual
Parameters
corethe core to use for the drawing

Reimplemented from StelModule.

◆ getActiveRadiantOnly

bool MeteorShowersMgr::getActiveRadiantOnly ( )
inlineslot
Returns
true if only active radiants are visible
// example of usage in scripts
var flag = MeteorShowers.getActiveRadiantOnly();

◆ getBolideTexture()

StelTextureSP MeteorShowersMgr::getBolideTexture ( )
inline
Returns
texture

◆ getCallOrder()

virtual double MeteorShowersMgr::getCallOrder ( StelModuleActionName  actionName) const
virtual
Parameters
actionNamethe 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.

◆ getColorARC

Vec3f MeteorShowersMgr::getColorARC ( )
inlineslot
Returns
color of markers of the active radiants based on confirmed data.
// example of usage in scripts
color = MeteorShowers.getColorARC();

◆ getColorARG

Vec3f MeteorShowersMgr::getColorARG ( )
inlineslot
Returns
color of markers of the active radiants based on generic data.
// example of usage in scripts
color = MeteorShowers.getColorARG();

◆ getColorIR

Vec3f MeteorShowersMgr::getColorIR ( )
inlineslot
Returns
color of markers of the inactive radiants.
// example of usage in scripts
color = MeteorShowers.getColorIR();

◆ getEnableAtStartup

bool MeteorShowersMgr::getEnableAtStartup ( )
inlineslot
Returns
true if it's enabled at startup

◆ getEnableAutoUpdates

bool MeteorShowersMgr::getEnableAutoUpdates ( )
inlineslot
Returns
true if auto updates is enabled

◆ getEnableLabels

bool MeteorShowersMgr::getEnableLabels ( )
inlineslot
Returns
true if radiant labels visible
// example of usage in scripts
var flag = MeteorShowers.getEnableLabels();

◆ getEnableMarker

bool MeteorShowersMgr::getEnableMarker ( )
inlineslot
Returns
true if radiant markers visible
// example of usage in scripts
var flag = MeteorShowers.getEnableMarker();

◆ getFontSize

int MeteorShowersMgr::getFontSize ( )
inlineslot
Returns
size of font
// example of usage in scripts
var size = MeteorShowers.getFontSize();

◆ getMeteorShowers()

MeteorShowers* MeteorShowersMgr::getMeteorShowers ( )
inline
Returns
MeteorShowers instance

◆ getPointerTexture()

StelTextureSP MeteorShowersMgr::getPointerTexture ( )
inline
Returns
texture

◆ getRadiantTexture()

StelTextureSP MeteorShowersMgr::getRadiantTexture ( )
inline
Returns
texture

◆ getShowEnableButton

bool MeteorShowersMgr::getShowEnableButton ( )
inlineslot
Returns
true if it's visible

◆ getShowSearchButton

bool MeteorShowersMgr::getShowSearchButton ( )
inlineslot
Returns
true if it's visible

◆ getUpdateFrequencyHours

int MeteorShowersMgr::getUpdateFrequencyHours ( )
inlineslot
Returns
update frequency in hours

◆ init()

virtual void MeteorShowersMgr::init ( )
virtual

If the initialization takes significant time, the progress should be displayed on the loading bar.

Implements StelModule.

◆ setActiveRadiantOnly

void MeteorShowersMgr::setActiveRadiantOnly ( const bool &  b)
slot
Parameters
bboolean flag
// example of usage in scripts
MeteorShowers.setActiveRadiantOnly(true);

◆ setColorARC

void MeteorShowersMgr::setColorARC ( const Vec3f rgb)
slot
// example of usage in scripts
MeteorShowers.setColorARC(Vec3f(1.0,0.0,0.0));

◆ setColorARG

void MeteorShowersMgr::setColorARG ( const Vec3f rgb)
slot
// example of usage in scripts
MeteorShowers.setColorARG(Vec3f(1.0,0.0,0.0));

◆ setColorIR

void MeteorShowersMgr::setColorIR ( const Vec3f rgb)
slot
// example of usage in scripts
MeteorShowers.setColorIR(Vec3f(1.0,0.0,0.0));

◆ setEnableAtStartup

void MeteorShowersMgr::setEnableAtStartup ( const bool &  b)
slot
Parameters
bboolean flag

◆ setEnableAutoUpdates

void MeteorShowersMgr::setEnableAutoUpdates ( const bool &  b)
slot
Parameters
bboolean flag

◆ setEnableLabels

void MeteorShowersMgr::setEnableLabels ( const bool &  b)
slot
Parameters
bboolean flag
// example of usage in scripts
MeteorShowers.setEnableLabels(true);

◆ setEnableMarker

void MeteorShowersMgr::setEnableMarker ( const bool &  b)
slot
Parameters
bboolean flag
// example of usage in scripts
MeteorShowers.setEnableMarker(true);

◆ setFontSize

void MeteorShowersMgr::setFontSize ( int  pixelSize)
slot
Parameters
pixelSizesize of font
// example of usage in scripts
MeteorShowers.setFontSize(15);

◆ setShowEnableButton

void MeteorShowersMgr::setShowEnableButton ( const bool &  show)
slot
Parameters
bboolean flag

◆ setShowSearchButton

void MeteorShowersMgr::setShowSearchButton ( const bool &  show)
slot
Parameters
bboolean flag

◆ setUpdateFrequencyHours

void MeteorShowersMgr::setUpdateFrequencyHours ( const int &  hours)
slot
Parameters
hoursupdate frequency in hours

◆ update()

virtual void MeteorShowersMgr::update ( double  deltaTime)
virtual
Parameters
deltaTimethe time increment in second since last call.

Reimplemented from StelModule.

◆ updateStateChanged

void MeteorShowersMgr::updateStateChanged ( MeteorShowersMgr::UpdateState  state)
signal
Parameters
statethe new update state.