Skip to content

Commit

Permalink
[fix] std::unique_ptr<Private> build error
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanyan committed Oct 16, 2023
1 parent b2bca94 commit 0a1ff3b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ui/zenoui/ColorEditor/ColorEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}});
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1069,6 +1083,8 @@ ColorComboWidget::ColorComboWidget(QWidget* parent)
});
}

ColorComboWidget::~ColorComboWidget() = default;

void ColorComboWidget::addCombination(colorcombo::ICombination* combo)
{
p->combs.push(combo);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 16 additions & 0 deletions ui/zenoui/ColorEditor/ColorEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -279,6 +292,7 @@ class ColorComboWidget : public QWidget
Q_OBJECT
public:
explicit ColorComboWidget(QWidget* parent = nullptr);
~ColorComboWidget();

void addCombination(colorcombo::ICombination* combo);
void clearCombination();
Expand Down Expand Up @@ -317,6 +331,7 @@ class ColorPicker : public QWidget
Q_OBJECT
public:
explicit ColorPicker(QWidget* parent = nullptr);
~ColorPicker();

QColor grabScreenColor(QPoint p) const;
void startColorPicking();
Expand Down Expand Up @@ -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 = "");

Expand Down

0 comments on commit 0a1ff3b

Please sign in to comment.