Kstars

import_skycomp.h
1 /*
2  SPDX-FileCopyrightText: 2021 Valentin Boettcher <hiro at protagon.space; @hiro98:tchncs.de>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 /**
8  * Some glue code to import `_Internet_Resolved` and
9  * `_Manual_Additions` into the new DSO database.
10  */
11 
12 #pragma once
13 
14 #include <utility>
15 #include <QString>
16 #include <QSqlDatabase>
17 #include <QStandardPaths>
18 #include <QFileInfo>
19 #include "kspaths.h"
20 #include "catalogsdb.h"
21 
23 {
24 /**
25  * Get the skycomponent database from the specified path.
26  *
27  * \returns wether the database could be found and read and the
28  * database itself.
29  */
30 std::pair<bool, QSqlDatabase> get_skycomp_db(const QString &path);
31 
32 /**
33  * Get the skycomponent database from the standard path.
34  *
35  * \returns wether the database could be found and read and the
36  * database itself.
37  */
38 std::pair<bool, QSqlDatabase> get_skycomp_db();
39 
40 /**
41  * \returns wether the operation succeeded, an error message and if it
42  * was successful the objects from the catalogs with \p ids.
43  */
44 std::tuple<bool, QString, CatalogsDB::CatalogObjectVector>
45 get_objects(QSqlDatabase db, const std::list<int> &ids = { 1, 2 });
46 
47 } // namespace SkyComponentsImport
std::tuple< bool, QString, CatalogsDB::CatalogObjectVector > get_objects(QSqlDatabase db, const std::list< int > &ids={ 1, 2 })
Some glue code to import _Internet_Resolved and _Manual_Additions into the new DSO database.
std::pair< bool, QSqlDatabase > get_skycomp_db(const QString &path)
Get the skycomponent database from the specified path.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:54 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.