|
Mantid
|
Controller for drawing mask shapes. More...
#include <InputController.h>
Public Slots | |
| void | onDisabled () override |
| Action on disabling. More... | |
| void | startCreatingShape2D (const QString &type, const QColor &borderColor, const QColor &fillColor) |
| Slot for defining the shape to draw and initializing drawing. More... | |
Signals | |
| void | addShape (const QString &type, int x, int y, const QColor &borderColor, const QColor &fillColor) |
| Add a new shape. More... | |
| void | copySelectedShapes () |
| Copy the selected shapes. More... | |
| void | deselectAll () |
| Deselect all selected shapes. More... | |
| void | finishSelection (const QRect &) |
| Rubber band selection is done. More... | |
| void | moveBy (int, int) |
| Move selected shape or a control point by a displacement vector. More... | |
| void | moveRightBottomTo (int, int) |
| Resize the current shape by moving the right-bottom control point to a location on the screen. More... | |
| void | pasteCopiedShapes () |
| Paste previously copied shapes. More... | |
| void | removeSelectedShapes () |
| Remove the selected shapes. More... | |
| void | restoreOverrideCursor () |
| Restore the cursor to its default image. More... | |
| void | selectAt (int, int) |
| Select a shape or a conrol point at a location on the screen. More... | |
| void | selectCtrlAt (int, int) |
| Select a shape with ctrl key pressed at a location on the screen. More... | |
| void | setSelection (const QRect &) |
| Update the rubber band selection. More... | |
| void | touchPointAt (int, int) |
| Sent when the mouse is moved to a new position with the buttons up. More... | |
Signals inherited from MantidQt::MantidWidgets::InputController | |
| void | disabled () |
| void | enabled () |
| void | touchPointAt (int, int) |
Public Member Functions | |
| InputControllerDrawShape (QObject *parent) | |
| Constructor. More... | |
| void | keyPressEvent (QKeyEvent *) override |
| Process the keyboard key press event. More... | |
| void | leaveEvent (QEvent *) override |
| Process event of the mouse leaving the widget. 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 button release 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 | |
| QColor | m_borderColor |
| bool | m_creating |
| a shape is being created with a mouse More... | |
| QColor | m_fillColor |
| bool | m_isButtonPressed |
| QRect | m_rect |
| QString | m_shapeType |
| int | m_x |
| int | m_y |
Controller for drawing mask shapes.
Definition at line 139 of file InputController.h.
| MantidQt::MantidWidgets::InputControllerDrawShape::InputControllerDrawShape | ( | QObject * | parent | ) |
Constructor.
Definition at line 129 of file InputController.cpp.
|
signal |
Add a new shape.
Referenced by mousePressEvent().
|
signal |
Copy the selected shapes.
Referenced by keyPressEvent().
|
signal |
Deselect all selected shapes.
|
signal |
Rubber band selection is done.
Referenced by mouseReleaseEvent().
|
overridevirtual |
Process the keyboard key press event.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 184 of file InputController.cpp.
References copySelectedShapes(), pasteCopiedShapes(), and removeSelectedShapes().
|
overridevirtual |
Process event of the mouse leaving the widget.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 206 of file InputController.cpp.
References restoreOverrideCursor().
|
overridevirtual |
Process the mouse move event.
If the left mouse button is down sends editing signals.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 155 of file InputController.cpp.
References m_creating, m_isButtonPressed, m_rect, m_x, m_y, moveBy(), moveRightBottomTo(), setSelection(), and touchPointAt().
|
overridevirtual |
Process the mouse press event.
Sends addShape or selectAt signal.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 135 of file InputController.cpp.
References addShape(), m_borderColor, m_creating, m_fillColor, m_isButtonPressed, m_rect, m_shapeType, m_x, m_y, selectAt(), and selectCtrlAt().
|
overridevirtual |
Process the mouse button release event.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 174 of file InputController.cpp.
References finishSelection(), m_creating, m_isButtonPressed, m_rect, and m_shapeType.
|
signal |
Move selected shape or a control point by a displacement vector.
Referenced by mouseMoveEvent().
|
signal |
Resize the current shape by moving the right-bottom control point to a location on the screen.
Referenced by mouseMoveEvent().
|
overrideslot |
Action on disabling.
Definition at line 222 of file InputController.cpp.
References MantidQt::MantidWidgets::InputController::disabled(), and m_creating.
|
signal |
Paste previously copied shapes.
Referenced by keyPressEvent().
|
signal |
Remove the selected shapes.
Referenced by keyPressEvent().
|
signal |
Restore the cursor to its default image.
Referenced by leaveEvent().
|
signal |
Select a shape or a conrol point at a location on the screen.
Referenced by mousePressEvent().
|
signal |
Select a shape with ctrl key pressed at a location on the screen.
Referenced by mousePressEvent().
|
signal |
Update the rubber band selection.
Referenced by mouseMoveEvent().
|
slot |
Slot for defining the shape to draw and initializing drawing.
Definition at line 211 of file InputController.cpp.
References m_borderColor, m_creating, m_fillColor, and m_shapeType.
|
signal |
Sent when the mouse is moved to a new position with the buttons up.
Referenced by mouseMoveEvent().
|
private |
Definition at line 187 of file InputController.h.
Referenced by mousePressEvent(), and startCreatingShape2D().
|
private |
a shape is being created with a mouse
Definition at line 184 of file InputController.h.
Referenced by mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), onDisabled(), and startCreatingShape2D().
|
private |
Definition at line 187 of file InputController.h.
Referenced by mousePressEvent(), and startCreatingShape2D().
|
private |
Definition at line 188 of file InputController.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 189 of file InputController.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 186 of file InputController.h.
Referenced by mousePressEvent(), mouseReleaseEvent(), and startCreatingShape2D().
|
private |
Definition at line 185 of file InputController.h.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 185 of file InputController.h.
Referenced by mouseMoveEvent(), and mousePressEvent().