]> git.sesse.net Git - kdenlive/blob - src/scopes/colorscopes/waveform.h
Add explicit keyword, const'ref, minor optimization
[kdenlive] / src / scopes / colorscopes / waveform.h
1 /***************************************************************************
2  *   Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com)      *
3  *   This file is part of kdenlive. See www.kdenlive.org.                  *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  ***************************************************************************/
10
11 #ifndef WAVEFORM_H
12 #define WAVEFORM_H
13
14 #include "abstractgfxscopewidget.h"
15
16 #include "ui_waveform_ui.h"
17
18 class Waveform_UI;
19 class WaveformGenerator;
20
21 /**
22   \brief Displays the waveform of a frame.
23
24    For further explanations of the waveform see the WaveformGenerator class.
25 */
26 class Waveform : public AbstractGfxScopeWidget {
27     Q_OBJECT
28
29 public:
30     explicit Waveform(QWidget *parent = 0);
31     ~Waveform();
32
33     virtual QString widgetName() const;
34
35 protected:
36     virtual void readConfig();
37     void writeConfig();
38
39 private:
40     Ui::Waveform_UI *ui;
41     WaveformGenerator *m_waveformGenerator;
42
43     QAction *m_aRec601;
44     QAction *m_aRec709;
45     QActionGroup *m_agRec;
46
47     static const QSize m_textWidth;
48     static const int m_paddingBottom;
49
50     QImage m_waveform;
51
52     /// Implemented methods ///
53     QRect scopeRect();
54     QImage renderHUD(uint);
55     QImage renderGfxScope(uint, const QImage);
56     QImage renderBackground(uint);
57     bool isHUDDependingOnInput() const;
58     bool isScopeDependingOnInput() const;
59     bool isBackgroundDependingOnInput() const;
60
61 };
62
63 #endif // WAVEFORM_H