23 #include <vtkSmartPointer.h>
28 class vtkDataSetMapper;
29 class vtkExtractSelection;
31 class vtkSelectionNode;
34 class vtkLabeledDataMapper;
55 QString cellLabelFontFamily =
"Arial";
56 int cellLabelFontSize = 18;
57 QColor cellLabelColor = QColor(0, 255, 0);
58 double cellLabelOpacity = 1.0;
59 bool cellLabelBold =
false;
60 bool cellLabelItalic =
false;
61 bool cellLabelShadow =
false;
62 int cellLabelHorizontalJustification = 0;
63 int cellLabelVerticalJustification = 0;
64 QString cellLabelFormat =
"";
69 QString pointLabelFontFamily =
"Arial";
70 int pointLabelFontSize = 18;
71 QColor pointLabelColor = QColor(255, 255, 0);
72 double pointLabelOpacity = 1.0;
73 bool pointLabelBold =
false;
74 bool pointLabelItalic =
false;
75 bool pointLabelShadow =
false;
76 int pointLabelHorizontalJustification = 0;
77 int pointLabelVerticalJustification = 0;
78 QString pointLabelFormat =
"";
81 bool showTooltips =
true;
82 int maxTooltipAttributes = 15;
148 int fieldAssociation,
149 HighlightMode mode = SELECTED);
161 bool highlightSelection(vtkPolyData* polyData,
163 int fieldAssociation,
164 HighlightMode mode = SELECTED);
175 HighlightMode mode = SELECTED);
184 bool highlightElement(vtkPolyData* polyData,
186 int fieldAssociation);
191 void clearHighlights();
197 void clearHoverHighlight();
205 void setHighlightsVisible(
bool visible);
214 void setHighlightColor(
double r,
217 HighlightMode mode = SELECTED);
224 void setHighlightOpacity(
double opacity, HighlightMode mode = SELECTED);
231 const double* getHighlightColor(HighlightMode mode)
const;
238 double getHighlightOpacity(HighlightMode mode)
const;
245 void setPointSize(
int size, HighlightMode mode = SELECTED);
252 int getPointSize(HighlightMode mode)
const;
259 void setLineWidth(
int width, HighlightMode mode = SELECTED);
266 int getLineWidth(HighlightMode mode)
const;
272 void setEnabled(
bool enabled);
284 bool interactive =
false)
const;
292 bool interactive =
false);
303 void setPointLabelArray(
const QString& arrayName,
bool visible =
true);
310 void setCellLabelArray(
const QString& arrayName,
bool visible =
true);
339 QColor getHighlightQColor(HighlightMode mode)
const;
344 void setHighlightQColor(
const QColor&
color, HighlightMode mode = SELECTED);
388 vtkIdTypeArray* selection,
389 int fieldAssociation,
397 vtkIdTypeArray* selection,
int fieldAssociation);
402 void addActorToVisualizer(vtkActor* actor,
const QString&
id);
407 void removeActorFromVisualizer(
const QString&
id);
413 void updateLabelActor(
bool isPointLabels);
425 double m_hoverColor[3];
427 double m_preselectedColor[3];
429 double m_selectedColor[3];
431 double m_boundaryColor[3];
435 double m_hoverOpacity;
436 double m_preselectedOpacity;
437 double m_selectedOpacity;
438 double m_boundaryOpacity;
441 int m_hoverPointSize;
442 int m_preselectedPointSize;
443 int m_selectedPointSize;
444 int m_boundaryPointSize;
447 int m_hoverLineWidth;
448 int m_preselectedLineWidth;
449 int m_selectedLineWidth;
450 int m_boundaryLineWidth;
453 QString m_hoverActorId;
454 QString m_preselectedActorId;
455 QString m_selectedActorId;
456 QString m_boundaryActorId;
463 QString m_pointLabelArrayName;
465 QString m_cellLabelArrayName;
467 bool m_pointLabelVisible;
468 bool m_cellLabelVisible;
474 m_lastSelectionPolyData;
519 QString getTooltipInfo(vtkPolyData* polyData,
521 AssociationType association,
522 const QString& datasetName = QString());
532 QString getPlainTooltipInfo(vtkPolyData* polyData,
534 AssociationType association,
535 const QString& datasetName = QString());
541 void setMaxAttributes(
int maxAttribs);
547 QString formatPointTooltip(vtkPolyData* polyData,
549 const QString& datasetName);
554 QString formatCellTooltip(vtkPolyData* polyData,
556 const QString& datasetName);
561 void addArrayValues(QString& tooltip,
562 vtkFieldData* fieldData,
563 vtkIdType tupleIndex);
568 QString formatArrayValue(vtkDataArray* array, vtkIdType tupleIndex);
575 QString formatNumber(
double value);
Encapsulates selection data without exposing VTK types.
Helper class for highlighting selected elements in the visualizer.
QString getCellLabelArrayName() const
Get current cell label array name.
void propertiesChanged()
Emitted when any property changes (general notification)
void colorChanged(int mode)
Emitted when any highlight color changes.
void opacityChanged(int mode)
Emitted when any opacity changes.
void labelPropertiesChanged(bool interactive)
Emitted when label properties change.
HighlightMode
Highlight mode (Enhanced multi-level highlighting)
QString getPointLabelArrayName() const
Get current point label array name.
bool isCellLabelVisible() const
Check if cell labels are visible.
void pointSizeChanged(int mode)
Emitted when point size changes.
bool isPointLabelVisible() const
Check if point labels are visible.
void lineWidthChanged(int mode)
Emitted when line width changes.
#define QPCL_ENGINE_LIB_API
Label properties for selection annotations.