Sayonara Player
GUI_LevelPainter.h
1 /* GUI_LevelPainter.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 GUI_LEVELPAINTER_H
22 #define GUI_LEVELPAINTER_H
23 
24 #include "EnginePlugin.h"
25 #include "Components/Engine/Playback/SoundOutReceiver.h"
26 
27 namespace Ui { class GUI_LevelPainter; }
28 
30  public EnginePlugin,
31  public LevelReceiver
32 {
33  Q_OBJECT
34 
35 public:
36  explicit GUI_LevelPainter(QWidget *parent=nullptr);
37  virtual ~GUI_LevelPainter();
38 
39  QString get_name() const override;
40  QString get_display_name() const override;
41 
42 
43 public slots:
44  void sl_update_style() override;
45 
46 
47 protected:
48  void paintEvent(QPaintEvent* e) override;
49  void showEvent(QShowEvent*) override;
50  void closeEvent(QCloseEvent*) override;
51  void init_ui() override;
52  void retranslate_ui() override;
53 
54 
55 protected slots:
56  void timed_out() override;
57  void set_level(float, float) override;
58 
59 
60 private:
61 
62  Ui::GUI_LevelPainter* ui=nullptr;
63 
64  float _level[2];
65  float _exp_lot[600];
66 
67  int** _steps=nullptr;
68 
69  void resize_steps(int n_rects);
70  void reload();
71 };
72 
73 #endif // GUI_LEVELPAINTER_H
Definition: ui_GUI_LevelPainter.h:58
Definition: GUI_SomaFM.h:34
The LevelReceiver class.
Definition: SoundOutReceiver.h:30
Definition: GUI_LevelPainter.h:29
Definition: EnginePlugin.h:34