Kstars

pwizfovconfig.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#ifndef PWIZFOVCONFIG_H
8#define PWIZFOVCONFIG_H
9
10#include "ui_pwizfovconfig.h"
11#include "legend.h"
12
13/**
14 * \class PWizFovConfigUI
15 * \brief User interface for "Configure common FOV export options" step of the Printing Wizard.
16 * \author Rafał Kułaga
17 */
18class PWizFovConfigUI : public QFrame, public Ui::PWizFovConfig
19{
21 public:
22 /**
23 * \brief Constructor.
24 */
25 explicit PWizFovConfigUI(QWidget *parent = nullptr);
26
27 /**
28 * \brief Check if switching to "Sky Chart" color scheme is enabled.
29 * \return True if color scheme switching is enabled.
30 */
31 bool isSwitchColorsEnabled() { return switchColorsBox->isChecked(); }
32
33 /**
34 * \brief Check if FOV shape is always rectangular.
35 * \return True if FOV shape is always rectangular.
36 */
37 bool isFovShapeOverriden() { return overrideShapeBox->isChecked(); }
38
39 /**
40 * \brief Check if legend will be added to FOV images.
41 * \return True if legend will be added to FOV images.
42 */
43 bool isLegendEnabled() { return addLegendBox->isChecked(); }
44
45 /**
46 * \brief Check if alpha blending is enabled.
47 * \return True if alpha blending is enabled.
48 */
49 bool isAlphaBlendingEnabled() { return useAlphaBlendBox->isChecked(); }
50
51 /**
52 * \brief Get selected legend type.
53 * \return Selected legend type.
54 */
55 Legend::LEGEND_TYPE getLegendType();
56
57 /**
58 * \brief Get selected legend orientation.
59 * \return Selected legend orientation.
60 */
61 Legend::LEGEND_ORIENTATION getLegendOrientation()
62 {
63 return static_cast<Legend::LEGEND_ORIENTATION>(orientationCombo->currentIndex());
64 }
65
66 /**
67 * \brief Get selected legend position.
68 * \return Selected legend position.
69 */
70 Legend::LEGEND_POSITION getLegendPosition()
71 {
72 return static_cast<Legend::LEGEND_POSITION>(positionCombo->currentIndex());
73 }
74
75 private slots:
76 /**
77 * \brief Slot: enable or disable legend configuration fields.
78 * \param enabled True if legend configuration fields should be enabled.
79 */
80 void slotUpdateLegendFields(bool enabled);
81
82 private:
83 /**
84 * \brief Configure widgets.
85 */
86 void setupWidgets();
87
88 /**
89 * \brief Configure signal-slot connections.
90 */
91 void setupConnections();
92};
93
94#endif // PWIZFOVCONFIG_H
User interface for "Configure common FOV export options" step of the Printing Wizard.
bool isLegendEnabled()
Check if legend will be added to FOV images.
bool isAlphaBlendingEnabled()
Check if alpha blending is enabled.
bool isFovShapeOverriden()
Check if FOV shape is always rectangular.
Legend::LEGEND_POSITION getLegendPosition()
Get selected legend position.
Legend::LEGEND_TYPE getLegendType()
Get selected legend type.
Legend::LEGEND_ORIENTATION getLegendOrientation()
Get selected legend orientation.
bool isSwitchColorsEnabled()
Check if switching to "Sky Chart" color scheme is enabled.
PWizFovConfigUI(QWidget *parent=nullptr)
Constructor.
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 4 2024 16:38:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.