Kstars

pwizfovconfig.h
1 /*
2  SPDX-FileCopyrightText: 2011 Rafał Kułaga <[email protected]>
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  */
18 class PWizFovConfigUI : public QFrame, public Ui::PWizFovConfig
19 {
20  Q_OBJECT
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
Q_OBJECTQ_OBJECT
bool isSwitchColorsEnabled()
Check if switching to "Sky Chart" color scheme is enabled.
Definition: pwizfovconfig.h:31
Legend::LEGEND_ORIENTATION getLegendOrientation()
Get selected legend orientation.
Definition: pwizfovconfig.h:61
bool isFovShapeOverriden()
Check if FOV shape is always rectangular.
Definition: pwizfovconfig.h:37
User interface for "Configure common FOV export options" step of the Printing Wizard.
Definition: pwizfovconfig.h:18
bool isAlphaBlendingEnabled()
Check if alpha blending is enabled.
Definition: pwizfovconfig.h:49
bool isLegendEnabled()
Check if legend will be added to FOV images.
Definition: pwizfovconfig.h:43
PWizFovConfigUI(QWidget *parent=nullptr)
Constructor.
Legend::LEGEND_TYPE getLegendType()
Get selected legend type.
Legend::LEGEND_POSITION getLegendPosition()
Get selected legend position.
Definition: pwizfovconfig.h:70
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:02:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.