Stellarium 0.15.2
StelDialog_p.hpp
Go to the documentation of this file.
1 /*
2  * Stellarium
3  * Copyright (C) 2016 Florian Schaukowitsch
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18 */
19 
23 
24 #ifndef _STELDIALOG_P_HPP_
25 #define _STELDIALOG_P_HPP_
26 
27 #include "StelPropertyMgr.hpp"
28 #include <QAbstractButton>
29 #include <QComboBox>
30 #include <QSpinBox>
31 #include <QDoubleSpinBox>
32 #include <QSlider>
33 
38 {
39  Q_OBJECT
40 public:
42 
43 protected slots:
44  virtual void onPropertyChanged(const QVariant& value) Q_DECL_OVERRIDE;
45 private:
46  QAbstractButton* button;
47 };
48 
53 {
54  Q_OBJECT
55 public:
57 
58 protected slots:
59  virtual void onPropertyChanged(const QVariant& value) Q_DECL_OVERRIDE;
60 private:
61  QComboBox* combo;
62 };
63 
64 
69 {
70  Q_OBJECT
71 public:
73 
74 protected slots:
75  virtual void onPropertyChanged(const QVariant& value) Q_DECL_OVERRIDE;
76 private:
77  QSpinBox* spin;
78 };
79 
80 
85 {
86  Q_OBJECT
87 public:
89 
90 protected slots:
91  virtual void onPropertyChanged(const QVariant& value) Q_DECL_OVERRIDE;
92 private:
93  QDoubleSpinBox* spin;
94 };
95 
97 {
98  Q_OBJECT
99 public:
100  QSliderStelPropertyConnectionHelper(StelProperty* prop, double minValue, double maxValue, QSlider* slider);
101  QSliderStelPropertyConnectionHelper(StelProperty* prop, int minValue, int maxValue, QSlider* slider);
102 protected slots:
103  virtual void onPropertyChanged(const QVariant& value) Q_DECL_OVERRIDE;
104 private slots:
105  void sliderIntValueChanged(int val);
106 private:
107  QSlider* slider;
108  double minValue, maxValue,dRange;
109 };
110 
111 #endif // _STELDIALOG_P_HPP_
Wrapper around a Q_PROPERTY (see the Qt property system for more information) of a specific object...
StelProperty * prop
The connected property, set by the constructor.
A StelPropertyProxy that works with QComboBox widgets.
A StelPropertyProxy that works with QAbstractButton widgets.
Abstract base class for a StelProperty proxy implementation, which allow reacting to the StelProperty...
A StelPropertyProxy that works with QDoubleSpinBox widgets.
A StelPropertyProxy that works with QSpinBox widgets.