Kstars

catalogeditform.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#pragma once
8
9#include <QDialog>
10#include "catalogsdb.h"
11
12namespace Ui
13{
14class CatalogEditForm;
15}
16
17/**
18 * A simple data entry form for creating/editing catalog meta
19 * information.
20 *
21 * As this is intended to be used for custom catalogs only, the
22 * minimum for the catalog `id` is set to
23 * `CatalogsDB::custom_cat_min_id`.
24 */
26{
28
29 public:
30 explicit CatalogEditForm(QWidget *parent, const CatalogsDB::Catalog &catalog,
31 const int min_id = CatalogsDB::custom_cat_min_id,
32 const bool allow_id_edit = true);
34
35 /**
36 * Get the result of the catalog edit.
37 */
38 CatalogsDB::Catalog getCatalog() { return m_catalog; };
39
40 private:
41 Ui::CatalogEditForm *ui;
42 CatalogsDB::Catalog m_catalog;
43
44 /**
45 * Fills the form fields with the given catalog information.
46 */
47 void fill_form_from_catalog();
48};
A simple data entry form for creating/editing catalog meta information.
CatalogsDB::Catalog getCatalog()
Get the result of the catalog edit.
Q_OBJECTQ_OBJECT
QObject * parent() const const
A simple struct to hold information about catalogs.
Definition catalogsdb.h:37
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

KDE's Doxygen guidelines are available online.