26 : QDialog(parent),
Ui::
HSVDialog(), m_pickingHub(pickingHub) {
37 connect(pointPickingButton_first, &QCheckBox::toggled,
this,
40 static_cast<void (QDoubleSpinBox::*)(
double)
>(
41 &QDoubleSpinBox::valueChanged),
44 static_cast<void (QDoubleSpinBox::*)(
double)
>(
45 &QDoubleSpinBox::valueChanged),
48 static_cast<void (QDoubleSpinBox::*)(
double)
>(
49 &QDoubleSpinBox::valueChanged),
53 connect(
this, &QDialog::finished, [&]() {
71 "Can't start the picking process (another tool is using "
79 pointPickingButton_first->blockSignals(
true);
80 pointPickingButton_first->setChecked(state);
81 pointPickingButton_first->blockSignals(
false);
95 if (pointPickingButton_first->isChecked()) {
99 red->blockSignals(
true);
100 green->blockSignals(
true);
102 red->setValue(rgb.
r);
104 blue->setValue(rgb.
b);
106 red->blockSignals(
false);
107 green->blockSignals(
false);
109 pointPickingButton_first->setChecked(
false);
121 hue_first->setValue(hsv_values.
h);
122 sat_first->setValue(hsv_values.
s);
123 val_first->setValue(hsv_values.
v);
static bool Print(const char *format,...)
Prints out a formatted message in console.
static bool Error(const char *format,...)
Display an error dialog with formatted message.
virtual void onItemPicked(const PickedItem &pi)
Inherited from ccPickingListener.
HSVDialog(ccPickingHub *pickingHub, QWidget *parent=nullptr)
ccPickingHub * m_pickingHub
Picking hub.
A 3D cloud interface with associated features (color, normals, octree, etc.)
virtual const ecvColor::Rgb & getPointColor(unsigned pointIndex) const =0
Returns color corresponding to a given point.
bool isKindOf(CV_CLASS_ENUM type) const
Point/triangle picking hub.
void removeListener(ccPickingListener *listener, bool autoStopPickingIfLast=true)
Removes a listener.
bool addListener(ccPickingListener *listener, bool exclusive=false, bool autoStartPicking=true, ecvDisplayTools::PICKING_MODE mode=ecvDisplayTools::POINT_OR_TRIANGLE_PICKING)
Adds a listener.
constexpr Rgb red(MAX, 0, 0)
constexpr Rgb blue(0, 0, MAX)
constexpr Rgb green(0, MAX, 0)