#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=nullptr) 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... | |
BaseClass (const BaseClass &)=default | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
virtual void | onLinkedIconChange (LinkInfoPtr) |
virtual void | onLinkedUpdateData (LinkInfoPtr, const App::Property *) |
virtual void | unlink (LinkInfoPtr) |
Static Public Member Functions | |
static void | setTransform (SoTransform *pcTransform, const Base::Matrix4D &mat) |
Static Public Member Functions inherited from Base::BaseClass | |
static void * | create () |
static Type | getClassTypeId () |
static void | init () |
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) |
LinkView::LinkView | ( | ) |
|
delete |
Base::BoundBox3d LinkView::getBoundBox | ( | ViewProviderDocumentObject * | vpd = nullptr | ) | const |
References linkOwner, and pcLinkRoot.
std::vector< ViewProviderDocumentObject * > LinkView::getChildren | ( | ) | const |
References nodeArray.
References getGroupHierarchy(), and nodeArray.
Referenced by getGroupHierarchy(), and linkGetDetailPath().
QIcon LinkView::getLinkedIcon | ( | QPixmap | overlay | ) | const |
References autoSubLink, linkInfo, and subInfo.
Referenced by Gui::ViewProviderLink::getIcon().
ViewProviderDocumentObject * LinkView::getLinkedView | ( | ) | const |
References autoSubLink, linkInfo, and subInfo.
Referenced by Gui::ViewProviderLink::doubleClicked(), and Gui::ViewProviderLink::startEditing().
SoFCSelectionRoot * Gui::LinkView::getLinkRoot | ( | ) | const |
ViewProviderDocumentObject * LinkView::getOwner | ( | ) | const |
References linkOwner.
|
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().
int Gui::LinkView::getSize | ( | void | ) | const |
std::vector< std::string > LinkView::getSubNames | ( | void | ) | const |
References subInfo.
bool LinkView::hasSubs | ( | ) | const |
References isLinked(), and subInfo.
Referenced by Gui::ViewProviderLink::initDraggingPlacement(), and Gui::ViewProviderLink::updateDataPrivate().
References nodeArray.
Referenced by linkGetElementPicked().
bool LinkView::isLinked | ( | ) | const |
References linkInfo.
Referenced by Gui::ViewProviderLink::canDropObjectEx(), hasSubs(), Gui::ViewProviderLink::linkEdit(), linkGetDetailPath(), linkGetElementPicked(), setLinkViewObject(), setNodeType(), and updateLink().
bool LinkView::linkGetDetailPath | ( | const char * | subname, |
SoFullPath * | path, | ||
SoDetail *& | det | ||
) | const |
References autoSubLink, childType, DraftVecUtils::equals(), App::LinkBaseExtension::getArrayIndex(), getGroupHierarchy(), isLinked(), linkInfo, nodeArray, nodeType, pcLinkedRoot, pcLinkRoot, SnapshotTransform, and subInfo.
Referenced by Gui::ViewProviderLink::getDetailPath().
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().
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References linkInfo, and linkOwner.
Referenced by Gui::LinkView::SubInfo::onLinkedIconChange().
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References App::Property::getType(), linkInfo, linkOwner, App::Property::Output, App::Prop_Output, and App::Property::testStatus().
void LinkView::renderDoubleSide | ( | bool | enable | ) |
References pcLinkRoot, and pcShapeHints.
Referenced by Gui::ViewProviderLink::updateDataPrivate().
|
protected |
References childType, nodeArray, pcLinkedRoot, pcLinkRoot, and resetRoot().
Referenced by setNodeType(), and updateLink().
|
protected |
References Gui::coinRemoveAllChildren(), pcDrawStyle, pcLinkRoot, pcShapeHints, and pcTransform.
Referenced by replaceLinkedRoot(), setChildren(), setSize(), and unlink().
void LinkView::setChildren | ( | const std::vector< App::DocumentObject * > & | children, |
const boost::dynamic_bitset<> & | vis, | ||
SnapshotType | type = SnapshotVisible |
||
) |
References childType, Gui::coinRemoveAllChildren(), App::GroupExtension::getGroupOfObject(), nodeArray, nodeMap, pcLinkedRoot, pcLinkRoot, resetRoot(), SnapshotContainer, and SnapshotMax.
Referenced by Gui::ViewProviderLink::updateElementList().
void LinkView::setDrawStyle | ( | int | linePattern, |
double | lineWidth = 0 , |
||
double | pointSize = 0 |
||
) |
References pcDrawStyle, and pcLinkRoot.
Referenced by Gui::ViewProviderLink::finishRestoring(), and Gui::ViewProviderLink::onChanged().
References nodeArray.
Referenced by Gui::ViewProviderLink::updateDataPrivate().
void LinkView::setInvalid | ( | void | ) |
References PythonObject.
Referenced by Gui::ViewProviderLink::~ViewProviderLink().
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::ViewProviderLink::updateDataPrivate().
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 setLink().
void LinkView::setMaterial | ( | int | index, |
const App::Material * | material | ||
) |
References App::Color::a, App::Material::diffuseColor, getSize(), nodeArray, pcLinkRoot, setMaterial(), and App::Material::transparency.
Referenced by Gui::ViewProviderLink::applyMaterial(), and setMaterial().
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().
void LinkView::setOwner | ( | ViewProviderDocumentObject * | vpd | ) |
References Gui::LinkInfo::get(), linkOwner, and unlink().
Referenced by Gui::ViewProviderLink::attach(), and Gui::ViewProviderLink::reattach().
void LinkView::setSize | ( | int | size | ) |
References childType, nodeArray, nodeMap, pcLinkedRoot, pcLinkRoot, resetRoot(), and SnapshotContainer.
Referenced by Gui::ViewProviderLink::updateDataPrivate().
void LinkView::setTransform | ( | int | index, |
const Base::Matrix4D & | mat | ||
) |
References nodeArray, pcLinkRoot, pcTransform, and setTransform().
Referenced by setTransform(), Gui::ViewProviderLink::updateDataPrivate(), and updateLink().
|
static |
References Base::Matrix4D::getGLMatrix(), pcTransform, and Base::Vector3< _Precision >::Sqr().
|
overridevirtual |
Reimplemented from Gui::LinkOwner.
References linkInfo, linkOwner, nodeArray, pcLinkedRoot, pcLinkRoot, resetRoot(), and subInfo.
Referenced by setLinkViewObject(), setOwner(), and ~LinkView().
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().
Referenced by setLinkViewObject().
|
protected |
|
protected |
Referenced by Gui::LinkView::Element::link(), linkGetDetailPath(), linkGetElementPicked(), replaceLinkedRoot(), setChildren(), and setSize().
|
protected |
|
protected |
Referenced by getBoundBox(), getOwner(), onLinkedIconChange(), onLinkedUpdateData(), setOwner(), unlink(), updateLink(), and ~LinkView().
|
protected |
Referenced by linkGetElementPicked(), setChildren(), and setSize().
|
protected |
Referenced by linkGetDetailPath(), linkGetElementPicked(), setNodeType(), and updateLink().
|
protected |
Referenced by resetRoot(), and setDrawStyle().
|
protected |
Referenced by linkGetDetailPath(), linkGetElementPicked(), replaceLinkedRoot(), setChildren(), setNodeType(), setSize(), unlink(), and updateLink().
|
protected |
|
protected |
Referenced by renderDoubleSide(), and resetRoot().
|
protected |
Referenced by resetRoot(), and setTransform().
|
protected |
Referenced by getPyObject(), and setInvalid().
|
protected |