Kstars
catalogsdb.h
784 * where KStars Crashes on MacOS when launched by double clicking (NOT by Terminal or QT Creator)
828 // c.f. https://stackoverflow.com/questions/25392935/wrap-a-function-pointer-in-c-with-variadic-template
Q_OBJECTQ_OBJECT
CatalogObjectVector get_objects_in_trixel_null_mag(const int trixel)
Definition: catalogsdb.h:267
void msleep(unsigned long msecs)
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:800
std::shared_ptr< QThread > thread()
Return a pointer to the QThread object.
Definition: catalogsdb.h:806
bool compile_master_catalog()
Compiles the master catalog by merging the individual catalogs based on oid and precedence and create...
Definition: catalogsdb.cpp:337
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:687
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:846
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:1042
a dms subclass that caches its sine and cosine values every time the angle is changed.
Definition: cachingdms.h:18
ColorMap get_catalog_colors()
Definition: catalogsdb.cpp:1163
std::pair< bool, QString > remove_catalog(const int id)
remove a catalog
Definition: catalogsdb.cpp:879
CatalogObjectVector get_objects_in_trixel_no_nulls(const int trixel)
Definition: catalogsdb.h:260
void started()
int find_suitable_catalog_id()
Finds the smallest free id for a catalog.
Definition: catalogsdb.cpp:953
Manages the catalog database and provides an interface to provide an interface to query and modify th...
Definition: catalogsdb.h:182
const std::pair< bool, Catalog > get_catalog(const int id)
Definition: catalogsdb.cpp:378
CatalogObjectList find_objects_by_wildcard(const QString &wildcard, const int limit=-1)
Find an objects by searching the name four wildcard.
Definition: catalogsdb.cpp:1077
bool update_catalog_views()
Updates the all_catalog_view so that it includes all known catalogs.
Definition: catalogsdb.cpp:242
std::pair< bool, QString > set_catalog_enabled(const int id, const bool enabled)
Enable or disable a catalog.
Definition: catalogsdb.cpp:602
void moveToThread(QThread *targetThread)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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:1195
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:723
QString color
The catalog color in the form [default color];[scheme file name];[color]....
Definition: catalogsdb.h:91
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:81
const std::pair< bool, CatalogStatistics > get_master_statistics()
Definition: catalogsdb.cpp:1022
const std::vector< Catalog > get_catalogs(bool include_disabled=false)
Definition: catalogsdb.cpp:621
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
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:562
CatalogObjectList find_objects_by_name(const QString &name, const int limit=-1, const bool exactMatchOnly=false)
Find an objects by name.
Definition: catalogsdb.cpp:490
std::pair< bool, QString > update_catalog_meta(const Catalog &cat)
Update the metatadata catalog.
Definition: catalogsdb.cpp:932
std::string toStdString() const const
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:738
Holds statistical information about the objects in a catalog.
Definition: catalogsdb.h:118
CatalogObjectVector get_objects_in_trixel(const int trixel)
Definition: catalogsdb.h:253
std::pair< bool, CatalogObject > get_object(const CatalogObject::oid &oid)
Get an object by oid.
Definition: catalogsdb.cpp:538
void close()
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:876
std::unique_ptr< CatalogObjectList > result()
Returns the result of the previous call, or a nullptr if none exists.
Definition: catalogsdb.h:904
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
bool commit()
const std::pair< bool, CatalogStatistics > get_catalog_statistics(const int catalog_id)
Definition: catalogsdb.cpp:1032
bool catalog_exists(const int id)
Definition: catalogsdb.cpp:395
void execute(DBManagerMethod< Args... > dbManagerMethod, Args... args)
A generic wrapper to call any method on DBManager that returns a CatalogObjectList.
Definition: catalogsdb.h:826
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 (smalle...
Definition: catalogsdb.cpp:589
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
Definition: catalogobject.h:40
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 ...
Definition: catalogsdb.cpp:1094
QString message
std::shared_ptr< DBManager > manager()
Return a pointer to the DBManager, for non-DB functionalities.
Definition: catalogsdb.h:801
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:913
Database related error, thrown when database access fails or an action does not succeed.
Definition: catalogsdb.h:687
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.