![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/DataDisplayHandler.h>
Interface to generically show/hide Data in a GUI::View and/or query visibility. More...
Inheritance diagram for DataDisplayHandler: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. | |
|
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.
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.
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.
Remove the given data from the given view.
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.
|
inlinevirtual |
Called if a view associated with this DataDisplayHandler is destroyed.
Reimplemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.
|
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.
Reimplemented in ASCDataDisplayHandlerBase, ConeBeamDataDisplayHandler, RTStructureDataDisplayHandler, SharedImageSetDisplayHandler, TrackingSequenceDisplayHandler, and SweepDisplayHandler.