OpenStructure
|
#include <mask_overlay.hh>
Inherits 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 () |
Public Member Functions inherited from Overlay | |
Overlay (const String &name) | |
void | SetName (const String &name) |
String | GetName () const |
virtual void | OnMenuEvent (QAction *e) |
Protected Attributes | |
std::vector< geom::Polygon2 > | polygons_ |
QMenu * | menu_ |
int | active_ |
bool | add_mode_ |
geom::Polygon2 | new_poly_ |
geom::Vec2 | old_mouse_pos_ |
geom::Vec2 | shift_ |
Additional Inherited Members | |
Public Slots inherited from Overlay | |
void | OnMenuEventSlot (QAction *e) |
Signals inherited from Overlay | |
void | SettingsChanged () |
void | InfoTextChanged (const QString &t) |
Definition at line 42 of file mask_overlay.hh.
MaskOverlay | ( | ) |
MaskOverlay | ( | const MaskPtr & | m | ) |
void ApplyShiftToMask | ( | ) |
void ClearMask | ( | ) |
|
inline |
Definition at line 57 of file mask_overlay.hh.
MaskPtr GetMask | ( | ) | const |
|
virtual |
return overlay specific pulldown menu
Reimplemented from Overlay.
|
inline |
Definition at line 58 of file mask_overlay.hh.
|
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 |
|
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 | ) |
|
protected |
Definition at line 65 of file mask_overlay.hh.
|
protected |
Definition at line 66 of file mask_overlay.hh.
|
protected |
Definition at line 64 of file mask_overlay.hh.
|
protected |
Definition at line 67 of file mask_overlay.hh.
|
protected |
Definition at line 68 of file mask_overlay.hh.
|
protected |
Definition at line 63 of file mask_overlay.hh.
|
protected |
Definition at line 69 of file mask_overlay.hh.