Gui::ObjectLabelObserver Class Reference

Observer that watches relabeled objects and make sure that the labels inside a document are unique. More...

List of all members.

Public Member Functions

void slotRelabelObject (const App::DocumentObject &, const App::Property &)
 Checks the new label of the object and relabel it if needed to make it unique document-wide.

Static Public Member Functions

static void destruct ()
 Destructs the sole instance.
static ObjectLabelObserverinstance ()
 The one and only instance.

Detailed Description

Observer that watches relabeled objects and make sure that the labels inside a document are unique.

Note:
In the FreeCAD design it is explicitly allowed to have duplicate labels (i.e. the user visible text e.g. in the tree view) while the internal names are always guaranteed to be unique.

Definition at line 143 of file Gui/Application.cpp.


Member Function Documentation

void Gui::ObjectLabelObserver::destruct ( void   )  [static]

Destructs the sole instance.

Definition at line 174 of file Gui/Application.cpp.

ObjectLabelObserver * Gui::ObjectLabelObserver::instance (  )  [static]

The one and only instance.

Definition at line 167 of file Gui/Application.cpp.

Referenced by Gui::Application::Application().

void Gui::ObjectLabelObserver::slotRelabelObject ( const App::DocumentObject obj,
const App::Property prop 
)

Checks the new label of the object and relabel it if needed to make it unique document-wide.

Definition at line 180 of file Gui/Application.cpp.

References App::DocumentObject::getDocument(), App::Document::getObjects(), Base::Tools::getUniqueName(), and App::DocumentObject::Label.


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

Generated on Wed Nov 23 19:02:00 2011 for FreeCAD by  doxygen 1.6.1