]> git.sesse.net Git - kdenlive/blob - src/waveform.h
Abstract scope class AbstractScopeWidget added.
[kdenlive] / src / 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 "abstractscopewidget.h"
15
16 #include "ui_waveform_ui.h"
17
18 class Waveform_UI;
19 class WaveformGenerator;
20
21 class Waveform : public AbstractScopeWidget {
22     Q_OBJECT
23
24 public:
25     Waveform(Monitor *projMonitor, Monitor *clipMonitor, QWidget *parent = 0);
26     ~Waveform();
27
28     virtual QString widgetName() const;
29
30 protected:
31     void paintEvent(QPaintEvent *);
32 //    void resizeEvent(QResizeEvent *);
33 //    void mouseReleaseEvent(QMouseEvent *);
34
35 private:
36     Ui::Waveform_UI *ui;
37
38     WaveformGenerator *m_waveformGenerator;
39
40     bool initialDimensionUpdateDone;
41
42     QImage m_waveform;
43
44     /// Implemented methods ///
45     QRect scopeRect();
46     QImage renderHUD();
47     QImage renderScope();
48     QImage renderBackground();
49
50 private slots:
51     void slotRenderZoneUpdated();
52     void slotWaveformCalculated(QImage waveform, const uint &msec);
53
54 };
55
56 #endif // WAVEFORM_H