ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvContourExtractorDlg.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 // Qt
11 #include <QDialog>
12 #include <QEventLoop>
13 
14 // CV_DB_LIB
15 #include <ecvBBox.h>
16 #include <ecvDisplayTools.h>
17 
18 // GUI
19 #include <ui_contourExtractorDlg.h>
20 
21 class ccHObject;
22 class QMainWindow;
23 
25 class ccContourExtractorDlg : public QDialog, public Ui::ContourExtractorDlg {
26  Q_OBJECT
27 
28 public:
30  explicit ccContourExtractorDlg(QWidget* parent = 0);
31 
33  void init();
34 
36  void displayMessage(QString message, bool waitForUserConfirmation = false);
37 
39  void waitForUser(unsigned defaultDelay_ms = 100);
40 
42  inline QMainWindow* win() { return ecvDisplayTools::GetMainWindow(); }
43 
45  void zoomOn(const ccBBox& bbox);
46 
48  void refresh();
49 
51  void addToDisplay(ccHObject* obj, bool noDependency = true);
53  void removFromDisplay(ccHObject* obj);
54 
56  bool isSkipped() const;
57 
58 protected slots:
59 
61  void onSkipButtonClicked();
62 
63 protected:
65  bool m_skipped;
67  QEventLoop m_loop;
68 };
#define slots
Bounding box structure.
Definition: ecvBBox.h:25
Dialog for debugging contour extraction.
void removFromDisplay(ccHObject *obj)
Removes an entity from the (2D/3D) display.
bool isSkipped() const
Returns whether the dialog has been 'skipped' or not.
void init()
Initializes the display.
void addToDisplay(ccHObject *obj, bool noDependency=true)
Adds an entity to the (2D/3D) display.
QEventLoop m_loop
Local event loop.
void onSkipButtonClicked()
When the skip button is clicked.
void zoomOn(const ccBBox &bbox)
Zooms on a given 2D region (3D bouding-box considered in 2D only)
void waitForUser(unsigned defaultDelay_ms=100)
Waits for user action.
void refresh()
Forces refresh.
QMainWindow * win()
Returns associated GL window.
ccContourExtractorDlg(QWidget *parent=0)
Default constructor.
void displayMessage(QString message, bool waitForUserConfirmation=false)
Display a new message.
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
static QMainWindow * GetMainWindow()