-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflowwave.h
62 lines (49 loc) · 1.9 KB
/
flowwave.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/***************************************************************************
* This file is part of the TTK qmmp plugin project
* Copyright (C) 2015 - 2025 Greedysky Studio
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; If not, see <http://www.gnu.org/licenses/>.
***************************************************************************/
#ifndef FLOWWAVE_H
#define FLOWWAVE_H
#include <qmmp/visual.h>
/*!
* @author Greedysky <greedysky@163.com>
*/
class FlowWave : public Visual
{
Q_OBJECT
public:
explicit FlowWave(QWidget *parent = nullptr);
virtual ~FlowWave();
public slots:
virtual void start() override final;
virtual void stop() override final;
private slots:
void updateVisual();
void setFullScreen(bool yes);
private:
virtual void hideEvent(QHideEvent *e) override final;
virtual void showEvent(QShowEvent *e) override final;
virtual void paintEvent(QPaintEvent *e) override final;
virtual void contextMenuEvent(QContextMenuEvent *e) override final;
void process(float *left, float *right);
int *m_xscale = nullptr;
double m_analyzerSize = 2.2;
QSize m_cellSize = QSize(15, 6);
QTimer *m_timer = nullptr;
int m_rows = 0, m_cols = 0;
int *m_intern_vis_data = nullptr;
float m_left[QMMP_VISUAL_NODE_SIZE];
float m_right[QMMP_VISUAL_NODE_SIZE];
QAction *m_screenAction = nullptr;
};
#endif