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 */
30std::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 */
38std::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 */
44std::tuple<bool, QString, CatalogsDB::CatalogObjectVector>
45get_objects(QSqlDatabase db, const std::list<int> &ids = { 1, 2 });
46
47} // namespace SkyComponentsImport
Some glue code to import _Internet_Resolved and _Manual_Additions into the new DSO database.
std::pair< bool, QSqlDatabase > get_skycomp_db()
Get the skycomponent database from the standard path.
std::tuple< bool, QString, CatalogsDB::CatalogObjectVector > get_objects(QSqlDatabase db, const std::list< int > &ids={ 1, 2 })
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.