kstars
#include <ksuserdb.h>
Public Member Functions | |
| ~KSUserDB () | |
| void | AddEyepiece (const QString &vendor, const QString &model, const double &focalLength, const double &fov, const QString &fovunit) | 
| void | AddEyepiece (const QString &vendor, const QString &model, const double &focalLength, const double &fov, const QString &fovunit, const QString &id) | 
| void | AddFilter (const QString &vendor, const QString &model, const QString &type, const QString &color) | 
| void | AddFilter (const QString &vendor, const QString &model, const QString &type, const QString &color, const QString &id) | 
| void | AddFlag (const QString &ra, const QString &dec, const QString &epoch, const QString &image_name, const QString &label, const QString &labelColor) | 
| void | AddLens (const QString &vendor, const QString &model, const double &factor) | 
| void | AddLens (const QString &vendor, const QString &model, const double &factor, const QString &id) | 
| void | AddObserver (const QString &name, const QString &surname, const QString &contact) | 
| void | AddScope (const QString &model, const QString &vendor, const QString &driver, const QString &type, const double &focalLength, const double &aperture) | 
| void | AddScope (const QString &model, const QString &vendor, const QString &driver, const QString &type, const double &focalLength, const double &aperture, const QString &id) | 
| bool | DeleteObserver (const QString &id) | 
| void | EraseAllEquipment (const QString &type) | 
| void | EraseAllFlags () | 
| void | EraseEquipment (const QString &type, const int &id) | 
| int | FindObserver (const QString &name, const QString &surname) | 
| void | GetAllEyepieces (QList< OAL::Eyepiece * > &m_eyepieceList) | 
| void | GetAllFilters (QList< OAL::Filter * > &m_filterList) | 
| void | GetAllLenses (QList< OAL::Lens * > &m_lensList) | 
| void | GetAllObservers (QList< OAL::Observer * > &observer_list) | 
| void | GetAllScopes (QList< OAL::Scope * > &m_scopeList) | 
| bool | Initialize () | 
| QList< QStringList > | ReturnAllFlags () | 
Detailed Description
Single class to delegate all User database I/O.
usage: Call QSqlDatabase::removeDatabase("userdb"); after the object of this class is deallocated
Definition at line 46 of file ksuserdb.h.
Constructor & Destructor Documentation
| KSUserDB::~KSUserDB | ( | ) | 
Definition at line 57 of file ksuserdb.cpp.
Member Function Documentation
| void KSUserDB::AddEyepiece | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const double & | focalLength, | ||
| const double & | fov, | ||
| const QString & | fovunit | ||
| ) | 
| void KSUserDB::AddEyepiece | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const double & | focalLength, | ||
| const double & | fov, | ||
| const QString & | fovunit, | ||
| const QString & | id | ||
| ) | 
Replace eyepiece at position (ID) with new content.
- Returns
 - void
 
Definition at line 449 of file ksuserdb.cpp.
| void KSUserDB::AddFilter | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const QString & | type, | ||
| const QString & | color | ||
| ) | 
| void KSUserDB::AddFilter | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const QString & | type, | ||
| const QString & | color, | ||
| const QString & | id | ||
| ) | 
Replace a filter at given ID with new content.
- Returns
 - void
 
Definition at line 580 of file ksuserdb.cpp.
| void KSUserDB::AddFlag | ( | const QString & | ra, | 
| const QString & | dec, | ||
| const QString & | epoch, | ||
| const QString & | image_name, | ||
| const QString & | label, | ||
| const QString & | labelColor | ||
| ) | 
Add a new Flag with given parameters.
- Parameters
 - 
  
ra Right Ascension dec Declination epoch Epoch image_name Name of the image used label Content of display label on screen labelColor Color of the label (name or hex code) eg #00FF00  
- Returns
 - void
 
Definition at line 267 of file ksuserdb.cpp.
| void KSUserDB::AddLens | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const double & | factor | ||
| ) | 
| void KSUserDB::AddLens | ( | const QString & | vendor, | 
| const QString & | model, | ||
| const double & | factor, | ||
| const QString & | id | ||
| ) | 
Replace a lens at given ID with new content.
- Returns
 - void
 
Definition at line 518 of file ksuserdb.cpp.
| void KSUserDB::AddObserver | ( | const QString & | name, | 
| const QString & | surname, | ||
| const QString & | contact | ||
| ) | 
Adds a new observer into the database.
Definition at line 168 of file ksuserdb.cpp.
| void KSUserDB::AddScope | ( | const QString & | model, | 
| const QString & | vendor, | ||
| const QString & | driver, | ||
| const QString & | type, | ||
| const double & | focalLength, | ||
| const double & | aperture | ||
| ) | 
Appends the scope with given details in the database.
- Returns
 - void
 
Definition at line 353 of file ksuserdb.cpp.
| void KSUserDB::AddScope | ( | const QString & | model, | 
| const QString & | vendor, | ||
| const QString & | driver, | ||
| const QString & | type, | ||
| const double & | focalLength, | ||
| const double & | aperture, | ||
| const QString & | id | ||
| ) | 
Replaces the scope with given ID with provided content.
- Returns
 - void
 
Definition at line 374 of file ksuserdb.cpp.
| bool KSUserDB::DeleteObserver | ( | const QString & | id | ) | 
Removes the user with unique id as given by FindObserver Returns false if the user is not found.
- Returns
 - bool
 
Definition at line 212 of file ksuserdb.cpp.
| void KSUserDB::EraseAllEquipment | ( | const QString & | type | ) | 
Erases the whole equipment table of given type.
- Parameters
 - 
  
type Equipment type (same as table name)  
- Returns
 - void
 
Definition at line 337 of file ksuserdb.cpp.
| void KSUserDB::EraseAllFlags | ( | ) | 
| void KSUserDB::EraseEquipment | ( | const QString & | type, | 
| const int & | id | ||
| ) | 
Erase the equipment with given type and unique id Valid equipment types: "telescope","lens","filter".
- Parameters
 - 
  
type Equipment type (same as table name) id Unique id (same as row number)  
- Returns
 - void
 
Definition at line 323 of file ksuserdb.cpp.
| int KSUserDB::FindObserver | ( | const QString & | name, | 
| const QString & | surname | ||
| ) | 
Returns the unique id of the user with given name & surname.
- Returns
 - int
 
Definition at line 196 of file ksuserdb.cpp.
| void KSUserDB::GetAllEyepieces | ( | QList< OAL::Eyepiece * > & | m_eyepieceList | ) | 
Populate the reference passed with all eyepieces.
- Parameters
 - 
  
m_eyepieceList Reference to list of eyepieces  
- Returns
 - void
 
Definition at line 472 of file ksuserdb.cpp.
| void KSUserDB::GetAllFilters | ( | QList< OAL::Filter * > & | m_filterList | ) | 
Populate the reference passed with all filters.
- Parameters
 - 
  
m_filterList Reference to list of filters  
- Returns
 - void
 
Definition at line 601 of file ksuserdb.cpp.
Populate the reference passed with all lenses.
- Parameters
 - 
  
m_lensList Reference to list of lenses  
- Returns
 - void
 
Definition at line 537 of file ksuserdb.cpp.
| void KSUserDB::GetAllObservers | ( | QList< OAL::Observer * > & | observer_list | ) | 
Updates the passed reference of observer_list with all observers The original content of the list is cleared.
- Returns
 - void
 
Definition at line 229 of file ksuserdb.cpp.
| void KSUserDB::GetAllScopes | ( | QList< OAL::Scope * > & | m_scopeList | ) | 
updates the scope list with all scopes from database List is cleared and then filled with content.
- Parameters
 - 
  
m_scopeList Reference to list to be updated  
- Returns
 - void
 
Definition at line 399 of file ksuserdb.cpp.
| bool KSUserDB::Initialize | ( | ) | 
Initialize KStarsDB while running splash screen.
- Returns
 - true on success
 
Definition at line 32 of file ksuserdb.cpp.
| QList< QStringList > KSUserDB::ReturnAllFlags | ( | ) | 
Returns a QList populated with all stored flags Order: const QString &ra, const QString &dec, const QString &epoch, const QString &imageName, const QString &label, const QString &labelColor.
- Returns
 - QList< QStringList >
 
Definition at line 288 of file ksuserdb.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.
    KDE API Reference