23 m_pickingWin(nullptr),
24 m_pickingHub(pickingHub) {
31 connect(pointPickingButton_first, &QCheckBox::toggled,
this,
33 connect(pointPickingButton_second, &QCheckBox::toggled,
this,
37 connect(
this, &QDialog::finished, [&]() {
38 if (pointPickingButton_first->isChecked())
39 pointPickingButton_first->setChecked(
false);
40 if (pointPickingButton_second->isChecked())
41 pointPickingButton_second->setChecked(
false);
55 "Can't start the picking process (another tool is using "
62 pointPickingButton_first->blockSignals(
true);
63 pointPickingButton_first->setChecked(state);
64 pointPickingButton_first->blockSignals(
false);
77 "Can't start the picking process (another tool is using "
84 pointPickingButton_second->blockSignals(
true);
85 pointPickingButton_second->setChecked(state);
86 pointPickingButton_second->blockSignals(
false);
102 if (pointPickingButton_first->isChecked()) {
105 red_first->setValue(rgb.
r);
106 green_first->setValue(rgb.
g);
107 blue_first->setValue(rgb.
b);
109 pointPickingButton_first->setChecked(
false);
112 red_second->setValue(rgb.
r);
113 green_second->setValue(rgb.
g);
114 blue_second->setValue(rgb.
b);
116 pointPickingButton_second->setChecked(
false);
119 CVLog::Print(
"The point cloud is not with RGB values.");
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.
ccPickingHub * m_pickingHub
Picking hub.
virtual void onItemPicked(const PickedItem &pi)
Inherited from ccPickingListener.
void pickPoint_second(bool)
RgbDialog(ccPickingHub *pickingHub, QWidget *parent=nullptr)
void pickPoint_first(bool)
QWidget * m_pickingWin
Picking window (if any)
virtual bool hasColors() const
Returns whether colors are enabled or not.
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.
QWidget * activeWindow() const
Returns the currently active window.