 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
14 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
15 #include <QActionGroup>
20 #include <QtWidgets/QActionGroup>
21 #include <QtCore/QMap>
22 #include <QtCore/QObject>
23 #include <QtCore/QPointer>
37 class cvSelectionHistory;
38 class cvSelectionBookmarks;
66 void initialize(QWidget* parent);
93 template <
typename UiType>
94 void setupActions(UiType* ui);
99 static bool isPCLBackendAvailable();
109 QAction* selectSurfaceCells =
nullptr;
110 QAction* selectSurfacePoints =
nullptr;
113 QAction* selectFrustumCells =
nullptr;
114 QAction* selectFrustumPoints =
nullptr;
117 QAction* selectPolygonCells =
nullptr;
118 QAction* selectPolygonPoints =
nullptr;
121 QAction* selectBlocks =
nullptr;
122 QAction* selectFrustumBlocks =
nullptr;
125 QAction* interactiveSelectCells =
nullptr;
126 QAction* interactiveSelectPoints =
nullptr;
129 QAction* hoverCells =
nullptr;
130 QAction* hoverPoints =
nullptr;
133 QAction* addSelection =
nullptr;
134 QAction* subtractSelection =
nullptr;
135 QAction* toggleSelection =
nullptr;
138 QAction* growSelection =
nullptr;
139 QAction* shrinkSelection =
nullptr;
140 QAction* clearSelection =
nullptr;
143 QAction* zoomToBox =
nullptr;
155 void connectHighlighter();
166 m_propertiesDelegate = delegate;
188 void registerModifierActions(QAction* addAction,
189 QAction* subtractAction,
190 QAction* toggleAction);
195 void registerManipulationActions(QAction* growAction,
196 QAction* shrinkAction,
197 QAction* clearAction);
208 bool isAnyToolActive()
const;
219 bool handleEscapeKey();
237 void setSelectionPropertiesActive(
bool active);
245 void invalidateCache();
257 void selectionToolStateChanged(
bool anyToolActive);
263 void selectionPropertiesUpdateRequested(
269 void selectionHistoryChanged();
274 void bookmarksChanged();
279 void zoomToBoxRequested(
int xmin,
int ymin,
int xmax,
int ymax);
292 void onModifierChanged(QAction* action);
304 QPointer<QWidget> m_parentWidget;
306 bool m_selectionToolsActive;
307 QPointer<QObject> m_propertiesDelegate;
310 QMap<SelectionMode, QPointer<cvRenderViewSelectionReaction>> m_reactions;
313 SelectionActions m_actions;
316 QPointer<QActionGroup> m_modifierGroup;
317 QPointer<QAction> m_addAction;
318 QPointer<QAction> m_subtractAction;
319 QPointer<QAction> m_toggleAction;
322 QPointer<QAction> m_growAction;
323 QPointer<QAction> m_shrinkAction;
324 QPointer<QAction> m_clearAction;
cvSelectionHighlighter * getHighlighter()
Get the shared highlighter.
Definition: cvViewSelectionManager.h:238
@ SELECTION_SUBTRACTION
Subtract from selection (Shift)
void setSelectionModifier(SelectionModifier modifier)
Set the selection modifier.
Definition: cvViewSelectionManager.cpp:165
@ SELECT_FRUSTUM_POINTS
Select points in frustum.
SelectionModifier
Selection modifiers for combining selections.
Definition: cvSelectionData.h:80
void invalidateCachedSelection()
Clear selection cache and invalidate cached buffers.
Definition: cvSelectionPipeline.cpp:491
@ SELECT_SURFACE_CELLS_POLYGON
Select cells on surface (polygon)
GraphType data
Definition: graph_cut.cc:138
static bool PrintVerbose(const char *format,...)
Prints out a verbose formatted message in console.
Definition: CVLog.cpp:103
#define signals
Definition: PythonPlugin.cpp:26
Simplified selection reaction class aligned with ParaView architecture.
@ SELECT_SURFACE_CELLS_INTERACTIVELY
@ SHRINK_SELECTION
Shrink selection by one layer.
@ SELECTION_ADDITION
Add to selection (Ctrl)
#define slots
Definition: PythonPlugin.cpp:25
SelectionMode getCurrentMode() const
Get the current active selection mode.
Definition: cvViewSelectionManager.h:110
bool isActive() const
Check if this reaction's selection is currently active.
Definition: cvRenderViewSelectionReaction.cpp:221
@ ZOOM_TO_BOX
Zoom to box region.
@ SELECT_SURFACE_CELLS
Select cells on surface (rectangle)
bool isEmpty() const
Check if selection is empty.
Definition: cvSelectionData.cpp:114
@ SELECTION_DEFAULT
Replace selection (default)
@ HOVER_POINTS_TOOLTIP
Show point data tooltip on hover (read-only)
Selection pipeline abstraction layer.
Definition: cvSelectionPipeline.h:53
Central manager for all selection operations in the view.
Definition: cvViewSelectionManager.h:52
Generic visualizer 3D interface.
Definition: ecvGenericVisualizer3D.h:15
int count() const
Get number of selected items.
Definition: cvSelectionData.cpp:119
cvSelectionPipeline * getPipeline()
Get the selection pipeline.
Definition: cvViewSelectionManager.h:214
void setVisualizer(ecvGenericVisualizer3D *viewer)
Set the visualizer for selection operations.
Definition: cvRenderViewSelectionReaction.cpp:193
static cvRenderViewSelectionReaction * activeReaction()
Get the currently active reaction (static)
Definition: cvRenderViewSelectionReaction.h:142
static void endActiveSelection()
Force end any active selection.
Definition: cvRenderViewSelectionReaction.cpp:226
@ SELECTION_TOGGLE
Toggle selection (Ctrl+Shift)
@ SELECT_BLOCKS
Select blocks (rectangle)
void zoomToBoxCompleted(int xmin, int ymin, int xmax, int ymax)
Emitted when zoom to box is completed.
QString fieldTypeString() const
Get human-readable field type string.
Definition: cvSelectionData.cpp:143
cvRenderViewSelectionReaction handles all selection modes in a single class
Definition: cvRenderViewSelectionReaction.h:89
Encapsulates selection data without exposing VTK types.
Definition: cvSelectionData.h:136
@ HOVER_CELLS_TOOLTIP
Show cell data tooltip on hover (read-only)
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
void selectionFinished(const cvSelectionData &selectionData)
Emitted when selection is finished.
ecvGenericVisualizer3D * getVisualizer() const
Get the visualizer instance.
Definition: cvSelectionBase.h:64
@ SELECT_FRUSTUM_CELLS
Select cells in frustum.
void selectionChanged()
Emitted when the selection has changed (legacy - for backward compatibility)
SelectionMode
Selection modes matching ParaView's SelectionMode enum.
Definition: cvSelectionData.h:36
@ SELECT_FRUSTUM_BLOCKS
Select blocks in frustum.
@ SELECT_SURFACE_POINTS_INTERACTIVELY
void setCurrentSelection(const cvSelectionData &selectionData, bool resetLayers=true)
Set the current selection data.
Definition: cvViewSelectionManager.cpp:370
@ CLEAR_SELECTION
Clear current selection.
@ SELECT_SURFACE_POINTS_POLYGON
Select points on surface (polygon)
@ SELECT_SURFACE_POINTS
Select points on surface (rectangle)
@ GROW_SELECTION
Expand selection by one layer.
void setSourceObject(ccHObject *obj)
Set the source object for selection operations.
Definition: cvViewSelectionManager.cpp:631
Helper class for highlighting selected elements in the visualizer.
Definition: cvSelectionHighlighter.h:101
void setVisualizer(ecvGenericVisualizer3D *viewer) override
Set the visualizer for all selection operations.
Definition: cvViewSelectionManager.cpp:89