#include <ViewProviderLink.h>
Classes | |
class | Element |
class | SubInfo |
Public Types | |
enum | SnapshotType { SnapshotTransform = 0, SnapshotVisible = 1, SnapshotChild = 2, SnapshotMax, SnapshotContainer = -1, SnapshotContainerTransform = -2 } |
Public Member Functions | |
Base::BoundBox3d | getBoundBox (ViewProviderDocumentObject *vpd=0) const |
std::vector< ViewProviderDocumentObject * > | getChildren () const |
QIcon | getLinkedIcon (QPixmap overlay) const |
ViewProviderDocumentObject * | getLinkedView () const |
SoFCSelectionRoot * | getLinkRoot () const |
ViewProviderDocumentObject * | getOwner () const |
virtual PyObject * | getPyObject (void) override |
This method returns the Python wrapper for a C++ object. More... | |
int | getSize () const |
std::vector< std::string > | getSubNames () const |
bool | hasSubs () const |
bool | isElementVisible (int index) const |
bool | isLinked () const |
bool | linkGetDetailPath (const char *, SoFullPath *, SoDetail *&) const |
bool | linkGetElementPicked (const SoPickedPoint *, std::string &) const |
LinkView () | |
LinkView (const LinkView &)=delete | |
virtual void | onLinkedIconChange (LinkInfoPtr) override |
virtual void | onLinkedUpdateData (LinkInfoPtr, const App::Property *) override |
LinkView & | operator= (const LinkView &)=delete |
void | renderDoubleSide (bool) |
void | setChildren (const std::vector< App::DocumentObject * > &children, const boost::dynamic_bitset<> &vis, SnapshotType type=SnapshotVisible) |
void | setDrawStyle (int linePattern, double lineWidth=0, double pointSize=0) |
void | setElementVisible (int index, bool visible) |
void | setInvalid () |
void | setLink (App::DocumentObject *obj, const std::vector< std::string > &subs=std::vector< std::string >()) |
void | setLinkViewObject (ViewProviderDocumentObject *vpd, const std::vector< std::string > &subs=std::vector< std::string >()) |
void | setMaterial (int index, const App::Material *material) |
void | setNodeType (SnapshotType type, bool sublink=true) |
void | setOwner (ViewProviderDocumentObject *vpd) |
void | setSize (int size) |
void | setTransform (int index, const Base::Matrix4D &mat) |
virtual void | unlink (LinkInfoPtr) override |
void | updateLink () |
~LinkView () | |
Public Member Functions inherited from Base::BaseClass | |
BaseClass () | |
Construction. More... | |
virtual Type | getTypeId (void) const |
bool | isDerivedFrom (const Type type) const |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Static Public Member Functions | |
static void | setTransform (SoTransform *pcTransform, const Base::Matrix4D &mat) |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create (void) |
static Type | getClassTypeId (void) |
static void | init (void) |
Protected Member Functions | |
bool | getGroupHierarchy (int index, SoFullPath *path) const |
void | replaceLinkedRoot (SoSeparator *) |
void | resetRoot () |
Protected Member Functions inherited from Gui::LinkOwner | |
virtual | ~LinkOwner () |
Protected Attributes | |
bool | autoSubLink |
SnapshotType | childType |
LinkInfoPtr | linkInfo |
LinkInfoPtr | linkOwner |
std::vector< std::unique_ptr< Element > > | nodeArray |
std::unordered_map< SoNode *, int > | nodeMap |
SnapshotType | nodeType |
CoinPtr< SoDrawStyle > | pcDrawStyle |
CoinPtr< SoSeparator > | pcLinkedRoot |
CoinPtr< SoFCSelectionRoot > | pcLinkRoot |
CoinPtr< SoShapeHints > | pcShapeHints |
CoinPtr< SoTransform > | pcTransform |
Py::Object | PythonObject |
std::map< std::string, std::unique_ptr< SubInfo > > | subInfo |
Friends | |
class | SubInfo |
Additional Inherited Members | |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
Member Enumeration Documentation
◆ SnapshotType
Constructor & Destructor Documentation
◆ LinkView() [1/2]
LinkView::LinkView | ( | ) |
◆ ~LinkView()
◆ LinkView() [2/2]
|
delete |
Member Function Documentation
◆ getBoundBox()
Base::BoundBox3d LinkView::getBoundBox | ( | ViewProviderDocumentObject * | vpd = 0 | ) | const |
References linkOwner, and pcLinkRoot.
Referenced by Gui::LinkViewPy::getBoundBox().
◆ getChildren()
std::vector< ViewProviderDocumentObject * > LinkView::getChildren | ( | ) | const |
References nodeArray.
Referenced by Gui::LinkViewPy::getChildren().
◆ getGroupHierarchy()
|
protected |
References nodeArray.
Referenced by linkGetDetailPath().
◆ getLinkedIcon()
QIcon LinkView::getLinkedIcon | ( | QPixmap | overlay | ) | const |
References autoSubLink, linkInfo, and subInfo.
Referenced by Gui::ViewProviderLink::getIcon().
◆ getLinkedView()
ViewProviderDocumentObject * LinkView::getLinkedView | ( | ) | const |
References autoSubLink, linkInfo, and subInfo.
Referenced by Gui::ViewProviderLink::doubleClicked(), Gui::LinkViewPy::getLinkedView(), Gui::ViewProviderLink::setupContextMenu(), and Gui::ViewProviderLink::startEditing().
◆ getLinkRoot()
SoFCSelectionRoot* Gui::LinkView::getLinkRoot | ( | ) | const |
◆ getOwner()
ViewProviderDocumentObject * LinkView::getOwner | ( | ) | const |
References linkOwner.
Referenced by Gui::LinkViewPy::getOwner().
◆ getPyObject()
|
overridevirtual |
This method returns the Python wrapper for a C++ object.
It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.
The default implementation returns 'None'.
Reimplemented from Base::BaseClass.
References PythonObject.
Referenced by Gui::ViewProviderLink::getPyLinkView().
◆ getSize()
int Gui::LinkView::getSize | ( | ) | const |
◆ getSubNames()
std::vector< std::string > LinkView::getSubNames | ( | ) | const |
References subInfo.
Referenced by Gui::LinkViewPy::getSubNames().
◆ hasSubs()
bool LinkView::hasSubs | ( | ) | const |
References isLinked(), and subInfo.
Referenced by Gui::ViewProviderLink::initDraggingPlacement(), and Gui::ViewProviderLink::updateDataPrivate().
◆ isElementVisible()
bool LinkView::isElementVisible | ( | int | index | ) | const |
References nodeArray.
Referenced by linkGetElementPicked().
◆ isLinked()
bool LinkView::isLinked | ( | ) | const |
References linkInfo.
Referenced by Gui::ViewProviderLink::canDropObjectEx(), hasSubs(), Gui::ViewProviderLink::linkEdit(), linkGetDetailPath(), linkGetElementPicked(), setLinkViewObject(), setNodeType(), and updateLink().
◆ linkGetDetailPath()
bool LinkView::linkGetDetailPath | ( | const char * | subname, |
SoFullPath * | path, | ||
SoDetail *& | det | ||
) | const |
References autoSubLink, childType, App::LinkBaseExtension::getArrayIndex(), getGroupHierarchy(), isLinked(), linkInfo, nodeArray, nodeType, pcLinkedRoot, pcLinkRoot, SnapshotTransform, and subInfo.
Referenced by Gui::LinkViewPy::getDetailPath(), and Gui::ViewProviderLink::getDetailPath().
◆ linkGetElementPicked()
bool LinkView::linkGetElementPicked | ( | const SoPickedPoint * | pp, |
std::string & | subname | ||
) | const |
References autoSubLink, childType, isElementVisible(), isLinked(), linkInfo, nodeArray, nodeMap, nodeType, pcLinkedRoot, pcLinkRoot, SnapshotTransform, and subInfo.
Referenced by Gui::ViewProviderLink::getElementPicked().
◆ onLinkedIconChange()
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References linkInfo, and linkOwner.
Referenced by Gui::LinkView::SubInfo::onLinkedIconChange().
◆ onLinkedUpdateData()
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References App::Property::getType(), linkInfo, linkOwner, App::Property::Output, App::Prop_Output, and App::Property::testStatus().
◆ operator=()
◆ renderDoubleSide()
void LinkView::renderDoubleSide | ( | bool | enable | ) |
References pcLinkRoot, and pcShapeHints.
Referenced by Gui::ViewProviderLink::updateDataPrivate().
◆ replaceLinkedRoot()
|
protected |
References childType, nodeArray, pcLinkedRoot, pcLinkRoot, and resetRoot().
Referenced by setNodeType(), and updateLink().
◆ resetRoot()
|
protected |
References Gui::coinRemoveAllChildren(), pcDrawStyle, pcLinkRoot, pcShapeHints, and pcTransform.
Referenced by replaceLinkedRoot(), setChildren(), setSize(), and unlink().
◆ setChildren()
void LinkView::setChildren | ( | const std::vector< App::DocumentObject * > & | children, |
const boost::dynamic_bitset<> & | vis, | ||
SnapshotType | type = SnapshotVisible |
||
) |
◆ setDrawStyle()
void LinkView::setDrawStyle | ( | int | linePattern, |
double | lineWidth = 0 , |
||
double | pointSize = 0 |
||
) |
References pcDrawStyle, and pcLinkRoot.
Referenced by Gui::ViewProviderLink::finishRestoring(), and Gui::ViewProviderLink::onChanged().
◆ setElementVisible()
void LinkView::setElementVisible | ( | int | index, |
bool | visible | ||
) |
References nodeArray.
Referenced by Gui::ViewProviderLink::updateDataPrivate().
◆ setInvalid()
void LinkView::setInvalid | ( | ) |
References PythonObject.
Referenced by Gui::ViewProviderLink::~ViewProviderLink().
◆ setLink()
void LinkView::setLink | ( | App::DocumentObject * | obj, |
const std::vector< std::string > & | subs = std::vector<std::string>() |
||
) |
References Gui::Application::Instance, and setLinkViewObject().
Referenced by Gui::LinkViewPy::setLink(), and Gui::ViewProviderLink::updateDataPrivate().
◆ setLinkViewObject()
void LinkView::setLinkViewObject | ( | ViewProviderDocumentObject * | vpd, |
const std::vector< std::string > & | subs = std::vector<std::string>() |
||
) |
References Data::ComplexGeoData::findElementName(), Gui::LinkInfo::get(), isLinked(), linkInfo, SubInfo, subInfo, unlink(), and updateLink().
Referenced by Gui::LinkViewPy::setLink(), and setLink().
◆ setMaterial()
void LinkView::setMaterial | ( | int | index, |
const App::Material * | material | ||
) |
References App::Color::a, App::Material::diffuseColor, getSize(), nodeArray, pcLinkRoot, and App::Material::transparency.
Referenced by Gui::ViewProviderLink::applyMaterial().
◆ setNodeType()
void LinkView::setNodeType | ( | SnapshotType | type, |
bool | sublink = true |
||
) |
References autoSubLink, isLinked(), linkInfo, nodeType, pcLinkedRoot, replaceLinkedRoot(), SnapshotContainer, SnapshotContainerTransform, SnapshotMax, and updateLink().
Referenced by Gui::ViewProviderLink::setLinkType(), and Gui::LinkViewPy::setType().
◆ setOwner()
void LinkView::setOwner | ( | ViewProviderDocumentObject * | vpd | ) |
References Gui::LinkInfo::get(), linkOwner, and unlink().
Referenced by Gui::ViewProviderLink::attach(), Gui::ViewProviderLink::reattach(), and Gui::LinkViewPy::setOwner().
◆ setSize()
void LinkView::setSize | ( | int | size | ) |
References childType, nodeArray, nodeMap, pcLinkedRoot, pcLinkRoot, resetRoot(), and SnapshotContainer.
Referenced by Gui::LinkViewPy::setCount(), and Gui::ViewProviderLink::updateDataPrivate().
◆ setTransform() [1/2]
void LinkView::setTransform | ( | int | index, |
const Base::Matrix4D & | mat | ||
) |
References nodeArray, pcLinkRoot, and pcTransform.
Referenced by Gui::ViewProviderLink::updateDataPrivate(), and updateLink().
◆ setTransform() [2/2]
|
static |
References Base::Matrix4D::getGLMatrix(), pcTransform, and Base::Vector3< _Precision >::Sqr().
◆ unlink()
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References linkInfo, linkOwner, nodeArray, pcLinkedRoot, pcLinkRoot, resetRoot(), and subInfo.
Referenced by setLinkViewObject(), setOwner(), and ~LinkView().
◆ updateLink()
void LinkView::updateLink | ( | ) |
References Gui::SoSelectionElementAction::Append, Gui::coinRemoveAllChildren(), App::DocumentObject::getSubObject(), isLinked(), linkInfo, linkOwner, nodeType, pcLinkedRoot, pcLinkRoot, replaceLinkedRoot(), setTransform(), SnapshotContainer, SnapshotTransform, and subInfo.
Referenced by setLinkViewObject(), setNodeType(), and Gui::ViewProviderLink::updateDataPrivate().
Friends And Related Function Documentation
◆ SubInfo
Referenced by setLinkViewObject().
Member Data Documentation
◆ autoSubLink
|
protected |
◆ childType
|
protected |
Referenced by Gui::LinkView::Element::link(), linkGetDetailPath(), linkGetElementPicked(), replaceLinkedRoot(), setChildren(), and setSize().
◆ linkInfo
|
protected |
◆ linkOwner
|
protected |
Referenced by getBoundBox(), getOwner(), onLinkedIconChange(), onLinkedUpdateData(), setOwner(), unlink(), updateLink(), and ~LinkView().
◆ nodeArray
|
protected |
◆ nodeMap
|
protected |
Referenced by linkGetElementPicked(), setChildren(), and setSize().
◆ nodeType
|
protected |
Referenced by linkGetDetailPath(), linkGetElementPicked(), setNodeType(), and updateLink().
◆ pcDrawStyle
|
protected |
Referenced by resetRoot(), and setDrawStyle().
◆ pcLinkedRoot
|
protected |
Referenced by linkGetDetailPath(), linkGetElementPicked(), replaceLinkedRoot(), setChildren(), setNodeType(), setSize(), unlink(), and updateLink().
◆ pcLinkRoot
|
protected |
◆ pcShapeHints
|
protected |
Referenced by renderDoubleSide(), and resetRoot().
◆ pcTransform
|
protected |
Referenced by resetRoot(), and setTransform().
◆ PythonObject
|
protected |
Referenced by getPyObject(), and setInvalid().
◆ subInfo
|
protected |
The documentation for this class was generated from the following files:
- src/Gui/ViewProviderLink.h
- src/Gui/ViewProviderLink.cpp