OpenStructure
Public Slots | Signals | Public Member Functions
Overlay Class Reference

#include <overlay_base.hh>

Inherits QObject.

Inherited by DrawOverlay, MaskOverlay, NullOverlay, and PointlistOverlayBase.

Public Slots

void OnMenuEventSlot (QAction *e)
 

Signals

void SettingsChanged ()
 
void InfoTextChanged (const QString &t)
 

Public Member Functions

 Overlay (const String &name)
 
void SetName (const String &name)
 
String GetName () const
 
virtual void OnDraw (QPainter &pnt, DataViewerPanel *dvp, bool is_active)
 
virtual bool OnMouseEvent (QMouseEvent *e, DataViewerPanel *dvp, const QPoint &lastmouse)
 
virtual bool OnKeyEvent (QKeyEvent *e, DataViewerPanel *dvp)
 
virtual QMenu * GetMenu ()
 
virtual void OnMenuEvent (QAction *e)
 

Detailed Description

Definition at line 46 of file overlay_base.hh.

Constructor & Destructor Documentation

◆ Overlay()

Overlay ( const String name)

initialization requires name

Member Function Documentation

◆ GetMenu()

virtual QMenu* GetMenu ( )
virtual

return overlay specific pulldown menu

Reimplemented in PointlistOverlayBase, NullOverlay, MaskOverlay, and DrawOverlay.

◆ GetName()

String GetName ( ) const

retrieve name

◆ InfoTextChanged

void InfoTextChanged ( const QString &  t)
signal

◆ OnDraw()

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 in PointlistOverlayBase, PointlistOverlay, NullOverlay, and MaskOverlay.

◆ OnKeyEvent()

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

key event handler

see comments for the mouse events

Reimplemented in NullOverlay, and MaskOverlay.

◆ OnMenuEvent()

virtual void OnMenuEvent ( QAction *  e)
virtual

◆ OnMenuEventSlot

void OnMenuEventSlot ( QAction *  e)
slot

◆ OnMouseEvent()

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 in PointlistOverlay, NullOverlay, MaskOverlay, and DrawOverlay.

◆ SetName()

void SetName ( const String name)

set name

◆ SettingsChanged

void SettingsChanged ( )
signal

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