DGtal  1.3.beta
Public Types | Public Member Functions
DGtal::Viewer3D< TSpace, TKSpace >::Extension Struct Reference

#include <DGtal/io/viewers/Viewer3D.h>

Inheritance diagram for DGtal::Viewer3D< TSpace, TKSpace >::Extension:
[legend]

Public Types

typedef Viewer3D< Space, KSpaceViewer
 The associated viewer. More...
 

Public Member Functions

virtual ~Extension ()=default
 
virtual bool keyPressEvent (Viewer &viewer, QKeyEvent *event)
 
virtual void drawWithNames (Viewer &viewer)
 
virtual void draw (Viewer &viewer)
 
virtual void init (Viewer &viewer)
 
virtual QString helpString (const Viewer &viewer) const
 
virtual bool postSelection (const Viewer &viewer, const QPoint &point)
 
virtual bool mouseMoveEvent (const Viewer &viewer, QMouseEvent *event)
 
virtual bool mousePressEvent (const Viewer &viewer, QMouseEvent *event)
 
virtual bool mouseReleaseEvent (const Viewer &viewer, QMouseEvent *event)
 

Detailed Description

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
struct DGtal::Viewer3D< TSpace, TKSpace >::Extension

Interface that can be used so that one can extend a few service of Viewer3D, like keyPressEvent and others. You may thus give an extension to a Viewer3D by simply handling it a pointer to an object deriving from this class.

Definition at line 166 of file Viewer3D.h.

Member Typedef Documentation

◆ Viewer

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
typedef Viewer3D<Space, KSpace> DGtal::Viewer3D< TSpace, TKSpace >::Extension::Viewer

The associated viewer.

Definition at line 169 of file Viewer3D.h.

Constructor & Destructor Documentation

◆ ~Extension()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual DGtal::Viewer3D< TSpace, TKSpace >::Extension::~Extension ( )
virtualdefault

Member Function Documentation

◆ draw()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::Extension::draw ( Viewer viewer)
inlinevirtual

This method may be overloaded and is called at the beginning of Viewer3D::draw. This method is called for drawing elements.

Parameters
viewerthe viewer calling this method

Definition at line 203 of file Viewer3D.h.

204  {
205  boost::ignore_unused_variable_warning( viewer );
206  }

◆ drawWithNames()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::Extension::drawWithNames ( Viewer viewer)
inlinevirtual

This method may be overloaded and is called at the beginning of Viewer3D::drawWithNames. This method is useful for drawing elements with additional information for selection.

Parameters
viewerthe viewer calling this method

Definition at line 193 of file Viewer3D.h.

194  {
195  boost::ignore_unused_variable_warning( viewer );
196  }

◆ helpString()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual QString DGtal::Viewer3D< TSpace, TKSpace >::Extension::helpString ( const Viewer viewer) const
inlinevirtual

This method may be overloaded and is called when pressing help. It will be added before Viewer3D::helpString.

Parameters
viewerthe viewer calling this method
Returns
astring corresponding to the help of the viewer (list of commands, etc)

Definition at line 223 of file Viewer3D.h.

224  {
225  boost::ignore_unused_variable_warning( viewer );
226  return "";
227  }

◆ init()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual void DGtal::Viewer3D< TSpace, TKSpace >::Extension::init ( Viewer viewer)
inlinevirtual

This method may be overloaded and is called at QGLViewer initialization. It will be called at the beginning of Viewer3D::init.

Parameters
viewerthe viewer calling this method

Definition at line 212 of file Viewer3D.h.

213  {
214  boost::ignore_unused_variable_warning( viewer );
215  }

◆ keyPressEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual bool DGtal::Viewer3D< TSpace, TKSpace >::Extension::keyPressEvent ( Viewer viewer,
QKeyEvent *  event 
)
inlinevirtual

This method may be overloaded to capture other key events. It will be called at the beginning of Viewer3D::keyPressEvent.

Parameters
viewerthe viewer calling this method
eventthe key event
Returns
'true' if the event was handled (in this case, Viewer3D::keyPressEvent will not do anything).

Definition at line 181 of file Viewer3D.h.

182  {
183  boost::ignore_unused_variable_warning( viewer );
184  boost::ignore_unused_variable_warning( event );
185  return false;
186  }

◆ mouseMoveEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual bool DGtal::Viewer3D< TSpace, TKSpace >::Extension::mouseMoveEvent ( const Viewer viewer,
QMouseEvent *  event 
)
inlinevirtual

This method may be overloaded to capture other mouse move events. It will be called at the beginning of Viewer3D::mouseMoveEvent.

Parameters
viewerthe viewer calling this method
eventthe mouse move event
Returns
'true' if the event was handled (in this case, Viewer3D::mouseMoveEvent will not do anything).

Definition at line 253 of file Viewer3D.h.

254  {
255  boost::ignore_unused_variable_warning( viewer );
256  boost::ignore_unused_variable_warning( event );
257  return false;
258  }

◆ mousePressEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual bool DGtal::Viewer3D< TSpace, TKSpace >::Extension::mousePressEvent ( const Viewer viewer,
QMouseEvent *  event 
)
inlinevirtual

This method may be overloaded to capture other mouse press events. It will be called at the beginning of Viewer3D::mousePressEvent.

Parameters
viewerthe viewer calling this method
eventthe mouse press event
Returns
'true' if the event was handled (in this case, Viewer3D::mousePressEvent will not do anything).

Definition at line 268 of file Viewer3D.h.

269  {
270  boost::ignore_unused_variable_warning( viewer );
271  boost::ignore_unused_variable_warning( event );
272  return false;
273  }

◆ mouseReleaseEvent()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual bool DGtal::Viewer3D< TSpace, TKSpace >::Extension::mouseReleaseEvent ( const Viewer viewer,
QMouseEvent *  event 
)
inlinevirtual

This method may be overloaded to capture other mouse release events. It will be called at the beginning of Viewer3D::mouseReleaseEvent.

Parameters
viewerthe viewer calling this method
eventthe mouse release event
Returns
'true' if the event was handled (in this case, Viewer3D::mouseReleaseEvent will not do anything).

Definition at line 284 of file Viewer3D.h.

285  {
286  boost::ignore_unused_variable_warning( viewer );
287  boost::ignore_unused_variable_warning( event );
288  return false;
289  }

◆ postSelection()

template<typename TSpace = SpaceND<3>, typename TKSpace = KhalimskySpaceND<3>>
virtual bool DGtal::Viewer3D< TSpace, TKSpace >::Extension::postSelection ( const Viewer viewer,
const QPoint &  point 
)
inlinevirtual

This method may be overloaded to take care of a mouse selection event. It will be called at the beginning of Viewer3D::postSelection.

Parameters
viewerthe viewer calling this method
pointthe point clicked by the user in the window
Returns
'true' if the event was handled (in this case, Viewer3D::postSelection will not do anything).

Definition at line 238 of file Viewer3D.h.

239  {
240  boost::ignore_unused_variable_warning( viewer );
241  boost::ignore_unused_variable_warning( point );
242  return false;
243  }

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