]> git.sesse.net Git - kdenlive/blob - src/scopes/colorscopes/histogram.h
Fix includes
[kdenlive] / src / scopes / colorscopes / histogram.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 HISTOGRAM_H
12 #define HISTOGRAM_H
13
14 #include "abstractgfxscopewidget.h"
15 #include "ui_histogram_ui.h"
16
17 class HistogramGenerator;
18
19 /**
20  *  \brief Displays the histogram of frames.
21  */
22 class Histogram : public AbstractGfxScopeWidget {
23     Q_OBJECT
24
25 public:
26     explicit Histogram(QWidget *parent = 0);
27     ~Histogram();
28     QString widgetName() const;
29
30 protected:
31     virtual void readConfig();
32     void writeConfig();
33
34 private:
35     HistogramGenerator *m_histogramGenerator;
36     QAction *m_aUnscaled;
37     QAction *m_aRec601;
38     QAction *m_aRec709;
39     QActionGroup *m_agRec;
40
41     QRect scopeRect();
42     bool isHUDDependingOnInput() const;
43     bool isScopeDependingOnInput() const;
44     bool isBackgroundDependingOnInput() const;
45     QImage renderHUD(uint accelerationFactor);
46     QImage renderGfxScope(uint accelerationFactor, const QImage &);
47     QImage renderBackground(uint accelerationFactor);
48     Ui::Histogram_UI *ui;
49
50 };
51
52 #endif // HISTOGRAM_H