• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | List of all members
CatalogDB Class Reference

#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_entryData 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
raRight Ascension of new object to be added
decDeclination 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
catalogName of the catalog whose objects are needed.
sky_listList of all skyobjects stored in database (assigns)
namesList of named objects in database (assigns)
catalog_pointerpointer 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_nameName of catalog whose details are required
catalog_dataData 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:

  1. Checks if database file exists
  2. Checks if database can be opened
  3. If DB file is missing, creates new DB
  4. 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_nameName of the catalog
Returns
void

Definition at line 184 of file catalogdb.cpp.


The documentation for this class was generated from the following files:
  • catalogdb.h
  • catalogdb.cpp
This file is part of the KDE documentation.
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.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal