Stellarium  0.18.3
Data Structures | Typedefs
Quasars Plug-in

Data Structures

class  QuasarsDialog
 
class  Quasar
 A Quasar object represents one Quasar on the sky. More...
 
class  Quasars
 Main class of the Quasars plugin. More...
 

Typedefs

typedef QSharedPointer< QuasarQuasarP
 

Detailed Description

The Quasars plugin provides visualization of some quasars brighter than 16 visual magnitude. A catalogue of quasars compiled from "Quasars and Active Galactic Nuclei" (13th Ed.) (Veron+ 2010).

Quasars Catalog

The quasars catalog is stored on the disk in JSON format, in a file named "quasars.json". A default copy is embedded in the plug-in at compile time. A working copy is kept in the user data directory.

Configuration

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


Data Structure Documentation

◆ QuasarsDialog

class QuasarsDialog

Public Slots

void retranslate ()
 
void refreshUpdateValues (void)
 
- Public Slots inherited from StelDialog
virtual void retranslate ()=0
 Retranslate the content of the dialog. More...
 
void setVisible (bool)
 On the first call with "true" populates the window contents.
 
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...
 
QString getDialogName () const
 

Protected Member Functions

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

Additional Inherited Members

- Signals inherited from StelDialog
void visibleChanged (bool)
 
- Public Member Functions inherited from StelDialog
 StelDialog (QString dialogName="Default", QObject *parent=Q_NULLPTR)
 
bool visible () const
 Returns true if the dialog contents have been constructed and are currently shown.
 
- Protected Slots inherited from StelDialog
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.
 
- 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 (QSlider *slider, const QString &propName, double minValue, double maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectBoolProperty (QAbstractButton *checkBox, const QString &propName)
 Helper function to connect a checkbox 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
 

◆ Quasar

class Quasar

Details about the Quasars are passed using a QVariant which contains a map of data from the json file.

Public Member Functions

 Quasar (const QVariantMap &map)
 
QVariantMap getMap (void) const
 Get a QVariantMap which describes the Quasar. More...
 
virtual QString getType (void) const
 Return object's type. It should be the name of the class.
 
virtual QString getID (void) const
 Returns a unique identifier for this object. More...
 
virtual float getSelectPriority (const StelCore *core) const
 Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.
 
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Get an HTML string to describe the object. More...
 
virtual QVariantMap getInfoMap (const StelCore *core) const
 Return a map like StelObject::getInfoMap(), but with a few extra tags also available in getMap(). More...
 
virtual Vec3f getInfoColor (void) const
 Get a color used to display info about the object.
 
virtual Vec3d getJ2000EquatorialPos (const StelCore *) const
 Get observer-centered equatorial coordinates at equinox J2000.
 
virtual float getVMagnitude (const StelCore *core) const
 Return object's apparent V magnitude as seen from observer, without including extinction.
 
virtual double getAngularSize (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 QString getNameI18n (void) const
 Return translated object's name.
 
virtual QString getEnglishName (void) const
 Return object's name in english.
 
void update (double deltaTime)
 
- Public Member Functions inherited from StelObject
virtual SphericalRegionP getRegion () const
 Default implementation of the getRegion method. More...
 
virtual Vec3d getPointInRegion () const
 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...
 
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...
 
Vec3f getRTSTime (StelCore *core) const
 Get today's time of rise, transit and set for celestial object for current location. More...
 
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
 

Static Public Attributes

static const QString QUASAR_TYPE
 
- Static Public Attributes inherited from StelObject
static const InfoStringGroupFlags AllInfo
 A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. More...
 
static const InfoStringGroupFlags ShortInfo = (InfoStringGroupFlags)(Name|CatalogNumber|Magnitude|RaDecJ2000)
 A pre-defined set of specifiers for the getInfoString flags argument to getInfoString.
 

Friends

class Quasars
 

Additional Inherited Members

- Public Types inherited from StelObject
enum  InfoStringGroupFlags {
  Name = 0x00000001, CatalogNumber = 0x00000002, Magnitude = 0x00000004, RaDecJ2000 = 0x00000008,
  RaDecOfDate = 0x00000010, AltAzi = 0x00000020, Distance = 0x00000040, Size = 0x00000080,
  Velocity = 0x00000100, Extra = 0x00000200, HourAngle = 0x00000400, AbsoluteMagnitude = 0x00000800,
  GalacticCoord = 0x00001000, SupergalacticCoord = 0x00002000, ObjectType = 0x00004000, EclipticCoordJ2000 = 0x00008000,
  EclipticCoordOfDate = 0x00010000, IAUConstellation = 0x00020000, SiderealTime = 0x00040000, RTSTime = 0x00080000,
  NoFont = 0x00100000, PlainText = 0x00200000
}
 Used as named bitfield flags as specifiers to filter results of getInfoString. 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. for the object.
 
virtual QString getMagnitudeInfoString (const StelCore *core, const InfoStringGroup &flags, const double alt_app, const int decimals=1) const
 Format the magnitude info string for the object. More...
 
void postProcessInfoString (QString &str, const InfoStringGroup &flags) const
 Apply post processing on the info string.
 

Constructor & Destructor Documentation

◆ Quasar()

Quasar::Quasar ( const QVariantMap &  map)
Parameters
idThe official designation for a quasar, e.g. "RXS J00066+4342"

Member Function Documentation

◆ getAngularSize()

virtual double Quasar::getAngularSize ( const StelCore core) const
virtual
Returns
radius in degree. This value is the apparent angular size of the object, and is independent of the current FOV.

Implements StelObject.

◆ getID()

virtual QString Quasar::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 Quasar::getInfoMap ( const StelCore core) const
virtual
  • amag
  • bV
  • redshift

Reimplemented from StelObject.

◆ getInfoString()

virtual QString Quasar::getInfoString ( const StelCore core,
const InfoStringGroup &  flags 
) const
virtual
Parameters
coreA pointer to the core a set of flags with information types to include.

Implements StelObject.

◆ getMap()

QVariantMap Quasar::getMap ( void  ) const

Could be used to create a duplicate.

  • designation
  • Vmag
  • Amag
  • bV
  • RA
  • DE
  • z
  • f6
  • f20
  • sclass

◆ Quasars

class Quasars
Author
Alexander Wolf

Public Types

enum  UpdateState {
  Updating, CompleteNoUpdates, CompleteUpdates, DownloadError,
  OtherError
}
 Used for keeping for track of the download/update status. More...
 
- 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 updateJSON (void)
 Download JSON from web recources described in the module section of the module.ini file and update the local JSON file. More...
 
void setFlagShowQuasars (bool b)
 Enable/disable display of markers of quasars. More...
 
bool getFlagShowQuasars (void)
 Get status to display of markers of quasars. More...
 
void setFlagUseQuasarMarkers (bool b)
 Enable/disable usage of markers for quasars. More...
 
bool getFlagUseQuasarMarkers (void)
 Get status usage of markers for quasars. More...
 
void setFlagShowQuasarsButton (bool b)
 Define whether the button toggling quasars should be visible.
 
bool getFlagShowQuasarsButton (void)
 
int getCountQuasars (void)
 Get count of quasars from catalog. More...
 
bool getDisplayMode (void)
 Get status to display of distribution of quasars. More...
 
void setDisplayMode (bool b)
 Enable/disable display of distribution of quasars. More...
 
Vec3f getMarkerColor (void)
 Get color for quasars markers. More...
 
void setMarkerColor (const Vec3f &c)
 Set color for quasars markers. More...
 
void setFontSize (int s)
 Connect this to StelApp font size.
 

Signals

void updateStateChanged (Quasars::UpdateState state)
 
void jsonUpdateComplete (void)
 emitted after a JSON update has run.
 
void flagQuasarsVisibilityChanged (bool b)
 
void quasarsColorChanged (Vec3f)
 

Public Member Functions

virtual void init ()
 Initialize itself. More...
 
virtual void deinit ()
 Called before the module will be delete, and before the openGL context is suppressed. More...
 
virtual void update (double)
 Update the module with respect to the time. More...
 
virtual void draw (StelCore *core)
 Execute all the drawing functions for this module. More...
 
virtual void drawPointer (StelCore *core, StelPainter &painter)
 
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 QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const
 Used to get a list of objects which are near to some position. More...
 
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const
 Return the matching satellite object's pointer if exists or Q_NULLPTR. More...
 
virtual StelObjectP searchByName (const QString &name) const
 Return the matching satellite if exists or Q_NULLPTR. More...
 
virtual StelObjectP searchByID (const QString &id) const
 Return the StelObject with the given ID if exists or the empty StelObject if not found. More...
 
virtual QStringList listMatchingObjects (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const
 Find and return the list of at most maxNbItem objects auto-completing the passed object name. More...
 
virtual QStringList listAllObjects (bool inEnglish) const
 List all StelObjects. More...
 
virtual QString getName () const
 Gets a user-displayable name of the object category.
 
virtual QString getStelObjectType () const
 Returns the name that will be returned by StelObject::getType() for the objects this module manages.
 
QuasarP getByID (const QString &id) const
 get a Quasar object by identifier
 
virtual bool configureGui (bool show=true)
 Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin. More...
 
void restoreDefaults (void)
 Set up the plugin with default values. More...
 
void readSettingsFromConfig (void)
 Read (or re-read) settings from the main config file. More...
 
void saveSettingsToConfig (void)
 Save the settings to the main configuration file.
 
bool getUpdatesEnabled (void)
 get whether or not the plugin will try to update catalog data from the internet More...
 
void setUpdatesEnabled (bool b)
 set whether or not the plugin will try to update catalog data from the internet More...
 
void setEnableAtStartup (bool b)
 
bool getEnableAtStartup (void)
 
QDateTime getLastUpdate (void)
 get the date and time the TLE elements were updated
 
int getUpdateFrequencyDays (void)
 get the update frequency in days
 
void setUpdateFrequencyDays (int days)
 
int getSecondsToUpdate (void)
 get the number of seconds till the next update
 
UpdateState getUpdateState (void)
 Get the current updateState.
 
- Public Member Functions inherited from StelObjectModule
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
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 adress 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 quasarsVisible
 
Vec3f quasarsColor
 

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

Member Enumeration Documentation

◆ UpdateState

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 Quasars::configureGui ( bool  show = true)
virtual

Reimplemented from StelModule.

◆ deinit()

virtual void Quasars::deinit ( )
virtual

Deinitialize all openGL texture in this method.

Reimplemented from StelModule.

◆ draw()

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

Reimplemented from StelModule.

◆ getCallOrder()

virtual double Quasars::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.

◆ getCountQuasars

int Quasars::getCountQuasars ( void  )
inlineslot
Returns
count of quasars

◆ getDisplayMode

bool Quasars::getDisplayMode ( void  )
slot
Returns
true if distribution of quasars is enabled

◆ getFlagShowQuasars

bool Quasars::getFlagShowQuasars ( void  )
inlineslot
Returns
true if it's visible

◆ getFlagUseQuasarMarkers

bool Quasars::getFlagUseQuasarMarkers ( void  )
slot
Returns
true if markers are used

◆ getMarkerColor

Vec3f Quasars::getMarkerColor ( void  )
slot
Returns
color

◆ getUpdatesEnabled()

bool Quasars::getUpdatesEnabled ( void  )
inline
Returns
true if updates are set to be done, false otherwise

◆ init()

virtual void Quasars::init ( )
virtual

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

Implements StelModule.

◆ listAllObjects()

virtual QStringList Quasars::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.

◆ listMatchingObjects()

virtual QStringList Quasars::listMatchingObjects ( const QString &  objPrefix,
int  maxNbItem = 5,
bool  useStartOfWords = false,
bool  inEnglish = false 
) const
virtual
Parameters
objPrefixthe case insensitive first letters of the searched object
maxNbItemthe maximum number of returned object names
useStartOfWordsthe autofill mode for returned objects names
Returns
a list of matching object name by order of relevance, or an empty list if nothing match

Reimplemented from StelObjectModule.

◆ readSettingsFromConfig()

void Quasars::readSettingsFromConfig ( void  )

This will be called from init and also when restoring defaults (i.e. from the configuration dialog / restore defaults button).

◆ restoreDefaults()

void Quasars::restoreDefaults ( void  )

This means clearing out the Quasars section in the main config.ini (if one already exists), and populating it with default values. It also creates the default quasars.json file from the resource embedded in the plugin lib/dll file.

◆ searchAround()

virtual QList<StelObjectP> Quasars::searchAround ( const Vec3d v,
double  limitFov,
const StelCore core 
) const
virtual
Parameters
va vector representing the position in th sky around which to search for quasars.
limitFovthe field of view around the position v in which to search for quasars.
corethe StelCore to use for computations.
Returns
an list containing the quasars located inside the limitFov circle around position v.

Implements StelObjectModule.

◆ searchByID()

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

Implements StelObjectModule.

◆ searchByName()

virtual StelObjectP Quasars::searchByName ( const QString &  name) const
virtual
Parameters
nameThe case in-sensistive standard program name

Implements StelObjectModule.

◆ searchByNameI18n()

virtual StelObjectP Quasars::searchByNameI18n ( const QString &  nameI18n) const
virtual
Parameters
nameI18nThe case in-sensistive satellite name

Implements StelObjectModule.

◆ setDisplayMode

void Quasars::setDisplayMode ( bool  b)
slot
Parameters
b(set true for display quasars as markers)

◆ setFlagShowQuasars

void Quasars::setFlagShowQuasars ( bool  b)
slot
Parameters
bboolean flag

◆ setFlagUseQuasarMarkers

void Quasars::setFlagUseQuasarMarkers ( bool  b)
slot
Parameters
bboolean flag

◆ setMarkerColor

void Quasars::setMarkerColor ( const Vec3f c)
slot
Parameters
ccolor
// example of usage in scripts

◆ setUpdatesEnabled()

void Quasars::setUpdatesEnabled ( bool  b)
inline
Parameters
bif true, updates will be enabled, else they will be disabled

◆ update()

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

Implements StelModule.

◆ updateJSON

void Quasars::updateJSON ( void  )
slot

◆ updateStateChanged

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