Gui::SelectionObject Class Reference

The Selection object class. More...

#include <SelectionObject.h>

Public Member Functions

std::string getAsPropertyLinkSubString (void) const
 returns python expreasion sutably for assigning to a LinkSub property More...
 
const char * getDocName (void) const
 get the name of the Document of this SelctionObject More...
 
const char * getFeatName (void) const
 get the name of the Document Object of this SelectionObject More...
 
App::DocumentObjectgetObject (void)
 returns the selected DocumentObject or NULL if the object is already deleted More...
 
const App::DocumentObjectgetObject (void) const
 returns the selected DocumentObject or NULL if the object is already deleted More...
 
const std::vector< Base::Vector3dgetPickedPoints (void) const
 get the selection points More...
 
PyObjectgetPyObject ()
 The default implementation returns an instance of SelectionObjectPy. More...
 
const std::vector< std::string > & getSubNames (void) const
 get the SubElement name of this SelectionObject More...
 
const char * getTypeName (void) const
 get the Type of the selected Object More...
 
bool hasSubNames (void) const
 are there any SubNames selected More...
 
bool isObjectTypeOf (const Base::Type &typeId) const
 check the selected object is a special type or derived of More...
 
 SelectionObject ()
 Constructs a SelectionObject object. More...
 
 SelectionObject (App::DocumentObject *)
 
 SelectionObject (const SelectionChanges &msg)
 
virtual ~SelectionObject ()
 
- 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...
 

Protected Attributes

std::string DocName
 
std::string FeatName
 
std::vector< Base::Vector3dSelPoses
 
std::vector< std::string > SubNames
 
std::string TypeName
 

Friends

class SelectionSingleton
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::BaseClass
static void * create ()
 
static Type getClassTypeId ()
 
static void init ()
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Detailed Description

The Selection object class.

Constructor & Destructor Documentation

◆ SelectionObject() [1/3]

SelectionObject::SelectionObject ( )

Constructs a SelectionObject object.

Referenced by getPyObject().

◆ SelectionObject() [2/3]

SelectionObject::SelectionObject ( const SelectionChanges msg)

Constructs a SelectionObject from the SelectionChanges structure.

References DocName, FeatName, SelPoses, SubNames, and TypeName.

◆ SelectionObject() [3/3]

SelectionObject::SelectionObject ( App::DocumentObject obj)
explicit

References DocName, FeatName, and TypeName.

◆ ~SelectionObject()

SelectionObject::~SelectionObject ( )
virtual

Member Function Documentation

◆ getAsPropertyLinkSubString()

std::string SelectionObject::getAsPropertyLinkSubString ( void  ) const

returns python expreasion sutably for assigning to a LinkSub property

References getObject(), Gui::Command::getObjectCmd(), and SubNames.

◆ getDocName()

const char * Gui::SelectionObject::getDocName ( void  ) const

get the name of the Document of this SelctionObject

◆ getFeatName()

const char * Gui::SelectionObject::getFeatName ( void  ) const

get the name of the Document Object of this SelectionObject

◆ getObject() [1/2]

App::DocumentObject * SelectionObject::getObject ( void  )

returns the selected DocumentObject or NULL if the object is already deleted

References DocName, FeatName, App::GetApplication(), and App::Application::getDocument().

◆ getObject() [2/2]

◆ getPickedPoints()

const std::vector< Base::Vector3d > Gui::SelectionObject::getPickedPoints ( void  ) const

get the selection points

◆ getPyObject()

PyObject * SelectionObject::getPyObject ( void  )
virtual

The default implementation returns an instance of SelectionObjectPy.

Reimplemented from Base::BaseClass.

References SelectionObject().

Referenced by Gui::SelectionSingleton::sGetSelectionObject().

◆ getSubNames()

const std::vector< std::string > & Gui::SelectionObject::getSubNames ( void  ) const

get the SubElement name of this SelectionObject

Referenced by Gui::SelectionSingleton::getAsPropertyLinkSubList().

◆ getTypeName()

const char * Gui::SelectionObject::getTypeName ( void  ) const

get the Type of the selected Object

◆ hasSubNames()

bool Gui::SelectionObject::hasSubNames ( void  ) const

are there any SubNames selected

◆ isObjectTypeOf()

bool SelectionObject::isObjectTypeOf ( const Base::Type typeId) const

check the selected object is a special type or derived of

References getObject().

Friends And Related Function Documentation

◆ SelectionSingleton

friend class SelectionSingleton
friend

Member Data Documentation

◆ DocName

◆ FeatName

std::string Gui::SelectionObject::FeatName
protected

◆ SelPoses

std::vector<Base::Vector3d> Gui::SelectionObject::SelPoses
protected

◆ SubNames

std::vector<std::string> Gui::SelectionObject::SubNames
protected

◆ TypeName

std::string Gui::SelectionObject::TypeName
protected

Referenced by SelectionObject().


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