Kstars

exporteyepieceview.h
1/*
2 SPDX-FileCopyrightText: 2016 Akarsh Simha <akarsh.simha@kdemail.net>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kstarsdatetime.h"
10
11#include <QDialog>
12#include <QImage>
13
14#include <memory>
15
16class QComboBox;
17class QLabel;
18class QPixmap;
19
20class SkyPoint;
21
22/**
23 * @class ExportEyepieceView
24 * @short Dialog to export the eyepiece view as an image, with some annotations for field-use
25 *
26 * @author Akarsh Simha <akarsh@kde.org>
27 */
29{
31
32 public:
33 /**
34 * @short Constructor
35 * @note Class self-destructs (commits suicide). Invoke and forget.
36 */
38 const QPixmap *renderChart, QWidget *parent = nullptr);
39
40 public slots:
41
42 /** Change the tick overlay scheme */
44
45 /** Save the image (export), and then close the dialog by calling slotCloseDialog() */
46 void slotSaveImage();
47
48 /** Closes the dialog, and sets up deleteLater() so that the dialog is destructed. */
49 void slotCloseDialog();
50
51 private slots:
52
53 /** Render the output */
54 void render();
55
56 private:
57 QLabel *m_outputDisplay { nullptr };
58 QLabel *m_tickWarningLabel { nullptr };
59 QComboBox *m_tickConfigCombo { nullptr };
60
61 KStarsDateTime m_dt;
62 std::unique_ptr<SkyPoint> m_sp;
63 std::unique_ptr<QPixmap> m_renderImage;
64 std::unique_ptr<QPixmap> m_renderChart;
65 QImage m_output;
66 int m_tickConfig { 0 };
67};
Dialog to export the eyepiece view as an image, with some annotations for field-use.
ExportEyepieceView(const SkyPoint *_sp, const KStarsDateTime &dt, const QPixmap *renderImage, const QPixmap *renderChart, QWidget *parent=nullptr)
Constructor.
void slotOverlayTicks(int overlayType)
Change the tick overlay scheme.
void slotSaveImage()
Save the image (export), and then close the dialog by calling slotCloseDialog()
void slotCloseDialog()
Closes the dialog, and sets up deleteLater() so that the dialog is destructed.
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
The sky coordinates of a point in the sky.
Definition skypoint.h:45
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:55:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.