OpenLexocad  27.1
UIElement.h
Go to the documentation of this file.
1 // //
3 // LEXOCAD API //
4 // //
5 // ©2005-2016 Cadwork Informatik. All rights reserved. //
6 // //
7 // ONLY INCLUDE OTHER INTERFACES! //
8 // Lexocad provides API Classes for public use and //
9 // Implementation Classes for private use. //
10 // //
11 // - Do ONLY include and use the LEXOCAD API in this header. //
12 // - Do not change existing interfaces. //
13 // - Document your code! //
14 // //
15 // - All types from Base, Core, Geom, Topo are allowed here. //
16 // - In the Gui modules the use of Qt types is allowed. //
17 // //
19 
20 #pragma once
21 
22 #include <OpenLxApp/DocObject.h>
23 #include <OpenLxApp/Element.h>
24 #include <OpenLxApp/Product.h>
25 #include <OpenLxApp/Root.h>
26 
27 
28 namespace Gui
29 {
30 class ViewProvider;
31 class ViewProviderElementBaseInterface;
32 } // namespace Gui
33 
34 namespace OpenLxUI
35 {
36 class UIElementP;
37 
44 class LX_OPENLXUI_EXPORT UIElement
45 #ifndef SWIG
46  : public QObject
47 #endif
48 
49 {
50  Q_OBJECT
51 
52 public:
53  friend class UIDocument;
54 
55  std::shared_ptr<OpenLxApp::DocObject> getObject() const;
56  std::shared_ptr<OpenLxApp::Root> getAsRoot() const;
57  std::shared_ptr<OpenLxApp::Product> getAsProduct() const;
58  std::shared_ptr<OpenLxApp::Element> getAsElement() const;
59 
60 #ifndef SWIG
61 
62 signals:
63 
64 private slots:
65 
66 #endif
67 public:
68  bool isSelected() const;
69  bool isDrawable() const;
70  void setTmpVisible(bool onoff);
71  bool isTmpVisible() const;
72  // void setTmpSelected(bool on, bool singleselect = false);
73  // void setTmpGreyscale(bool on);
74  // void setTmpHiddenLine(bool on);
75  // void setTmpTexturesGrey(bool onoff);
76  void setHighlighted(bool onoff, int r, int g, int b);
77  // void setHasDragger(bool on);
78  // bool hasDragger();
79  // void setTmpDrawStyle(const Draw::DrawStyle& ds);
80  void setPickable(bool);
81  bool isPickable();
82  void setTmpBaseColor(int r, int g, int b);
83  void removeTmpBaseColor();
84  // int getTmpTransparency() const;
85  // void setTmpTransparency(int value);
86  // void setLODEnabled(bool onoff);
87  // void drawBoundingBox(bool onoff);
88  void setTmpWireframe(bool on);
89  bool hasTmpWireframe() const;
90  Geom::Bnd_Box getBoundingBox();
91 
92  UIElement() = delete;
93 
94 private:
95  UIElement(Gui::ViewProvider* aVP);
96  UIElement(std::shared_ptr<OpenLxApp::DocObject> aObj);
97  std::shared_ptr<OpenLxUI::UIElementP> _pimpl;
98 };
99 } // namespace OpenLxUI
Definition: UIDocument.h:58
Definition: Bnd_Box.h:63
#define slots
Definition: PyExport.h:22
#define signals
Definition: pythonize.h:40
Definition: UIElement.h:44
Definition: ActiveEdge.h:25