qCC  version 2.5.4 (Qt) - 19 Apr. 2014
 All Classes Functions Variables Typedefs Enumerations
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ccGraphicalTransformationTool Class Reference

Dialog + mechanism for graphical transformation of entities. More...

#include <ccGraphicalTransformationTool.h>

Inheritance diagram for ccGraphicalTransformationTool:
Inheritance graph
[legend]
Collaboration diagram for ccGraphicalTransformationTool:
Collaboration graph
[legend]

Public Member Functions

 ccGraphicalTransformationTool (QWidget *parent)
 Default constructor.
 
virtual ~ccGraphicalTransformationTool ()
 Default destructor.
 
virtual bool linkWith (ccGLWindow *win)
 Links the overlay dialog with a MDI window. More...
 
virtual bool start ()
 Starts process. More...
 
virtual void stop (bool state)
 Stops process/dialog. More...
 
bool addEntity (ccHObject *anObject)
 Adds an entity to the 'selected' entities set. More...
 
unsigned getNumberOfValidEntities ()
 Returns the number of vald entities (see addEntity)
 
- Public Member Functions inherited from ccOverlayDialog
 ccOverlayDialog (QWidget *parent=0)
 Default constructor.
 
virtual ~ccOverlayDialog ()
 Destructor.
 
virtual void reject ()
 
void addOverridenShortcut (Qt::Key key)
 Adds a keyboard shortcut (single key) that will be overridden from the associated window. More...
 

Protected Slots

void apply ()
 Applies transformation to selected entities.
 
void reset ()
 Resets transformation.
 
void cancel ()
 Cancels (no transformation is applied)
 
void pause (bool)
 Pauses the transformation mode.
 
void glTranslate (const CCVector3 &)
 Applies translation (graphically) to selected entities.
 
void glRotate (const ccGLMatrix &)
 Applies rotation (graphically) to selected entities.
 
void onShortcutTriggered (int)
 To capture overridden shortcuts (pause button, etc.)
 
- Protected Slots inherited from ccOverlayDialog
virtual void onLinkedWindowDeletion (QObject *object=0)
 Slot called when the linked window is deleted (calls 'onClose')
 

Protected Member Functions

void clear ()
 Clear all variables and 'unlink' dialog.
 
void updateAllGLTransformations ()
 Updates all selected entities GL transformation matrices.
 
- Protected Member Functions inherited from ccOverlayDialog
bool eventFilter (QObject *obj, QEvent *e)
 

Protected Attributes

ccHObject * m_toTransform
 List of entities to be transformed.
 
ccGLMatrix m_rotation
 Current rotation.
 
CCVector3 m_translation
 Current translation.
 
CCVector3 m_rotationCenter
 Rotation center. More...
 
- Protected Attributes inherited from ccOverlayDialog
ccGLWindow * m_associatedWin
 Associated (MDI) window.
 
bool m_processing
 Running/processing state.
 
QList< int > m_overriddenKeys
 Overridden keys.
 

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...
 

Detailed Description

Dialog + mechanism for graphical transformation of entities.

Mouse driven rotation and translation of selected entities at screen.

Member Function Documentation

bool ccGraphicalTransformationTool::addEntity ( ccHObject *  anObject)

Adds an entity to the 'selected' entities set.

Only the 'selected' entities are moved.

Returns
success, if the entitiy is elligible for graphical transformation
bool ccGraphicalTransformationTool::linkWith ( ccGLWindow *  win)
virtual

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.

bool ccGraphicalTransformationTool::start ( )
virtual

Starts process.

Returns
success

Reimplemented from ccOverlayDialog.

void ccGraphicalTransformationTool::stop ( bool  accepted)
virtual

Stops process/dialog.

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

Parameters
acceptedprocess/dialog result

Reimplemented from ccOverlayDialog.

Member Data Documentation

CCVector3 ccGraphicalTransformationTool::m_rotationCenter
protected

Rotation center.

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


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