Mantid
|
Controller for moving the instrument on Projection3D surface: translation, rotation and zooming. More...
#include <InputController.h>
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 |
Controller for moving the instrument on Projection3D surface: translation, rotation and zooming.
Definition at line 79 of file InputController.h.
MantidQt::MantidWidgets::InputController3DMove::InputController3DMove | ( | QObject * | parent | ) |
Constructor.
parent | :: The parent object. |
Definition at line 30 of file InputController.cpp.
|
signal |
Finish movement.
Referenced by mouseReleaseEvent().
|
overridevirtual |
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 83 of file InputController.cpp.
References m_isRotationFrozen.
|
signal |
Init rotation. x and y is the starting point on the screen.
Referenced by mousePressEvent().
|
signal |
Init translation. x and y is the starting point on the screen.
Referenced by mousePressEvent().
|
signal |
Init zooming. x and y is the zoom starting point on the screen.
Referenced by mousePressEvent().
|
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().
|
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.
|
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.
|
signal |
Rotate.
Referenced by mouseMoveEvent().
|
signal |
Translate.
Referenced by mouseMoveEvent().
|
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().
|
signal |
Wheel zoom.
Referenced by wheelEvent().
|
signal |
Zoom.
Referenced by mouseMoveEvent().
|
private |
Definition at line 109 of file InputController.h.
Referenced by mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 110 of file InputController.h.
Referenced by freezeRotation(), mouseMoveEvent(), and mousePressEvent().