MaskOverlay Class Reference

#include <mask_overlay.hh>

Inherits ost::img::gui::Overlay.

Public Member Functions

 MaskOverlay ()
 MaskOverlay (const MaskPtr &m)
virtual bool OnMouseEvent (QMouseEvent *e, DataViewerPanel *dvp, const QPoint &lastmouse)
virtual bool OnKeyEvent (QKeyEvent *e, DataViewerPanel *dvp)
virtual void OnDraw (QPainter &pnt, DataViewerPanel *dvp, bool is_active)
virtual QMenu * GetMenu ()
MaskPtr GetMask () const
void SetMask (const MaskPtr &m)
void ClearMask ()
void ClearShift ()
geom::Vec2 GetShift ()
void SetShift (geom::Vec2 shift)
void ApplyShiftToMask ()

Protected Attributes

std::vector< geom::Polygon2polygons_
QMenu * menu_
int active_
bool add_mode_
geom::Polygon2 new_poly_
geom::Vec2 old_mouse_pos_
geom::Vec2 shift_

Detailed Description

Definition at line 42 of file mask_overlay.hh.


Constructor & Destructor Documentation

MaskOverlay (  ) 
MaskOverlay ( const MaskPtr m  ) 

Member Function Documentation

void ApplyShiftToMask (  ) 
void ClearMask (  ) 
void ClearShift (  )  [inline]

Definition at line 57 of file mask_overlay.hh.

MaskPtr GetMask (  )  const
virtual QMenu* GetMenu (  )  [virtual]

return overlay specific pulldown menu

Reimplemented from Overlay.

geom::Vec2 GetShift (  )  [inline]

Definition at line 58 of file mask_overlay.hh.

virtual void OnDraw ( QPainter &  pnt,
DataViewerPanel dvp,
bool  is_active 
) [virtual]

call when redrawing is necessary

params: the drawing context, the parent data viewer, as well as a flag to indicate wether this overlay is currently active

Reimplemented from Overlay.

virtual bool OnKeyEvent ( QKeyEvent *  e,
DataViewerPanel dvp 
) [virtual]

key event handler

see comments for the mouse events

Reimplemented from Overlay.

virtual bool OnMouseEvent ( QMouseEvent *  e,
DataViewerPanel dvp,
const QPoint &  lastmouse 
) [virtual]

mouse event handler

if an overlay is active, it receives the mouse events. if it handles the event for itself, it should return true, otherwise false should be returned to give the data viewer a chance to handle the event for itself

Reimplemented from Overlay.

void SetMask ( const MaskPtr m  ) 
void SetShift ( geom::Vec2  shift  ) 

Field Documentation

int active_ [protected]

Definition at line 65 of file mask_overlay.hh.

bool add_mode_ [protected]

Definition at line 66 of file mask_overlay.hh.

QMenu* menu_ [protected]

Definition at line 64 of file mask_overlay.hh.

Definition at line 67 of file mask_overlay.hh.

Definition at line 68 of file mask_overlay.hh.

std::vector<geom::Polygon2> polygons_ [protected]

Definition at line 63 of file mask_overlay.hh.

geom::Vec2 shift_ [protected]

Definition at line 69 of file mask_overlay.hh.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 1 Mar 2018 for OpenStructure by  doxygen 1.6.1