DGtal  1.0.0
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 163 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 166 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 200 of file Viewer3D.h.

201  {
202  boost::ignore_unused_variable_warning( viewer );
203  }

◆ 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 190 of file Viewer3D.h.

191  {
192  boost::ignore_unused_variable_warning( viewer );
193  }

◆ 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 220 of file Viewer3D.h.

221  {
222  boost::ignore_unused_variable_warning( viewer );
223  return "";
224  }

◆ 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 209 of file Viewer3D.h.

210  {
211  boost::ignore_unused_variable_warning( viewer );
212  }

◆ 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 178 of file Viewer3D.h.

179  {
180  boost::ignore_unused_variable_warning( viewer );
181  boost::ignore_unused_variable_warning( event );
182  return false;
183  }

◆ 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 250 of file Viewer3D.h.

251  {
252  boost::ignore_unused_variable_warning( viewer );
253  boost::ignore_unused_variable_warning( event );
254  return false;
255  }

◆ 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 265 of file Viewer3D.h.

266  {
267  boost::ignore_unused_variable_warning( viewer );
268  boost::ignore_unused_variable_warning( event );
269  return false;
270  }

◆ 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 281 of file Viewer3D.h.

282  {
283  boost::ignore_unused_variable_warning( viewer );
284  boost::ignore_unused_variable_warning( event );
285  return false;
286  }

◆ 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 235 of file Viewer3D.h.

236  {
237  boost::ignore_unused_variable_warning( viewer );
238  boost::ignore_unused_variable_warning( point );
239  return false;
240  }

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