The Selection class The selection singleton keeps track of the selection state of the whole application. More...
#include <Selection.h>
Classes | |
struct | _SelObj |
struct | SelObj |
Public Member Functions | |
bool | addSelection (const char *pDocName, const char *pObjectName=0, const char *pSubName=0, float x=0, float y=0, float z=0) |
Add to selection. | |
void | addSelectionGate (Gui::SelectionGate *gate) |
add a SelectionGate to control what is selectable | |
void | clearCompleteSelection () |
Clear the selection of all documents. | |
void | clearSelection (const char *pDocName=0) |
Clear the selection of document pDocName. If the document name is not given the selection of the active document is cleared. | |
unsigned int | countObjectsOfType (const char *typeName, const char *pDocName=0) const |
Does basically the same as the method above unless that it accepts a string literal as first argument. | |
unsigned int | countObjectsOfType (const Base::Type &typeId, const char *pDocName=0) const |
Returns the number of selected objects with a special object type It's the convenient way to check if the right objects are selected to perform an operation (GuiCommand). | |
std::vector< SelObj > | getCompleteSelection () const |
Returns a vector of all selection objects of all documents. | |
template<typename T > | |
std::vector< T * > | getObjectsOfType (const char *pDocName=0) const |
A convenience template-based method that returns an array with the correct types already. | |
std::vector < App::DocumentObject * > | getObjectsOfType (const char *typeName, const char *pDocName=0) const |
Does basically the same as the method above unless that it accepts a string literal as first argument. | |
std::vector < App::DocumentObject * > | getObjectsOfType (const Base::Type &typeId, const char *pDocName=0) const |
Returns a vector of objects of type TypeName selected for the given document name pDocName. | |
const SelectionChanges & | getPreselection (void) const |
returns the present preselection | |
std::vector< SelObj > | getSelection (const char *pDocName=0) const |
Returns a vector of selection objects If no document name is given the objects of the active are returned. | |
std::vector< Gui::SelectionObject > | getSelectionEx (const char *pDocName=0, Base::Type typeId=App::DocumentObject::getClassTypeId()) const |
Returns a vector of selection objects If no document name is given the objects of the active are returned. | |
bool | hasSelection (const char *doc) const |
bool | hasSelection () const |
bool | isSelected (App::DocumentObject *, const char *pSubName=0) const |
Check if selected. | |
bool | isSelected (const char *pDocName, const char *pObjectName=0, const char *pSubName=0) const |
Check if selected. | |
void | rmvPreselect () |
remove the present preselection | |
void | rmvSelection (const char *pDocName, const char *pObjectName=0, const char *pSubName=0) |
Remove from selection (for internal use). | |
void | rmvSelectionGate (void) |
remove the active SelectionGate | |
bool | setPreselect (const char *pDocName, const char *pObjectName, const char *pSubName, float x=0, float y=0, float z=0) |
set the preselected object (mostly by the 3D view) | |
void | setPreselectCoord (float x, float y, float z) |
sets different coords for the preselection | |
void | setSelection (const char *pDocName, const std::vector< App::DocumentObject * > &) |
Set the selection for a document. | |
unsigned int | size (void) const |
Size of selcted entities for all documents. | |
Static Public Member Functions | |
static void | destruct (void) |
static SelectionSingleton & | instance (void) |
Public Attributes | |
boost::signal< void(const SelectionChanges &msg)> | signalSelectionChanged |
signal on new object | |
Static Public Attributes | |
static PyMethodDef | Methods [] |
Protected Member Functions | |
App::Document * | getDocument (const char *pDocName=0) const |
helper to retrieve document by name | |
SelectionSingleton () | |
Construction. | |
void | slotDeletedObject (const App::DocumentObject &) |
void | slotRenamedObject (const App::DocumentObject &) |
Observer message from the App doc. | |
virtual | ~SelectionSingleton () |
Destruction. | |
Static Protected Member Functions | |
static PyObject * | sAddSelection (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | saddSelectionGate (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sAddSelObserver (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sClearSelection (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sGetSelection (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sGetSelectionEx (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sIsSelected (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sRemoveSelection (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sremoveSelectionGate (PyObject *self, PyObject *args, PyObject *kwd) |
static PyObject * | sRemSelObserver (PyObject *self, PyObject *args, PyObject *kwd) |
Protected Attributes | |
std::list< _SelObj > | _SelList |
Gui::SelectionGate * | ActiveGate |
SelectionChanges | CurrentPreselection |
std::string | DocName |
std::string | FeatName |
float | hx |
float | hy |
float | hz |
std::string | SubName |
Static Protected Attributes | |
static SelectionSingleton * | _pcSingleton = NULL |
Friends | |
class | SelectionFilter |
The Selection class The selection singleton keeps track of the selection state of the whole application.
It gets messages from all entities which can alter the selection (e.g. tree view and 3D-view) and sends messages to entities which need to keep track on the selection state.
The selection consists mainly out of following information per selected object:
Also the preselection is managed. That means you can add a filter to prevent selection of unwanted objects or subelements.
Definition at line 198 of file Selection.h.
SelectionSingleton::SelectionSingleton | ( | ) | [protected] |
Construction.
A constructor.
A more elaborate description of the constructor.
Definition at line 897 of file Selection.cpp.
References ActiveGate, draftlibs::fcgeo::bind(), CurrentPreselection, App::GetApplication(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, App::Application::signalDeletedObject, App::Application::signalRenamedObject, slotDeletedObject(), and slotRenamedObject().
SelectionSingleton::~SelectionSingleton | ( | ) | [protected, virtual] |
Destruction.
A destructor.
A more elaborate description of the destructor.
Definition at line 912 of file Selection.cpp.
bool SelectionSingleton::addSelection | ( | const char * | pDocName, | |
const char * | pObjectName = 0 , |
|||
const char * | pSubName = 0 , |
|||
float | x = 0 , |
|||
float | y = 0 , |
|||
float | z = 0 | |||
) |
Add to selection.
Definition at line 627 of file Selection.cpp.
References _SelList, Gui::Application::activeDocument(), ActiveGate, Gui::SelectionChanges::AddSelection, Gui::SelectionGate::allow(), Base::Console(), Gui::SelectionSingleton::_SelObj::DocName, Gui::SelectionSingleton::_SelObj::FeatName, Gui::Document::getActiveView(), Gui::View3DInventor::getClassTypeId(), getDocument(), Gui::getMainWindow(), Base::Type::getName(), App::Document::getObject(), App::PropertyContainer::getTypeId(), Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), isSelected(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionSingleton::_SelObj::pDoc, Gui::SelectionChanges::pDocName, Gui::SelectionSingleton::_SelObj::pObject, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, Gui::MainWindow::showMessage(), signalSelectionChanged, Gui::SelectionSingleton::_SelObj::SubName, Gui::SelectionChanges::Type, Gui::SelectionSingleton::_SelObj::TypeName, Gui::SelectionChanges::x, Gui::SelectionSingleton::_SelObj::x, Gui::SelectionChanges::y, Gui::SelectionSingleton::_SelObj::y, Gui::SelectionChanges::z, and Gui::SelectionSingleton::_SelObj::z.
Referenced by Gui::SoFCUnifiedSelection::handleEvent(), Gui::SoFCSelection::handleEvent(), and sAddSelection().
void SelectionSingleton::addSelectionGate | ( | Gui::SelectionGate * | gate | ) |
add a SelectionGate to control what is selectable
Definition at line 601 of file Selection.cpp.
References ActiveGate, and rmvSelectionGate().
Referenced by saddSelectionGate().
void SelectionSingleton::clearCompleteSelection | ( | ) |
Clear the selection of all documents.
Definition at line 825 of file Selection.cpp.
References _SelList, Gui::SelectionChanges::ClrSelection, Base::Console(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, signalSelectionChanged, and Gui::SelectionChanges::Type.
Referenced by clearSelection(), and sClearSelection().
void SelectionSingleton::clearSelection | ( | const char * | pDocName = 0 |
) |
Clear the selection of document pDocName. If the document name is not given the selection of the active document is cleared.
Definition at line 789 of file Selection.cpp.
References _SelList, clearCompleteSelection(), Gui::SelectionChanges::ClrSelection, Base::Console(), getDocument(), App::Document::getName(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, signalSelectionChanged, and Gui::SelectionChanges::Type.
Referenced by CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainHorizontal::activated(), SketcherGui::CmdSketcherToggleConstruction::activated(), CmdMeshToolMesh::activated(), Gui::SoFCUnifiedSelection::handleEvent(), Gui::SoFCSelection::handleEvent(), Gui::NavigationStyle::processEvent(), sClearSelection(), and Gui::Application::slotDeleteDocument().
unsigned int SelectionSingleton::countObjectsOfType | ( | const char * | typeName, | |
const char * | pDocName = 0 | |||
) | const |
Does basically the same as the method above unless that it accepts a string literal as first argument.
typeName must be a registered type, otherwise 0 is returned.
Definition at line 448 of file Selection.cpp.
References Base::Type::badType(), countObjectsOfType(), and Base::Type::fromName().
unsigned int SelectionSingleton::countObjectsOfType | ( | const Base::Type & | typeId, | |
const char * | pDocName = 0 | |||
) | const |
Returns the number of selected objects with a special object type It's the convenient way to check if the right objects are selected to perform an operation (GuiCommand).
The check also detects base types. E.g. "Part" also fits on "PartImport" or PartTransform types. If no document name is given the active document is assumed.
Definition at line 429 of file Selection.cpp.
References _SelList, getDocument(), App::PropertyContainer::getTypeId(), and Base::Type::isDerivedFrom().
Referenced by CmdRobotInsertWaypoint::activated(), StdCmdMeasurementSimple::activated(), CmdRobotExportKukaFull::activated(), CmdRobotExportKukaCompact::activated(), CmdRaytracingExportProject::activated(), CmdPartDesignRevolution::activated(), CmdPartDesignPocket::activated(), CmdPartDesignPad::activated(), CmdPartSection::activated(), CmdPartFuse::activated(), CmdPartCommon::activated(), CmdPartCut::activated(), CmdMeshDemolding::activated(), CmdMeshTransform::activated(), CmdDrawingExportPage::activated(), countObjectsOfType(), StdCmdExport::isActive(), CmdPointsPolyCut::isActive(), CmdPointsTransform::isActive(), CmdPointsExport::isActive(), CmdPartSection::isActive(), CmdPartFuse::isActive(), CmdPartCommon::isActive(), CmdPartCut::isActive(), CmdMeshFillupHoles::isActive(), CmdMeshBoundingBox::isActive(), CmdMeshFlipNormals::isActive(), CmdMeshHarmonizeNormals::isActive(), CmdMeshSmoothing::isActive(), CmdMeshEvaluateSolid::isActive(), CmdMeshToolMesh::isActive(), CmdMeshVertexCurvature::isActive(), CmdMeshFromGeometry::isActive(), CmdMeshExport::isActive(), CmdMeshIntersection::isActive(), CmdMeshDifference::isActive(), CmdMeshUnion::isActive(), CmdMeshDemolding::isActive(), and CmdMeshTransform::isActive().
void SelectionSingleton::destruct | ( | void | ) | [static] |
Definition at line 926 of file Selection.cpp.
References _pcSingleton.
Referenced by Gui::Application::~Application().
std::vector< SelectionSingleton::SelObj > SelectionSingleton::getCompleteSelection | ( | ) | const |
Returns a vector of all selection objects of all documents.
Definition at line 278 of file Selection.cpp.
References _SelList, Gui::SelectionSingleton::SelObj::DocName, Gui::SelectionSingleton::SelObj::FeatName, Gui::SelectionSingleton::SelObj::pDoc, Gui::SelectionSingleton::SelObj::pObject, Gui::SelectionSingleton::SelObj::SubName, and Gui::SelectionSingleton::SelObj::TypeName.
Referenced by StdCmdRandomColor::activated(), StdCmdDDuplicateSelection::activated(), Gui::MainWindow::createMimeDataFromSelection(), StdCmdDelete::isActive(), and sGetSelection().
App::Document * SelectionSingleton::getDocument | ( | const char * | pDocName = 0 |
) | const [protected] |
helper to retrieve document by name
Definition at line 619 of file Selection.cpp.
References App::Application::getActiveDocument(), App::GetApplication(), and App::Application::getDocument().
Referenced by addSelection(), clearSelection(), countObjectsOfType(), getObjectsOfType(), getSelection(), getSelectionEx(), hasSelection(), setPreselect(), and setSelection().
std::vector< T * > Gui::SelectionSingleton::getObjectsOfType | ( | const char * | pDocName = 0 |
) | const [inline] |
A convenience template-based method that returns an array with the correct types already.
Definition at line 356 of file Selection.h.
References getObjectsOfType(), and Py::type().
std::vector< App::DocumentObject * > SelectionSingleton::getObjectsOfType | ( | const char * | typeName, | |
const char * | pDocName = 0 | |||
) | const |
Does basically the same as the method above unless that it accepts a string literal as first argument.
typeName must be a registered type otherwise an empty array is returned.
Definition at line 421 of file Selection.cpp.
References Base::Type::badType(), Base::Type::fromName(), and getObjectsOfType().
vector< App::DocumentObject * > SelectionSingleton::getObjectsOfType | ( | const Base::Type & | typeId, | |
const char * | pDocName = 0 | |||
) | const |
Returns a vector of objects of type TypeName selected for the given document name pDocName.
If no document name is specified the objects from the active document are regarded. If no objects of this document are selected an empty vector is returned.
Definition at line 402 of file Selection.cpp.
References _SelList, getDocument(), App::PropertyContainer::getTypeId(), and Base::Type::isDerivedFrom().
Referenced by StdCmdHideSelection::activated(), StdCmdShowSelection::activated(), StdCmdToggleSelectability::activated(), StdCmdToggleVisibility::activated(), CmdRobotAddToolShape::activated(), StdCmdPlacement::activated(), CmdPointsExport::activated(), CmdPartDesignRevolution::activated(), CmdPartDesignPocket::activated(), CmdPartDesignPad::activated(), CmdMeshFillupHoles::activated(), CmdMeshBoundingBox::activated(), CmdMeshFlipNormals::activated(), CmdMeshHarmonizeNormals::activated(), CmdMeshSmoothing::activated(), CmdMeshEvaluateSolid::activated(), CmdMeshEvaluation::activated(), CmdMeshVertexCurvature::activated(), CmdDrawingNewView::activated(), Gui::Application::exportTo(), and getObjectsOfType().
const SelectionChanges & SelectionSingleton::getPreselection | ( | void | ) | const |
returns the present preselection
Definition at line 595 of file Selection.cpp.
References CurrentPreselection.
Referenced by CmdRobotInsertWaypointPreselect::activated().
std::vector< SelectionSingleton::SelObj > SelectionSingleton::getSelection | ( | const char * | pDocName = 0 |
) | const |
Returns a vector of selection objects If no document name is given the objects of the active are returned.
If nothing for this Document is selected an empty vector is returned. The vector reflects the sequence of selection.
Definition at line 296 of file Selection.cpp.
References _SelList, Gui::SelectionSingleton::SelObj::DocName, Gui::SelectionSingleton::SelObj::FeatName, getDocument(), Gui::SelectionSingleton::SelObj::pDoc, Gui::SelectionSingleton::SelObj::pObject, Gui::SelectionSingleton::SelObj::SubName, Gui::SelectionSingleton::SelObj::TypeName, Gui::SelectionSingleton::SelObj::x, Gui::SelectionSingleton::SelObj::y, and Gui::SelectionSingleton::SelObj::z.
Referenced by CmdRobotInsertWaypointPreselect::activated(), CmdRobotInsertWaypoint::activated(), StdCmdMeasurementSimple::activated(), CmdRobotExportKukaFull::activated(), CmdRobotExportKukaCompact::activated(), CmdRaytracingExportProject::activated(), CmdPartSection::activated(), CmdPartFuse::activated(), CmdPartCommon::activated(), CmdPartCut::activated(), CmdMeshDemolding::activated(), CmdMeshTransform::activated(), CmdDrawingExportPage::activated(), CmdDrawingNewView::activated(), Gui::DocumentItem::selectItems(), and sGetSelection().
std::vector< SelectionObject > SelectionSingleton::getSelectionEx | ( | const char * | pDocName = 0 , |
|
Base::Type | typeId = App::DocumentObject::getClassTypeId() | |||
) | const |
Returns a vector of selection objects If no document name is given the objects of the active are returned.
If nothing for this document is selected an empty vector is returned. The vector reflects the sequence of selection.
Definition at line 355 of file Selection.cpp.
References _SelList, Base::Type::badType(), Gui::SelectionObject::DocName, DocName, Gui::SelectionObject::FeatName, getDocument(), Gui::SelectionObject::SelPoses, Gui::SelectionObject::SubNames, and Gui::SelectionObject::TypeName.
Referenced by StdCmdDelete::activated(), CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainTangent::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistance::activated(), CmdSketcherConstrainCoincident::activated(), CmdSketcherConstrainLock::activated(), CmdSketcherConstrainVertical::activated(), CmdSketcherConstrainHorizontal::activated(), SketcherGui::CmdSketcherToggleConstruction::activated(), CmdPartDesignFillet::activated(), Gui::SelectionFilter::match(), and sGetSelectionEx().
bool SelectionSingleton::hasSelection | ( | const char * | doc | ) | const |
Definition at line 325 of file Selection.cpp.
References _SelList, and getDocument().
bool SelectionSingleton::hasSelection | ( | ) | const |
Definition at line 273 of file Selection.cpp.
References _SelList.
Referenced by StdCmdDDuplicateSelection::isActive(), and StdCmdCopy::isActive().
SelectionSingleton & SelectionSingleton::instance | ( | void | ) | [static] |
Definition at line 919 of file Selection.cpp.
References _pcSingleton.
Referenced by Gui::Selection().
bool SelectionSingleton::isSelected | ( | App::DocumentObject * | obj, | |
const char * | pSubName = 0 | |||
) | const |
bool SelectionSingleton::isSelected | ( | const char * | pDocName, | |
const char * | pObjectName = 0 , |
|||
const char * | pSubName = 0 | |||
) | const |
Check if selected.
Definition at line 842 of file Selection.cpp.
References _SelList.
Referenced by addSelection(), Gui::SoFCUnifiedSelection::doAction(), Gui::SoFCSelection::doAction(), Gui::SoFCSelection::handleEvent(), sIsSelected(), and Gui::View3DInventorViewer::viewSelection().
void SelectionSingleton::rmvPreselect | ( | ) |
remove the present preselection
Definition at line 555 of file Selection.cpp.
References Gui::Application::activeDocument(), CurrentPreselection, DocName, FeatName, Gui::Document::getActiveView(), Gui::View3DInventor::getClassTypeId(), Gui::getMainWindow(), hx, hy, hz, Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, Gui::SelectionChanges::RmvPreselect, signalSelectionChanged, SubName, Gui::SelectionChanges::Type, Gui::SelectionChanges::x, Gui::SelectionChanges::y, and Gui::SelectionChanges::z.
Referenced by Gui::SoFCSelection::handleEvent(), and setPreselect().
void SelectionSingleton::rmvSelection | ( | const char * | pDocName, | |
const char * | pObjectName = 0 , |
|||
const char * | pSubName = 0 | |||
) |
Remove from selection (for internal use).
Definition at line 698 of file Selection.cpp.
References _SelList, Base::Console(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, Gui::SelectionChanges::RmvSelection, signalSelectionChanged, and Gui::SelectionChanges::Type.
Referenced by Gui::SoFCUnifiedSelection::handleEvent(), Gui::SoFCSelection::handleEvent(), slotDeletedObject(), and sRemoveSelection().
void SelectionSingleton::rmvSelectionGate | ( | void | ) |
remove the active SelectionGate
Definition at line 611 of file Selection.cpp.
References ActiveGate.
Referenced by addSelectionGate(), and sremoveSelectionGate().
PyObject * SelectionSingleton::sAddSelection | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 988 of file Selection.cpp.
References addSelection(), App::DocumentObject::getDocument(), App::DocumentObjectPy::getDocumentObjectPtr(), App::Document::getName(), App::DocumentObject::getNameInDocument(), Py_Return, Gui::Selection(), App::DocumentObjectPy::Type, MovieTool::x, and MovieTool::y.
PyObject * SelectionSingleton::saddSelectionGate | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1119 of file Selection.cpp.
References addSelectionGate(), PY_CATCH, Py_Return, PY_TRY, and Gui::Selection().
PyObject * SelectionSingleton::sAddSelObserver | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1097 of file Selection.cpp.
References Gui::SelectionObserverPython::addObserver(), PY_CATCH, Py_Return, and PY_TRY.
PyObject * SelectionSingleton::sClearSelection | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1031 of file Selection.cpp.
References clearCompleteSelection(), clearSelection(), Py_Return, and Gui::Selection().
bool SelectionSingleton::setPreselect | ( | const char * | pDocName, | |
const char * | pObjectName, | |||
const char * | pSubName, | |||
float | x = 0 , |
|||
float | y = 0 , |
|||
float | z = 0 | |||
) |
set the preselected object (mostly by the 3D view)
Definition at line 456 of file Selection.cpp.
References Gui::Application::activeDocument(), ActiveGate, Gui::SelectionGate::allow(), CurrentPreselection, DocName, FeatName, Gui::Document::getActiveView(), Gui::View3DInventor::getClassTypeId(), getDocument(), Gui::getMainWindow(), App::Document::getObject(), hx, hy, hz, Gui::Application::Instance, Base::BaseClass::isDerivedFrom(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, rmvPreselect(), Gui::SelectionChanges::SetPreselect, Gui::MainWindow::showMessage(), signalSelectionChanged, SubName, Gui::SelectionChanges::Type, Gui::SelectionChanges::x, Gui::SelectionChanges::y, and Gui::SelectionChanges::z.
Referenced by Gui::SoFCSelection::handleEvent().
void SelectionSingleton::setPreselectCoord | ( | float | x, | |
float | y, | |||
float | z | |||
) |
sets different coords for the preselection
Definition at line 535 of file Selection.cpp.
References CurrentPreselection, Gui::getMainWindow(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, Gui::MainWindow::showMessage(), Gui::SelectionChanges::x, Gui::SelectionChanges::y, and Gui::SelectionChanges::z.
Referenced by Gui::SoFCSelection::handleEvent().
void SelectionSingleton::setSelection | ( | const char * | pDocName, | |
const std::vector< App::DocumentObject * > & | sel | |||
) |
Set the selection for a document.
Definition at line 733 of file Selection.cpp.
References _SelList, getDocument(), Base::Type::getName(), App::PropertyContainer::getTypeId(), Base::Subject< const SelectionChanges & >::Notify(), Gui::SelectionChanges::pDocName, Gui::SelectionChanges::pObjectName, Gui::SelectionChanges::pSubName, Gui::SelectionChanges::SetSelection, signalSelectionChanged, and Gui::SelectionChanges::Type.
Referenced by StdCmdSelectAll::activated(), Gui::View3DInventorViewer::selectAll(), and Gui::DocumentItem::updateSelection().
PyObject * SelectionSingleton::sGetSelection | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1052 of file Selection.cpp.
References Py::List::append(), Py::asObject(), getCompleteSelection(), getSelection(), Py::new_reference_to(), and Gui::Selection().
PyObject * SelectionSingleton::sGetSelectionEx | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1076 of file Selection.cpp.
References Py::List::append(), Py::asObject(), getSelectionEx(), Py::new_reference_to(), and Gui::Selection().
PyObject * SelectionSingleton::sIsSelected | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1040 of file Selection.cpp.
References App::DocumentObjectPy::getDocumentObjectPtr(), isSelected(), Gui::Selection(), and App::DocumentObjectPy::Type.
unsigned int Gui::SelectionSingleton::size | ( | void | ) | const [inline] |
Size of selcted entities for all documents.
Definition at line 293 of file Selection.h.
Referenced by StdCmdSetAppearance::isActive().
void SelectionSingleton::slotDeletedObject | ( | const App::DocumentObject & | Obj | ) | [protected] |
Definition at line 872 of file Selection.cpp.
References App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), rmvSelection(), and Gui::Selection().
Referenced by SelectionSingleton().
void SelectionSingleton::slotRenamedObject | ( | const App::DocumentObject & | Obj | ) | [protected] |
Observer message from the App doc.
Definition at line 878 of file Selection.cpp.
References _SelList, App::DocumentObject::getDocument(), and App::Document::getName().
Referenced by SelectionSingleton().
PyObject * SelectionSingleton::sRemoveSelection | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1010 of file Selection.cpp.
References App::DocumentObject::getDocument(), App::DocumentObjectPy::getDocumentObjectPtr(), App::Document::getName(), App::DocumentObject::getNameInDocument(), Py_Return, rmvSelection(), Gui::Selection(), and App::DocumentObjectPy::Type.
PyObject * SelectionSingleton::sremoveSelectionGate | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1132 of file Selection.cpp.
References PY_CATCH, Py_Return, PY_TRY, rmvSelectionGate(), and Gui::Selection().
PyObject * SelectionSingleton::sRemSelObserver | ( | PyObject * | self, | |
PyObject * | args, | |||
PyObject * | kwd | |||
) | [static, protected] |
Definition at line 1108 of file Selection.cpp.
References PY_CATCH, Py_Return, PY_TRY, and Gui::SelectionObserverPython::removeObserver().
friend class SelectionFilter [friend] |
Definition at line 299 of file Selection.h.
SelectionSingleton * SelectionSingleton::_pcSingleton = NULL [static, protected] |
Definition at line 342 of file Selection.h.
Referenced by destruct(), and instance().
std::list<_SelObj> Gui::SelectionSingleton::_SelList [protected] |
Definition at line 340 of file Selection.h.
Referenced by addSelection(), clearCompleteSelection(), clearSelection(), countObjectsOfType(), getCompleteSelection(), getObjectsOfType(), getSelection(), getSelectionEx(), hasSelection(), isSelected(), rmvSelection(), setSelection(), and slotRenamedObject().
Gui::SelectionGate* Gui::SelectionSingleton::ActiveGate [protected] |
Definition at line 349 of file Selection.h.
Referenced by addSelection(), addSelectionGate(), rmvSelectionGate(), SelectionSingleton(), and setPreselect().
Definition at line 329 of file Selection.h.
Referenced by getPreselection(), rmvPreselect(), SelectionSingleton(), setPreselect(), and setPreselectCoord().
std::string Gui::SelectionSingleton::DocName [protected] |
Definition at line 344 of file Selection.h.
Referenced by getSelectionEx(), rmvPreselect(), and setPreselect().
std::string Gui::SelectionSingleton::FeatName [protected] |
Definition at line 345 of file Selection.h.
Referenced by rmvPreselect(), and setPreselect().
float Gui::SelectionSingleton::hx [protected] |
Definition at line 347 of file Selection.h.
Referenced by rmvPreselect(), and setPreselect().
float Gui::SelectionSingleton::hy [protected] |
Definition at line 347 of file Selection.h.
Referenced by rmvPreselect(), and setPreselect().
float Gui::SelectionSingleton::hz [protected] |
Definition at line 347 of file Selection.h.
Referenced by rmvPreselect(), and setPreselect().
PyMethodDef SelectionSingleton::Methods [static] |
Definition at line 302 of file Selection.h.
Referenced by Gui::Application::Application().
boost::signal<void (const SelectionChanges& msg)> Gui::SelectionSingleton::signalSelectionChanged |
signal on new object
Definition at line 272 of file Selection.h.
Referenced by addSelection(), Gui::SelectionObserver::attachSelection(), clearCompleteSelection(), clearSelection(), rmvPreselect(), rmvSelection(), setPreselect(), and setSelection().
std::string Gui::SelectionSingleton::SubName [protected] |
Definition at line 346 of file Selection.h.
Referenced by rmvPreselect(), and setPreselect().