Mantid
|
Controller for free drawing on an unwrapped surface. More...
#include <InputController.h>
Public Member Functions | |
void | enterEvent (QEvent *) override |
InputControllerDraw (QObject *parent) | |
Constructor. More... | |
void | leaveEvent (QEvent *) override |
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... | |
void | wheelEvent (QWheelEvent *) override |
~InputControllerDraw () override | |
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 | |
Protected Member Functions | |
int | cursorSize () const |
bool | isActive () const |
bool | isLeftButtonPressed () const |
bool | isRightButtonPressed () const |
Private Member Functions | |
virtual void | drawCursor (QPixmap *cursor)=0 |
void | redrawCursor () |
virtual void | resize ()=0 |
virtual void | setPosition (const QPoint &pos)=0 |
virtual void | signalLeftClick ()=0 |
virtual void | signalRightClick () |
Private Attributes | |
QPixmap * | m_cursor |
bool | m_isActive |
bool | m_isLeftButtonPressed |
bool | m_isRightButtonPressed |
const int | m_max_size |
int | m_size |
Size of the cursor. More... | |
Additional Inherited Members | |
Signals inherited from MantidQt::MantidWidgets::InputController | |
void | disabled () |
void | enabled () |
void | touchPointAt (int, int) |
Controller for free drawing on an unwrapped surface.
Definition at line 218 of file InputController.h.
MantidQt::MantidWidgets::InputControllerDraw::InputControllerDraw | ( | QObject * | parent | ) |
Constructor.
Definition at line 277 of file InputController.cpp.
|
override |
Definition at line 281 of file InputController.cpp.
References m_cursor.
|
inlineprotected |
Definition at line 233 of file InputController.h.
References m_size.
Referenced by MantidQt::MantidWidgets::InputControllerSelection::drawCursor(), MantidQt::MantidWidgets::InputControllerDrawAndErase::drawCursor(), MantidQt::MantidWidgets::InputControllerDrawAndErase::makePolygon(), and MantidQt::MantidWidgets::InputControllerSelection::resize().
|
privatepure virtual |
Implemented in MantidQt::MantidWidgets::InputControllerSelection, and MantidQt::MantidWidgets::InputControllerDrawAndErase.
Referenced by redrawCursor().
|
overridevirtual |
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 333 of file InputController.cpp.
References m_cursor, m_isActive, and redrawCursor().
|
inlineprotected |
Definition at line 236 of file InputController.h.
Referenced by MantidQt::MantidWidgets::InputControllerSelection::onPaint().
|
inlineprotected |
Definition at line 234 of file InputController.h.
Referenced by MantidQt::MantidWidgets::InputControllerSelection::onPaint().
|
inlineprotected |
Definition at line 235 of file InputController.h.
|
overridevirtual |
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 339 of file InputController.cpp.
References m_isActive.
|
overridevirtual |
Process the mouse move event.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 301 of file InputController.cpp.
References m_isActive, m_isLeftButtonPressed, m_isRightButtonPressed, setPosition, signalLeftClick(), and signalRightClick().
|
overridevirtual |
Process the mouse press event.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 286 of file InputController.cpp.
References m_isActive, m_isLeftButtonPressed, m_isRightButtonPressed, setPosition, signalLeftClick(), and signalRightClick().
|
overridevirtual |
Process the mouse button release event.
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 314 of file InputController.cpp.
References m_isLeftButtonPressed, and m_isRightButtonPressed.
|
private |
Definition at line 344 of file InputController.cpp.
References drawCursor(), m_cursor, and m_max_size.
Referenced by enterEvent(), and wheelEvent().
|
privatepure virtual |
Implemented in MantidQt::MantidWidgets::InputControllerSelection, and MantidQt::MantidWidgets::InputControllerDrawAndErase.
Referenced by wheelEvent().
|
privatepure virtual |
|
privatepure virtual |
Implemented in MantidQt::MantidWidgets::InputControllerSelection, and MantidQt::MantidWidgets::InputControllerDrawAndErase.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
privatevirtual |
Reimplemented in MantidQt::MantidWidgets::InputControllerDrawAndErase.
Definition at line 351 of file InputController.cpp.
Referenced by mouseMoveEvent(), and mousePressEvent().
|
overridevirtual |
Reimplemented from MantidQt::MantidWidgets::InputController.
Definition at line 322 of file InputController.cpp.
References Mantid::Geometry::d, m_cursor, m_max_size, m_size, redrawCursor(), and resize().
|
private |
Definition at line 251 of file InputController.h.
Referenced by enterEvent(), redrawCursor(), wheelEvent(), and ~InputControllerDraw().
|
private |
Definition at line 250 of file InputController.h.
Referenced by enterEvent(), leaveEvent(), mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 248 of file InputController.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 249 of file InputController.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 246 of file InputController.h.
Referenced by redrawCursor(), and wheelEvent().
|
private |