• 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
KSUserDB Class Reference

#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

Author
Rishab Arora (spacetime)

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 
)

Add new eyepiece to database.

Returns
void

Definition at line 429 of file ksuserdb.cpp.

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 
)

Add a new filter to the database.

Returns
void

Definition at line 562 of file ksuserdb.cpp.

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
raRight Ascension
decDeclination
epochEpoch
image_nameName of the image used
labelContent of display label on screen
labelColorColor 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 
)

Add a new lens to the database.

Returns
void

Definition at line 501 of file ksuserdb.cpp.

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
typeEquipment type (same as table name)
Returns
void

Definition at line 337 of file ksuserdb.cpp.

void KSUserDB::EraseAllFlags ( )

Erases all the flags from the database.

Returns
void

Definition at line 254 of file ksuserdb.cpp.

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
typeEquipment type (same as table name)
idUnique 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_eyepieceListReference 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_filterListReference to list of filters
Returns
void

Definition at line 601 of file ksuserdb.cpp.

void KSUserDB::GetAllLenses ( QList< OAL::Lens * > &  m_lensList)

Populate the reference passed with all lenses.

Parameters
m_lensListReference 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_scopeListReference 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:
  • ksuserdb.h
  • ksuserdb.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