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

Controller for drawing and erasing arbitrary shapes on an unwrapped surface. More...

#include <InputController.h>

Inheritance diagram for MantidQt::MantidWidgets::InputControllerDrawAndErase:
MantidQt::MantidWidgets::InputControllerDraw MantidQt::MantidWidgets::InputController

Public Slots

void startCreatingShape2D (const QColor &borderColor, const QColor &fillColor)
 

Signals

void addShape (const QPolygonF &poly, const QColor &borderColor, const QColor &fillColor)
 
void draw (const QPolygonF &)
 
void erase (const QPolygonF &)
 
- Signals inherited from MantidQt::MantidWidgets::InputController
void disabled ()
 
void enabled ()
 
void touchPointAt (int, int)
 

Public Member Functions

 InputControllerDrawAndErase (QObject *parent)
 
- Public Member Functions inherited from MantidQt::MantidWidgets::InputControllerDraw
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
 

Private Member Functions

void drawCursor (QPixmap *cursor) override
 
void makePolygon ()
 
void resize () override
 
void setPosition (const QPoint &pos) override
 
void signalLeftClick () override
 
void signalRightClick () override
 

Private Attributes

QColor m_borderColor
 
bool m_creating
 
QColor m_fillColor
 
QPoint m_pos
 
QPolygonF m_rect
 

Additional Inherited Members

- Protected Member Functions inherited from MantidQt::MantidWidgets::InputControllerDraw
int cursorSize () const
 
bool isActive () const
 
bool isLeftButtonPressed () const
 
bool isRightButtonPressed () const
 

Detailed Description

Controller for drawing and erasing arbitrary shapes on an unwrapped surface.

Definition at line 281 of file InputController.h.

Constructor & Destructor Documentation

◆ InputControllerDrawAndErase()

MantidQt::MantidWidgets::InputControllerDrawAndErase::InputControllerDrawAndErase ( QObject *  parent)

Definition at line 398 of file InputController.cpp.

References makePolygon().

Member Function Documentation

◆ addShape

void MantidQt::MantidWidgets::InputControllerDrawAndErase::addShape ( const QPolygonF &  poly,
const QColor &  borderColor,
const QColor &  fillColor 
)
signal

Referenced by signalLeftClick().

◆ draw

void MantidQt::MantidWidgets::InputControllerDrawAndErase::draw ( const QPolygonF &  )
signal

Referenced by signalLeftClick().

◆ drawCursor()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::drawCursor ( QPixmap *  cursor)
overrideprivatevirtual

◆ erase

void MantidQt::MantidWidgets::InputControllerDrawAndErase::erase ( const QPolygonF &  )
signal

Referenced by signalRightClick().

◆ makePolygon()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::makePolygon ( )
private

◆ resize()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::resize ( )
overrideprivatevirtual

Implements MantidQt::MantidWidgets::InputControllerDraw.

Definition at line 453 of file InputController.cpp.

References makePolygon().

◆ setPosition()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::setPosition ( const QPoint &  pos)
overrideprivatevirtual

Implements MantidQt::MantidWidgets::InputControllerDraw.

Definition at line 451 of file InputController.cpp.

References m_pos.

◆ signalLeftClick()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::signalLeftClick ( )
overrideprivatevirtual

◆ signalRightClick()

void MantidQt::MantidWidgets::InputControllerDrawAndErase::signalRightClick ( )
overrideprivatevirtual

Reimplemented from MantidQt::MantidWidgets::InputControllerDraw.

Definition at line 424 of file InputController.cpp.

References erase(), m_pos, and m_rect.

◆ startCreatingShape2D

void MantidQt::MantidWidgets::InputControllerDrawAndErase::startCreatingShape2D ( const QColor &  borderColor,
const QColor &  fillColor 
)
slot

Definition at line 455 of file InputController.cpp.

References m_borderColor, m_creating, and m_fillColor.

Member Data Documentation

◆ m_borderColor

QColor MantidQt::MantidWidgets::InputControllerDrawAndErase::m_borderColor
private

Definition at line 305 of file InputController.h.

Referenced by signalLeftClick(), and startCreatingShape2D().

◆ m_creating

bool MantidQt::MantidWidgets::InputControllerDrawAndErase::m_creating
private

Definition at line 306 of file InputController.h.

Referenced by signalLeftClick(), and startCreatingShape2D().

◆ m_fillColor

QColor MantidQt::MantidWidgets::InputControllerDrawAndErase::m_fillColor
private

Definition at line 305 of file InputController.h.

Referenced by signalLeftClick(), and startCreatingShape2D().

◆ m_pos

QPoint MantidQt::MantidWidgets::InputControllerDrawAndErase::m_pos
private

Definition at line 303 of file InputController.h.

Referenced by setPosition(), signalLeftClick(), and signalRightClick().

◆ m_rect

QPolygonF MantidQt::MantidWidgets::InputControllerDrawAndErase::m_rect
private

Definition at line 304 of file InputController.h.

Referenced by drawCursor(), makePolygon(), signalLeftClick(), and signalRightClick().


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