6#include <iqtgui/TGuiObserverWrap.h>
9#include <imt3dgui/CGridShape.h>
10#include <imt3dgui/CPointCloudShape.h>
11#include <imt3dgui/CView3dProviderComp.h>
12#include <imt3dgui/CAxisShape.h>
13#include <imt3dgui/CRulerShape.h>
20class CPointCloudViewComp:
public iqtgui::TGuiObserverWrap<CView3dProviderComp, CPointCloudShape>
25 typedef iqtgui::TGuiObserverWrap<CView3dProviderComp, CPointCloudShape> BaseClass;
27 I_BEGIN_COMPONENT(CPointCloudViewComp);
28 I_REGISTER_INTERFACE(imod::IObserver);
29 I_REGISTER_INTERFACE(imod::IModelEditor);
30 I_ASSIGN(m_pointSizeAttrPtr,
"PointSize",
"Size of the point used for rendering of the 3D-points in the cloud view",
true, 3.0);
31 I_ASSIGN(m_showInfoBoxAttrPtr,
"ShowInfoBox",
"Show info box if enabled",
true,
false);
32 I_ASSIGN(m_defaultShowAxisAttrPtr,
"ShowAxis",
"If enabled, the axes are shown",
true,
true);
33 I_ASSIGN(m_defaultShowGridAttrPtr,
"ShowGrid",
"If enabled, the grid is shown",
true,
true);
34 I_ASSIGN(m_xRangeMinAttrPtr,
"XRangeMin",
"Minimum value on the X-axis",
true, 0.0);
35 I_ASSIGN(m_xRangeMaxAttrPtr,
"XRangeMax",
"Maximum value on the X-axis",
true, 1.0);
36 I_ASSIGN(m_yRangeMinAttrPtr,
"YRangeMin",
"Minimum value on the Y-axis",
true, 0.0);
37 I_ASSIGN(m_yRangeMaxAttrPtr,
"YRangeMax",
"Maximum value on the Y-axis",
true, 1.0);
38 I_ASSIGN(m_zRangeMinAttrPtr,
"ZRangeMin",
"Minimum value on the Z-axis",
true, 0.0);
39 I_ASSIGN(m_zRangeMaxAttrPtr,
"ZRangeMax",
"Maximum value on the Z-axis",
true, 1.0);
40 I_ASSIGN(m_axisLineLengthAttrPtr,
"AxisLengthWidth",
"Width of the axis line",
true, 4.0);
41 I_ASSIGN(m_xAxisLabelAttrPtr,
"XAxisLabel",
"Label of the X-axis",
true,
"X");
42 I_ASSIGN(m_yAxisLabelAttrPtr,
"YAxisLabel",
"Label of the Y-axis",
true,
"Y");
43 I_ASSIGN(m_zAxisLabelAttrPtr,
"ZAxisLabel",
"Label of the Z-axis",
true,
"Z");
48 virtual void OnGuiCreated()
override;
49 virtual void OnGuiDestroyed()
override;
52 virtual void OnShowGrid(
bool show)
override;
53 virtual void OnShowAxis(
bool show)
override;
54 virtual void OnShowRuler(
bool show)
override;
55 virtual void OnPointSelection(
const QPoint& point,
bool clearPreviousSelection)
override;
56 virtual void OnBoxSelection(
const QRect& rect,
bool clearPreviousSelection)
override;
57 virtual void OnCircleSelection(
const QRect& rect,
bool clearPreviousSelection)
override;
58 virtual void OnClearSelection()
override;
59 virtual void OnAllSelection()
override;
60 virtual void OnInvertSelection()
override;
61 virtual void OnDeleteSelection()
override;
62 virtual bool OnMousePress(QMouseEvent& e)
override;
63 virtual bool OnMouseMove(QMouseEvent& e)
override;
64 virtual bool OnMouseRelease(QMouseEvent& e)
override;
67 virtual void OnRestoreSettings(
const QSettings& settings)
override;
68 virtual void OnSaveSettings(QSettings& settings)
const override;
71 virtual void SetupGridShape(CGridShape& gridShape)
const;
72 virtual void SetupAxisShape(CAxisShape& axisShape)
const;
73 virtual void SetupRulerShape(CRulerShape& rulerShape)
const;
76 CGridShape m_gridShape;
77 CAxisShape m_axisShape;
78 CRulerShape m_rulerShape;
80 I_ATTR(
double, m_pointSizeAttrPtr);
81 I_ATTR(
bool, m_showInfoBoxAttrPtr);
82 I_ATTR(
bool, m_defaultShowAxisAttrPtr);
83 I_ATTR(
bool, m_defaultShowGridAttrPtr);
84 I_ATTR(
double, m_xRangeMinAttrPtr);
85 I_ATTR(
double, m_xRangeMaxAttrPtr);
86 I_ATTR(
double, m_yRangeMinAttrPtr);
87 I_ATTR(
double, m_yRangeMaxAttrPtr);
88 I_ATTR(
double, m_zRangeMinAttrPtr);
89 I_ATTR(
double, m_zRangeMaxAttrPtr);
90 I_ATTR(
double, m_axisLineLengthAttrPtr);
91 I_TEXTATTR(m_xAxisLabelAttrPtr);
92 I_TEXTATTR(m_yAxisLabelAttrPtr);
93 I_TEXTATTR(m_zAxisLabelAttrPtr);