File indexing completed on 2023-11-26 04:48:46
0001 /* 0002 SPDX-FileCopyrightText: 2016 Jean-Baptiste Mardelle <jb@kdenlive.org> 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 <QCheckBox> 0011 0012 #include "definitions.h" 0013 0014 class QScrollArea; 0015 class QToolButton; 0016 0017 class ElidedCheckBox : public QCheckBox 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit ElidedCheckBox(QWidget *parent = nullptr); 0023 void setBoxText(const QString &text); 0024 void updateText(int width); 0025 int currentWidth() const; 0026 0027 private: 0028 QString m_text; 0029 0030 protected: 0031 void resizeEvent(QResizeEvent *event) override; 0032 }; 0033 0034 class EffectSettings : public QWidget 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 explicit EffectSettings(QWidget *parent = nullptr); 0040 0041 ElidedCheckBox *checkAll; 0042 QScrollArea *container; 0043 void updatePalette(); 0044 void setLabel(const QString &label, const QString &tooltip = QString()); 0045 void updateCheckState(int state); 0046 QToolButton *effectCompare; 0047 0048 protected: 0049 void resizeEvent(QResizeEvent *event) override; 0050 };