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 "utils/colortools.h"
0011 #include "ui_colorplaneexport_ui.h"
0012 #include <QDialog>
0013 
0014 class ColorPlaneExport_UI;
0015 
0016 /** @class ColorPlaneExport
0017     @brief Exports color planes (e.g. YUV-UV-planes) to a file.
0018     Basically just for fun, but also for comparing color models.
0019  */
0020 class ColorPlaneExport : public QDialog, public Ui::ColorPlaneExport_UI
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit ColorPlaneExport(QWidget *parent = nullptr);
0025     ~ColorPlaneExport() override;
0026 
0027     enum COLOR_EXPORT_MODE { CPE_YUV, CPE_YUV_Y, CPE_YUV_MOD, CPE_RGB_CURVE, CPE_YPbPr, CPE_HSV_HUESHIFT, CPE_HSV_SATURATION };
0028 
0029 private:
0030     ColorTools *m_colorTools;
0031     float m_scaling;
0032     void enableSliderScaling(bool enable);
0033     void enableSliderColor(bool enable);
0034     void enableCbVariant(bool enable);
0035 
0036 private Q_SLOTS:
0037     void slotValidate();
0038     void slotExportPlane();
0039     void slotColormodeChanged();
0040     void slotUpdateDisplays();
0041 };