/* This file is part of Clementine. Copyright 2004, Adam Pigg Copyright 2009, David Sansome Copyright 2014, Krzysztof Sobiecki Copyright 2014, John Maguire Clementine 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. Clementine 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 Clementine. If not, see . */ /* Original Author: Adam Pigg 2004 */ #ifndef ANALYZERS_GLANALYZER_H_ #define ANALYZERS_GLANALYZER_H_ #include #ifdef HAVE_QGLWIDGET #include "analyzerbase.h" typedef struct { float level; uint delay; } peak_tx; class GLAnalyzer : public Analyzer::Base3D { private: std::vector m_oldy; std::vector m_peaks; void drawCube(); void drawFrame(); void drawBar(float xPos, float height); void drawPeak(float xPos, float ypos); void drawFloor(); GLfloat x, y; public: explicit GLAnalyzer(QWidget*); ~GLAnalyzer(); void analyze(const Scope&); protected: void initializeGL(); void resizeGL(int w, int h); void paintGL(); }; #endif #endif // ANALYZERS_GLANALYZER_H_