Sayonara Player
EqSlider.h
1 /* EqSlider.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef EQSLIDER_H
22 #define EQSLIDER_H
23 
24 #include "GUI/Utils/Widgets/Slider.h"
25 #include "Utils/Pimpl.h"
26 
27 class QLabel;
28 
33 class EqSlider :
34  public Gui::Slider
35 {
36  Q_OBJECT
37  PIMPL(EqSlider)
38 
39  signals:
40  void sig_value_changed(int idx, int val);
41 
42  public:
43  explicit EqSlider(QWidget* parent);
44  virtual ~EqSlider();
45 
51  void set_label(int idx, QLabel* label);
52 
57  QLabel* label() const;
58 
63  int index() const;
64 
69  double eq_value() const;
70 
71  QSize minimumSizeHint() const override;
72 
73  private slots:
74  void set_zero();
75 
76 
77  protected:
78  void sliderChange(SliderChange change) override;
79 };
80 
81 #endif // EQSLIDER_H
The EqSlider class.
Definition: EqSlider.h:33
void set_label(int idx, QLabel *label)
sets everything the slider has to be aware about
double eq_value() const
get the gstreamer compatible value
QLabel * label() const
get the value label
int index() const
get the index of the slider
The Slider class.
Definition: Slider.h:32