12 #include <QtGui/QColor>
13 #include <QtWidgets/QGroupBox>
14 #include <QtWidgets/QLabel>
15 #include <QtCore/QObject>
16 #include <QtWidgets/QPushButton>
17 #include <QtWidgets/QScrollArea>
18 #include <QtWidgets/QSpinBox>
19 #include <QtWidgets/QTableWidget>
20 #include <QtWidgets/QToolButton>
21 #include <QtWidgets/QWidget>
41 class cvSelectionBookmarks;
92 void syncUIWithHighlighter();
95 vtkPolyData* polyData =
nullptr);
96 void clearSelection();
100 return m_selectionManager;
106 void setDataProducerName(
const QString&
name);
112 void refreshDataProducers();
134 const QString& elementType,
135 const QString& attribute,
137 const QString& value);
146 void onCellLabelsClicked();
147 void onPointLabelsClicked();
148 void onEditLabelPropertiesClicked();
149 void onSelectionColorClicked();
150 void onInteractiveSelectionColorClicked();
151 void onEditInteractiveLabelPropertiesClicked();
152 void onLabelPropertiesApplied(
154 void onInteractiveLabelPropertiesApplied(
158 void onExpressionChanged(
const QString& text);
159 void onAddActiveSelectionClicked();
160 void onRemoveSelectedSelectionClicked();
161 void onRemoveAllSelectionsClicked();
162 void onActivateCombinedSelectionsClicked();
163 void onSelectionEditorTableSelectionChanged();
164 void onSelectionEditorCellClicked(
int row,
int column);
165 void onSelectionEditorCellDoubleClicked(
int row,
int column);
168 void onAttributeTypeChanged(
int index);
169 void onInvertSelectionToggled(
bool checked);
170 void onFreezeClicked();
171 void onExtractClicked();
172 void onPlotOverTimeClicked();
173 void onToggleColumnVisibility();
174 void onToggleFieldDataClicked(
bool checked);
177 void onDataProducerChanged(
int index);
178 void onElementTypeChanged(
int index);
179 void onFindDataClicked();
180 void onResetClicked();
181 void onClearClicked();
182 void updateAttributeCombo();
183 void updateDataProducerCombo();
184 void addQueryRow(
int index = -1,
185 const QString& attribute = QString(),
186 const QString& op = QString(),
187 const QString& value = QString());
188 void removeQueryRow(
int index);
189 void updateQueryRowButtons();
190 void performFindData(
const QString& attribute,
192 const QString& value,
194 void onSpreadsheetItemClicked(QTableWidgetItem* item);
197 void onHoverColorClicked();
198 void onPreselectedColorClicked();
199 void onSelectedColorClicked();
200 void onBoundaryColorClicked();
201 void onHoverOpacityChanged(
double value);
202 void onPreselectedOpacityChanged(
double value);
203 void onSelectedOpacityChanged(
double value);
204 void onBoundaryOpacityChanged(
double value);
205 void onExportToMeshClicked();
206 void onExportToPointCloudClicked();
207 void onSelectionTableItemClicked(QTableWidgetItem* item);
208 void onAlgebraOperationTriggered();
211 void onAddAnnotationClicked();
212 void onExtractBoundaryClicked();
215 void onHighlighterColorChanged(
int mode);
216 void onHighlighterOpacityChanged(
int mode);
217 void onHighlighterLabelPropertiesChanged(
bool interactive);
221 bool eventFilter(QObject* obj, QEvent*
event)
override;
223 void resizeEvent(QResizeEvent*
event)
override;
229 void setupSelectedDataHeader();
230 void setupCreateSelectionSection();
231 void setupSelectionDisplaySection();
232 void setupSelectionEditorSection();
233 void setupSelectedDataSpreadsheet();
235 setupCompactStatisticsSection();
237 void updateStatistics(vtkPolyData* polyData,
239 void updateSelectionList(vtkPolyData* polyData);
240 void updateSpreadsheetData(
241 vtkPolyData* polyData,
243 void computeBoundingBox(vtkPolyData* polyData,
double bounds[6]);
244 QString formatBounds(
const double bounds[6]);
245 void showColorDialog(
const QString& title,
246 double currentColor[3],
248 void highlightSingleItem(qint64
id);
249 qint64 extractIdFromItemText(
const QString& itemText);
251 void updateSelectionEditorTable();
252 QString generateSelectionName();
253 QColor generateSelectionColor()
const;
256 void syncInternalColorArray(
double r,
double g,
double b,
int mode);
260 void updateColorButtonIcon(QAbstractButton* button,
const QColor&
color);
263 void setupCollapsibleGroupBox(QGroupBox* groupBox);
266 void updateScrollContentWidth();
270 QStringList tokenizeExpression(
const QString& expression);
271 cvSelectionData parseOrExpression(
const QStringList& tokens,
int& pos);
272 cvSelectionData parseXorExpression(
const QStringList& tokens,
int& pos);
273 cvSelectionData parseAndExpression(
const QStringList& tokens,
int& pos);
274 cvSelectionData parseUnaryExpression(
const QStringList& tokens,
int& pos);
275 cvSelectionData parsePrimaryExpression(
const QStringList& tokens,
int& pos);
284 m_originalSelectionIds;
291 QList<SavedSelection> m_savedSelections;
292 QString m_dataProducerName;
295 QScrollArea* m_scrollArea;
296 QWidget* m_scrollContent;
300 QWidget* m_selectedDataContainer;
301 QLabel* m_selectedDataLabel;
302 QPushButton* m_freezeButton;
303 QPushButton* m_extractButton;
304 QPushButton* m_plotOverTimeButton;
308 QWidget* m_selectionDisplayContainer;
309 QGroupBox* m_selectionDisplayGroup;
311 QPushButton* m_cellLabelsButton;
312 QPushButton* m_pointLabelsButton;
313 QMenu* m_cellLabelsMenu;
314 QMenu* m_pointLabelsMenu;
315 QPushButton* m_editLabelPropertiesButton;
317 QToolButton* m_selectionColorButton;
322 m_interactiveSelectionColorButton;
323 QPushButton* m_editInteractiveLabelPropertiesButton;
327 QWidget* m_selectionEditorContainer;
328 QGroupBox* m_selectionEditorGroup;
329 QLabel* m_dataProducerLabel;
330 QLabel* m_dataProducerValue;
331 QLabel* m_elementTypeLabel;
332 QLabel* m_elementTypeValue;
334 QLabel* m_expressionLabel;
335 QLineEdit* m_expressionEdit;
336 QTableWidget* m_selectionEditorTable;
337 QToolButton* m_addSelectionButton;
338 QToolButton* m_removeSelectionButton;
339 QToolButton* m_removeAllSelectionsButton;
340 QPushButton* m_activateCombinedSelectionsButton;
344 QWidget* m_createSelectionContainer;
345 QGroupBox* m_createSelectionGroup;
346 QComboBox* m_dataProducerCombo;
347 QComboBox* m_elementTypeCombo;
348 QComboBox* m_attributeCombo;
349 QComboBox* m_operatorCombo;
350 QLineEdit* m_valueEdit;
351 QSpinBox* m_processIdSpinBox;
352 QPushButton* m_findDataButton;
353 QPushButton* m_resetButton;
354 QPushButton* m_clearButton;
355 QVBoxLayout* m_queriesLayout;
359 QComboBox* attributeCombo;
360 QComboBox* operatorCombo;
361 QLineEdit* valueEdit;
362 QPushButton* plusButton;
363 QPushButton* minusButton;
367 bool operator==(
const QueryRow& other)
const {
368 return container == other.container;
371 QList<QueryRow> m_queryRows;
375 QWidget* m_selectedDataSpreadsheetContainer;
376 QGroupBox* m_selectedDataGroup;
377 QComboBox* m_attributeTypeCombo;
378 QToolButton* m_toggleColumnVisibilityButton;
379 QToolButton* m_toggleFieldDataButton;
381 QCheckBox* m_invertSelectionCheck;
382 QTableWidget* m_spreadsheetTable;
386 QWidget* m_compactStatsContainer;
387 QGroupBox* m_compactStatsGroup;
388 QLabel* m_countLabel;
390 QLabel* m_boundsLabel;
391 QLabel* m_centerLabel;
392 QLabel* m_volumeLabel;
395 QTabWidget* m_tabWidget;
400 QTableWidget* m_selectionTableWidget;
401 QLabel* m_listInfoLabel;
402 QComboBox* m_algebraOpCombo;
403 QPushButton* m_applyAlgebraButton;
404 QPushButton* m_extractBoundaryButton;
407 QPushButton* m_addAnnotationButton;
410 QPushButton* m_hoverColorButton;
411 QPushButton* m_preselectedColorButton;
412 QPushButton* m_selectedColorButton;
413 QPushButton* m_boundaryColorButton;
414 QDoubleSpinBox* m_hoverOpacitySpin;
415 QDoubleSpinBox* m_preselectedOpacitySpin;
416 QDoubleSpinBox* m_selectedOpacitySpin;
417 QDoubleSpinBox* m_boundaryOpacitySpin;
421 QColor getSelectionColor()
const;
422 QColor getInteractiveSelectionColor()
const;
425 int m_selectionCount;
426 QString m_selectionType;
432 int m_selectionNameCounter;
436 int m_extractCounter;
439 static const QColor s_selectionColors[];
440 static const int s_selectionColorsCount;
443 QString m_currentCellLabelArray;
444 QString m_currentPointLabelArray;
447 double m_savedPreselectedColor[3];
448 qint64 m_lastHighlightedId;
Hierarchical CLOUDVIEWER Object.
Selection algebra operations.
Selection annotation manager.
Lightweight base class for all selection-related components.
Encapsulates selection data without exposing VTK types.
Advanced selection filtering system.
Helper class for highlighting selected elements in the visualizer.
Central manager for all selection operations in the view.
constexpr bool operator==(const optional< T > &x, const optional< T > &y)
#define QPCL_ENGINE_LIB_API
Label properties structure.