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/Helper/SayonaraWidget/SayonaraSlider.h"
25 #include <QLabel>
30 class EqSlider :
31  public SayonaraSlider
32 {
33  Q_OBJECT
34 
35  signals:
36  void sig_value_changed(int idx, int val);
37 
38  public:
39  explicit EqSlider(QWidget* parent);
40  virtual ~EqSlider() {}
41 
47  void setData(int idx, QLabel* label);
48 
53  QLabel* getLabel() const;
54 
59  int getIndex() const;
60 
65  double get_eq_value() const;
66 
67 
68  protected:
69  void sliderChange(SliderChange change) override;
70  void keyPressEvent(QKeyEvent* e) override;
71 
72  private:
73  QLabel* _label=nullptr;
74  int _idx;
75 };
76 
77 #endif // EQSLIDER_H
The EqSlider class.
Definition: EqSlider.h:30
double get_eq_value() const
get the gstreamer compatible value
void setData(int idx, QLabel *label)
sets everything the slider has to be aware about
The SayonaraSlider class.
Definition: SayonaraSlider.h:30
int getIndex() const
get the index of the slider
QLabel * getLabel() const
get the value label