DGtal  1.5.beta
DGtal::Viewer3D< TSpace, TKSpace >::Extension Struct Reference

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

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 162 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 165 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 199 of file Viewer3D.h.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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