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);
101 const ScalarType scalarValue =
103 if (pointPickingButton_first->isChecked()) {
106 first->setValue(scalarValue);
108 pointPickingButton_first->setChecked(
false);
112 second->setValue(scalarValue);
114 pointPickingButton_second->setChecked(
false);
117 CVLog::Print(
"The point cloud hasn't any scalar field.");
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.
ScalarDialog(ccPickingHub *pickingHub, QWidget *parent=nullptr)
ccPickingHub * m_pickingHub
Picking hub.
void pickPoint_first(bool)
QWidget * m_pickingWin
Picking window (if any)
void pickPoint_second(bool)
virtual bool hasScalarFields() const
Returns whether one or more scalar fields are instantiated.
A 3D cloud interface with associated features (color, normals, octree, etc.)
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.
virtual ScalarType getPointScalarValue(unsigned pointIndex) const =0
Returns the ith point associated scalar value.