ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccGraphicalTransformationTool Class Reference

#include <ecvGraphicalTransformationTool.h>

Inheritance diagram for ccGraphicalTransformationTool:
Collaboration diagram for ccGraphicalTransformationTool:

Public Member Functions

 ccGraphicalTransformationTool (QWidget *parent)
 Default constructor. More...
 
virtual ~ccGraphicalTransformationTool ()
 Default destructor. More...
 
virtual bool linkWith (QWidget *win) override
 Links the overlay dialog with a MDI window. More...
 
virtual bool start () override
 Starts process. More...
 
virtual void stop (bool state) override
 Stops process/dialog. More...
 
bool setTansformTool (ecvGenericTransformTool *tool)
 
bool addEntity (ccHObject *anObject)
 Adds an entity to the 'selected' entities set. More...
 
unsigned getNumberOfValidEntities () const
 Returns the number of valid entities (see addEntity) More...
 
const ccHObjectgetValidEntities () const
 Returns the 'to be transformed' entities set (see addEntity) More...
 
void setRotationCenter (CCVector3d &center)
 Sets the rotation center. More...
 
void exportNewEntities ()
 
void clear ()
 Clear all variables and 'unlink' dialog. 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...
 

Protected Slots

void apply ()
 Applies transformation to selected entities. More...
 
void reset ()
 Resets transformation. More...
 
void cancel ()
 Cancels (no transformation is applied) More...
 
void pause (bool)
 Pauses the transformation mode. More...
 
void onShortcutTriggered (int)
 To capture overridden shortcuts (pause button, etc.) More...
 
void onScaleEnabled (bool dummy)
 
void onShearEnabled (bool dummy)
 
void onRotationModeChanged (int dummy)
 
void onTranlationModeChanged (bool dummy)
 
- Protected Slots inherited from ccOverlayDialog
virtual void onLinkedWindowDeletion (QObject *object=nullptr)
 Slot called when the linked window is deleted (calls 'onClose') More...
 

Protected Attributes

ccHObject m_toTransform
 List of entities to be transformed. More...
 
CCVector3d m_rotationCenter
 Rotation center. More...
 
ecvGenericTransformToolm_tool
 
- 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 Member Functions inherited from ccOverlayDialog
bool eventFilter (QObject *obj, QEvent *e) override
 

Detailed Description

Definition at line 21 of file ecvGraphicalTransformationTool.h.

Constructor & Destructor Documentation

◆ ccGraphicalTransformationTool()

ccGraphicalTransformationTool::ccGraphicalTransformationTool ( QWidget *  parent)
explicit

◆ ~ccGraphicalTransformationTool()

ccGraphicalTransformationTool::~ccGraphicalTransformationTool ( )
virtual

Default destructor.

Definition at line 57 of file ecvGraphicalTransformationTool.cpp.

References clear().

Member Function Documentation

◆ addEntity()

bool ccGraphicalTransformationTool::addEntity ( ccHObject anObject)

◆ apply

◆ cancel

void ccGraphicalTransformationTool::cancel ( )
protectedslot

◆ clear()

void ccGraphicalTransformationTool::clear ( void  )

◆ exportNewEntities()

◆ getNumberOfValidEntities()

unsigned ccGraphicalTransformationTool::getNumberOfValidEntities ( ) const

Returns the number of valid entities (see addEntity)

Definition at line 268 of file ecvGraphicalTransformationTool.cpp.

References ccHObject::getChildrenNumber(), and m_toTransform.

Referenced by exportNewEntities().

◆ getValidEntities()

const ccHObject& ccGraphicalTransformationTool::getValidEntities ( ) const
inline

Returns the 'to be transformed' entities set (see addEntity)

Definition at line 49 of file ecvGraphicalTransformationTool.h.

References m_toTransform.

◆ linkWith()

bool ccGraphicalTransformationTool::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.

Definition at line 276 of file ecvGraphicalTransformationTool.cpp.

References ccOverlayDialog::linkWith().

◆ onRotationModeChanged

void ccGraphicalTransformationTool::onRotationModeChanged ( int  dummy)
protectedslot

◆ onScaleEnabled

void ccGraphicalTransformationTool::onScaleEnabled ( bool  dummy)
protectedslot

◆ onShearEnabled

void ccGraphicalTransformationTool::onShearEnabled ( bool  dummy)
protectedslot

◆ onShortcutTriggered

void ccGraphicalTransformationTool::onShortcutTriggered ( int  key)
protectedslot

To capture overridden shortcuts (pause button, etc.)

Definition at line 59 of file ecvGraphicalTransformationTool.cpp.

Referenced by ccGraphicalTransformationTool().

◆ onTranlationModeChanged

void ccGraphicalTransformationTool::onTranlationModeChanged ( bool  dummy)
protectedslot

◆ pause

◆ reset

void ccGraphicalTransformationTool::reset ( void  )
protectedslot

◆ setRotationCenter()

void ccGraphicalTransformationTool::setRotationCenter ( CCVector3d center)

Sets the rotation center.

Definition at line 272 of file ecvGraphicalTransformationTool.cpp.

References m_rotationCenter.

Referenced by MainWindow::onItemPicked().

◆ setTansformTool()

bool ccGraphicalTransformationTool::setTansformTool ( ecvGenericTransformTool tool)

Definition at line 322 of file ecvGraphicalTransformationTool.cpp.

References m_tool.

◆ start()

◆ stop()

void ccGraphicalTransformationTool::stop ( bool  accepted)
overridevirtual

Stops process/dialog.

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

Parameters
acceptedprocess/dialog result

Reimplemented from ccOverlayDialog.

Definition at line 311 of file ecvGraphicalTransformationTool.cpp.

References ecvGenericTransformTool::clear(), m_tool, ecvGenericTransformTool::stop(), and ccOverlayDialog::stop().

Referenced by apply(), and cancel().

Member Data Documentation

◆ m_rotationCenter

CCVector3d ccGraphicalTransformationTool::m_rotationCenter
protected

Rotation center.

The rotation center is actually the center of gravity of the selected 'entities'

Definition at line 89 of file ecvGraphicalTransformationTool.h.

Referenced by setRotationCenter().

◆ m_tool

◆ m_toTransform

ccHObject ccGraphicalTransformationTool::m_toTransform
protected

List of entities to be transformed.

Definition at line 83 of file ecvGraphicalTransformationTool.h.

Referenced by addEntity(), apply(), cancel(), clear(), exportNewEntities(), getNumberOfValidEntities(), getValidEntities(), and start().


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