ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccGuiPythonInstance.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 <FileIOFilter.h>
11 
13 class QMainWindow;
14 
15 namespace pybind11
16 {
17 class args;
18 class kwargs;
19 class object;
20 } // namespace pybind11
21 
26 class Q_DECL_EXPORT ccGuiPythonInstance final
27 {
28  public:
29  explicit ccGuiPythonInstance(ecvMainAppInterface *app) noexcept(false);
30 
31  QMainWindow *getMainWindow();
32 
33  bool haveSelection() const;
34 
35  bool haveOneSelection() const;
36 
37  const ccHObject::Container &getSelectedEntities() const;
38 
39  void setSelectedInDB(ccHObject *obj, bool selected);
40 
41  ccHObject *dbRootObject();
42 
43  void addToDB(pybind11::object &obj,
44  bool updateZoom = false,
45  bool autoExpandDBTree = true,
46  bool checkDimensions = false,
47  bool autoRedraw = true);
48 
49  void removeFromDB(pybind11::object &obj);
50 
51  void redrawAll(bool only2D = false);
52 
53  void refreshAll(bool only2D = false);
54 
55  void enableAll();
56 
57  void disableAll();
58 
59  void updateUI();
60 
61  void freezeUI(bool state);
62 
63  ccHObject *loadFile(const char *filename, FileIOFilter::LoadParameters &parameters);
64 
65  ecvMainAppInterface *app();
66 
67  private:
68  ecvMainAppInterface *m_app;
69 };
std::string filename
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
Main application interface (for plugins)
Generic loading parameters.
Definition: FileIOFilter.h:51