ImFusion SDK 4.3
DataDisplayHandler Class Referenceabstract

#include <ImFusion/GUI/DataDisplayHandler.h>

Interface to generically show/hide Data in a GUI::View and/or query visibility. More...

+ Inheritance diagram for DataDisplayHandler:

Detailed Description

Interface to generically show/hide Data in a GUI::View and/or query visibility.

In order to make a specific Data type generically visualizable implement this interface and register the specialization with the DataDisplayHandlerFactory. This enables SDK classes such as GUI::Display, GUI::View, and DataWidget to use them.

Public Member Functions

virtual bool handlesType (const Data *data) const =0
 Check whether this specialization handles the given Data type.
 
virtual bool canBeShownInView (const Data *data, const GUI::View &view) const =0
 Check whether a particular Data can be shown in the given view.
 
virtual void show (Data *data, GUI::View &view)=0
 Visualize the given data in the given view.
 
virtual void hide (Data *data, GUI::View &view)=0
 Remove the given data from the given view.
 
virtual void onViewDeleted (GUI::View &view)
 Called if a view associated with this DataDisplayHandler is destroyed.
 
virtual std::unique_ptr< QWidget > createDisplayOptionsWidget (Data *data, GUI::DisplayBase &display, GUI::View &view) const
 Provides an optional QtWidgets-based GUI to configure display options for the given data shown in view.
 

Member Function Documentation

◆ handlesType()

virtual bool handlesType ( const Data * data) const
pure virtual

Check whether this specialization handles the given Data type.

Checks should be as narrow as possible to avoid potential overlap with other handlers.

Implemented in ASCDataDisplayHandler< Q, T >, ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, DataItemDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.

◆ canBeShownInView()

virtual bool canBeShownInView ( const Data * data,
const GUI::View & view ) const
pure virtual

Check whether a particular Data can be shown in the given view.

Used by DataDisplayHandler during view dispatch when calling show(). Should only be called if handlesType(data) == true.

Implemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, DataItemDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.

◆ show()

virtual void show ( Data * data,
GUI::View & view )
pure virtual

Visualize the given data in the given view.

Should only be called if (handlesType(data) == true) && (canBeShownInView(data, view) == true).

Implemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, DataItemDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.

◆ hide()

virtual void hide ( Data * data,
GUI::View & view )
pure virtual

Remove the given data from the given view.

Warning
Implementations must not access data beyond pointer comparison because the instance may already in the process of deletion when calling this function.

Implemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, DataItemDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.

◆ onViewDeleted()

virtual void onViewDeleted ( GUI::View & view)
inlinevirtual

Called if a view associated with this DataDisplayHandler is destroyed.

Reimplemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.

◆ createDisplayOptionsWidget()

virtual std::unique_ptr< QWidget > createDisplayOptionsWidget ( Data * data,
GUI::DisplayBase & display,
GUI::View & view ) const
virtual

Provides an optional QtWidgets-based GUI to configure display options for the given data shown in view.

This function is used to enable InteractiveViewOptionsOverlay showing a suitable GUI for all data shown in its corresponding view. The default implementation returns nullptr.

Note
This function is still considered experimental and may be moved/changed in the future.

Reimplemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close