Gui::LinkView Class Reference

#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
 
ViewProviderDocumentObjectgetLinkedView () const
 
SoFCSelectionRootgetLinkRoot () const
 
ViewProviderDocumentObjectgetOwner () const
 
virtual PyObjectgetPyObject (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
 
LinkViewoperator= (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 PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (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 *, intnodeMap
 
SnapshotType nodeType
 
CoinPtr< SoDrawStyle > pcDrawStyle
 
CoinPtr< SoSeparatorpcLinkedRoot
 
CoinPtr< SoFCSelectionRootpcLinkRoot
 
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

Enumerator
SnapshotTransform 
SnapshotVisible 
SnapshotChild 
SnapshotMax 
SnapshotContainer 
SnapshotContainerTransform 

Constructor & Destructor Documentation

◆ LinkView() [1/2]

LinkView::LinkView ( )

◆ ~LinkView()

LinkView::~LinkView ( )

References linkInfo, linkOwner, and unlink().

◆ LinkView() [2/2]

Gui::LinkView::LinkView ( const LinkView )
delete

Member Function Documentation

◆ getBoundBox()

Base::BoundBox3d LinkView::getBoundBox ( ViewProviderDocumentObject vpd = nullptr) const

References linkOwner, and pcLinkRoot.

◆ getChildren()

std::vector< ViewProviderDocumentObject * > LinkView::getChildren ( ) const

References nodeArray.

◆ getGroupHierarchy()

bool LinkView::getGroupHierarchy ( int  index,
SoFullPath *  path 
) const
protected

◆ getLinkedIcon()

QIcon LinkView::getLinkedIcon ( QPixmap  overlay) const

◆ getLinkedView()

◆ getLinkRoot()

◆ getOwner()

ViewProviderDocumentObject * LinkView::getOwner ( ) const

References linkOwner.

◆ getPyObject()

PyObject * LinkView::getPyObject ( void  )
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 ( void  ) const

◆ getSubNames()

std::vector< std::string > LinkView::getSubNames ( void  ) const

References subInfo.

◆ hasSubs()

◆ isElementVisible()

bool LinkView::isElementVisible ( int  index) const

References nodeArray.

Referenced by linkGetElementPicked().

◆ isLinked()

◆ linkGetDetailPath()

bool LinkView::linkGetDetailPath ( const char *  subname,
SoFullPath *  path,
SoDetail *&  det 
) const

◆ linkGetElementPicked()

bool LinkView::linkGetElementPicked ( const SoPickedPoint *  pp,
std::string &  subname 
) const

◆ onLinkedIconChange()

void LinkView::onLinkedIconChange ( LinkInfoPtr  info)
overridevirtual

Reimplemented from Gui::LinkOwner.

References linkInfo, and linkOwner.

Referenced by Gui::LinkView::SubInfo::onLinkedIconChange().

◆ onLinkedUpdateData()

void LinkView::onLinkedUpdateData ( LinkInfoPtr  info,
const App::Property prop 
)
overridevirtual

◆ operator=()

LinkView & Gui::LinkView::operator= ( const LinkView )
delete

◆ renderDoubleSide()

void LinkView::renderDoubleSide ( bool  enable)

◆ replaceLinkedRoot()

void LinkView::replaceLinkedRoot ( SoSeparator root)
protected

◆ resetRoot()

void LinkView::resetRoot ( )
protected

◆ 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 
)

◆ setElementVisible()

void LinkView::setElementVisible ( int  index,
bool  visible 
)

◆ setInvalid()

void LinkView::setInvalid ( void  )

◆ setLink()

void LinkView::setLink ( App::DocumentObject obj,
const std::vector< std::string > &  subs = std::vector<std::string>() 
)

◆ setLinkViewObject()

void LinkView::setLinkViewObject ( ViewProviderDocumentObject vpd,
const std::vector< std::string > &  subs = std::vector<std::string>() 
)

◆ setMaterial()

◆ setNodeType()

◆ setOwner()

◆ setSize()

void LinkView::setSize ( int  size)

◆ setTransform() [1/2]

void LinkView::setTransform ( int  index,
const Base::Matrix4D mat 
)

◆ setTransform() [2/2]

void LinkView::setTransform ( SoTransform *  pcTransform,
const Base::Matrix4D mat 
)
static

◆ unlink()

void LinkView::unlink ( LinkInfoPtr  info)
overridevirtual

◆ updateLink()

Friends And Related Function Documentation

◆ SubInfo

friend class SubInfo
friend

Referenced by setLinkViewObject().

Member Data Documentation

◆ autoSubLink

◆ childType

◆ linkInfo

◆ linkOwner

◆ nodeArray

◆ nodeMap

std::unordered_map<SoNode*,int> Gui::LinkView::nodeMap
protected

◆ nodeType

SnapshotType Gui::LinkView::nodeType
protected

◆ pcDrawStyle

CoinPtr<SoDrawStyle> Gui::LinkView::pcDrawStyle
protected

Referenced by resetRoot(), and setDrawStyle().

◆ pcLinkedRoot

◆ pcLinkRoot

◆ pcShapeHints

CoinPtr<SoShapeHints> Gui::LinkView::pcShapeHints
protected

Referenced by renderDoubleSide(), and resetRoot().

◆ pcTransform

CoinPtr<SoTransform> Gui::LinkView::pcTransform
protected

Referenced by resetRoot(), and setTransform().

◆ PythonObject

Py::Object Gui::LinkView::PythonObject
protected

Referenced by getPyObject(), and setInvalid().

◆ subInfo


The documentation for this class was generated from the following files: