The link between the tree and a document. More...
#include <Tree.h>
Public Member Functions | |
void | clearSelection (void) |
const Gui::Document * | document () const |
DocumentItem (const Gui::Document *doc, QTreeWidgetItem *parent) | |
void | selectItems (void) |
void | setData (int column, int role, const QVariant &value) |
void | setObjectHighlighted (const char *, bool) |
void | setObjectSelected (const char *, bool) |
void | testStatus (void) |
void | updateSelection (void) |
~DocumentItem () | |
Protected Member Functions | |
void | slotActiveObject (const Gui::ViewProviderDocumentObject &) |
void | slotChangeObject (const Gui::ViewProviderDocumentObject &) |
void | slotDeleteObject (const Gui::ViewProviderDocumentObject &) |
Removes a view provider from the document item. | |
void | slotInEdit (const Gui::ViewProviderDocumentObject &) |
void | slotNewObject (const Gui::ViewProviderDocumentObject &) |
Adds a view provider to the document item. | |
void | slotRenameObject (const Gui::ViewProviderDocumentObject &) |
void | slotResetEdit (const Gui::ViewProviderDocumentObject &) |
The link between the tree and a document.
Every document in the application gets its associated DocumentItem which controls the visibility and the functions of the document.
Definition at line 110 of file Tree.h.
DocumentItem::DocumentItem | ( | const Gui::Document * | doc, | |
QTreeWidgetItem * | parent | |||
) |
Definition at line 715 of file Gui/Tree.cpp.
References draftlibs::fcgeo::bind(), Gui::Document::signalActivatedObject, Gui::Document::signalChangedObject, Gui::Document::signalDeletedObject, Gui::Document::signalInEdit, Gui::Document::signalNewObject, Gui::Document::signalRenamedObject, Gui::Document::signalResetEdit, slotActiveObject(), slotChangeObject(), slotDeleteObject(), slotInEdit(), slotNewObject(), slotRenameObject(), and slotResetEdit().
DocumentItem::~DocumentItem | ( | ) |
Definition at line 730 of file Gui/Tree.cpp.
void DocumentItem::clearSelection | ( | void | ) |
Definition at line 952 of file Gui/Tree.cpp.
const Gui::Document * DocumentItem::document | ( | ) | const |
Definition at line 911 of file Gui/Tree.cpp.
Referenced by Gui::TreeWidget::onCreateGroup().
void DocumentItem::selectItems | ( | void | ) |
Definition at line 991 of file Gui/Tree.cpp.
References KDL::diff(), Gui::Document::getDocument(), App::Document::getName(), Gui::SelectionSingleton::getSelection(), and Gui::Selection().
void DocumentItem::setData | ( | int | column, | |
int | role, | |||
const QVariant & | value | |||
) |
Definition at line 923 of file Gui/Tree.cpp.
References Gui::Document::getDocument(), and App::Document::Label.
void DocumentItem::setObjectHighlighted | ( | const char * | name, | |
bool | select | |||
) |
Definition at line 933 of file Gui/Tree.cpp.
void DocumentItem::setObjectSelected | ( | const char * | name, | |
bool | select | |||
) |
Definition at line 943 of file Gui/Tree.cpp.
void DocumentItem::slotActiveObject | ( | const Gui::ViewProviderDocumentObject & | obj | ) | [protected] |
Definition at line 896 of file Gui/Tree.cpp.
References App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
Referenced by DocumentItem().
void DocumentItem::slotChangeObject | ( | const Gui::ViewProviderDocumentObject & | view | ) | [protected] |
Definition at line 785 of file Gui/Tree.cpp.
References Gui::ViewProvider::claimChildren(), Base::Console(), RobotExampleTrajectoryOutOfShapes::count, App::PropertyContainer::getClassTypeId(), App::DocumentObject::getNameInDocument(), Gui::ViewProviderDocumentObject::getObject(), App::PropertyContainer::getTypeId(), group, Base::Type::isDerivedFrom(), and App::DocumentObject::Label.
Referenced by DocumentItem().
void DocumentItem::slotDeleteObject | ( | const Gui::ViewProviderDocumentObject & | obj | ) | [protected] |
Removes a view provider from the document item.
If this view provider is not added nothing happens.
Definition at line 768 of file Gui/Tree.cpp.
References App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
Referenced by DocumentItem().
void DocumentItem::slotInEdit | ( | const Gui::ViewProviderDocumentObject & | v | ) | [protected] |
Definition at line 734 of file Gui/Tree.cpp.
References App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
Referenced by DocumentItem().
void DocumentItem::slotNewObject | ( | const Gui::ViewProviderDocumentObject & | obj | ) | [protected] |
Adds a view provider to the document item.
If this view provider is already added nothing happens.
Definition at line 751 of file Gui/Tree.cpp.
References Base::Console(), Gui::ViewProvider::getIcon(), App::DocumentObject::getNameInDocument(), Gui::ViewProviderDocumentObject::getObject(), and App::DocumentObject::Label.
Referenced by DocumentItem().
void DocumentItem::slotRenameObject | ( | const Gui::ViewProviderDocumentObject & | obj | ) | [protected] |
Definition at line 880 of file Gui/Tree.cpp.
References Base::Console(), App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
Referenced by DocumentItem().
void DocumentItem::slotResetEdit | ( | const Gui::ViewProviderDocumentObject & | v | ) | [protected] |
Definition at line 742 of file Gui/Tree.cpp.
References App::DocumentObject::getNameInDocument(), and Gui::ViewProviderDocumentObject::getObject().
Referenced by DocumentItem().
void DocumentItem::testStatus | ( | void | ) |
Definition at line 916 of file Gui/Tree.cpp.
void DocumentItem::updateSelection | ( | void | ) |
Definition at line 959 of file Gui/Tree.cpp.
References Gui::Document::getDocument(), App::Document::getName(), Gui::Selection(), and Gui::SelectionSingleton::setSelection().