1 /* This file is part of Clementine.
2    Copyright 2004, Melchior FRANZ <mfranz@kde.org>
3    Copyright 2009-2010, David Sansome <davidsansome@gmail.com>
4    Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
5    Copyright 2014, John Maguire <john.maguire@gmail.com>
6    Copyright 2015, Mark Furneaux <mark@furneaux.ca>
7 
8    Clementine is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    Clementine is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with Clementine.  If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 /* Original Author:  Melchior FRANZ  <mfranz@kde.org>  2004
23  */
24 
25 #ifndef ANALYZERS_SONOGRAM_H_
26 #define ANALYZERS_SONOGRAM_H_
27 
28 #include "analyzerbase.h"
29 
30 class Sonogram : public Analyzer::Base {
31   Q_OBJECT
32  public:
33   Q_INVOKABLE Sonogram(QWidget*);
34   ~Sonogram();
35 
36   static const char* kName;
37 
38  protected:
39   void analyze(QPainter& p, const Analyzer::Scope&, bool new_frame);
40   void transform(Analyzer::Scope&);
41   void demo(QPainter& p);
42   void resizeEvent(QResizeEvent*);
43   void psychedelicModeChanged(bool);
44 
45   QPixmap canvas_;
46   int scope_size_;
47 };
48 
49 #endif  // ANALYZERS_SONOGRAM_H_
50