Kstars
catalogsdb.h
a dms subclass that caches its sine and cosine values every time the angle is changed.
Definition cachingdms.h:19
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
Definition catalogobject.h:41
void find_objects_by_name(const QString &name, const int limit=-1)
Calls the given DBManager method, storing the result for later retrieval.
Definition catalogsdb.h:870
std::shared_ptr< QThread > thread()
Return a pointer to the QThread object.
Definition catalogsdb.h:800
void execute(DBManagerMethod< Args... > dbManagerMethod, Args... args)
A generic wrapper to call any method on DBManager that returns a CatalogObjectList.
Definition catalogsdb.h:820
std::shared_ptr< DBManager > manager()
Return a pointer to the DBManager, for non-DB functionalities.
Definition catalogsdb.h:795
std::unique_ptr< CatalogObjectList > result()
Returns the result of the previous call, or a nullptr if none exists.
Definition catalogsdb.h:898
void _find_objects_by_name(const QString &name, const int limit, const bool exactMatchOnly)
execute(), but specialized to find_objects_by_name
Definition catalogsdb.h:840
Manages the catalog database and provides an interface to provide an interface to query and modify th...
Definition catalogsdb.h:183
std::pair< bool, QString > add_object(const int catalog_id, const SkyObject::TYPE t, const CachingDms &r, const CachingDms &d, const QString &n, const float m=NaN::f, const QString &lname=QString(), const QString &catalog_identifier=QString(), const float a=0.0, const float b=0.0, const double pa=0.0, const float flux=0)
Add a CatalogObject to a table with `catalog_id`.
Definition catalogsdb.cpp:698
int find_suitable_catalog_id()
Finds the smallest free id for a catalog.
Definition catalogsdb.cpp:966
bool compile_master_catalog()
Compiles the master catalog by merging the individual catalogs based on oid and precedence and create...
Definition catalogsdb.cpp:337
bool update_catalog_views()
Updates the all_catalog_view so that it includes all known catalogs.
Definition catalogsdb.cpp:238
CatalogObjectVector get_objects_in_trixel_null_mag(const int trixel)
Definition catalogsdb.h:267
CatalogObjectList find_objects_by_name(const QString &name, const int limit=-1, const bool exactMatchOnly=false)
Find an objects by name.
Definition catalogsdb.cpp:499
std::pair< bool, QString > set_catalog_enabled(const int id, const bool enabled)
Enable or disable a catalog.
Definition catalogsdb.cpp:612
ColorMap get_catalog_colors()
Definition catalogsdb.cpp:1177
const std::pair< bool, CatalogStatistics > get_catalog_statistics(const int catalog_id)
Definition catalogsdb.cpp:1046
CatalogObjectList find_objects_by_wildcard(const QString &wildcard, const int limit=-1)
Find an objects by searching the name four wildcard.
Definition catalogsdb.cpp:1091
std::tuple< bool, const QString, CatalogObjectList > general_master_query(const QString &where, const QString &order_by="", const int limit=-1)
Find an objects by searching the master catlog with a query like SELECT ... FROM master WHERE \p wher...
Definition catalogsdb.cpp:1108
std::pair< bool, QString > update_catalog_meta(const Catalog &cat)
Update the metatadata `catalog`.
Definition catalogsdb.cpp:945
std::pair< bool, QString > remove_catalog(const int id)
remove a catalog
Definition catalogsdb.cpp:892
const std::pair< bool, Catalog > get_catalog(const int id)
Definition catalogsdb.cpp:381
std::pair< bool, QString > remove_object(const int catalog_id, const CatalogObject::oid &id)
Remove the catalog object with the `oid` from the catalog with the `catalog_id`.
Definition catalogsdb.cpp:734
CatalogObjectList get_objects_in_catalog(SkyObject::TYPE type, const int catalog_id, float maglim=default_maglim, int limit=-1)
Get limit objects from the catalog with `catalog_id` of type with magnitude smaller than maglim (smal...
Definition catalogsdb.cpp:599
DBManager(const QString &filename)
Constructs a database manager from the filename which is resolved to a path in the kstars data direct...
Definition catalogsdb.cpp:80
CatalogObjectVector get_objects_in_trixel_no_nulls(const int trixel)
Definition catalogsdb.h:260
std::pair< bool, QString > register_catalog(const int id, const QString &name, const bool mut, const bool enabled, const double precedence, const QString &author=cat_defaults.author, const QString &source=cat_defaults.source, const QString &description=cat_defaults.description, const int version=cat_defaults.version, const QString &color=cat_defaults.color, const QString &license=cat_defaults.license, const QString &maintainer=cat_defaults.maintainer, const QDateTime ×tamp=cat_defaults.timestamp)
Registers a new catalog in the database.
Definition catalogsdb.cpp:309
std::pair< bool, QString > import_catalog(const QString &file_path, const bool overwrite=false)
Loads a dumped catalog from path `file_path`.
Definition catalogsdb.cpp:812
std::pair< bool, QString > add_objects(const int catalog_id, const CatalogObjectVector &objects)
Add the `objects` to a table with `catalog_id`.
Definition catalogsdb.cpp:1056
const std::vector< Catalog > get_catalogs(bool include_disabled=false)
Definition catalogsdb.cpp:631
CatalogObjectList get_objects(float maglim=default_maglim, int limit=-1)
Get limit objects with magnitude smaller than maglim (smaller = brighter) from the database.
Definition catalogsdb.cpp:572
std::pair< bool, QString > insert_catalog_colors(const int id, const CatalogColorMap &colors)
Saves the configures colors of the catalog with id id in colors into the database.
Definition catalogsdb.cpp:1209
const std::pair< bool, CatalogStatistics > get_master_statistics()
Definition catalogsdb.cpp:1036
std::pair< bool, QString > dump_catalog(int catalog_id, QString file_path)
Dumps the catalog with `id` into the file under the path file_path.
Definition catalogsdb.cpp:749
std::pair< bool, CatalogObject > get_object(const CatalogObject::oid &oid)
Get an object by `oid`.
Definition catalogsdb.cpp:547
CatalogObjectVector get_objects_in_trixel(const int trixel)
Definition catalogsdb.h:253
std::pair< bool, QString > copy_objects(const int id_1, const int id_2)
Clone objects from the catalog with `id_1` to another with id_2.
Definition catalogsdb.cpp:926
Database related error, thrown when database access fails or an action does not succeed.
Definition catalogsdb.h:682
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
Q_OBJECTQ_OBJECT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void moveToThread(QThread *targetThread)
void close()
bool commit()
std::string toStdString() const const
void msleep(unsigned long msecs)
void started()
Holds statistical information about the objects in a catalog.
Definition catalogsdb.h:119
QString color
The catalog color in the form [default color];[scheme file name];[color]....
Definition catalogsdb.h:91
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.