#include <ViewProviderDocumentObjectGroup.h>
Public Member Functions | |
void | attach (App::DocumentObject *pcObject) |
virtual std::vector < App::DocumentObject * > | claimChildren (void) const |
deliver the children belonging to this object this method is used to deliver the objects to the tree framework which should be grouped under its label. | |
std::vector< std::string > | getDisplayModes (void) const |
returns a list of all possible modes | |
QIcon | getIcon (void) const |
Returns the pixmap for the list item. | |
virtual Base::Type | getTypeId (void) const |
void | hide (void) |
Hide the object in the view. | |
bool | isShow (void) const |
checks whether the view provider is visible or not | |
virtual bool | onDelete (const std::vector< std::string > &) |
get called if the object is about to get deleted. Here you can delete other objects to or switch visibility of others. | |
void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. | |
void | show (void) |
Show the object in the view. | |
void | updateData (const App::Property *) |
Gets called if some of the property hade bin changed. | |
ViewProviderDocumentObjectGroup () | |
constructor. | |
virtual | ~ViewProviderDocumentObjectGroup () |
destructor. | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Protected Member Functions | |
virtual const App::PropertyData & | getPropertyData (void) const |
void | getViewProviders (std::vector< ViewProviderDocumentObject * > &) const |
Extracts the associated view providers of the objects of the associated object group group. | |
void | onChanged (const App::Property *prop) |
get called by the container whenever a property has been changed | |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Definition at line 32 of file ViewProviderDocumentObjectGroup.h.
ViewProviderDocumentObjectGroup::ViewProviderDocumentObjectGroup | ( | ) |
constructor.
Creates the view provider for an object group.
Definition at line 54 of file ViewProviderDocumentObjectGroup.cpp.
ViewProviderDocumentObjectGroup::~ViewProviderDocumentObjectGroup | ( | ) | [virtual] |
destructor.
Definition at line 61 of file ViewProviderDocumentObjectGroup.cpp.
void ViewProviderDocumentObjectGroup::attach | ( | App::DocumentObject * | pcObject | ) | [virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage.
Definition at line 74 of file ViewProviderDocumentObjectGroup.cpp.
std::vector< App::DocumentObject * > ViewProviderDocumentObjectGroup::claimChildren | ( | void | ) | const [virtual] |
deliver the children belonging to this object this method is used to deliver the objects to the tree framework which should be grouped under its label.
Obvious is the usage in the group but it can be used for any kind of grouping needed for a special purpose.
Reimplemented from Gui::ViewProvider.
Definition at line 122 of file ViewProviderDocumentObjectGroup.cpp.
References Gui::ViewProviderDocumentObject::getObject().
void * Gui::ViewProviderDocumentObjectGroup::create | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
Base::Type Gui::ViewProviderDocumentObjectGroup::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
Referenced by updateData().
std::vector< std::string > ViewProviderDocumentObjectGroup::getDisplayModes | ( | void | ) | const [virtual] |
returns a list of all possible modes
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage.
Definition at line 127 of file ViewProviderDocumentObjectGroup.cpp.
QIcon ViewProviderDocumentObjectGroup::getIcon | ( | void | ) | const [virtual] |
Returns the pixmap for the list item.
Reimplemented from Gui::ViewProvider.
Reimplemented in InspectionGui::ViewProviderInspectionGroup.
Definition at line 215 of file ViewProviderDocumentObjectGroup.cpp.
const App::PropertyData & Gui::ViewProviderDocumentObjectGroup::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
const App::PropertyData * Gui::ViewProviderDocumentObjectGroup::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
Base::Type Gui::ViewProviderDocumentObjectGroup::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
void ViewProviderDocumentObjectGroup::getViewProviders | ( | std::vector< ViewProviderDocumentObject * > & | vp | ) | const [protected] |
Extracts the associated view providers of the objects of the associated object group group.
Definition at line 197 of file ViewProviderDocumentObjectGroup.cpp.
References Gui::ViewProviderDocumentObject::getClassTypeId(), App::PropertyContainer::getClassTypeId(), App::DocumentObject::getDocument(), Gui::Application::getDocument(), Gui::ViewProviderDocumentObject::getObject(), App::DocumentObjectGroup::getObjects(), Gui::ViewProvider::getTypeId(), App::PropertyContainer::getTypeId(), Gui::Document::getViewProvider(), Gui::Application::Instance, and Base::Type::isDerivedFrom().
void ViewProviderDocumentObjectGroup::hide | ( | void | ) | [virtual] |
Hide the object in the view.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 140 of file ViewProviderDocumentObjectGroup.cpp.
References App::PropertyContainer::getClassTypeId(), App::DocumentObject::getDocument(), Gui::Application::getDocument(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyContainer::getTypeId(), Gui::Document::getViewProvider(), group, Gui::ViewProvider::hide(), Gui::Application::Instance, Base::Type::isDerivedFrom(), App::Property::StatusBits, and Gui::ViewProviderDocumentObject::Visibility.
void Gui::ViewProviderDocumentObjectGroup::init | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage, and InspectionGui::ViewProviderInspectionGroup.
Definition at line 48 of file ViewProviderDocumentObjectGroup.cpp.
Referenced by Gui::Application::initTypes().
bool ViewProviderDocumentObjectGroup::isShow | ( | void | ) | const [virtual] |
checks whether the view provider is visible or not
Reimplemented from Gui::ViewProvider.
Definition at line 182 of file ViewProviderDocumentObjectGroup.cpp.
References App::PropertyBool::getValue(), and Gui::ViewProviderDocumentObject::Visibility.
void ViewProviderDocumentObjectGroup::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
get called by the container whenever a property has been changed
Whenever a property of the group gets changed then the same property of all associated view providers of the objects of the object group get changed as well.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 69 of file ViewProviderDocumentObjectGroup.cpp.
bool ViewProviderDocumentObjectGroup::onDelete | ( | const std::vector< std::string > & | ) | [virtual] |
get called if the object is about to get deleted. Here you can delete other objects to or switch visibility of others.
Reimplemented from Gui::ViewProvider.
Definition at line 132 of file ViewProviderDocumentObjectGroup.cpp.
References Gui::Command::Doc, Gui::Command::doCommand(), App::PropertyContainer::getName(), and Gui::ViewProviderDocumentObject::getObject().
void ViewProviderDocumentObjectGroup::Restore | ( | Base::XMLReader & | ) | [virtual] |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
void PropertyVector::Restore(Base::XMLReader &reader) { // read my Element reader.readElement("PropertyVector"); // get the value of my Attribute _cVec.x = (float)reader.getAttributeAsFloat("valueX"); _cVec.y = (float)reader.getAttributeAsFloat("valueY"); _cVec.z = (float)reader.getAttributeAsFloat("valueZ"); }
Reimplemented from App::PropertyContainer.
Definition at line 187 of file ViewProviderDocumentObjectGroup.cpp.
References App::Property::StatusBits, and Gui::ViewProviderDocumentObject::Visibility.
void ViewProviderDocumentObjectGroup::show | ( | void | ) | [virtual] |
Show the object in the view.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 161 of file ViewProviderDocumentObjectGroup.cpp.
References App::PropertyContainer::getClassTypeId(), App::DocumentObject::getDocument(), Gui::Application::getDocument(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyContainer::getTypeId(), Gui::Document::getViewProvider(), group, Gui::Application::Instance, Base::Type::isDerivedFrom(), Gui::ViewProvider::show(), App::Property::StatusBits, and Gui::ViewProviderDocumentObject::Visibility.
void ViewProviderDocumentObjectGroup::updateData | ( | const App::Property * | ) | [virtual] |
Gets called if some of the property hade bin changed.
Reimplemented from Gui::ViewProviderDocumentObject.
Reimplemented in DrawingGui::ViewProviderDrawingPage.
Definition at line 79 of file ViewProviderDocumentObjectGroup.cpp.
References Gui::Document::getActiveView(), Gui::View3DInventor::getClassTypeId(), getClassTypeId(), Gui::Application::getDocument(), Gui::ViewProviderDocumentObject::getObject(), App::Property::getTypeId(), Gui::Document::getViewProvider(), Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), and Gui::ViewProvider::pcModeSwitch.