ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvTooltipFormatter Class Reference

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...
 

Detailed Description

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:

  • Element ID
  • Coordinates (for points)
  • Type (for cells)
  • Data array values (Intensity, RGB, normals, etc.)

Based on ParaView's vtkSMTooltipSelectionPipeline Reference: ParaView/Remoting/Misc/vtkSMTooltipSelectionPipeline.cxx

Definition at line 494 of file cvSelectionHighlighter.h.

Member Enumeration Documentation

◆ AssociationType

Element association type.

Enumerator
POINTS 
CELLS 

Definition at line 499 of file cvSelectionHighlighter.h.

Constructor & Destructor Documentation

◆ cvTooltipFormatter()

cvTooltipFormatter::cvTooltipFormatter ( )

Constructor.

Definition at line 1247 of file cvSelectionHighlighter.cpp.

◆ ~cvTooltipFormatter()

cvTooltipFormatter::~cvTooltipFormatter ( )

Destructor.

Definition at line 1250 of file cvSelectionHighlighter.cpp.

Member Function Documentation

◆ getPlainTooltipInfo()

QString cvTooltipFormatter::getPlainTooltipInfo ( vtkPolyData *  polyData,
vtkIdType  elementId,
AssociationType  association,
const QString &  datasetName = QString() 
)

Generate plain text tooltip (no HTML formatting)

Parameters
polyDataThe mesh data
elementIdThe ID of the selected element
associationType of element (POINTS or CELLS)
datasetNameOptional name of the dataset
Returns
Plain text tooltip string

Definition at line 1275 of file cvSelectionHighlighter.cpp.

References getTooltipInfo().

◆ getTooltipInfo()

QString cvTooltipFormatter::getTooltipInfo ( vtkPolyData *  polyData,
vtkIdType  elementId,
AssociationType  association,
const QString &  datasetName = QString() 
)

Generate tooltip information for a selected element.

Parameters
polyDataThe mesh data
elementIdThe ID of the selected element (point or cell)
associationType of element (POINTS or CELLS)
datasetNameOptional name of the dataset
Returns
HTML-formatted tooltip string

Definition at line 1258 of file cvSelectionHighlighter.cpp.

References CVLog::Error(), and POINTS.

Referenced by getPlainTooltipInfo().

◆ setMaxAttributes()

void cvTooltipFormatter::setMaxAttributes ( int  maxAttribs)

Set maximum number of attributes to display.

Parameters
maxAttribsMaximum number of data arrays to show (default: 15)

Definition at line 1253 of file cvSelectionHighlighter.cpp.


The documentation for this class was generated from the following files: