ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvGraphicalTransformationTool.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 <ecvOverlayDialog.h>
12 #include <ui_graphicalTransformationDlg.h>
13 
14 // CV_DB_LIB
15 #include <ecvHObject.h>
16 
18 
22  public Ui::GraphicalTransformationDlg {
23  Q_OBJECT
24 
25 public:
27  explicit ccGraphicalTransformationTool(QWidget* parent);
30 
31  // inherited from ccOverlayDialog
32  virtual bool linkWith(QWidget* win) override;
33  virtual bool start() override;
34  virtual void stop(bool state) override;
35 
37 
39 
43  bool addEntity(ccHObject* anObject);
44 
46  unsigned getNumberOfValidEntities() const;
47 
49  const ccHObject& getValidEntities() const { return m_toTransform; }
50 
52  void setRotationCenter(CCVector3d& center);
53 
54  void exportNewEntities();
55 
57  void clear();
58 
59 protected slots:
60 
62  void apply();
63 
65  void reset();
66 
68  void cancel();
69 
71  void pause(bool);
72 
74  void onShortcutTriggered(int);
75 
76  void onScaleEnabled(bool dummy);
77  void onShearEnabled(bool dummy);
78  void onRotationModeChanged(int dummy);
79  void onTranlationModeChanged(bool dummy);
80 
81 protected:
84 
86 
90 
92 };
#define slots
virtual bool start() override
Starts process.
void onShortcutTriggered(int)
To capture overridden shortcuts (pause button, etc.)
const ccHObject & getValidEntities() const
Returns the 'to be transformed' entities set (see addEntity)
void setRotationCenter(CCVector3d &center)
Sets the rotation center.
void pause(bool)
Pauses the transformation mode.
virtual ~ccGraphicalTransformationTool()
Default destructor.
void apply()
Applies transformation to selected entities.
bool addEntity(ccHObject *anObject)
Adds an entity to the 'selected' entities set.
CCVector3d m_rotationCenter
Rotation center.
void clear()
Clear all variables and 'unlink' dialog.
unsigned getNumberOfValidEntities() const
Returns the number of valid entities (see addEntity)
virtual bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
ccGraphicalTransformationTool(QWidget *parent)
Default constructor.
ccHObject m_toTransform
List of entities to be transformed.
virtual void stop(bool state) override
Stops process/dialog.
void cancel()
Cancels (no transformation is applied)
bool setTansformTool(ecvGenericTransformTool *tool)
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Generic overlay dialog interface.
Generic Annotation Tool interface.