OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( const String name)

initialization requires name

Member Function Documentation

virtual QMenu* GetMenu ( )
virtual

return overlay specific pulldown menu

Reimplemented in PointlistOverlayBase, MaskOverlay, DrawOverlay, and NullOverlay.

String GetName ( ) const

retrieve name

void InfoTextChanged ( const QString &  t)
signal
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, MaskOverlay, PointlistOverlay, and NullOverlay.

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

key event handler

see comments for the mouse events

Reimplemented in MaskOverlay, and NullOverlay.

virtual void OnMenuEvent ( QAction *  e)
virtual
void OnMenuEventSlot ( QAction *  e)
slot
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 MaskOverlay, DrawOverlay, PointlistOverlay, and NullOverlay.

void SetName ( const String name)

set name

void SettingsChanged ( )
signal

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