ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MainWindow.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // LOCAL
11 #include "ecvEntityAction.h"
12 #include "ecvMainAppInterface.h"
13 #include "ecvPickingListener.h"
14 
15 // CV_CORE_LIB
16 #include <AutoSegmentationTools.h>
17 #include <CVTools.h>
18 
19 // QT
20 #include <QAbstractButton>
21 #include <QAction>
22 #include <QColorDialog>
23 #include <QDebug>
24 #include <QDesktopServices>
25 #include <QDockWidget>
26 #include <QFileDialog>
27 #include <QHBoxLayout>
28 #include <QHostInfo>
29 #include <QLabel>
30 #include <QMainWindow>
31 #include <QMenu>
32 #include <QMenuBar>
33 #include <QMessageBox>
34 #include <QMouseEvent>
35 #include <QProgressBar>
36 #include <QPushButton>
37 #include <QSet>
38 #include <QStatusBar>
39 #include <QString>
40 #include <QTextEdit>
41 #include <QTime>
42 #include <QTimer>
43 #include <QToolBar>
44 #include <QToolButton>
45 #include <QUrl>
46 #include <QVBoxLayout>
47 
48 // system
49 #include <algorithm>
50 #include <map>
51 #include <vector>
52 
55 
56 using std::map;
57 using std::string;
58 using std::vector;
59 
60 // devices
61 class cc3DMouseManager;
62 class ccGamepadManager;
63 
64 class ccHObject;
65 class ccPickingHub;
66 class ccPluginUIManager;
67 class ccDBRoot;
68 class ecvLayoutManager;
69 class ecvRecentFiles;
73 class ecvDeepSemanticSegmentationTool;
74 class ecvFilterTool;
75 class ecvAnnotationsTool;
76 class ecvMeasurementTool;
77 
78 #if defined(USE_PCL_BACKEND)
79 class cvViewSelectionManager;
80 class cvSelectionData;
81 class cvSelectionHighlighter;
82 class cvSelectionToolController;
83 class cvFindDataDockWidget;
84 #endif
85 
86 class ecvUpdateDlg;
87 class ccOverlayDialog;
88 class ccComparisonDlg;
96 class ecvShortcutDialog;
97 
98 class QMdiArea;
99 class QMdiSubWindow;
100 class QTreeWidgetItem;
101 class QUIWidget;
102 
103 struct dbTreeSelectionInfo;
104 
105 namespace Ui {
106 class MainViewerClass;
107 }
108 
109 #ifdef BUILD_RECONSTRUCTION
110 namespace cloudViewer {
111 class ReconstructionWidget;
112 }
113 #endif
114 
115 class QSimpleUpdater;
116 
117 class MainWindow : public QMainWindow,
118  public ecvMainAppInterface,
119  public ccPickingListener {
120  Q_OBJECT
121 
122 protected:
123  MainWindow();
124  ~MainWindow() override;
125 
127  QMenu* createPopupMenu() override;
128 
129 public: // static method
131  static void UpdateUI();
132 
134  static MainWindow* TheInstance();
135 
137  static QWidget* GetActiveRenderWindow();
138 
140 
142  static QWidget* GetRenderWindow(const QString& title);
143 
145 
147  static void GetRenderWindows(std::vector<QWidget*>& windows);
148 
150  static void DestroyInstance();
151 
152  static void ChangeStyle(const QString& qssFile);
153 
154 public slots:
155  // Picking opeations
156  void enablePickingOperation(QString message);
157  void cancelPreviousPickingOperation(bool aborted);
158 
159 public:
160  void setUiManager(QUIWidget* uiManager);
161 
163  void saveGUIElementsPos();
164 
165  void setAutoPickPivot(bool state);
166  void setOrthoView();
167  void setPerspectiveView();
168 
170 
172 
173  void updateFullScreenMenu(bool state);
174 
175  void addToDBAuto(const QStringList& filenames, bool displayDialog = true);
176 
177  void addToDB(const QStringList& filenames,
178  QString fileFilter = QString(),
179  bool displayDialog = true);
180 
182  void initPlugins();
183 
185  void updatePropertiesView();
186 
188 
190  void onItemPicked(const PickedItem& pi) override;
191 
193  inline ccDBRoot* db() { return m_ccRoot; }
194 
196  int getRenderWindowCount() const;
197 
199  QMdiSubWindow* getMDISubWindow(QWidget* win);
200  QWidget* getActiveWindow() override;
201  QWidget* getWindow(int index) const;
202  void update3DViewsMenu();
203 
204 public:
208 
209 public: // inherited from ecvMainAppInterface
210  void spawnHistogramDialog(const std::vector<unsigned>& histoValues,
211  double minVal,
212  double maxVal,
213  QString title,
214  QString xAxisLabel) override;
215  ccPickingHub* pickingHub() override { return m_pickingHub; }
216 
217  void toggleExclusiveFullScreen(bool state) override;
218  void toggle3DView(bool state) override;
219  void forceConsoleDisplay() override;
220  ccHObject* dbRootObject() override;
221  // void updateScreen() override;
222  void refreshAll(bool only2D = false, bool forceRedraw = true) override;
223  void enableAll() override;
224  void disableAll() override;
225  void refreshSelected(bool only2D = false, bool forceRedraw = true) override;
226  void refreshObject(ccHObject* obj,
227  bool only2D = false,
228  bool forceRedraw = true) override;
230  bool only2D = false,
231  bool forceRedraw = true) override;
232  void resetSelectedBBox() override;
233  void removeFromDB(ccHObject* obj, bool autoDelete = true) override;
234  void setSelectedInDB(ccHObject* obj, bool selected) override;
236  const ccHObjectContext& context) override;
237  inline QMainWindow* getMainWindow() override { return this; }
238  inline const ccHObject::Container& getSelectedEntities() const override {
239  return m_selectedEntities;
240  }
241  ccHObjectContext removeObjectTemporarilyFromDBTree(ccHObject* obj) override;
242 
244 
245  void addToDB(ccHObject* obj,
246  bool updateZoom = false,
247  bool autoExpandDBTree = true,
248  bool checkDimensions = false,
249  bool autoRedraw = true) override;
250 
251  void registerOverlayDialog(ccOverlayDialog* dlg, Qt::Corner pos) override;
252  void unregisterOverlayDialog(ccOverlayDialog* dlg) override;
253  void updateOverlayDialogsPlacement() override;
254  ccHObject* loadFile(QString filename, bool silent) override;
255 
256  // int getDevicePixelRatio() const override;
257  void setView(CC_VIEW_ORIENTATION view) override;
258 
259  void dispToConsole(
260  QString message,
261  ConsoleMessageLevel level = STD_CONSOLE_MESSAGE) override;
263 
264  void addWidgetToQMdiArea(QWidget* widget) override;
265 
266  void increasePointSize() override;
267  void decreasePointSize() override;
268  void updateUI() override;
269  void freezeUI(bool state) override;
270  void zoomOnSelectedEntities() override;
271  void zoomOnEntities(ccHObject* obj) override;
272  void setGlobalZoom() override;
273 
274 #ifdef USE_PCL_BACKEND
276  cvViewSelectionManager* getSelectionManager() const;
277 
279  cvSelectionToolController* getSelectionController() const {
280  return m_selectionController;
281  }
282 #endif
283 
284 private:
285  /***** Utils Methods ***/
286  void connectActions();
287  void initThemes();
288  void initLanguages();
289  void initApplicationUpdate();
290  void initial();
291  void initStatusBar();
292  void initDBRoot();
293  void initConsole();
294 
295  // Helper function for formatting bytes
296  QString formatBytes(qint64 bytes);
297 
298  // Update memory usage widget size based on window size
299  void updateMemoryUsageWidgetSize();
300 
301  // Update all toolbar icon sizes based on current screen resolution
302  // This should be called after all toolbars are created/modified
303  void updateAllToolbarIconSizes();
304 
305 #ifdef USE_PCL_BACKEND
307  void initSelectionController();
311  void disableAllSelectionTools(void* except = nullptr);
312 #endif
313 
315 
318  void addEditPlaneAction(QMenu& menu) const;
319 
321  void zoomOn(ccHObject* object);
322 
324 
326  void doComputePlaneOrientation(bool fitFacet);
327 
328  void toggleActiveWindowCenteredPerspective() override;
329  void toggleActiveWindowViewerBasedPerspective() override;
330 
332  void setupInputDevices();
334  void destroyInputDevices();
335 
337  void populateActionList();
338 
340  void showShortcutDialog();
341 
342  void doActionComputeMesh(cloudViewer::TRIANGULATION_TYPES type);
344  void createComponentsClouds(
345  ccGenericPointCloud* cloud,
347  unsigned minPointPerComponent,
348  bool randomColors,
349  bool selectComponents,
350  bool sortBysize = true);
351 
352 public slots:
355 
356 private slots:
357  // status slots
358  void onMousePosChanged(const QPoint& pos);
359  void updateMemoryUsage();
360  // File menu slots
361  void doActionOpenFile();
362  void doActionSaveFile();
363  // Save all the entities at once, BIN format forced
364  void doActionSaveProject();
365  void changeTheme();
366  void changeLanguage();
367  void doActionGlobalShiftSeetings();
368  void doActionResetGUIElementsPos();
369  void doActionRestoreWindowOnStartup(bool state);
370  void doActionSaveCustomLayout();
371  void doActionRestoreDefaultLayout();
372  void doActionRestoreCustomLayout();
373  void doShowPrimitiveFactory();
374 
375  void doCheckForUpdate();
376 
377  void doActionComputeNormals();
378  void doActionInvertNormals();
379  void doActionConvertNormalsToHSV();
380  void doActionOrientNormalsFM();
381  void doActionOrientNormalsMST();
382  void doActionExportNormalToSF();
383  void doActionConvertNormalsToDipDir();
384 
385  void doActionComputeOctree();
386  void doActionResampleWithOctree();
387 
388  void doBoxAnnotation();
389  void doSemanticAnnotation();
390  void doAnnotations(int mode);
391 
393  void createSinglePointCloud();
395  void createPointCloudFromClipboard();
396 
397  // sand box research
398  void doActionComputeKdTree();
399  void doComputeBestFitBB();
400  void doActionComputeDistanceMap();
401  void doActionComputeDistToBestFitQuadric3D();
402  void doAction4pcsRegister();
403  void doSphericalNeighbourhoodExtractionTest();
404  void doCylindricalNeighbourhoodExtractionTest();
405  void doActionCreateCloudFromEntCenters();
406  void doActionComputeBestICPRmsMatrix();
407  void doActionFindBiggestInnerRectangle();
408 
410  void doEnableQtWarnings(bool);
411 
412  // Edit method
413  void doActionComputeMeshAA();
414  void doActionComputeMeshLS();
415  void doActionConvexHull();
416  void doActionPoissonReconstruction();
417  void doMeshTwoPolylines();
418 
419  void doActionMeshScanGrids();
420  void doActionCreateGBLSensor();
421  void doActionCreateCameraSensor();
422  void doActionModifySensor();
423  void doActionProjectUncertainty();
424  void doActionCheckPointsInsideFrustum();
425  void doActionComputeDistancesFromSensor();
426  void doActionComputeScatteringAngles();
427  void doActionSetViewFromSensor();
428  void doActionShowDepthBuffer();
429  void doActionExportDepthBuffer();
430  void doActionComputePointsVisibility();
431 
432  void doActionShowWaveDialog();
433  void doActionCompressFWFData();
434 
435  void doActionConvertTextureToColor();
436  void doActionSamplePointsOnMesh();
437  void doActionSamplePointsOnPolyline();
438  void doActionSmoohPolyline();
439  void doConvertPolylinesToMesh();
440  void doBSplineFittingFromCloud();
441  void doActionSmoothMeshSF();
442  void doActionEnhanceMeshSF();
443  void doActionSubdivideMesh();
444  void doActionFlipMeshTriangles();
445  void doActionSmoothMeshLaplacian();
446  void doActionFlagMeshVertices();
447  void doActionMeasureMeshVolume();
448  void doActionMeasureMeshSurface();
449 
450  void doActionCreatePlane();
451  void doActionEditPlane();
452  void doActionFlipPlane();
453  void doActionComparePlanes();
454  void doActionPromoteCircleToCylinder();
455 
457  void doActionClone();
458  void doActionMerge();
459 
460  void activateTracePolylineMode();
461  void deactivateTracePolylineMode(bool);
462 
463  void popMenuInConsole(const QPoint&);
464  void clearConsoleItems();
465  void clearConsole();
466  void copyConsoleItems();
467 
468  // Display method
470  void toggleFullScreen(bool state);
472  void onExclusiveFullScreenToggled(bool);
473  void showDisplayOptions();
474 
475  void toggleActiveWindowAutoPickRotCenter(bool state);
476  void toggleRotationCenterVisibility(bool state);
477  void doActionResetRotCenter();
478 
479  void doActionEditCamera();
480  void toggleLockRotationAxis();
481  void doActionAnimation();
482  void doActionScreenShot();
483  void doActionToggleOrientationMarker(bool state);
484  void doActionToggleCameraOrientationWidget(bool state);
485 
486  // About menu slots
487  void help();
488  void showEvent(QShowEvent* event) override;
489  void closeEvent(QCloseEvent* event) override;
490  void moveEvent(QMoveEvent* event) override;
491  void resizeEvent(QResizeEvent* event) override;
492  bool eventFilter(QObject* obj, QEvent* event) override;
493  void keyPressEvent(QKeyEvent* event) override;
494 
495  // ESC key handler - called from both keyPressEvent and eventFilter
496  void handleEscapeKey();
497 
498  void toggleVisualDebugTraces();
499 
500  void updateUIWithSelection();
501  void doActionApplyTransformation();
502  void doActionApplyScale();
503  void activateTranslateRotateMode();
504  void deactivateTranslateRotateMode(bool state);
505 
506  void updateMenus();
507  void on3DViewActivated(QMdiSubWindow*);
508 
510  void handleNewLabel(ccHObject*);
511 
512  // Point picking mechanism
513  void activatePointPickingMode();
514  void deactivatePointPickingMode(bool);
515 
516  // Point list picking mechanism
517  void activatePointListPickingMode();
518  void deactivatePointListPickingMode(bool);
519 
521  void clearAll();
522 
523  // color menu
524  void doActionSetUniqueColor();
525  void doActionColorize();
526  void doActionRGBToGreyScale();
527  void doActionSetColor(bool colorize);
528  void doActionSetColorGradient();
529  void doActionInterpolateColors();
530  void doActionChangeColorLevels();
531  void doActionEnhanceRGBWithIntensities();
532  void doActionColorFromScalars();
533  void doActionRGBGaussianFilter();
534  void doActionRGBBilateralFilter();
535  void doActionRGBMeanFilter();
536  void doActionRGBMedianFilter();
537 
538  // scalar field menu
539  void showSelectedEntitiesHistogram();
540  void doActionComputeStatParams();
541  void doActionSFGradient();
542  void doActionOpenColorScalesManager();
543  void doActionSFGaussianFilter();
544  void doActionSFBilateralFilter();
545  void doActionFilterByLabel();
546  void doActionFilterByValue();
547 
548  void doActionScalarFieldFromColor();
549  void doActionSFConvertToRGB();
550  void doActionSFConvertToRandomRGB();
551  void doActionRenameSF();
552  void doActionAddConstantSF();
553  void doActionImportSFFromFile();
554  void doActionAddIdField();
555  void doActionExportCoordToSF();
556  void doActionSetSFAsCoord();
557  void doActionInterpolateScalarFields();
558  void doActionScalarFieldArithmetic();
559 
560  // Current active scalar field
561  void doActionToggleActiveSFColorScale();
562  void doActionShowActiveSFPrevious();
563  void doActionShowActiveSFNext();
565 
570  void doApplyActiveSFAction(int action);
571 
572  void doRemoveDuplicatePoints();
573  void doActionSubsample();
574  void doActionEditGlobalShiftAndScale();
575 
576  // Tools -> Registration
577  void doActionMatchScales();
578  void doActionMatchBBCenters();
579  void doActionRegister();
580  void activateRegisterPointPairTool();
581  void deactivateRegisterPointPairTool(bool state);
582 
583  inline void doActionMoveBBCenterToOrigin() {
584  doActionFastRegistration(MoveBBCenterToOrigin);
585  }
586  inline void doActionMoveBBMinCornerToOrigin() {
587  doActionFastRegistration(MoveBBMinCornerToOrigin);
588  }
589  inline void doActionMoveBBMaxCornerToOrigin() {
590  doActionFastRegistration(MoveBBMaxCornerToOrigin);
591  }
592 
593  // Tools -> Recognition
594  void doSemanticSegmentation();
595  void deactivateSemanticSegmentation(bool);
596 
597  // Tools -> Segmentation
598  void doActionDBScanCluster();
599  void doActionPlaneSegmentation();
600 
601  // Tools -> Segmentation
602  void activateSegmentationMode();
603  void deactivateSegmentationMode(bool);
604  void doActionMeasurementMode(int mode);
605  void activateDistanceMode();
606  void activateContourMode();
607  void activateProtractorMode();
608 
609  void doActionFilterMode(int mode);
610  void activateClippingMode();
611  void activateSliceMode();
612  void activateProbeMode();
613  void activateDecimateMode();
614  void activateIsoSurfaceMode();
615  void activateThresholdMode();
616  void activateSmoothMode();
617  void activateGlyphMode();
618  void activateStreamlineMode();
619 
620  void doActionLabelConnectedComponents();
621  void doActionKMeans();
622  void doActionFrontPropagation();
623  void doActionExportPlaneInfo();
624  void doActionExportCloudInfo();
625 
626 #ifdef USE_PCL_BACKEND
627  void onSelectionFinished(const cvSelectionData& selectionData);
628  void onSelectionRestored(const cvSelectionData& selection);
629  void onSelectionToolActivated(QAction* action);
630  // onSelectionHistoryChanged/onBookmarksChanged removed - UI not implemented
631  // undoSelection/redoSelection removed - UI not implemented
632 #endif
633 
634 public slots
635  : // Make this public so it can be connected from delegate
636  // Note: onTooltipSettingsChanged has been removed as tooltip settings
637  // are now managed through cvSelectionLabelPropertiesDialog
638  // Note: Highlight color/opacity changes are now handled directly via
639  // the shared highlighter in cvViewSelectionManager. All tooltip tools
640  // share this highlighter, so settings from cvSelectionPropertiesWidget
641  // are automatically synchronized.
642 
643 private slots:
644  void doActionCloudCloudDist();
645  void doActionCloudMeshDist();
646  void doActionCloudPrimitiveDist();
647  void deactivateComparisonMode(int result);
648  void doActionComputeCPS();
649 
650  void doActionFitPlane();
651  void doActionFitSphere();
652  void doActionFitCircle();
653  void doActionFitFacet();
654  void doActionFitQuadric();
655 
656  void doActionSORFilter();
657  void doActionFilterNoise();
658  void doActionVoxelSampling();
659 
660  void doActionUnroll();
661  void doComputeGeometricFeature();
662 
663 private:
665  void applyTransformation(const ccGLMatrixd& transMat);
666 
668  void enableUIItems(dbTreeSelectionInfo& selInfo);
669 
670  /***** Slots of QMenuBar and QToolBar *****/
671  void getFileFilltersAndHistory(QStringList& fileFilters,
672  QString& currentOpenDlgFilter);
673 
675 
680  ccPointCloud* askUserToSelectACloud(ccHObject* defaultCloudEntity = nullptr,
681  QString inviteMessage = QString());
682 
683  void toggleSelectedEntitiesProperty(
685  void clearSelectedEntitiesProperty(ccEntityAction::CLEAR_PROPERTY property);
686 
687  enum FastRegistrationMode {
688  MoveBBCenterToOrigin,
689  MoveBBMinCornerToOrigin,
690  MoveBBMaxCornerToOrigin
691  };
692 
693  void doActionFastRegistration(FastRegistrationMode mode);
694 
695 private:
696  Ui::MainViewerClass* m_ui;
697 
699  ccDBRoot* m_ccRoot;
700 
702  ccHObject::Container m_selectedEntities;
703 
705  bool m_uiFrozen;
706 
708  ecvRecentFiles* m_recentFiles;
709 
711  QToolButton* m_viewModePopupButton;
712 
714  ccPickingHub* m_pickingHub;
715 
716  /******************************/
717  /*** MDI AREA ***/
718  /******************************/
719  QMdiArea* m_mdiArea;
720 
722  struct ccMDIDialogs {
723  ccOverlayDialog* dialog;
724  Qt::Corner position;
725 
727  ccMDIDialogs(ccOverlayDialog* dlg, Qt::Corner pos)
728  : dialog(dlg), position(pos) {}
729  };
730 
732  void repositionOverlayDialog(ccMDIDialogs& mdiDlg);
733 
735  std::vector<ccMDIDialogs> m_mdiDialogs;
736 
737  /*** dialogs ***/
739  ecvUpdateDlg* m_updateDlg;
741  ecvCameraParamEditDlg* m_cpeDlg;
743  ecvAnimationParamDlg* m_animationDlg;
745  ccGraphicalSegmentationTool* m_gsTool;
747  ccTracePolylineTool* m_tplTool;
749  ccGraphicalTransformationTool* m_transTool;
751  ccComparisonDlg* m_compDlg;
753  ccPointPropertiesDlg* m_ppDlg;
755  ccPointListPickingDlg* m_plpDlg;
757  ccPointPairRegistrationDlg* m_pprDlg;
759  ecvPrimitiveFactoryDlg* m_pfDlg;
761  ecvDeepSemanticSegmentationTool* m_dssTool;
763  ecvFilterTool* m_filterTool;
765  ecvAnnotationsTool* m_annoTool;
767  ecvFilterByLabelDlg* m_filterLabelTool;
769  ecvMeasurementTool* m_measurementTool;
770 
771 #if defined(USE_PCL_BACKEND)
774  cvSelectionToolController* m_selectionController;
775 
779  cvFindDataDockWidget* m_findDataDock;
780 #endif
781 
782  QVBoxLayout* m_layout;
783  QUIWidget* m_uiManager;
784  QLabel* m_mousePosLabel;
785  QLabel* m_systemInfoLabel;
786 
787  // Memory usage display widget (ParaView-style)
788  QWidget* m_memoryUsageWidget;
789  QProgressBar* m_memoryUsageProgressBar;
790  QLabel* m_memoryUsageLabel;
791  QTimer* m_memoryUsageTimer;
792 
793  // For full screen
794  QWidget* m_currentFullWidget;
796  bool m_exclusiveFullscreen;
798  QByteArray m_formerGeometry;
799 
800  enum VIEWMODE { PERSPECTIVE, ORTHOGONAL };
801  VIEWMODE m_lastViewMode;
802 
803  /*** plugins ***/
805  ccPluginUIManager* m_pluginUIManager;
806 
808  ecvLayoutManager* m_layoutManager;
809 
811  cc3DMouseManager* m_3DMouseManager;
812 
814  ccGamepadManager* m_gamepadManager;
815 
817  ecvShortcutDialog* m_shortcutDlg;
818 
820  QList<QAction*> m_actions;
821 
823  QAction* m_selectionPropsAction = nullptr;
824 
825 private:
826 #ifdef BUILD_RECONSTRUCTION
827  void initReconstructions();
828  void autoShowReconstructionToolBar(bool state);
830 #endif
831 
832 signals:
834  void exclusiveFullScreenToggled(bool exclusive);
835 
837  void translation(const CCVector3d& t);
838 
840 
842  void rotation(const ccGLMatrixd& rotMat);
843 };
MouseEvent event
CC_VIEW_ORIENTATION
View orientation.
Definition: CVConst.h:102
std::string filename
char type
math::float3 position
const int CLOUDVIEWER_LANG_CHINESE
Definition: MainWindow.h:54
const int CLOUDVIEWER_LANG_ENGLISH
Definition: MainWindow.h:53
#define slots
#define signals
void * bytes
core::Tensor result
Definition: VtkUtils.cpp:76
QMenu * createPopupMenu() override
Override to add custom actions to right-click menu on toolbars.
Definition: MainWindow.cpp:628
static QWidget * GetRenderWindow(const QString &title)
Returns a given GL sub-window (determined by its title)
QWidget * getWindow(int index) const
void enablePickingOperation(QString message)
ccHObject * dbRootObject() override
Returns DB root (as a ccHObject)
ccHObjectContext removeObjectTemporarilyFromDBTree(ccHObject *obj) override
Removes object temporarily from DB tree.
void increasePointSize() override
QMdiSubWindow * getMDISubWindow(QWidget *win)
Returns MDI area subwindow corresponding to a given 3D view.
void setOrthoView()
void decreasePointSize() override
int getRenderWindowCount() const
Returns the number of 3D views.
~MainWindow() override
Definition: MainWindow.cpp:545
const ccHObject::Container & getSelectedEntities() const override
Returns currently selected entities ("read only")
Definition: MainWindow.h:238
void freezeUI(bool state) override
Freezes/unfreezes UI.
static MainWindow * TheInstance()
Returns the unique instance of this object.
void cancelPreviousPickingOperation(bool aborted)
ccDBRoot * db()
Returns real 'dbRoot' object.
Definition: MainWindow.h:193
void setUiManager(QUIWidget *uiManager)
void refreshObjects(ccHObject::Container objs, bool only2D=false, bool forceRedraw=true) override
void update3DViewsMenu()
void registerOverlayDialog(ccOverlayDialog *dlg, Qt::Corner pos) override
Registers a MDI area 'overlay' dialog.
void addToDB(const QStringList &filenames, QString fileFilter=QString(), bool displayDialog=true)
void dispToConsole(QString message, ConsoleMessageLevel level=STD_CONSOLE_MESSAGE) override
void updateOverlayDialogsPlacement() override
Forces the update of all registered MDI 'overlay' dialogs.
static void GetRenderWindows(std::vector< QWidget * > &windows)
Returns all GL sub-windows.
void doActionSaveViewportAsCamera()
void addToDBAuto(const QStringList &filenames, bool displayDialog=true)
static QWidget * GetActiveRenderWindow()
Static shortcut to MainWindow::getActiveWindow.
void setAutoPickPivot(bool state)
ccUniqueIDGenerator::Shared getUniqueIDGenerator() override
Returns the unique ID generator.
static bool s_autoSaveGuiElementPos
Definition: MainWindow.h:207
static void UpdateUI()
Static shortcut to MainWindow::updateUI.
void setGlobalZoom() override
void zoomOnEntities(ccHObject *obj) override
void refreshObject(ccHObject *obj, bool only2D=false, bool forceRedraw=true) override
void doActionOrthogonalProjection()
void removeFromDB(ccHObject *obj, bool autoDelete=true) override
Removes an entity from main db tree.
void onItemPicked(const PickedItem &pi) override
Inherited from ccPickingListener.
ccColorScalesManager * getColorScalesManager() override
Returns color scale manager (unique instance)
void spawnHistogramDialog(const std::vector< unsigned > &histoValues, double minVal, double maxVal, QString title, QString xAxisLabel) override
void addWidgetToQMdiArea(QWidget *widget) override
ccPickingHub * pickingHub() override
Definition: MainWindow.h:215
void refreshAll(bool only2D=false, bool forceRedraw=true) override
Redraws all GL windows that have the 'refresh' flag on.
void toggleExclusiveFullScreen(bool state) override
ccHObject * loadFile(QString filename, bool silent) override
Attempts to load a file.
void toggle3DView(bool state) override
void exclusiveFullScreenToggled(bool exclusive)
Signal emitted when the exclusive full screen is toggled.
void refreshSelected(bool only2D=false, bool forceRedraw=true) override
QMainWindow * getMainWindow() override
Returns main window.
Definition: MainWindow.h:237
void forceConsoleDisplay() override
Forces display of console widget.
void doActionPerspectiveProjection()
void updateFullScreenMenu(bool state)
void translation(const CCVector3d &t)
Signal emitted when the selected object is translated by the user.
void updateUI() override
bool m_FirstShow
Flag: first time the window is made visible.
Definition: MainWindow.h:206
void unregisterOverlayDialog(ccOverlayDialog *dlg) override
Unregisters a MDI area 'overlay' dialog.
ccBBox getSelectedEntityBbox()
void updateViewModePopUpMenu()
static void ChangeStyle(const QString &qssFile)
QWidget * getActiveWindow() override
void resetSelectedBBox() override
void initPlugins()
Sets up the UI (menus and toolbars) based on loaded plugins.
void putObjectBackIntoDBTree(ccHObject *obj, const ccHObjectContext &context) override
Adds back object to DB tree.
void rotation(const ccGLMatrixd &rotMat)
Signal emitted when the selected object is rotated by the user.
void zoomOnSelectedEntities() override
void enableAll() override
Enables all windows.
void setView(CC_VIEW_ORIENTATION view) override
void updatePropertiesView()
Updates the 'Properties' view.
void setPerspectiveView()
static void DestroyInstance()
Deletes current main window instance.
void disableAll() override
Disables all windows.
void saveGUIElementsPos()
Saves position and state of all GUI elements.
void setSelectedInDB(ccHObject *obj, bool selected) override
Selects or unselects an entity (in db tree)
Manages the updater instances.
Bounding box structure.
Definition: ecvBBox.h:25
Color scales manager/container.
Dialog for cloud/cloud or cloud/mesh comparison setting.
GUI database tree root.
Definition: ecvDBRoot.h:65
Double version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:56
A 3D cloud interface with associated features (color, normals, octree, etc.)
Graphical segmentation mechanism (with polyline)
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
Generic overlay dialog interface.
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
Point/triangle picking listener interface.
Plugin UI manager.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Dialog/interactor to graphically pick a list of points.
Dialog for simple point picking (information, distance, etc.)
Graphical Polyline Tracing tool.
QSharedPointer< ccUniqueIDGenerator > Shared
Shared type.
Definition: ecvObject.h:28
Dialog to interactively edit the camera pose parameters.
Dialog for managing a clipping box.
Dialog to interactively edit the camera pose parameters.
Dialog for managing a clipping box.
Definition: ecvFilterTool.h:29
Layout manager for MainWindow.
Main application interface (for plugins)
ConsoleMessageLevel
Console message level (see dispToConsole)
Dialog for managing measurement tools (Distance, Contour, Protractor)
ImGuiContext * context
Definition: Window.cpp:76
Generic file read and write utility for python interface.
TRIANGULATION_TYPES
Triangulation types.
std::vector< ReferenceCloud * > ReferenceCloudContainer
A standard container to store several subsets of points.
Precise statistics about current selection.
Definition: ecvDBRoot.h:28