Stellarium 0.11.4 | |||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
A shared pointer on a SphericalRegion. More...
#include <StelSphereGeometry.hpp>
Public Member Functions | |
SphericalRegionP (SphericalRegion *ptr) | |
template<class Deleter > | |
SphericalRegionP (SphericalRegion *ptr, Deleter deleter) | |
SphericalRegionP (const SphericalRegionP &other) | |
SphericalRegionP (const QWeakPointer< SphericalRegion > &other) | |
Static Public Member Functions | |
static SphericalRegionP | loadFromJson (QIODevice *in) |
Create a SphericalRegion from the given input JSON stream. | |
static SphericalRegionP | loadFromJson (const QByteArray &a) |
Create a SphericalRegion from the given QByteArray containing the JSON data. | |
static SphericalRegionP | loadFromQVariant (const QVariantMap &map) |
Create a SphericalRegion from the given QVariantMap with a format matching the JSON file parsed in loadFromJson(). | |
static SphericalRegionP | loadFromQVariant (const QVariantList &list) |
static void | serializeToJson (const QVariant &jsonObject, QIODevice *output, int indentLevel=0) |
Method registered to JSON serializer. | |
Static Public Attributes | |
static int | metaTypeId |
The meta type ID associated to a SphericalRegionP. |
A shared pointer on a SphericalRegion.
static SphericalRegionP SphericalRegionP::loadFromJson | ( | const QByteArray & | a | ) | [static] |
Create a SphericalRegion from the given QByteArray containing the JSON data.
static SphericalRegionP SphericalRegionP::loadFromJson | ( | QIODevice * | in | ) | [static] |
Create a SphericalRegion from the given input JSON stream.
The type of the region is automatically recognized from the input format. The currently recognized format are:
[[contour1], [contour2],[...]]
[[ra,dec], [ra,dec], [ra,dec], [ra,dec]]
["CAP", [raCenter,decCenter], ap]
["CAP", [0.,-90.], 90]
["PATH", [startRa,startDec], [[prim1],[prim2],[prim3],...]]
["PATH",[330,-25],[["smallCircle",[0,90],82.5],["greatCircleTo",[52.5,-35]],["smallCircle",[0,90],-82.5]]]
{ "worldCoords": [[[ra,dec],[ra,dec],[ra,dec],[ra,dec]], [[ra,dec],[ra,dec],[ra,dec]],[...]], "textureCoords": [[[u,v],[u,v],[u,v],[u,v]], [[u,v],[u,v],[u,v]], [...]] }
in | an open QIODevice ready for read. |
std::runtime_error | when there was an error while parsing the file. |
static SphericalRegionP SphericalRegionP::loadFromQVariant | ( | const QVariantMap & | map | ) | [static] |
Create a SphericalRegion from the given QVariantMap with a format matching the JSON file parsed in loadFromJson().
map | a valid QVariantMap which can be created e.g. from parsing a JSON file with the StelJsonParser class. |
static void SphericalRegionP::serializeToJson | ( | const QVariant & | jsonObject, | |
QIODevice * | output, | |||
int | indentLevel = 0 | |||
) | [static] |
Method registered to JSON serializer.
int SphericalRegionP::metaTypeId [static] |
The meta type ID associated to a SphericalRegionP.