OpenLexocad  28.0
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);
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;
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
Element.h
Geom::Bnd_Box
Definition: Bnd_Box.h:67
DocObject.h
OpenLxUI::UIElement::getAsProduct
std::shared_ptr< OpenLxApp::Product > getAsProduct() const
OpenLxUI::UIElement::getAsElement
std::shared_ptr< OpenLxApp::Element > getAsElement() const
Product.h
OpenLxUI::UIElement::setHighlighted
void setHighlighted(bool onoff, int r, int g, int b)
OpenLxUI::UIElement::getAsRoot
std::shared_ptr< OpenLxApp::Root > getAsRoot() const
OpenLxUI::UIElement::getBoundingBox
Geom::Bnd_Box getBoundingBox()
OpenLxUI::UIElement::setPickable
void setPickable(bool)
Root.h
OpenLxUI::UIElement::isDrawable
bool isDrawable() const
OpenLxUI::UIElement::isTmpVisible
bool isTmpVisible() const
OpenLxUI::UIElement::setTmpBaseColor
void setTmpBaseColor(int r, int g, int b)
OpenLxUI::UIElement::setTmpVisible
void setTmpVisible(bool onoff)
OpenLxUI::UIElement
Definition: UIElement.h:49
OpenLxUI::UIElement::getObject
std::shared_ptr< OpenLxApp::DocObject > getObject() const
OpenLxUI::UIElement::setTmpWireframe
void setTmpWireframe(bool on)
OpenLxUI::UIElement::isPickable
bool isPickable()
OpenLxUI::UIElement::UIElement
UIElement()=delete
OpenLxUI::UIElement::isSelected
bool isSelected() const
OpenLxUI
Definition: ActiveEdge.h:26
OpenLxUI::UIElement::hasTmpWireframe
bool hasTmpWireframe() const
OpenLxUI::UIElement::removeTmpBaseColor
void removeTmpBaseColor()
OpenLxUI::UIDocument
Definition: UIDocument.h:59