File indexing completed on 2024-04-28 04:52:22

0001 /*
0002     SPDX-FileCopyrightText: 2010 Simon Andreas Eugster <simon.eu@gmail.com>
0003     This file is part of kdenlive. See www.kdenlive.org.
0004 
0005 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006 */
0007 
0008 #pragma once
0009 
0010 #include "abstractgfxscopewidget.h"
0011 #include "ui_histogram_ui.h"
0012 
0013 class HistogramGenerator;
0014 
0015 /**
0016  *  @brief Displays the histogram of frames.
0017  */
0018 class Histogram : public AbstractGfxScopeWidget
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit Histogram(QWidget *parent = nullptr);
0024     ~Histogram() override;
0025     QString widgetName() const override;
0026 
0027 protected:
0028     void readConfig() override;
0029     void writeConfig();
0030 
0031 private:
0032     HistogramGenerator *m_histogramGenerator;
0033     QAction *m_aUnscaled;
0034     QAction *m_aRec601;
0035     QAction *m_aRec709;
0036     QActionGroup *m_agRec;
0037 
0038     QRect scopeRect() override;
0039     bool isHUDDependingOnInput() const override;
0040     bool isScopeDependingOnInput() const override;
0041     bool isBackgroundDependingOnInput() const override;
0042     QImage renderHUD(uint accelerationFactor) override;
0043     QImage renderGfxScope(uint accelerationFactor, const QImage &) override;
0044     QImage renderBackground(uint accelerationFactor) override;
0045     Ui::Histogram_UI *m_ui;
0046 };