Class super-container for managing a collection of DrawProjGroupItem Page Features. More...
#include <DrawProjGroup.h>
Public Member Functions | |
App::DocumentObject * addProjection (const char *viewProjType) | |
Adds a projection to the group. More... | |
double calculateAutomaticScale () const | |
DrawProjGroup () | |
Constructor. More... | |
Base::BoundBox3d getBoundingBox () const | |
Anchor Element to align views to. More... | |
DrawProjGroupItem * getProjItem (const char *viewProjType) const | |
App::DocumentObject * getProjObj (const char *viewProjType) const | |
virtual QRectF getRect (void) const override | |
Base::Vector3d getXYPosition (const char *viewTypeCStr) | |
bool hasProjection (const char *viewProjType) const | |
Check if container has a view of a specific type. More... | |
short mustExecute () const override | |
mustExecute We call this method to check if the object was modified to be invoked. More... | |
int purgeProjections () | |
int removeProjection (const char *viewProjType) | |
Removes a projection from the group. More... | |
~DrawProjGroup () | |
![]() | |
int addView (DrawView *view) | |
int countChildren () | |
DrawViewCollection () | |
Constructor. More... | |
bool isUnsetting (void) | |
void lockChildren (void) | |
short mustExecute () const | |
mustExecute We call this method to check if the object was modified to be invoked. More... | |
virtual void onDocumentRestored () | |
get called after a document has been fully restored More... | |
void rebuildViewList (void) | |
int removeView (DrawView *view) | |
virtual void unsetupObject () | |
get called when object is going to be removed from the document More... | |
virtual ~DrawViewCollection () | |
![]() | |
DrawView (void) | |
Constructor. More... | |
virtual ~DrawView () | |
bool isInClip () | |
DrawViewClip * getClipGroup (void) | |
virtual DrawPage * findParentPage () const | |
virtual double autoScale (void) const | |
virtual double autoScale (double w, double h) const | |
virtual bool checkFit (void) const | |
virtual bool checkFit (DrawPage *) const | |
check if View is too big for page More... | |
virtual void setPosition (double x, double y, bool force=false) | |
virtual bool keepUpdated (void) | |
virtual double getScale (void) const | |
void checkScale (void) | |
void requestPaint (void) | |
virtual void handleXYLock (void) | |
virtual bool isLocked (void) const | |
virtual bool showLock (void) const | |
std::vector< TechDraw::DrawLeaderLine * > getLeaders (void) const | |
![]() | |
virtual App::Property * addDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false) override | |
virtual bool adjustRelativeLinks (const std::set< App::DocumentObject * > &inList, std::set< App::DocumentObject * > *visited=0) | |
Called to adjust link properties to avoid cyclic links. More... | |
virtual bool allowDuplicateLabel () const | |
virtual bool canLinkProperties () const | |
virtual int canLoadPartial () const | |
allow partial loading of dependent objects More... | |
void clearOutListCache () const | |
clear internal out list cache More... | |
virtual const char * detachFromDocument () override | |
DocumentObject (void) | |
Constructor. More... | |
void enforceRecompute () | |
Enforce this document object to be recomputed. More... | |
App::Document * getDocument (void) const | |
gets the document in which this Object is handled More... | |
std::string getExportName (bool forced=false) const | |
returns the name that is safe to be exported to other document More... | |
virtual const PropertyExpressionEngine::ExpressionInfo getExpression (const ObjectIdentifier &path) const | |
virtual std::string getFullName () const override | |
Return the object full name of the form DocName::ObjName. More... | |
DocumentObjectGroup * getGroup () const | |
get group if object is part of a group, otherwise 0 is returned More... | |
long getID () const | |
Return the object ID that is unique within its owner document. More... | |
const std::vector< App::DocumentObject * > & getInList (void) const | |
std::set< App::DocumentObject * > getInListEx (bool recursive) const | |
Return a set of all objects linking to this object, including possible external parent objects. More... | |
void getInListEx (std::set< App::DocumentObject * > &inSet, bool recursive, std::vector< App::DocumentObject * > *inList=0) const | |
Get a set of all objects linking to this object, including possible external parent objects. More... | |
std::vector< App::DocumentObject * > getInListRecursive (void) const | |
get all objects link directly or indirectly to this object More... | |
virtual DocumentObject * getLinkedObject (bool recurse=true, Base::Matrix4D *mat=0, bool transform=false, int depth=0) const | |
Return the linked object with optional transformation. More... | |
const char * getNameInDocument (void) const | |
returns the name which is set in the document for this object (not the name property!) More... | |
const std::string & getOldLabel () const | |
const std::vector< App::DocumentObject * > & getOutList () const | |
returns a list of objects this object is pointing to by Links More... | |
std::vector< App::DocumentObject * > getOutList (int option) const | |
void getOutList (int option, std::vector< App::DocumentObject * > &res) const | |
std::vector< App::DocumentObject * > getOutListOfProperty (App::Property *) const | |
returns a list of objects linked by the property More... | |
std::vector< App::DocumentObject * > getOutListRecursive (void) const | |
returns a list of objects this object is pointing to by Links and all further descended More... | |
std::vector< std::pair< App::DocumentObject *, std::string > > getParents (int depth=0) const | |
Obtain top parents and subnames of this object using its InList. More... | |
std::vector< std::list< App::DocumentObject * > > getPathsByOutList (App::DocumentObject *to) const | |
get all possible paths from this to another object following the OutList More... | |
unsigned long getStatus () const | |
return the status bits More... | |
const char * getStatusString (void) const | |
get the status Message More... | |
virtual DocumentObject * getSubObject (const char *subname, PyObject **pyObj=0, Base::Matrix4D *mat=0, bool transform=true, int depth=0) const | |
Get the sub element/object by name. More... | |
std::vector< DocumentObject * > getSubObjectList (const char *subname) const | |
Return a list of objects referenced by a given subname including this object. More... | |
virtual std::vector< std::string > getSubObjects (int reason=0) const | |
Return name reference of all sub-objects. More... | |
virtual const char * getViewProviderNameOverride () const | |
This function is introduced to allow Python feature override its view provider. More... | |
const char * getViewProviderNameStored () const | |
virtual bool hasChildElement () const | |
return true to activate tree view group object handling and element visibility More... | |
virtual bool isAttachedToDocument () const override | |
virtual int isElementVisible (const char *element) const | |
Get sub-element visibility. More... | |
bool isError (void) const | |
set this feature to error More... | |
int isExporting () const | |
bool isInInList (DocumentObject *objToTest) const | |
test if this object is directly (non recursive) in the InList More... | |
bool isInInListRecursive (DocumentObject *objToTest) const | |
test if this object is in the InList and recursive further down More... | |
bool isInOutList (DocumentObject *objToTest) const | |
test if this object is directly (non recursive) in the OutList More... | |
bool isInOutListRecursive (DocumentObject *objToTest) const | |
test if the given object is in the OutList and recursive further down More... | |
bool isRecomputing () const | |
returns true if this objects is currently recomputing More... | |
bool isRemoving () const | |
returns true if this objects is currently removed from the document More... | |
bool isRestoring () const | |
returns true if this objects is currently restoring from file More... | |
bool isTouched (void) const | |
test if this document object is touched More... | |
bool isValid (void) const | |
bool mustRecompute (void) const | |
Test if this document object must be recomputed. More... | |
virtual void onBeforeChangeLabel (std::string &newLabel) | |
virtual void onLostLinkToObject (DocumentObject *) | |
Called in case of losing a link Get called by the document when a object got deleted a link property of this object ist pointing to. More... | |
virtual void onUpdateElementReference (const Property *) | |
void purgeError (void) | |
remove the error from the object More... | |
void purgeTouched (void) | |
reset this document object touched More... | |
bool recomputeFeature (bool recursive=false) | |
Recompute only this feature. More... | |
virtual bool redirectSubName (std::ostringstream &ss, DocumentObject *topParent, DocumentObject *child) const | |
Allow object to redirect a subname path. More... | |
virtual bool removeDynamicProperty (const char *prop) override | |
virtual void renameObjectIdentifiers (const std::map< App::ObjectIdentifier, App::ObjectIdentifier > &paths) | |
App::DocumentObject * resolve (const char *subname, App::DocumentObject **parent=0, std::string *childName=0, const char **subElement=0, PyObject **pyObj=0, Base::Matrix4D *mat=0, bool transform=true, int depth=0) const | |
Resolve the last document object referenced in the subname. More... | |
App::DocumentObject * resolveRelativeLink (std::string &subname, App::DocumentObject *&link, std::string &linkSub) const | |
Resolve a link reference that is relative to this object reference. More... | |
virtual void Save (Base::Writer &writer) const override | |
This method is used to save properties to an XML document. More... | |
virtual int setElementVisible (const char *element, bool visible) | |
Child element handling. More... | |
virtual void setExpression (const ObjectIdentifier &path, boost::shared_ptr< App::Expression > expr) | |
void setStatus (ObjectStatus pos, bool on) | |
bool testIfLinkDAGCompatible (App::PropertyLinkSub &linkTo) const | |
bool testIfLinkDAGCompatible (App::PropertyLinkSubList &linksTo) const | |
bool testIfLinkDAGCompatible (const std::vector< DocumentObject * > &linksTo) const | |
bool testIfLinkDAGCompatible (DocumentObject *linkTo) const | |
testIfLinkIsDAG tests a link that is about to be created for circular references. More... | |
bool testStatus (ObjectStatus pos) const | |
void touch (bool noRecompute=false) | |
Set the property touched -> changed, cause recomputation in Update() More... | |
virtual ~DocumentObject () | |
![]() | |
TransactionalObject (void) | |
Constructor. More... | |
virtual ~TransactionalObject () | |
![]() | |
ExtensionIterator extensionBegin () | |
ExtensionContainer () | |
ExtensionIterator extensionEnd () | |
App::Extension * getExtension (Base::Type, bool derived=true, bool no_except=false) const | |
App::Extension * getExtension (const std::string &name) const | |
template<typename ExtensionT > | |
ExtensionT * getExtensionByType (bool no_except=false, bool derived=true) const | |
std::vector< Extension * > getExtensionsDerivedFrom (Base::Type type) const | |
template<typename ExtensionT > | |
std::vector< ExtensionT * > getExtensionsDerivedFromType () const | |
bool hasExtension (Base::Type, bool derived=true) const | |
bool hasExtension (const std::string &name) const | |
bool hasExtensions () const | |
void registerExtension (Base::Type extension, App::Extension *ext) | |
virtual ~ExtensionContainer () | |
virtual Property * getPropertyByName (const char *name) const override | |
find a property by its name More... | |
virtual const char * getPropertyName (const Property *prop) const override | |
get the name of a property More... | |
virtual void getPropertyMap (std::map< std::string, Property * > &Map) const override | |
get all properties of the class (including properties of the parent) More... | |
virtual void getPropertyList (std::vector< Property * > &List) const override | |
get all properties of the class (including properties of the parent) More... | |
virtual short getPropertyType (const Property *prop) const override | |
get the Type of a Property More... | |
virtual short getPropertyType (const char *name) const override | |
get the Type of a named Property More... | |
virtual const char * getPropertyGroup (const Property *prop) const override | |
get the Group of a Property More... | |
virtual const char * getPropertyGroup (const char *name) const override | |
get the Group of a named Property More... | |
virtual const char * getPropertyDocumentation (const Property *prop) const override | |
get the Group of a Property More... | |
virtual const char * getPropertyDocumentation (const char *name) const override | |
get the Group of a named Property More... | |
virtual void Restore (Base::XMLReader &reader) override | |
This method is used to restore properties from an XML document. More... | |
void saveExtensions (Base::Writer &writer) const | |
void restoreExtensions (Base::XMLReader &reader) | |
![]() | |
virtual App::Property * getDynamicPropertyByName (const char *name) const | |
DynamicProperty::PropData getDynamicPropertyData (const Property *prop) const | |
virtual std::vector< std::string > getDynamicPropertyNames () const | |
virtual unsigned int getMemSize (void) const | |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More... | |
const char * getPropertyPrefix () const | |
bool isHidden (const char *name) const | |
check if the named property is hidden More... | |
bool isHidden (const Property *prop) const | |
check if the property is hidden More... | |
bool isReadOnly (const char *name) const | |
check if the named property is read-only More... | |
bool isReadOnly (const Property *prop) const | |
check if the property is read-only More... | |
PropertyContainer () | |
A constructor. More... | |
void setPropertyPrefix (const char *prefix) | |
void setPropertyStatus (unsigned char bit, bool value) | |
set the Status bit of all properties at once More... | |
virtual ~PropertyContainer () | |
A destructor. More... | |
![]() | |
void dumpToStream (std::ostream &stream, int compression) | |
virtual Base::Type getTypeId (void) const | |
virtual void RestoreDocFile (Reader &) | |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void restoreFromStream (std::istream &stream) | |
virtual void SaveDocFile (Writer &) const | |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
bool isDerivedFrom (const Type type) const | |
virtual void setPyObject (PyObject *) | |
virtual ~BaseClass () | |
Destruction. More... | |
methods override Feature | |
static const char * ProjectionTypeEnums [] | |
Allowed projection types - either Document, First Angle or Third Angle. More... | |
bool m_lockScale | |
virtual App::DocumentObjectExecReturn * execute (void) override | |
recalculate the Feature More... | |
virtual const char * getViewProviderName (void) const override | |
returns the type name of the ViewProvider More... | |
virtual PyObject * getPyObject (void) override | |
This method returns the Python wrapper for a C++ object. More... | |
App::Enumeration usedProjectionType (void) | |
Determines either "First Angle" or "Third Angle". More... | |
bool hasAnchor (void) | |
void setAnchorDirection (Base::Vector3d dir) | |
Base::Vector3d getAnchorDirection (void) | |
TechDraw::DrawProjGroupItem * getAnchor (void) | |
std::pair< Base::Vector3d, Base::Vector3d > getDirsFromFront (DrawProjGroupItem *view) | |
std::pair< Base::Vector3d, Base::Vector3d > getDirsFromFront (std::string viewType) | |
void updateSecondaryDirs () | |
void rotateRight (void) | |
void rotateLeft (void) | |
void rotateUp (void) | |
void rotateDown (void) | |
void spinCW (void) | |
void spinCCW (void) | |
void dumpISO (const char *title) | |
std::vector< DrawProjGroupItem * > getViewsAsDPGI () | |
void recomputeChildren (void) | |
void updateChildrenScale (void) | |
void autoPositionChildren (void) | |
void updateChildrenEnforce (void) | |
std::vector< App::DocumentObject * > getAllSources (void) const | |
void onChanged (const App::Property *prop) override | |
get called by the container when a property was changed More... | |
bool checkViewProjType (const char *in) | |
Annoying helper - keep in sync with DrawProjGroupItem::TypeEnums. More... | |
void arrangeViewPointers (DrawProjGroupItem *viewPtrs[10]) const | |
void makeViewBbs (DrawProjGroupItem *viewPtrs[10], Base::BoundBox3d bboxes[10], bool documentScale=true) const | |
Populates array of 10 BoundBox3d's given DrawProjGroupItem *s. More... | |
void minimumBbViews (DrawProjGroupItem *viewPtrs[10], double &width, double &height) const | |
Helper for calculateAutomaticScale. More... | |
TechDraw::DrawPage * getPage (void) const | |
Returns pointer to our page, or NULL if it couldn't be located. More... | |
void updateChildrenSource (void) | |
void updateChildrenLock (void) | |
int getViewIndex (const char *viewTypeCStr) const | |
int getDefProjConv (void) const | |
Base::Vector3d dir2vec (gp_Dir d) | |
gp_Dir vec2dir (Base::Vector3d v) | |
virtual void handleChangedPropertyType (Base::XMLReader &reader, const char *TypeName, App::Property *prop) override | |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container. More... | |
Additional Inherited Members | |
![]() | |
enum GSReason { GS_DEFAULT, GS_SELECT } | |
reason of calling getSubObjects() More... | |
enum OutListOption { OutListNoExpression = 1, OutListNoHidden = 2, OutListNoXLinked = 4 } | |
DAG handling This part of the interface deals with viewing the document as a DAG (directed acyclic graph). More... | |
![]() | |
typedef std::map< Base::Type, App::Extension * >::iterator ExtensionIterator | |
![]() | |
static const char * hasHiddenMarker (const char *subname) | |
Check if the subname reference ends with hidden marker. More... | |
static const std::string & hiddenMarker () | |
Special marker to mark the object as hidden. More... | |
![]() | |
static void * create (void) | |
static std::string encodeAttribute (const std::string &) | |
Encodes an attribute upon saving. More... | |
static Base::Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static DocumentObjectExecReturn * StdReturn | |
![]() | |
void onChanged (const App::Property *prop) | |
get called by the container when a property was changed More... | |
![]() | |
int prefScaleType (void) | |
double prefScale (void) | |
![]() | |
virtual void onBeforeChange (const Property *prop) override | |
get called before the value is changed More... | |
virtual void onPropertyStatusChanged (const Property &prop, unsigned long oldStatus) override | |
get called when a property status has changed More... | |
virtual void onSettingDocument () | |
get called after setting the document More... | |
virtual App::DocumentObjectExecReturn * recompute (void) | |
recompute only this object More... | |
void resetError (void) | |
void setDocument (App::Document *doc) | |
void setError (void) | |
virtual void setupObject () | |
get called after a brand new object was created More... | |
![]() | |
void onBeforeChangeProperty (Document *doc, const Property *prop) | |
![]() | |
virtual const PropertyData & getPropertyData (void) const | |
virtual void handleChangedPropertyName (Base::XMLReader &reader, const char *TypeName, const char *PropName) | |
PropertyContainer::handleChangedPropertyName is called during restore to possibly fix reading of older versions of this property container. More... | |
![]() | |
static const PropertyData * getPropertyDataPtr (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
![]() | |
bool nowUnsetting | |
![]() | |
std::string pageFeatName | |
bool autoPos | |
bool mouseMove | |
![]() | |
std::string oldLabel | |
Old label; used for renaming expressions. More... | |
const std::string * pcNameInDocument | |
Py::Object PythonObject | |
python object of this class and all descendent More... | |
std::bitset< 32 > StatusBits | |
Status bits of the document object The first 8 bits are used for the base system the rest can be used in descendent classes to mark special statuses on the objects. More... | |
![]() | |
DynamicProperty dynamicProps | |
Detailed Description
Class super-container for managing a collection of DrawProjGroupItem Page Features.
Constructor & Destructor Documentation
◆ DrawProjGroup()
DrawProjGroup::DrawProjGroup | ( | ) |
Constructor.
References App::GetApplication(), ParameterGrp::GetBool(), ParameterGrp::GetGroup(), App::Application::GetUserParameter(), App::Global, App::Property::Hidden, and App::Prop_None.
◆ ~DrawProjGroup()
DrawProjGroup::~DrawProjGroup | ( | ) |
Member Function Documentation
◆ addProjection()
App::DocumentObject * DrawProjGroup::addProjection | ( | const char * | viewProjType | ) |
Adds a projection to the group.
- Returns
- pointer to the new view
References TechDraw::DrawViewCollection::addView(), Anchor, checkViewProjType(), Base::Console(), Base::ConsoleSingleton::Error(), TechDraw::DrawView::findParentPage(), getDirsFromFront(), App::DocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), App::Document::getUniqueObjectName(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::PropertyXLinkSubList::getValues(), hasProjection(), Base::ConsoleSingleton::Log(), App::Property::purgeTouched(), App::Property::ReadOnly, TechDraw::DrawView::requestPaint(), App::PropertyLink::setValue(), Source, and XSource.
Referenced by TechDraw::DrawProjGroupPy::addProjection(), and TechDrawGui::TaskProjGroup::restoreGroupState().
◆ arrangeViewPointers()
|
protected |
References Base::Console(), Base::ConsoleSingleton::Error(), TechDraw::DrawView::findParentPage(), getDefProjConv(), App::DocumentObject::getNameInDocument(), App::PropertyEnumeration::getValueAsString(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::PropertyEnumeration::isValue(), Base::ConsoleSingleton::Log(), ProjectionType, TechDraw::DrawPage::ProjectionType, ProjectionTypeEnums, TechDraw::DrawViewCollection::Views, and Base::ConsoleSingleton::Warning().
Referenced by calculateAutomaticScale(), getRect(), and getXYPosition().
◆ autoPositionChildren()
void DrawProjGroup::autoPositionChildren | ( | void | ) |
References App::PropertyListsT< T, ListT, ParentT >::getValues(), and TechDraw::DrawViewCollection::Views.
Referenced by execute().
◆ calculateAutomaticScale()
double DrawProjGroup::calculateAutomaticScale | ( | ) | const |
References arrangeViewPointers(), Base::Console(), App::DocumentObject::getNameInDocument(), getPage(), TechDraw::DrawPage::getPageHeight(), TechDraw::DrawPage::getPageWidth(), App::PropertyQuantity::getValue(), Base::ConsoleSingleton::Log(), minimumBbViews(), TechDraw::DrawUtil::sensibleScale(), spacingX, and spacingY.
Referenced by TechDrawGui::TaskProjGroup::scaleTypeChanged().
◆ checkViewProjType()
|
protected |
Annoying helper - keep in sync with DrawProjGroupItem::TypeEnums.
- Returns
- true iff 'in' is a valid name for an orthographic/isometric view
Referenced by addProjection(), and removeProjection().
◆ dir2vec()
|
protected |
Referenced by getDirsFromFront().
◆ dumpISO()
void DrawProjGroup::dumpISO | ( | const char * | title | ) |
dumps the current iso DPGI's
References Base::Console(), TechDraw::DrawUtil::formatVector(), App::PropertyEnumeration::getValueAsString(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Message(), TechDraw::DrawProjGroupItem::Type, and TechDraw::DrawViewCollection::Views.
◆ execute()
|
overridevirtual |
recalculate the Feature
Reimplemented from TechDraw::DrawViewCollection.
References Anchor, autoPositionChildren(), TechDraw::DrawView::autoScale(), TechDraw::DrawView::checkFit(), TechDraw::DrawViewCollection::execute(), getAllSources(), getPage(), App::PropertyLink::getValue(), App::PropertyEnumeration::isValue(), TechDraw::DrawView::keepUpdated(), m_lockScale, App::Property::purgeTouched(), TechDraw::DrawView::Scale, TechDraw::DrawView::ScaleType, App::PropertyFloat::setValue(), App::DocumentObject::StdReturn, and updateChildrenScale().
Referenced by ArchSite.Compass::buildCoordinates(), ArchSchedule.CommandArchSchedule::IsActive(), and FeaturePython.DistanceBolt::onChanged().
◆ getAllSources()
std::vector< App::DocumentObject * > DrawProjGroup::getAllSources | ( | void | ) | const |
References App::PropertyXLinkSubList::getLinks(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Source, and XSource.
Referenced by execute().
◆ getAnchor()
TechDraw::DrawProjGroupItem * DrawProjGroup::getAnchor | ( | void | ) |
◆ getAnchorDirection()
Base::Vector3d DrawProjGroup::getAnchorDirection | ( | void | ) |
◆ getBoundingBox()
Base::BoundBox3d DrawProjGroup::getBoundingBox | ( | ) | const |
Anchor Element to align views to.
References Base::BoundBox3< _Precision >::Add(), Anchor, Base::Console(), TechDraw::DrawViewPart::getBoundingBox(), Base::Persistence::getClassTypeId(), App::DocumentObject::getNameInDocument(), TechDraw::DrawView::getScale(), App::PropertyQuantity::getValue(), App::PropertyLink::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Log(), Base::BoundBox3< _Precision >::MoveX(), Base::BoundBox3< _Precision >::MoveY(), Base::BoundBox3< _Precision >::ScaleX(), Base::BoundBox3< _Precision >::ScaleY(), Base::BoundBox3< _Precision >::ScaleZ(), TechDraw::DrawViewCollection::Views, TechDraw::DrawView::X, and TechDraw::DrawView::Y.
◆ getDefProjConv()
|
protected |
References TechDraw::Preferences::projectionAngle().
Referenced by arrangeViewPointers(), and getViewIndex().
◆ getDirsFromFront() [1/2]
std::pair< Base::Vector3d, Base::Vector3d > DrawProjGroup::getDirsFromFront | ( | DrawProjGroupItem * | view | ) |
Referenced by addProjection(), rotateDown(), rotateLeft(), rotateRight(), rotateUp(), and updateSecondaryDirs().
◆ getDirsFromFront() [2/2]
std::pair< Base::Vector3d, Base::Vector3d > DrawProjGroup::getDirsFromFront | ( | std::string | viewType | ) |
References Base::Console(), dir2vec(), TechDraw::DrawViewPart::Direction, Base::ConsoleSingleton::Error(), getAnchor(), App::DocumentObject::getNameInDocument(), TechDraw::DrawViewPart::getProjectionCS(), App::PropertyVector::getValue(), App::PropertyString::getValue(), TechDraw::DrawProjGroupItem::getXDirection(), App::DocumentObject::Label, and Base::ConsoleSingleton::Warning().
◆ getPage()
|
protected |
Returns pointer to our page, or NULL if it couldn't be located.
References TechDraw::DrawView::findParentPage().
Referenced by calculateAutomaticScale(), execute(), onChanged(), and usedProjectionType().
◆ getProjItem()
DrawProjGroupItem * DrawProjGroup::getProjItem | ( | const char * | viewProjType | ) | const |
◆ getProjObj()
App::DocumentObject * DrawProjGroup::getProjObj | ( | const char * | viewProjType | ) | const |
◆ 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 TechDraw::DrawView.
References App::DocumentObject::PythonObject.
◆ getRect()
|
overridevirtual |
Reimplemented from TechDraw::DrawViewCollection.
References arrangeViewPointers(), TechDraw::DrawUtil::fpCompare(), TechDraw::DrawView::getScale(), App::PropertyQuantity::getValue(), minimumBbViews(), spacingX, and spacingY.
◆ getViewIndex()
|
protected |
References Base::Console(), TechDraw::DrawView::findParentPage(), getDefProjConv(), App::DocumentObject::getNameInDocument(), App::PropertyEnumeration::getValueAsString(), App::PropertyEnumeration::isValue(), ProjectionType, TechDraw::DrawPage::ProjectionType, ProjectionTypeEnums, and Base::ConsoleSingleton::Warning().
Referenced by getXYPosition().
◆ getViewProviderName()
|
overridevirtual |
returns the type name of the ViewProvider
Reimplemented from TechDraw::DrawViewCollection.
◆ getViewsAsDPGI()
std::vector< DrawProjGroupItem * > DrawProjGroup::getViewsAsDPGI | ( | ) |
◆ getXYPosition()
Base::Vector3d DrawProjGroup::getXYPosition | ( | const char * | viewTypeCStr | ) |
References arrangeViewPointers(), App::PropertyQuantity::getValue(), getViewIndex(), makeViewBbs(), spacingX, spacingY, TechDraw::DrawView::X, and TechDraw::DrawView::Y.
Referenced by TechDraw::DrawProjGroupPy::getXYPosition().
◆ handleChangedPropertyType()
|
overrideprotectedvirtual |
PropertyContainer::handleChangedPropertyType is called during restore to possibly fix reading of older versions of the property container.
This method is typically called if the property on file has changed its type in more recent versions.
The default implementation does nothing.
- Parameters
-
reader The XML stream to read from. TypeName Name of property type on file. prop Pointer to property to restore. Its type differs from TypeName.
Reimplemented from TechDraw::DrawView.
References App::PropertyFloat::getValue(), TechDraw::DrawView::handleChangedPropertyType(), App::PropertyFloat::Restore(), App::PropertyQuantity::setValue(), spacingX, and spacingY.
◆ hasAnchor()
bool DrawProjGroup::hasAnchor | ( | void | ) |
References Anchor, and App::PropertyLink::getValue().
◆ hasProjection()
bool DrawProjGroup::hasProjection | ( | const char * | viewProjType | ) | const |
Check if container has a view of a specific type.
References Base::Console(), App::DocumentObject::getNameInDocument(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Log(), and TechDraw::DrawViewCollection::Views.
Referenced by addProjection(), TechDrawGui::ViewProviderProjGroupItem::onDelete(), removeProjection(), TechDrawGui::TaskProjGroup::setupViewCheckboxes(), and TechDrawGui::TaskProjGroup::viewToggled().
◆ makeViewBbs()
|
protected |
Populates array of 10 BoundBox3d's given DrawProjGroupItem *s.
If documentScale is set, then returned bounding boxes are scaled as in the Drawing. Otherwise, the dimensions are as in object space.
References TechDraw::DrawViewPart::getBoundingBox(), TechDraw::DrawProjGroupItem::getScale(), Base::BoundBox3< _Precision >::ScaleX(), Base::BoundBox3< _Precision >::ScaleY(), and Base::BoundBox3< _Precision >::ScaleZ().
Referenced by getXYPosition(), and minimumBbViews().
◆ minimumBbViews()
|
protected |
Helper for calculateAutomaticScale.
Returns a width and height in object-space scale, for the enabled views without accounting for their actual X and Y positions or borders.
References Base::BoundBox3< _Precision >::LengthX(), and makeViewBbs().
Referenced by calculateAutomaticScale(), and getRect().
◆ mustExecute()
|
overridevirtual |
mustExecute We call this method to check if the object was modified to be invoked.
If the object label or an argument is modified. If we must recompute the object - to call the method execute(). 0: no recomputation is needed 1: recomputation needed
- Remarks
- If an object is marked as 'touched' then this does not necessarily mean that it will be recomputed. It only means that all objects that link it (i.e. its InList) will be recomputed.
Reimplemented from TechDraw::DrawView.
References Anchor, AutoDistribute, App::DocumentObject::isRestoring(), App::Property::isTouched(), TechDraw::DrawView::LockPosition, TechDraw::DrawViewCollection::mustExecute(), ProjectionType, TechDraw::DrawView::Scale, TechDraw::DrawView::ScaleType, Source, spacingX, spacingY, TechDraw::DrawViewCollection::Views, and XSource.
◆ onChanged()
|
overrideprotectedvirtual |
get called by the container when a property was changed
Reimplemented from TechDraw::DrawView.
References Base::Console(), TechDraw::DrawUtil::fpCompare(), getPage(), TechDraw::DrawView::getScale(), App::PropertyQuantity::getValue(), App::PropertyFloat::getValue(), App::DocumentObject::isRestoring(), App::PropertyEnumeration::isValue(), TechDraw::DrawView::LockPosition, Base::ConsoleSingleton::Log(), m_lockScale, TechDraw::DrawViewCollection::onChanged(), ProjectionType, App::DocumentObject::purgeTouched(), TechDraw::DrawView::Rotation, TechDraw::DrawView::Scale, TechDraw::DrawPage::Scale, TechDraw::DrawView::ScaleType, App::PropertyQuantity::setValue(), App::PropertyFloat::setValue(), Source, updateChildrenEnforce(), updateChildrenLock(), updateChildrenScale(), updateChildrenSource(), and XSource.
Referenced by ArchSite.Compass::buildCoordinates(), and ArchAxis.CommandArchGrid::IsActive().
◆ purgeProjections()
int DrawProjGroup::purgeProjections | ( | ) |
References Base::Console(), TechDraw::DrawView::findParentPage(), App::DocumentObject::getNameInDocument(), App::PropertyEnumeration::getValueAsString(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Log(), removeProjection(), TechDraw::DrawProjGroupItem::Type, and TechDraw::DrawViewCollection::Views.
Referenced by TechDraw::DrawProjGroupPy::purgeProjections(), and TechDrawGui::TaskProjGroup::restoreGroupState().
◆ recomputeChildren()
void DrawProjGroup::recomputeChildren | ( | void | ) |
◆ removeProjection()
int DrawProjGroup::removeProjection | ( | const char * | viewProjType | ) |
Removes a projection from the group.
- Returns
- number of projections remaining
References checkViewProjType(), Base::Console(), App::DocumentObject::getDocument(), App::DocumentObject::getNameInDocument(), App::PropertyListsT< T, ListT, ParentT >::getValues(), hasProjection(), Base::ConsoleSingleton::Log(), App::Document::removeObject(), TechDraw::DrawViewCollection::removeView(), and TechDraw::DrawViewCollection::Views.
Referenced by purgeProjections(), TechDraw::DrawProjGroupPy::removeProjection(), and TechDrawGui::TaskProjGroup::viewToggled().
◆ rotateDown()
void DrawProjGroup::rotateDown | ( | void | ) |
◆ rotateLeft()
void DrawProjGroup::rotateLeft | ( | void | ) |
◆ rotateRight()
void DrawProjGroup::rotateRight | ( | void | ) |
◆ rotateUp()
void DrawProjGroup::rotateUp | ( | void | ) |
◆ setAnchorDirection()
void DrawProjGroup::setAnchorDirection | ( | Base::Vector3d | dir | ) |
◆ spinCCW()
void DrawProjGroup::spinCCW | ( | void | ) |
References TechDraw::DrawViewPart::Direction, getAnchor(), App::PropertyVector::getValue(), TechDraw::DrawProjGroupItem::getXDirection(), App::PropertyVector::setValue(), updateSecondaryDirs(), TechDraw::DrawUtil::vecRotate(), and TechDraw::DrawViewPart::XDirection.
Referenced by TechDrawGui::TaskProjGroup::rotateButtonClicked().
◆ spinCW()
void DrawProjGroup::spinCW | ( | void | ) |
References TechDraw::DrawViewPart::Direction, getAnchor(), App::PropertyVector::getValue(), TechDraw::DrawProjGroupItem::getXDirection(), App::PropertyVector::setValue(), updateSecondaryDirs(), TechDraw::DrawUtil::vecRotate(), and TechDraw::DrawViewPart::XDirection.
Referenced by TechDrawGui::TaskProjGroup::rotateButtonClicked().
◆ updateChildrenEnforce()
void DrawProjGroup::updateChildrenEnforce | ( | void | ) |
◆ updateChildrenLock()
|
protected |
tell children DPGIs that parent DPG has changed LockPosition (really for benefit of QGIV on Gui side)
References Base::Console(), App::DocumentObject::getNameInDocument(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Log(), and TechDraw::DrawViewCollection::Views.
Referenced by onChanged().
◆ updateChildrenScale()
void DrawProjGroup::updateChildrenScale | ( | void | ) |
tell children DPGIs that parent DPG has changed Scale
References Base::Console(), App::DocumentObject::getNameInDocument(), App::PropertyFloat::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), Base::ConsoleSingleton::Log(), TechDraw::DrawView::Scale, and TechDraw::DrawViewCollection::Views.
Referenced by execute(), and onChanged().
◆ updateChildrenSource()
|
protected |
tell children DPGIs that parent DPG has changed Source
References Base::Console(), App::DocumentObject::getNameInDocument(), App::PropertyListsT< T, ListT, ParentT >::getValues(), App::PropertyXLinkSubList::getValues(), Base::ConsoleSingleton::Log(), Source, TechDraw::DrawViewCollection::Views, and XSource.
Referenced by onChanged().
◆ updateSecondaryDirs()
void DrawProjGroup::updateSecondaryDirs | ( | ) |
References TechDraw::Bottom, Base::Console(), TechDraw::DrawViewPart::Direction, TechDraw::Front, TechDraw::FrontBottomLeft, TechDraw::FrontBottomRight, TechDraw::FrontTopLeft, TechDraw::FrontTopRight, getAnchor(), getDirsFromFront(), App::PropertyVector::getValue(), App::PropertyListsT< T, ListT, ParentT >::getValues(), TechDraw::DrawProjGroupItem::getXDirection(), TechDraw::Left, Base::ConsoleSingleton::Message(), TechDraw::Rear, recomputeChildren(), TechDraw::Right, TechDraw::Top, and TechDraw::DrawViewCollection::Views.
Referenced by rotateDown(), rotateLeft(), rotateRight(), rotateUp(), spinCCW(), and spinCW().
◆ usedProjectionType()
App::Enumeration DrawProjGroup::usedProjectionType | ( | void | ) |
Determines either "First Angle" or "Third Angle".
References getPage(), App::PropertyEnumeration::getValueAsString(), App::Enumeration::isValue(), ProjectionType, TechDraw::DrawPage::ProjectionType, ProjectionTypeEnums, and App::Enumeration::setValue().
◆ vec2dir()
|
protected |
Member Data Documentation
◆ Anchor
App::PropertyLink TechDraw::DrawProjGroup::Anchor |
◆ AutoDistribute
App::PropertyBool TechDraw::DrawProjGroup::AutoDistribute |
Referenced by mustExecute().
◆ m_lockScale
|
protected |
Referenced by execute(), and onChanged().
◆ ProjectionType
App::PropertyEnumeration TechDraw::DrawProjGroup::ProjectionType |
◆ ProjectionTypeEnums
|
static |
Allowed projection types - either Document, First Angle or Third Angle.
Referenced by arrangeViewPointers(), getViewIndex(), and usedProjectionType().
◆ Source
App::PropertyLinkList TechDraw::DrawProjGroup::Source |
◆ spacingX
App::PropertyLength TechDraw::DrawProjGroup::spacingX |
Default horizontal spacing between adjacent views on Drawing, in mm.
Referenced by calculateAutomaticScale(), getRect(), getXYPosition(), handleChangedPropertyType(), and mustExecute().
◆ spacingY
App::PropertyLength TechDraw::DrawProjGroup::spacingY |
Default vertical spacing between adjacent views on Drawing, in mm.
Referenced by calculateAutomaticScale(), getRect(), getXYPosition(), handleChangedPropertyType(), and mustExecute().
◆ XSource
App::PropertyXLinkList TechDraw::DrawProjGroup::XSource |
Referenced by addProjection(), getAllSources(), mustExecute(), onChanged(), and updateChildrenSource().
The documentation for this class was generated from the following files:
- src/Mod/TechDraw/App/DrawProjGroup.h
- src/Mod/TechDraw/App/DrawProjGroup.cpp