![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Formatter class for generating tooltip text from VTK data. More...
#include <cvSelectionHighlighter.h>
Public Types | |
| enum | AssociationType { POINTS = 1, CELLS = 0 } |
| Element association type. More... | |
Public Member Functions | |
| cvTooltipFormatter () | |
| Constructor. More... | |
| ~cvTooltipFormatter () | |
| Destructor. More... | |
| QString | getTooltipInfo (vtkPolyData *polyData, vtkIdType elementId, AssociationType association, const QString &datasetName=QString()) |
| Generate tooltip information for a selected element. More... | |
| QString | getPlainTooltipInfo (vtkPolyData *polyData, vtkIdType elementId, AssociationType association, const QString &datasetName=QString()) |
| Generate plain text tooltip (no HTML formatting) More... | |
| void | setMaxAttributes (int maxAttribs) |
| Set maximum number of attributes to display. More... | |
Formatter class for generating tooltip text from VTK data.
This class formats tooltip information for selected elements (points/cells) from VTK PolyData into HTML-formatted text. It extracts and formats:
Based on ParaView's vtkSMTooltipSelectionPipeline Reference: ParaView/Remoting/Misc/vtkSMTooltipSelectionPipeline.cxx
| cvTooltipFormatter::cvTooltipFormatter | ( | ) |
Constructor.
| cvTooltipFormatter::~cvTooltipFormatter | ( | ) |
Destructor.
| QString cvTooltipFormatter::getPlainTooltipInfo | ( | vtkPolyData * | polyData, |
| vtkIdType | elementId, | ||
| AssociationType | association, | ||
| const QString & | datasetName = QString() |
||
| ) |
Generate plain text tooltip (no HTML formatting)
| polyData | The mesh data |
| elementId | The ID of the selected element |
| association | Type of element (POINTS or CELLS) |
| datasetName | Optional name of the dataset |
References getTooltipInfo().
| QString cvTooltipFormatter::getTooltipInfo | ( | vtkPolyData * | polyData, |
| vtkIdType | elementId, | ||
| AssociationType | association, | ||
| const QString & | datasetName = QString() |
||
| ) |
Generate tooltip information for a selected element.
| polyData | The mesh data |
| elementId | The ID of the selected element (point or cell) |
| association | Type of element (POINTS or CELLS) |
| datasetName | Optional name of the dataset |
References CVLog::Error(), and POINTS.
Referenced by getPlainTooltipInfo().
| void cvTooltipFormatter::setMaxAttributes | ( | int | maxAttribs | ) |
Set maximum number of attributes to display.
| maxAttribs | Maximum number of data arrays to show (default: 15) |