blob: db72bc97e951b6e7257d97c1bc5973f9c23a5721 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "widget/wcolorpickeraction.h"
WColorPickerAction::WColorPickerAction(WColorPicker::ColorOption colorOption, QWidget* parent)
: QWidgetAction(parent),
m_pColorPicker(make_parented<WColorPicker>(colorOption)) {
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::setSelectedColor(PredefinedColorPointer pColor) {
m_pColorPicker->setSelectedColor(pColor);
}
|