ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvOverlayDialog.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 #include "CVPluginAPI.h"
11 
12 // Qt
13 #include <QDialog>
14 #include <QList>
15 
17 class CVPLUGIN_LIB_API ccOverlayDialog : public QDialog {
18  Q_OBJECT
19 
20 public:
22  explicit ccOverlayDialog(QWidget* parent = nullptr,
23  Qt::WindowFlags flags = Qt::FramelessWindowHint |
24  Qt::Tool);
25 
27  ~ccOverlayDialog() override;
28 
30 
33  virtual bool linkWith(QWidget* win);
34 
36 
38  virtual bool start();
39 
41 
44  virtual void stop(bool accepted);
45 
46  // reimplemented from QDialog
47  void reject() override;
48 
51 
54  void addOverridenShortcut(Qt::Key key);
55 
57  bool started() const { return m_processing; }
58 
59 signals:
60 
62 
64  void processFinished(bool accepted);
65 
67 
69  void shortcutTriggered(int key);
70 
72  void shown();
73 
74 protected slots:
75 
77  virtual void onLinkedWindowDeletion(QObject* object = nullptr);
78 
79 protected:
80  // inherited from QObject
81  bool eventFilter(QObject* obj, QEvent* e) override;
82 
84  QWidget* m_associatedWin;
85 
88 
90  QList<int> m_overriddenKeys;
91 };
ccOverlayDialog::started
bool started() const
Returns whether the tool is currently started or not.
Definition: ecvOverlayDialog.h:57
CVPluginAPI.h
CVPLUGIN_LIB_API
#define CVPLUGIN_LIB_API
Definition: CVPluginAPI.h:15
signals
#define signals
Definition: PythonPlugin.cpp:26
slots
#define slots
Definition: PythonPlugin.cpp:25
e
const double * e
Definition: essential_matrix_poly.h:10
ccOverlayDialog::m_processing
bool m_processing
Running/processing state.
Definition: ecvOverlayDialog.h:87
ccOverlayDialog::m_associatedWin
QWidget * m_associatedWin
Associated (MDI) window.
Definition: ecvOverlayDialog.h:84
ccOverlayDialog
Generic overlay dialog interface.
Definition: ecvOverlayDialog.h:17
ccOverlayDialog::m_overriddenKeys
QList< int > m_overriddenKeys
Overridden keys.
Definition: ecvOverlayDialog.h:90