Stellarium  HEAD
Public Member Functions
HipOnlineQuery Class Reference

Provides lookup features into an online service that accepts a Hipparcos number in the query string. More...

#include <HipOnlineQuery.hpp>

Public Member Functions

 HipOnlineQuery (QString baseURL, QObject *parent=nullptr)
 Constructor. More...
 
void setUrl (QString url)
 set a new URL for the query. There must be a "%1" included, else no number or name can be added to the query!
 
HipOnlineReplylookup (const int hipID)
 Lookup in an external starnames information site for object with catalog number. More...
 
HipOnlineReplylookup (const QString name)
 Lookup in an external information site for object with name. More...
 
HipOnlineReplylookup (const QString url, const int hipID)
 Lookup in an external starnames information site for object with catalog number. More...
 
HipOnlineReplylookup (const QString url, const QString name)
 Lookup in an external information site for object with name. More...
 

Detailed Description

Provides lookup features into an online service that accepts a Hipparcos number in the query string.

Constructor & Destructor Documentation

◆ HipOnlineQuery()

HipOnlineQuery::HipOnlineQuery ( QString  baseURL,
QObject *  parent = nullptr 
)

Constructor.

Parameters
baseURLcomplete URL like "https://mysite.org/lookForInfo.php?HIP=%1" It is allowed to initialize with an empty URL.

Member Function Documentation

◆ lookup() [1/4]

HipOnlineReply* HipOnlineQuery::lookup ( const int  hipID)

Lookup in an external starnames information site for object with catalog number.

Parameters
hipIDthe object ID. Only HIP IDs are supported.
Returns
a new HipOnlineReply which is owned by the caller.

◆ lookup() [2/4]

HipOnlineReply* HipOnlineQuery::lookup ( const QString  name)

Lookup in an external information site for object with name.

Parameters
namethe object name. Use getEnglishName() for a typical name.
Returns
a new HipOnlineReply which is owned by the caller.

◆ lookup() [3/4]

HipOnlineReply* HipOnlineQuery::lookup ( const QString  url,
const int  hipID 
)

Lookup in an external starnames information site for object with catalog number.

Parameters
urla new URL to use.
hipIDthe object ID. Only HIP IDs are supported.
Returns
a new HipOnlineReply which is owned by the caller.

◆ lookup() [4/4]

HipOnlineReply* HipOnlineQuery::lookup ( const QString  url,
const QString  name 
)

Lookup in an external information site for object with name.

Parameters
urla new URL to use.
namethe object name. Use getEnglishName() for a typical name.
Returns
a new HipOnlineReply which is owned by the caller.