Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://astro.uni-altai.ru/~aw/stellarium/api/classMultiLevelJsonBase.html
Дата изменения: Unknown Дата индексирования: Fri Feb 28 07:40:58 2014 Кодировка: Поисковые слова: п п п п п п п п |
Stellarium 0.12.3
|
Abstract base class for managing multi-level tree objects stored in JSON format. More...
#include <MultiLevelJsonBase.hpp>
Public Member Functions | |
MultiLevelJsonBase (MultiLevelJsonBase *parent=NULL) | |
Default constructor. More... | |
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. More... | |
QString | getShortName () const |
Return the short name for this image to be used in the loading bar. More... | |
bool | hasErrorOccured () const |
Return true if an error occured while loading the data. More... | |
int | getLevel () const |
Get the depth level in the tree. More... | |
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=NULL) | |
virtual void | draw (StelCore *core, class StelRenderer *renderer, StelProjectorP projector, float opacity=1.)=0 |
Draws the content of the layer. More... | |
virtual QString | getShortServerCredits () const |
Return the short server name to display in the loading bar. More... | |
virtual QString | getKeyHint () const |
Return a hint on which key to use for referencing this layer. More... | |
virtual QString | getLayerDescriptionHtml () const |
Return a human readable description of the layer with e.g. More... | |
void | setFrameType (StelCore::FrameType ft) |
Set the reference frame type. More... | |
StelCore::FrameType | getFrameType () |
Get the reference frame type. More... | |
Protected Member Functions | |
virtual void | loadFromQVariantMap (const QVariantMap &map)=0 |
Load the element from a valid QVariantMap. More... | |
bool | isDeletionScheduled () const |
Return true if a deletion is currently scheduled. More... | |
void | updatePercent (int tot, int numToBeLoaded) |
void | deleteUnusedSubTiles () |
Delete all the subtiles which were not displayed since more than lastDrawTrigger seconds. More... | |
void | cancelDeletion () |
If a deletion was scheduled, cancel it. More... | |
Static Protected Member Functions | |
static QVariantMap | loadFromJSON (QIODevice &input, bool qZcompressed=false, bool gzCompressed=false) |
Load the element information from a JSON file. More... | |
Protected Attributes | |
QString | shortName |
The very short name for this image set to be used in loading bar. More... | |
QString | baseUrl |
Base URL to prefix to relative URL. More... | |
QString | contructorUrl |
The relative URL passed to the constructor. More... | |
QList< MultiLevelJsonBase * > | subTiles |
The list of all the created subtiles for this tile. More... | |
bool | errorOccured |
Set to true if an error occured with this tile and it should not be displayed. More... | |
bool | downloading |
true if the JSON descriptor file is currently downloading More... | |
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... | |
Abstract base class for managing multi-level tree objects stored in JSON format.
The JSON files can be stored on disk or remotely and are loaded into threads.
Definition at line 34 of file MultiLevelJsonBase.hpp.
MultiLevelJsonBase::MultiLevelJsonBase | ( | MultiLevelJsonBase * | parent = NULL | ) |
Default constructor.
MultiLevelJsonBase::~MultiLevelJsonBase | ( | ) |
Destructor.
|
protected |
If a deletion was scheduled, cancel it.
|
protected |
Delete all the subtiles which were not displayed since more than lastDrawTrigger seconds.
|
inline |
Get the depth level in the tree.
Definition at line 62 of file MultiLevelJsonBase.hpp.
|
inlinevirtual |
Return the short name for this image to be used in the loading bar.
Implements StelSkyLayer.
Definition at line 56 of file MultiLevelJsonBase.hpp.
|
inline |
Return true if an error occured while loading the data.
Definition at line 59 of file MultiLevelJsonBase.hpp.
void MultiLevelJsonBase::initFromQVariantMap | ( | const QVariantMap & | map | ) |
Init the element from a QVariantMap.
This method should be called by the constructors of the subclass.
void MultiLevelJsonBase::initFromUrl | ( | const QString & | url | ) |
Init the element from a URL.
This method should be called by the constructors of the subclass.
|
inlineprotected |
Return true if a deletion is currently scheduled.
Definition at line 84 of file MultiLevelJsonBase.hpp.
|
staticprotected |
Load the element information from a JSON file.
|
protectedpure virtual |
Load the element from a valid QVariantMap.
This method is called after the JSON files are downloaded and parsed into a QVariantMap.
Implemented in StelSkyImageTile, and StelSkyPolygon.
void MultiLevelJsonBase::scheduleChildsDeletion | ( | ) |
Schedule a deletion for all the childs.
It will practically occur after the delay passed as argument to deleteUnusedTiles() has expired.
QVariantMap MultiLevelJsonBase::toQVariantMap | ( | ) | const |
Convert the image informations to a map following the JSON structure.
It can be saved as JSON using the StelJsonParser methods.
|
protected |
Base URL to prefix to relative URL.
Definition at line 90 of file MultiLevelJsonBase.hpp.
|
protected |
The relative URL passed to the constructor.
Definition at line 93 of file MultiLevelJsonBase.hpp.
|
protected |
true if the JSON descriptor file is currently downloading
Definition at line 107 of file MultiLevelJsonBase.hpp.
|
protected |
Set to true if an error occured with this tile and it should not be displayed.
Definition at line 99 of file MultiLevelJsonBase.hpp.
|
protected |
The very short name for this image set to be used in loading bar.
Definition at line 87 of file MultiLevelJsonBase.hpp.
|
protected |
The list of all the created subtiles for this tile.
Definition at line 96 of file MultiLevelJsonBase.hpp.