Stellarium  0.17.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
StelSkyImageTile Class Reference

Base class for any astro image with a fixed position.

#include <StelSkyImageTile.hpp>

Public Member Functions

 StelSkyImageTile ()
 Default constructor.
 
 StelSkyImageTile (const QString &url, StelSkyImageTile *parent=Q_NULLPTR)
 Constructor.
 
 StelSkyImageTile (const QVariantMap &map, StelSkyImageTile *parent)
 Constructor.
 
 ~StelSkyImageTile ()
 Destructor.
 
void draw (StelCore *core, StelPainter &sPainter, float opacity=1.)
 Draw the image on the screen.
 
DataSetCredits getDataSetCredits () const
 Return the dataset credits to use in the progress bar.
 
ServerCredits getServerCredits () const
 Return the server credits to use in the progress bar.
 
bool isReadyToDisplay () const
 Return true if the tile is fully loaded and can be displayed.
 
QVariantMap toQVariantMap () const
 Convert the image informations to a map following the JSON structure. More...
 
QString getAbsoluteImageURI () const
 Return the absolute path/URL to the image file.
 
virtual QString getLayerDescriptionHtml () const
 Return an HTML description of the image to be displayed in the GUI.
 
- Public Member Functions inherited from MultiLevelJsonBase
 MultiLevelJsonBase (MultiLevelJsonBase *parent=Q_NULLPTR)
 Default constructor.
 
void initFromUrl (const QString &url)
 Init the element from a URL. More...
 
void initFromQVariantMap (const QVariantMap &map)
 Init the element from a QVariantMap. More...
 
 ~MultiLevelJsonBase ()
 Destructor.
 
QString getShortName () const
 Return the short name for this image to be used in the loading bar.
 
bool hasErrorOccured () const
 Return true if an error occured while loading the data.
 
int getLevel () const
 Get the depth level in the tree.
 
QVariantMap toQVariantMap () const
 Convert the image informations to a map following the JSON structure. More...
 
void scheduleChildsDeletion ()
 Schedule a deletion for all the childs. More...
 
- Public Member Functions inherited from StelSkyLayer
 StelSkyLayer (QObject *parent=Q_NULLPTR)
 
virtual QString getShortServerCredits () const
 Return the short server name to display in the loading bar.
 
virtual QString getKeyHint () const
 Return a hint on which key to use for referencing this layer. More...
 
void setFrameType (StelCore::FrameType ft)
 Set the reference frame type.
 
StelCore::FrameType getFrameType ()
 Get the reference frame type.
 

Protected Member Functions

virtual void loadFromQVariantMap (const QVariantMap &map)
 Reimplement the abstract method. More...
 
- Protected Member Functions inherited from MultiLevelJsonBase
bool isDeletionScheduled () const
 Return true if a deletion is currently scheduled.
 
void updatePercent (int tot, int numToBeLoaded)
 
void deleteUnusedSubTiles ()
 Delete all the subtiles which were not displayed since more than lastDrawTrigger seconds.
 
void cancelDeletion ()
 If a deletion was scheduled, cancel it.
 

Protected Attributes

ServerCredits serverCredits
 The credits of the server where this data come from.
 
DataSetCredits dataSetCredits
 The credits for the data set.
 
QString absoluteImageURI
 URL where the image is located.
 
float luminance
 The image luminance in cd/m^2.
 
bool alphaBlend
 Whether the texture must be blended.
 
bool noTexture
 True if the tile is just a list of other tiles without texture for itself.
 
QList< SphericalRegionPskyConvexPolygons
 list of all the polygons.
 
StelTextureSP tex
 The texture of the tile.
 
float minResolution
 Minimum resolution of the data of the texture in degree/pixel.
 
double birthJD
 Allow some images to be shown only after this date, e.g. Supernova remnants.
 
- Protected Attributes inherited from MultiLevelJsonBase
QString shortName
 The very short name for this image set to be used in loading bar.
 
QString baseUrl
 Base URL to prefix to relative URL.
 
QString contructorUrl
 The relative URL passed to the constructor.
 
QList< MultiLevelJsonBase * > subTiles
 The list of all the created subtiles for this tile.
 
bool errorOccured
 Set to true if an error occured with this tile and it should not be displayed.
 
bool downloading
 true if the JSON descriptor file is currently downloading
 

Friends

class StelSkyLayerMgr
 

Additional Inherited Members

- Signals inherited from StelSkyLayer
void loadingStateChanged (bool b)
 Emitted when loading of data started or stopped. More...
 
void percentLoadedChanged (int percentage)
 Emitted when the percentage of loading tiles/tiles to be displayed changed. More...
 
- Static Protected Member Functions inherited from MultiLevelJsonBase
static QVariantMap loadFromJSON (QIODevice &input, bool qZcompressed=false, bool gzCompressed=false)
 Load the element information from a JSON file.
 

Member Function Documentation

virtual void StelSkyImageTile::loadFromQVariantMap ( const QVariantMap &  map)
protectedvirtual

Load the tile from a valid QVariantMap.

Implements MultiLevelJsonBase.

QVariantMap StelSkyImageTile::toQVariantMap ( ) const

It can be saved as JSON using the StelJsonParser methods.