kstars
#include <catalogdb.h>
Public Member Functions | |
~CatalogDB () | |
bool | AddCatalogContents (const QString &filename) |
void | AddEntry (const CatalogEntryData &catalog_entry) |
QStringList * | Catalogs () |
int | FindFuzzyEntry (const double ra, const double dec, const double magnitude) |
void | GetAllObjects (const QString &catalog_name, QList< SkyObject * > &sky_list, QList< QPair< int, QString > > &object_names, CatalogComponent *catalog_pointer) |
void | GetCatalogData (const QString &catalog_name, CatalogData &catalog_data) |
bool | Initialize () |
void | RefreshCatalogList () |
void | RemoveCatalog (const QString &catalog_name) |
Detailed Description
Definition at line 51 of file catalogdb.h.
Constructor & Destructor Documentation
CatalogDB::~CatalogDB | ( | ) |
Attempt to close database and remove reference from the DB List.
Definition at line 100 of file catalogdb.cpp.
Member Function Documentation
bool CatalogDB::AddCatalogContents | ( | const QString & | filename | ) |
Add contents of custom catalog to the program database.
filename
the name of the file containing the data to be read
- Returns
- true if catalog was successfully added
Definition at line 339 of file catalogdb.cpp.
void CatalogDB::AddEntry | ( | const CatalogEntryData & | catalog_entry | ) |
Used to add a cross referenced entry into the database.
- Parameters
-
catalog_entry Data structure with entry details
- Returns
- void
Definition at line 261 of file catalogdb.cpp.
QStringList * CatalogDB::Catalogs | ( | ) |
Accessor for list of all available catalogs in db.
- Returns
- QStringList*
Definition at line 111 of file catalogdb.cpp.
int CatalogDB::FindFuzzyEntry | ( | const double | ra, |
const double | dec, | ||
const double | magnitude | ||
) |
returns the id of the row if it matches with certain fuzz.
Else return -1 if none found
- Parameters
-
ra Right Ascension of new object to be added dec Declination of new object to be added
- Returns
- int RowUID of the new row
Definition at line 228 of file catalogdb.cpp.
void CatalogDB::GetAllObjects | ( | const QString & | catalog_name, |
QList< SkyObject * > & | sky_list, | ||
QList< QPair< int, QString > > & | object_names, | ||
CatalogComponent * | catalog_pointer | ||
) |
Creates objects of type SkyObject and assigns them to references.
- Parameters
-
catalog Name of the catalog whose objects are needed. sky_list List of all skyobjects stored in database (assigns) names List of named objects in database (assigns) catalog_pointer pointer to the catalogcomponent objects (needed for building skyobjects)
- Returns
- void
Definition at line 674 of file catalogdb.cpp.
void CatalogDB::GetCatalogData | ( | const QString & | catalog_name, |
CatalogData & | catalog_data | ||
) |
Get information about the catalog like Prefix etc.
- Parameters
-
catalog_name Name of catalog whose details are required catalog_data Data structure assigned with required data
- Returns
- void
Definition at line 654 of file catalogdb.cpp.
bool CatalogDB::Initialize | ( | ) |
Initializes the database and sets up pointers to Catalog DB Performs the following actions:
- Checks if database file exists
- Checks if database can be opened
- If DB file is missing, creates new DB
- Sets up pointer to Catalog DB
usage: Call QSqlDatabase::removeDatabase("skydb"); after the object of this class is deallocated
- Returns
- bool
Definition at line 22 of file catalogdb.cpp.
void CatalogDB::RefreshCatalogList | ( | ) |
Rechecks the database and builds the Catalog listing.
New listing is directly updated into catalogs (accessed using Catalogs())
- Returns
- void
Definition at line 117 of file catalogdb.cpp.
void CatalogDB::RemoveCatalog | ( | const QString & | catalog_name | ) |
Removes the catalog from the database and refreshes the listing.
- Parameters
-
catalog_name Name of the catalog
- Returns
- void
Definition at line 184 of file catalogdb.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.