CFEL - ASG Software Suite  2.5.0
CASS
minmax_control.h
Go to the documentation of this file.
1 // Copyright (C) 2013 Lutz Foucar
2 
3 /**
4  * @file minmax_control.h contains a control over min and max values
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _MINMAXCONTROL_
10 #define _MINMAXCONTROL_
11 
12 #include <QtCore/QString>
13 
14 #if QT_VERSION >= 0x050000
15 #include <QtWidgets/QWidget>
16 #else
17 #include <QtGui/QWidget>
18 #endif
19 
20 class QCheckBox;
21 class QToolButton;
22 class QLineEdit;
23 class QToolBar;
24 
25 namespace jocassview
26 {
27 
28 /** widget to control the min and max values
29  *
30  * @author Lutz Foucar
31  */
32 class MinMaxControl : public QWidget
33 {
34  Q_OBJECT
35 public:
36  /** constructor
37  *
38  * @param title the title of the widget
39  * @param parent the parent of this
40  */
41  MinMaxControl(QString title, QToolBar *parent);
42 
43  /** return whether the plot should be autoscaled
44  *
45  * @return true when plot should be autoscaled
46  */
47  bool autoscale() const;
48 
49  /** return wether log is enabled
50  *
51  * @return true when log is enabled
52  */
53  bool log() const;
54 
55  /** retrieve the minimum value
56  *
57  * @return the minimum value
58  */
59  double min() const;
60 
61  /** retieve the maximum value
62  *
63  * @return the maximum value
64  */
65  double max() const;
66 
67 private slots:
68  /** react on when one of the inputs changed
69  *
70  * details
71  */
72  void on_changed();
73 
74 signals:
75  /** signal is emitted when one of the controls have changed */
76  void controls_changed();
77 
78 private:
79  /** select manual input */
81 
82  /** select manual input */
84 
85  /** the minimum value input */
87 
88  /** the maximum value input */
90 };
91 }//end namespace jocassview
92 #endif
QLineEdit * _mininput
the minimum value input
void on_changed()
react on when one of the inputs changed
QToolButton * _auto
select manual input
bool log() const
return wether log is enabled
widget to control the min and max values
MinMaxControl(QString title, QToolBar *parent)
constructor
bool autoscale() const
return whether the plot should be autoscaled
QToolButton * _log
select manual input
void controls_changed()
signal is emitted when one of the controls have changed
double max() const
retieve the maximum value
QLineEdit * _maxinput
the maximum value input
double min() const
retrieve the minimum value