Kstars

exporteyepieceview.h
1 /*
2  SPDX-FileCopyrightText: 2016 Akarsh Simha <[email protected]>
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 
16 class QComboBox;
17 class QLabel;
18 class QPixmap;
19 
20 class 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 <[email protected]>
27  */
29 {
30  Q_OBJECT;
31 
32  public:
33  /**
34  * @short Constructor
35  * @note Class self-destructs (commits suicide). Invoke and forget.
36  */
37  ExportEyepieceView(const SkyPoint *_sp, const KStarsDateTime &dt, const QPixmap *renderImage,
38  const QPixmap *renderChart, QWidget *parent = nullptr);
39 
40  public slots:
41 
42  /** Change the tick overlay scheme */
43  void slotOverlayTicks(int overlayType);
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 };
Q_OBJECTQ_OBJECT
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
void slotCloseDialog()
Closes the dialog, and sets up deleteLater() so that the dialog is destructed.
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 slotSaveImage()
Save the image (export), and then close the dialog by calling slotCloseDialog()
void slotOverlayTicks(int overlayType)
Change the tick overlay scheme.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 29 2023 03:56:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.