blob: b57f1e4b78d598de2e84042059e591f3805ba897 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "widget/wcolorpickeraction.h"
WColorPickerAction::WColorPickerAction(WColorPicker::ColorOption colorOption, const ColorPalette& palette, QWidget* parent)
: QWidgetAction(parent),
m_pColorPicker(make_parented<WColorPicker>(colorOption, palette)) {
connect(m_pColorPicker.get(), &WColorPicker::colorPicked, this, &WColorPickerAction::colorPicked);
QHBoxLayout* pLayout = new QHBoxLayout();
pLayout->addWidget(m_pColorPicker);
QWidget* pWidget = new QWidget();
pWidget->setLayout(pLayout);
setDefaultWidget(pWidget);
}
void WColorPickerAction::resetSelectedColor() {
m_pColorPicker->resetSelectedColor();
}
void WColorPickerAction::setSelectedColor(mixxx::RgbColor::optional_t color) {
m_pColorPicker->setSelectedColor(color);
}
|