Kstars

addcatdialog.h
1/*
2 SPDX-FileCopyrightText: 2002 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_addcatdialog.h"
10
11class AddCatDialogUI : public QFrame, public Ui::AddCatDialog
12{
14
15 public:
16 explicit AddCatDialogUI(QWidget *parent = nullptr);
17};
18
19/**
20 * @class AddCatDialog
21 * @short Dialog for adding custom object catalogs to KStars
22 *
23 * @author Jason Harris
24 * @version 1.0
25 */
26class AddCatDialog : public QDialog
27{
29
30 public:
31 explicit AddCatDialog(QWidget *parent);
32
33 /** @return the name for the custom catalog. */
34 QString name() const { return acd->CatalogName->text(); }
35
36 /** @return the filename of the custom catalog. */
37 QString filename() const { return acd->CatalogURL->url().toLocalFile(); }
38
39 private slots:
40 /** Display contents of the import file. */
41 void slotShowDataFile();
42
43 /** Create the object catalog file, populate the objectList, and close the dialog. */
44 void slotCreateCatalog();
45
46 /** Preview the catalog file as constructed by the current parameters */
47 void slotPreviewCatalog();
48
49 /** Overridden from QDialog to show short help in a dialog rather than launch KHelpCenter. */
50 void slotHelp();
51
52 private:
53 /**
54 * Attempt to parse the user's data file according to the fields
55 * specified in the Catalog fields list.
56 */
57 bool validateDataFile();
58
59 /**
60 * Write a header line describing the data fields in the catalog, and
61 * defining the catalog name, ID prefix, and coordinate epoch.
62 */
63 QString writeCatalogHeader();
64
65 AddCatDialogUI *acd { nullptr };
66 QString CatalogContents;
67};
Dialog for adding custom object catalogs to KStars.
QString name() const
QString filename() const
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.