]> git.sesse.net Git - kdenlive/blob - src/colorscopes/waveform.h
Complete rewrite of the video4linux capture to use MLT, in progress.
[kdenlive] / src / 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 class Waveform : public AbstractGfxScopeWidget {
22     Q_OBJECT
23
24 public:
25     Waveform(MonitorManager *manager, QWidget *parent = 0);
26     ~Waveform();
27
28     virtual QString widgetName() const;
29
30 protected:
31     virtual void readConfig();
32     void writeConfig();
33
34 private:
35     Ui::Waveform_UI *ui;
36     WaveformGenerator *m_waveformGenerator;
37
38     QAction *m_aRec601;
39     QAction *m_aRec709;
40     QActionGroup *m_agRec;
41
42     static const QSize m_textWidth;
43     static const int m_paddingBottom;
44
45     QImage m_waveform;
46
47     /// Implemented methods ///
48     QRect scopeRect();
49     QImage renderHUD(uint);
50     QImage renderGfxScope(uint, const QImage);
51     QImage renderBackground(uint);
52     bool isHUDDependingOnInput() const;
53     bool isScopeDependingOnInput() const;
54     bool isBackgroundDependingOnInput() const;
55
56 };
57
58 #endif // WAVEFORM_H