Kstars

exportimagedialog.h
1/*
2 SPDX-FileCopyrightText: 2011 Rafał Kułaga <rl.kulaga@gmail.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "ui_exportimagedialog.h"
10
11#include "../printing/legend.h"
12
13#include <QDialog>
14
15class KStars;
16class QString;
17class QSize;
18class ImageExporter;
19
20// ExportImageDialog user interface.
21class ExportImageDialogUI : public QFrame, public Ui::ExportImageDialog
22{
24
25 public:
26 explicit ExportImageDialogUI(QWidget *parent = nullptr);
27};
28
29/** @short Export sky image dialog. This dialog enables user to set up basic legend
30 properties before image is exported.
31 */
33{
35
36 public:
37 /**short Default constructor. Creates dialog operating on passed URL and
38 output image width and height.
39 *@param url URL for exported image.
40 *@param size size of exported image.
41 *@param imgExporter A pointer to an ImageExporter that we can use instead of creating our own. if 0, we will create our own.
42 */
43 ExportImageDialog(const QString &url, const QSize &size, ImageExporter *imgExporter = nullptr);
44
45 ~ExportImageDialog() override = default;
46
47 inline void setOutputUrl(const QString &url) { m_Url = url; }
48 inline void setOutputSize(const QSize &size) { m_Size = size; }
49
50 private slots:
51 void switchLegendEnabled(bool enabled);
52 void previewImage();
53 void exportImage();
54
55 void setupWidgets();
56 void updateLegendSettings();
57
58 private:
59 KStars *m_KStars;
60 ExportImageDialogUI *m_DialogUI;
61 QString m_Url;
62 QSize m_Size;
63 ImageExporter *m_ImageExporter;
64};
Export sky image dialog.
ExportImageDialog(const QString &url, const QSize &size, ImageExporter *imgExporter=nullptr)
short Default constructor.
Backends for exporting a sky image, either raster or vector, with a legend.
This is the main window for KStars.
Definition kstars.h:89
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.