Mantid
Loading...
Searching...
No Matches
Signals | Public Member Functions | Private Attributes | List of all members
MantidQt::MantidWidgets::InputController3DMove Class Reference

Controller for moving the instrument on Projection3D surface: translation, rotation and zooming. More...

#include <InputController.h>

Inheritance diagram for MantidQt::MantidWidgets::InputController3DMove:
MantidQt::MantidWidgets::InputController

Signals

void finish ()
 Finish movement. More...
 
void initRotation (int x, int y)
 Init rotation. x and y is the starting point on the screen. More...
 
void initTranslation (int x, int y)
 Init translation. x and y is the starting point on the screen. More...
 
void initZoom (int x, int y)
 Init zooming. x and y is the zoom starting point on the screen. More...
 
void rotate (int x, int y)
 Rotate. More...
 
void translate (int x, int y)
 Translate. More...
 
void wheelZoom (int x, int y, int d)
 Wheel zoom. More...
 
void zoom (int x, int y)
 Zoom. More...
 
- Signals inherited from MantidQt::MantidWidgets::InputController
void disabled ()
 
void enabled ()
 
void touchPointAt (int, int)
 

Public Member Functions

void freezeRotation (bool) override
 
 InputController3DMove (QObject *parent)
 Constructor. More...
 
void mouseMoveEvent (QMouseEvent *) override
 Process the mouse move event. More...
 
void mousePressEvent (QMouseEvent *) override
 Process the mouse press event. More...
 
void mouseReleaseEvent (QMouseEvent *) override
 Process the mouse release event. More...
 
void wheelEvent (QWheelEvent *) override
 Process the mouse wheel event. More...
 
- Public Member Functions inherited from MantidQt::MantidWidgets::InputController
bool canShowContextMenu () const
 Returns true if a surface using this controller can show a context menu on right-click. More...
 
virtual void enterEvent (QEvent *)
 
virtual void freezeRotation (bool)
 
 InputController (QObject *parent, bool contextAllowed=true)
 
virtual void keyPressEvent (QKeyEvent *)
 
virtual void leaveEvent (QEvent *)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void onDisabled ()
 To be called when this controller looses control. More...
 
virtual void onEnabled ()
 To be called when this controller takes control of the input. More...
 
virtual void onPaint (QPainter &)
 To be called after the owner widget has drawn its content. More...
 
virtual void wheelEvent (QWheelEvent *)
 
 ~InputController () override=default
 

Private Attributes

bool m_isButtonPressed
 
bool m_isRotationFrozen = false
 

Detailed Description

Controller for moving the instrument on Projection3D surface: translation, rotation and zooming.

Definition at line 79 of file InputController.h.

Constructor & Destructor Documentation

◆ InputController3DMove()

MantidQt::MantidWidgets::InputController3DMove::InputController3DMove ( QObject *  parent)

Constructor.

Parameters
parent:: The parent object.

Definition at line 30 of file InputController.cpp.

Member Function Documentation

◆ finish

void MantidQt::MantidWidgets::InputController3DMove::finish ( )
signal

Finish movement.

Referenced by mouseReleaseEvent().

◆ freezeRotation()

void MantidQt::MantidWidgets::InputController3DMove::freezeRotation ( bool  freeze)
overridevirtual

Reimplemented from MantidQt::MantidWidgets::InputController.

Definition at line 83 of file InputController.cpp.

References m_isRotationFrozen.

◆ initRotation

void MantidQt::MantidWidgets::InputController3DMove::initRotation ( int  x,
int  y 
)
signal

Init rotation. x and y is the starting point on the screen.

Referenced by mousePressEvent().

◆ initTranslation

void MantidQt::MantidWidgets::InputController3DMove::initTranslation ( int  x,
int  y 
)
signal

Init translation. x and y is the starting point on the screen.

Referenced by mousePressEvent().

◆ initZoom

void MantidQt::MantidWidgets::InputController3DMove::initZoom ( int  x,
int  y 
)
signal

Init zooming. x and y is the zoom starting point on the screen.

Referenced by mousePressEvent().

◆ mouseMoveEvent()

void MantidQt::MantidWidgets::InputController3DMove::mouseMoveEvent ( QMouseEvent *  event)
overridevirtual

Process the mouse move event.

Send out surface movement signals.

Reimplemented from MantidQt::MantidWidgets::InputController.

Definition at line 54 of file InputController.cpp.

References m_isRotationFrozen, MantidQt::MantidWidgets::InputController::mouseMoveEvent(), rotate(), translate(), and zoom().

◆ mousePressEvent()

void MantidQt::MantidWidgets::InputController3DMove::mousePressEvent ( QMouseEvent *  event)
overridevirtual

Process the mouse press event.

Send out movement initialization signals.

Reimplemented from MantidQt::MantidWidgets::InputController.

Definition at line 37 of file InputController.cpp.

References initRotation(), initTranslation(), initZoom(), m_isButtonPressed, and m_isRotationFrozen.

◆ mouseReleaseEvent()

void MantidQt::MantidWidgets::InputController3DMove::mouseReleaseEvent ( QMouseEvent *  )
overridevirtual

Process the mouse release event.

Finalize the interaction.

Reimplemented from MantidQt::MantidWidgets::InputController.

Definition at line 69 of file InputController.cpp.

References finish(), and m_isButtonPressed.

◆ rotate

void MantidQt::MantidWidgets::InputController3DMove::rotate ( int  x,
int  y 
)
signal

Rotate.

Referenced by mouseMoveEvent().

◆ translate

void MantidQt::MantidWidgets::InputController3DMove::translate ( int  x,
int  y 
)
signal

Translate.

Referenced by mouseMoveEvent().

◆ wheelEvent()

void MantidQt::MantidWidgets::InputController3DMove::wheelEvent ( QWheelEvent *  event)
overridevirtual

Process the mouse wheel event.

Send the wheel zoom signal.

Reimplemented from MantidQt::MantidWidgets::InputController.

Definition at line 78 of file InputController.cpp.

References wheelZoom().

◆ wheelZoom

void MantidQt::MantidWidgets::InputController3DMove::wheelZoom ( int  x,
int  y,
int  d 
)
signal

Wheel zoom.

Referenced by wheelEvent().

◆ zoom

void MantidQt::MantidWidgets::InputController3DMove::zoom ( int  x,
int  y 
)
signal

Zoom.

Referenced by mouseMoveEvent().

Member Data Documentation

◆ m_isButtonPressed

bool MantidQt::MantidWidgets::InputController3DMove::m_isButtonPressed
private

Definition at line 109 of file InputController.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

◆ m_isRotationFrozen

bool MantidQt::MantidWidgets::InputController3DMove::m_isRotationFrozen = false
private

Definition at line 110 of file InputController.h.

Referenced by freezeRotation(), mouseMoveEvent(), and mousePressEvent().


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