]> git.sesse.net Git - kdenlive/blob - src/scopes/colorscopes/histogram.h
19b86da2011838ebacc9424e74c50bd115180436
[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 class Histogram : public AbstractGfxScopeWidget {
20     Q_OBJECT
21
22 public:
23     Histogram(MonitorManager *manager, QWidget *parent = 0);
24     ~Histogram();
25     QString widgetName() const;
26
27 protected:
28     virtual void readConfig();
29     void writeConfig();
30
31 private:
32     HistogramGenerator *m_histogramGenerator;
33     QAction *m_aUnscaled;
34     QAction *m_aRec601;
35     QAction *m_aRec709;
36     QActionGroup *m_agRec;
37
38     QRect scopeRect();
39     bool isHUDDependingOnInput() const;
40     bool isScopeDependingOnInput() const;
41     bool isBackgroundDependingOnInput() const;
42     QImage renderHUD(uint accelerationFactor);
43     QImage renderGfxScope(uint accelerationFactor, const QImage);
44     QImage renderBackground(uint accelerationFactor);
45     Ui::Histogram_UI *ui;
46
47 };
48
49 #endif // HISTOGRAM_H