ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccPointPickingGenericInterface Class Referenceabstract

#include <ecvPointPickingGenericInterface.h>

Inheritance diagram for ccPointPickingGenericInterface:
Collaboration diagram for ccPointPickingGenericInterface:

Public Member Functions

 ccPointPickingGenericInterface (ccPickingHub *pickingHub, QWidget *parent=nullptr)
 Default constructor. More...
 
 ~ccPointPickingGenericInterface () override=default
 Destructor. More...
 
bool linkWith (QWidget *win) override
 Links the overlay dialog with a MDI window. More...
 
bool start () override
 Starts process. More...
 
void stop (bool state) override
 Stops process/dialog. More...
 
void onItemPicked (const PickedItem &pi) override
 Inherited from ccPickingListener. More...
 
- Public Member Functions inherited from ccOverlayDialog
 ccOverlayDialog (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::FramelessWindowHint|Qt::Tool)
 Default constructor. More...
 
 ~ccOverlayDialog () override
 Destructor. More...
 
void reject () override
 
void addOverridenShortcut (Qt::Key key)
 
bool started () const
 Returns whether the tool is currently started or not. More...
 
- Public Member Functions inherited from ccPickingListener
virtual ~ccPickingListener ()=default
 

Protected Member Functions

virtual void processPickedPoint (ccPointCloud *cloud, unsigned pointIndex, int x, int y)=0
 Generic method to process picked points. More...
 
- Protected Member Functions inherited from ccOverlayDialog
bool eventFilter (QObject *obj, QEvent *e) override
 

Protected Attributes

ccPickingHubm_pickingHub
 Picking hub. More...
 
- Protected Attributes inherited from ccOverlayDialog
QWidget * m_associatedWin
 Associated (MDI) window. More...
 
bool m_processing
 Running/processing state. More...
 
QList< int > m_overriddenKeys
 Overridden keys. More...
 

Additional Inherited Members

- Signals inherited from ccOverlayDialog
void processFinished (bool accepted)
 Signal emitted when process is finished. More...
 
void shortcutTriggered (int key)
 Signal emitted when an overridden key shortcut is pressed. More...
 
void shown ()
 Signal emitted when a 'show' event is detected. More...
 
- Protected Slots inherited from ccOverlayDialog
virtual void onLinkedWindowDeletion (QObject *object=nullptr)
 Slot called when the linked window is deleted (calls 'onClose') More...
 

Detailed Description

Generic interface for any dialog/graphical interactor that relies on point picking.

Definition at line 28 of file ecvPointPickingGenericInterface.h.

Constructor & Destructor Documentation

◆ ccPointPickingGenericInterface()

ccPointPickingGenericInterface::ccPointPickingGenericInterface ( ccPickingHub pickingHub,
QWidget *  parent = nullptr 
)
explicit

Default constructor.

Definition at line 24 of file ecvPointPickingGenericInterface.cpp.

References m_pickingHub.

◆ ~ccPointPickingGenericInterface()

ccPointPickingGenericInterface::~ccPointPickingGenericInterface ( )
overridedefault

Destructor.

Member Function Documentation

◆ linkWith()

bool ccPointPickingGenericInterface::linkWith ( QWidget *  win)
overridevirtual

Links the overlay dialog with a MDI window.

Warning: link can't be modified while dialog is displayed/process is running!

Returns
success

Reimplemented from ccOverlayDialog.

Reimplemented in ccPointPropertiesDlg.

Definition at line 30 of file ecvPointPickingGenericInterface.cpp.

References ccOverlayDialog::linkWith(), m_pickingHub, and ccPickingHub::removeListener().

Referenced by ccPointPropertiesDlg::linkWith().

◆ onItemPicked()

◆ processPickedPoint()

virtual void ccPointPickingGenericInterface::processPickedPoint ( ccPointCloud cloud,
unsigned  pointIndex,
int  x,
int  y 
)
protectedpure virtual

Generic method to process picked points.

Parameters
cloudpicked point cloud
pointIndexpoint index in cloud
xpicked pixel X position
ypicked pixel Y position

Implemented in ccPointPropertiesDlg, and ccPointListPickingDlg.

Referenced by onItemPicked().

◆ start()

bool ccPointPickingGenericInterface::start ( )
overridevirtual

Starts process.

Returns
success

Reimplemented from ccOverlayDialog.

Reimplemented in ccPointPropertiesDlg.

Definition at line 45 of file ecvPointPickingGenericInterface.cpp.

References ccPickingHub::addListener(), CVLog::Error(), m_pickingHub, ecvDisplayTools::POINT_PICKING, and ccOverlayDialog::start().

Referenced by ccPointPropertiesDlg::start().

◆ stop()

void ccPointPickingGenericInterface::stop ( bool  accepted)
overridevirtual

Stops process/dialog.

Automatically emits the 'processFinished' signal (with input state as argument).

Parameters
acceptedprocess/dialog result

Reimplemented from ccOverlayDialog.

Reimplemented in ccPointPropertiesDlg.

Definition at line 64 of file ecvPointPickingGenericInterface.cpp.

References m_pickingHub, ccPickingHub::removeListener(), and ccOverlayDialog::stop().

Referenced by ccPointListPickingDlg::applyAndExit(), ccPointListPickingDlg::cancelAndExit(), and ccPointPropertiesDlg::stop().

Member Data Documentation

◆ m_pickingHub

ccPickingHub* ccPointPickingGenericInterface::m_pickingHub
protected

Picking hub.

Definition at line 60 of file ecvPointPickingGenericInterface.h.

Referenced by ccPointPickingGenericInterface(), linkWith(), start(), and stop().


The documentation for this class was generated from the following files: