Mantid
|
The base class for the mouse and keyboard controllers to work with ProjectionSurfaces. More...
#include <InputController.h>
Signals | |
void | disabled () |
void | enabled () |
void | touchPointAt (int, int) |
Public Member Functions | |
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_canShowContextMenu |
The base class for the mouse and keyboard controllers to work with ProjectionSurfaces.
Surfaces can be in different interaction modes and the same mode on different surfaces can involve different inputs.
A projection surface keeps a list of controllers: one per interaction mode. The current controller emits signals which are connected to the relevant slots on the surface.
Definition at line 37 of file InputController.h.
|
explicit |
Definition at line 21 of file InputController.cpp.
|
overridedefault |
|
inline |
Returns true if a surface using this controller can show a context menu on right-click.
Definition at line 63 of file InputController.h.
|
signal |
|
signal |
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 48 of file InputController.h.
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputController3DMove.
Definition at line 59 of file InputController.h.
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputControllerDrawShape.
Definition at line 47 of file InputController.h.
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputControllerDrawShape, and MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 49 of file InputController.h.
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputController3DMove, MantidQt::MantidWidgets::InputControllerPick, MantidQt::MantidWidgets::InputControllerDrawShape, MantidQt::MantidWidgets::InputControllerMoveUnwrapped, and MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 44 of file InputController.h.
Referenced by MantidQt::MantidWidgets::InputController3DMove::mouseMoveEvent(), and MantidQt::MantidWidgets::InputControllerMoveUnwrapped::mouseMoveEvent().
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputController3DMove, MantidQt::MantidWidgets::InputControllerPick, MantidQt::MantidWidgets::InputControllerDrawShape, MantidQt::MantidWidgets::InputControllerMoveUnwrapped, and MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 43 of file InputController.h.
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputController3DMove, MantidQt::MantidWidgets::InputControllerPick, MantidQt::MantidWidgets::InputControllerDrawShape, MantidQt::MantidWidgets::InputControllerMoveUnwrapped, and MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 45 of file InputController.h.
|
inlinevirtual |
To be called when this controller looses control.
By default emits disabled() signal.
Definition at line 57 of file InputController.h.
|
inlinevirtual |
To be called when this controller takes control of the input.
By default emits enabled() signal.
Definition at line 54 of file InputController.h.
|
inlinevirtual |
To be called after the owner widget has drawn its content.
Reimplemented in MantidQt::MantidWidgets::InputControllerSelection.
Definition at line 51 of file InputController.h.
|
signal |
|
inlinevirtual |
Reimplemented in MantidQt::MantidWidgets::InputController3DMove, and MantidQt::MantidWidgets::InputControllerDraw.
Definition at line 46 of file InputController.h.
|
private |
Definition at line 71 of file InputController.h.