diff --git a/ui/zenoui/ColorEditor/ColorEditor.cpp b/ui/zenoui/ColorEditor/ColorEditor.cpp index ac69f1b18e..e9c3fd6cca 100644 --- a/ui/zenoui/ColorEditor/ColorEditor.cpp +++ b/ui/zenoui/ColorEditor/ColorEditor.cpp @@ -107,6 +107,8 @@ ColorWheel::ColorWheel(QWidget* parent) setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); } +ColorWheel::~ColorWheel() = default; + void ColorWheel::setColorCombination(colorcombo::ICombination* combination) { p->colorCombination = combination; @@ -418,6 +420,8 @@ JumpableSlider::JumpableSlider(Qt::Orientation orientation, QWidget* parent) connect(this, &QSlider::valueChanged, this, [this](int value) { emit valueChanged(value * p->singleStep); }); } +JumpableSlider::~JumpableSlider() = default; + void JumpableSlider::setValue(double value) { // need round @@ -559,6 +563,8 @@ GradientSlider::GradientSlider(QWidget* parent) { } +GradientSlider::~GradientSlider() = default; + void GradientSlider::setGradient(const QColor& startColor, const QColor& stopColor) { setGradient({{0, startColor}, {1, stopColor}}); @@ -646,6 +652,8 @@ ColorSpinHSlider::ColorSpinHSlider(const QString& name, QWidget* parent) connect(p->spinbox, &MixedSpinBox::editingFinished, this, [this]() { p->slider->setValue(p->spinbox->value()); }); } +ColorSpinHSlider::~ColorSpinHSlider() = default; + void ColorSpinHSlider::setGradient(const QColor& startColor, const QColor& stopColor) { p->slider->setGradient(startColor, stopColor); @@ -727,6 +735,8 @@ ColorButton::ColorButton(QWidget* parent) connect(this, &QPushButton::clicked, this, [this]() { emit colorClicked(p->color); }); } +ColorButton::~ColorButton() = default; + void ColorButton::setColor(const QColor& color) { p->color = color; @@ -860,6 +870,8 @@ ColorPalette::ColorPalette(int column, QWidget* parent) setAcceptDrops(true); } +ColorPalette::~ColorPalette() = default; + void ColorPalette::addColor(const QColor& color) { int index = p->colors.size(); @@ -996,6 +1008,8 @@ ColorPreview::ColorPreview(const QColor& color, QWidget* parent) connect(p->pbtnCurrent, &ColorButton::colorDroped, this, &ColorPreview::currentColorChanged); } +ColorPreview::~ColorPreview() = default; + void ColorPreview::setCurrentColor(const QColor& color) { p->setCurrent(color); @@ -1069,6 +1083,8 @@ ColorComboWidget::ColorComboWidget(QWidget* parent) }); } +ColorComboWidget::~ColorComboWidget() = default; + void ColorComboWidget::addCombination(colorcombo::ICombination* combo) { p->combs.push(combo); @@ -1234,6 +1250,8 @@ ColorPicker::ColorPicker(QWidget* parent) setCursor(Qt::CrossCursor); } +ColorPicker::~ColorPicker() = default; + QColor ColorPicker::grabScreenColor(QPoint p) const { // not use now, just make screenshot and get color from it @@ -1652,6 +1670,8 @@ ColorEditor::ColorEditor(const QColor& initial, QWidget* parent) p->showInSRGB->setChecked(true); } +ColorEditor::~ColorEditor() = default; + void ColorEditor::setCurrentColor(const QColor& color) { p->blockColorSignals(true); diff --git a/ui/zenoui/ColorEditor/ColorEditor.h b/ui/zenoui/ColorEditor/ColorEditor.h index add4606900..684536f0a3 100644 --- a/ui/zenoui/ColorEditor/ColorEditor.h +++ b/ui/zenoui/ColorEditor/ColorEditor.h @@ -94,6 +94,7 @@ class ColorWheel : public QWidget Q_OBJECT public: explicit ColorWheel(QWidget* parent = nullptr); + ~ColorWheel(); void setColorCombination(colorcombo::ICombination* combination); void setSelectedColor(const QColor& color); @@ -136,6 +137,8 @@ class JumpableSlider : public QSlider public: explicit JumpableSlider(QWidget* parent); explicit JumpableSlider(Qt::Orientation orientation, QWidget* parent = nullptr); + ~JumpableSlider(); + void setValue(double value); void setMinimum(double value); void setMaximum(double value); @@ -167,6 +170,8 @@ class GradientSlider : public JumpableSlider Q_OBJECT public: explicit GradientSlider(QWidget* parent = nullptr); + ~GradientSlider(); + void setGradient(const QColor& startColor, const QColor& stopColor); void setGradient(const QGradientStops& colors); void setColorCorrection(ColorCorrection* colorCorrection); @@ -186,6 +191,8 @@ class ColorSpinHSlider : public QWidget Q_OBJECT public: explicit ColorSpinHSlider(const QString& name, QWidget* parent = nullptr); + ~ColorSpinHSlider(); + void setGradient(const QColor& startColor, const QColor& stopColor); void setGradient(const QGradientStops& colors); void setColorCorrection(ColorCorrection* colorCorrection); @@ -208,6 +215,8 @@ class ColorButton : public QPushButton Q_OBJECT public: explicit ColorButton(QWidget* parent = nullptr); + ~ColorButton(); + void setColor(const QColor& color); void setColorCorrection(ColorCorrection* colorCorrection); void setBolderWidth(int top, int bottom, int left, int right); @@ -235,6 +244,8 @@ class ColorPalette : public QScrollArea Q_OBJECT public: explicit ColorPalette(int column, QWidget* parent = nullptr); + ~ColorPalette(); + void addColor(const QColor& color); void setColor(const QColor& color, int row, int column); void removeColor(int row, int column); @@ -260,6 +271,8 @@ class ColorPreview : public QWidget Q_OBJECT public: explicit ColorPreview(const QColor& color, QWidget* parent = nullptr); + ~ColorPreview(); + void setCurrentColor(const QColor& color); void setColorCorrection(ColorCorrection* colorCorrection); QColor currentColor() const; @@ -279,6 +292,7 @@ class ColorComboWidget : public QWidget Q_OBJECT public: explicit ColorComboWidget(QWidget* parent = nullptr); + ~ColorComboWidget(); void addCombination(colorcombo::ICombination* combo); void clearCombination(); @@ -317,6 +331,7 @@ class ColorPicker : public QWidget Q_OBJECT public: explicit ColorPicker(QWidget* parent = nullptr); + ~ColorPicker(); QColor grabScreenColor(QPoint p) const; void startColorPicking(); @@ -344,6 +359,7 @@ class ColorEditor : public QDialog public: explicit ColorEditor(QWidget* parent = nullptr); explicit ColorEditor(const QColor& initial, QWidget* parent = nullptr); + ~ColorEditor(); static QColor getColor(const QColor& initial, QWidget* parent = nullptr, const QString& title = "");