File indexing completed on 2024-04-28 04:52:23
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 0012 #include "ui_waveform_ui.h" 0013 0014 class Waveform_UI; 0015 class WaveformGenerator; 0016 0017 /** 0018 * @brief Displays the waveform of a frame. 0019 * 0020 * For further explanations of the waveform see the WaveformGenerator class. 0021 */ 0022 class Waveform : public AbstractGfxScopeWidget 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit Waveform(QWidget *parent = nullptr); 0028 ~Waveform() override; 0029 0030 QString widgetName() const override; 0031 0032 protected: 0033 void readConfig() override; 0034 void writeConfig(); 0035 0036 private: 0037 Ui::Waveform_UI *m_ui{nullptr}; 0038 WaveformGenerator *m_waveformGenerator; 0039 0040 QAction *m_aRec601; 0041 QAction *m_aRec709; 0042 QActionGroup *m_agRec; 0043 0044 static const QSize m_textWidth; 0045 static const int m_paddingBottom; 0046 0047 QImage m_waveform; 0048 0049 /// Implemented methods /// 0050 QRect scopeRect() override; 0051 QImage renderHUD(uint) override; 0052 QImage renderGfxScope(uint, const QImage &) override; 0053 QImage renderBackground(uint) override; 0054 bool isHUDDependingOnInput() const override; 0055 bool isScopeDependingOnInput() const override; 0056 bool isBackgroundDependingOnInput() const override; 0057 };