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

The base class for the mouse and keyboard controllers to work with ProjectionSurfaces. More...

#include <InputController.h>

Inheritance diagram for MantidQt::MantidWidgets::InputController:
MantidQt::MantidWidgets::InputController3DMove MantidQt::MantidWidgets::InputControllerDraw MantidQt::MantidWidgets::InputControllerDrawShape MantidQt::MantidWidgets::InputControllerMoveUnwrapped MantidQt::MantidWidgets::InputControllerPick MantidQt::MantidWidgets::InputControllerDrawAndErase MantidQt::MantidWidgets::InputControllerSelection

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ InputController()

MantidQt::MantidWidgets::InputController::InputController ( QObject *  parent,
bool  contextAllowed = true 
)
explicit

Definition at line 21 of file InputController.cpp.

◆ ~InputController()

MantidQt::MantidWidgets::InputController::~InputController ( )
overridedefault

Member Function Documentation

◆ canShowContextMenu()

bool MantidQt::MantidWidgets::InputController::canShowContextMenu ( ) const
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.

◆ disabled

void MantidQt::MantidWidgets::InputController::disabled ( )
signal

◆ enabled

void MantidQt::MantidWidgets::InputController::enabled ( )
signal

◆ enterEvent()

virtual void MantidQt::MantidWidgets::InputController::enterEvent ( QEvent *  )
inlinevirtual

Reimplemented in MantidQt::MantidWidgets::InputControllerDraw.

Definition at line 48 of file InputController.h.

◆ freezeRotation()

virtual void MantidQt::MantidWidgets::InputController::freezeRotation ( bool  )
inlinevirtual

Reimplemented in MantidQt::MantidWidgets::InputController3DMove.

Definition at line 59 of file InputController.h.

◆ keyPressEvent()

virtual void MantidQt::MantidWidgets::InputController::keyPressEvent ( QKeyEvent *  )
inlinevirtual

Reimplemented in MantidQt::MantidWidgets::InputControllerDrawShape.

Definition at line 47 of file InputController.h.

◆ leaveEvent()

virtual void MantidQt::MantidWidgets::InputController::leaveEvent ( QEvent *  )
inlinevirtual

◆ mouseMoveEvent()

virtual void MantidQt::MantidWidgets::InputController::mouseMoveEvent ( QMouseEvent *  event)
inlinevirtual

◆ mousePressEvent()

virtual void MantidQt::MantidWidgets::InputController::mousePressEvent ( QMouseEvent *  )
inlinevirtual

◆ mouseReleaseEvent()

virtual void MantidQt::MantidWidgets::InputController::mouseReleaseEvent ( QMouseEvent *  )
inlinevirtual

◆ onDisabled()

virtual void MantidQt::MantidWidgets::InputController::onDisabled ( )
inlinevirtual

To be called when this controller looses control.

By default emits disabled() signal.

Definition at line 57 of file InputController.h.

◆ onEnabled()

virtual void MantidQt::MantidWidgets::InputController::onEnabled ( )
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.

◆ onPaint()

virtual void MantidQt::MantidWidgets::InputController::onPaint ( QPainter &  )
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.

◆ touchPointAt

void MantidQt::MantidWidgets::InputController::touchPointAt ( int  ,
int   
)
signal

◆ wheelEvent()

virtual void MantidQt::MantidWidgets::InputController::wheelEvent ( QWheelEvent *  )
inlinevirtual

Member Data Documentation

◆ m_canShowContextMenu

bool MantidQt::MantidWidgets::InputController::m_canShowContextMenu
private

Definition at line 71 of file InputController.h.


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