#include <ViewProviderInspection.h>
Public Member Functions | |
void | attach (App::DocumentObject *pcFeat) |
std::vector< std::string > | getDisplayModes (void) const |
Returns a list of all possible modes. | |
SoSeparator * | getFrontRoot (void) const |
Returns a color bar. | |
QIcon | getIcon () const |
deliver the icon shown in the tree view | |
virtual Base::Type | getTypeId (void) const |
virtual void | hide (void) |
Hide the object in the view. | |
void | OnChange (Base::Subject< int > &rCaller, int rcReason) |
Once the color bar settings has been changed this method gets called to update the feature's representation. | |
void | setDisplayMode (const char *ModeName) |
Sets the viewing mode. | |
virtual void | show (void) |
Show the object in the view. | |
void | updateData (const App::Property *) |
Update colorbar after recomputation of distances. | |
ViewProviderInspection () | |
virtual | ~ViewProviderInspection () |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
static void | inspectCallback (void *ud, SoEventCallback *n) |
Public Attributes | |
App::PropertyBool | OutsideGrayed |
App::PropertyFloatConstraint | PointSize |
Protected Member Functions | |
virtual const App::PropertyData & | getPropertyData (void) const |
QString | inspectDistance (const SoPickedPoint *pp) const |
void | onChanged (const App::Property *prop) |
Gets called by the container whenever a property has been changed. | |
void | setDistances () |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
Gui::SoFCColorBar * | pcColorBar |
SoMaterial * | pcColorMat |
SoSeparator * | pcColorRoot |
SoDrawStyle * | pcColorStyle |
SoCoordinate3 * | pcCoords |
SoGroup * | pcLinkRoot |
SoMaterialBinding * | pcMatBinding |
SoDrawStyle * | pcPointStyle |
Definition at line 48 of file ViewProviderInspection.h.
ViewProviderInspection::ViewProviderInspection | ( | ) |
Definition at line 70 of file ViewProviderInspection.cpp.
References ADD_PROPERTY_TYPE, SketcherExample::f, Mesh::floatRange, App::Prop_Hidden, App::Prop_None, and App::Prop_Output.
ViewProviderInspection::~ViewProviderInspection | ( | ) | [virtual] |
Definition at line 100 of file ViewProviderInspection.cpp.
References Base::Subject< _MessageType >::Detach(), pcColorBar, pcColorMat, pcColorRoot, pcCoords, pcLinkRoot, pcMatBinding, and pcPointStyle.
void ViewProviderInspection::attach | ( | App::DocumentObject * | pcFeat | ) | [virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 140 of file ViewProviderInspection.cpp.
References Gui::ViewProvider::addDisplayMaskMode(), Base::Subject< _MessageType >::Attach(), Base::Subject< _MessageType >::Detach(), Gui::ViewProviderDocumentObject::findFrontRootOfType(), Gui::SoFCColorBar::getMaxValue(), Gui::SoFCColorBar::getMinValue(), Base::Subject< _MessageType >::Notify(), pcColorBar, pcColorMat, pcColorRoot, pcLinkRoot, pcMatBinding, and Gui::SoFCColorBar::setRange().
void * InspectionGui::ViewProviderInspection::create | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
Base::Type InspectionGui::ViewProviderInspection::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
Referenced by inspectCallback(), inspectDistance(), setDistances(), and updateData().
std::vector< std::string > ViewProviderInspection::getDisplayModes | ( | void | ) | const [virtual] |
Returns a list of all possible modes.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 352 of file ViewProviderInspection.cpp.
SoSeparator * ViewProviderInspection::getFrontRoot | ( | void | ) | const [virtual] |
Returns a color bar.
Reimplemented from Gui::ViewProvider.
Definition at line 277 of file ViewProviderInspection.cpp.
References pcColorRoot.
QIcon ViewProviderInspection::getIcon | ( | void | ) | const [virtual] |
deliver the icon shown in the tree view
Reimplemented from Gui::ViewProvider.
Definition at line 325 of file ViewProviderInspection.cpp.
References App::PropertyLink::getClassTypeId(), App::DocumentObject::getDocument(), Gui::ViewProvider::getIcon(), App::PropertyContainer::getPropertyByName(), App::Property::getTypeId(), Gui::Document::getViewProvider(), Gui::Application::Instance, Base::Type::isDerivedFrom(), Gui::ViewProviderDocumentObject::pcObject, and px.
const App::PropertyData & InspectionGui::ViewProviderInspection::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
const App::PropertyData * InspectionGui::ViewProviderInspection::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
Base::Type InspectionGui::ViewProviderInspection::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
void ViewProviderInspection::hide | ( | void | ) | [virtual] |
Hide the object in the view.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 128 of file ViewProviderInspection.cpp.
References pcColorStyle.
void InspectionGui::ViewProviderInspection::init | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 68 of file ViewProviderInspection.cpp.
Referenced by initInspectionGui().
void ViewProviderInspection::inspectCallback | ( | void * | ud, | |
SoEventCallback * | n | |||
) | [static] |
Definition at line 408 of file ViewProviderInspection.cpp.
References InspectionGui::addFlag(), Base::Console(), getClassTypeId(), Gui::getMainWindow(), Gui::ViewProvider::getTypeId(), Gui::View3DInventorViewer::getViewProviderByPath(), inspectDistance(), Base::Type::isDerivedFrom(), Gui::View3DInventorViewer::isRedirectedToSceneGraph(), RobotExample::pos, Gui::View3DInventorViewer::removeEventCallback(), Gui::View3DInventorViewer::setEditing(), Gui::View3DInventorViewer::setRedirectToSceneGraph(), and Gui::ToolTip::showText().
Referenced by CmdInspectElement::activated().
QString ViewProviderInspection::inspectDistance | ( | const SoPickedPoint * | pp | ) | const [protected] |
Definition at line 523 of file ViewProviderInspection.cpp.
References InspectionGui::calcWeights(), draftlibs::fcvec::dist(), App::PropertyLink::getClassTypeId(), getClassTypeId(), App::PropertyContainer::getPropertyByName(), App::Property::getTypeId(), Base::Type::isDerivedFrom(), draftTools::p, pcCoords, Gui::ViewProviderDocumentObject::pcObject, and draftlibs::fcgeo::v1().
Referenced by inspectCallback().
void ViewProviderInspection::OnChange | ( | Base::Subject< int > & | rCaller, | |
int | rcReason | |||
) | [virtual] |
Once the color bar settings has been changed this method gets called to update the feature's representation.
Implements Base::Observer< int >.
Definition at line 360 of file ViewProviderInspection.cpp.
References Gui::ViewProviderDocumentObject::setActiveMode().
void ViewProviderInspection::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
Gets called by the container whenever a property has been changed.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 112 of file ViewProviderInspection.cpp.
References App::PropertyFloat::getValue(), App::PropertyBool::getValue(), Base::Subject< _MessageType >::Notify(), OutsideGrayed, pcColorBar, pcPointStyle, PointSize, and Gui::SoFCColorBar::setOutsideGrayed().
void ViewProviderInspection::setDisplayMode | ( | const char * | ModeName | ) | [virtual] |
Sets the viewing mode.
Reimplemented from Gui::ViewProvider.
Definition at line 342 of file ViewProviderInspection.cpp.
References Gui::ViewProvider::setDisplayMaskMode(), and setDistances().
void ViewProviderInspection::setDistances | ( | ) | [protected] |
Definition at line 282 of file ViewProviderInspection.cpp.
References App::Color::b, SketcherExample::f, App::Color::g, getClassTypeId(), Gui::SoFCColorBar::getColor(), Base::Type::getName(), App::PropertyContainer::getPropertyByName(), App::Property::getTypeId(), Py::int, Gui::SoFCColorBar::isVisible(), MeshCore::MeshIO::OVERALL, pcColorBar, pcColorMat, pcCoords, pcMatBinding, Gui::ViewProviderDocumentObject::pcObject, and App::Color::r.
Referenced by setDisplayMode(), and updateData().
void ViewProviderInspection::show | ( | void | ) | [virtual] |
Show the object in the view.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 134 of file ViewProviderInspection.cpp.
References pcColorStyle.
void ViewProviderInspection::updateData | ( | const App::Property * | prop | ) | [virtual] |
Update colorbar after recomputation of distances.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 182 of file ViewProviderInspection.cpp.
References Mesh2Shape::faces, Base::Type::fromName(), App::GetApplication(), Data::ComplexGeoData::getBoundBox(), getClassTypeId(), Data::ComplexGeoData::getFaces(), App::Property::getName(), App::Application::GetParameterGroupByPath(), App::PropertyContainer::getPropertyByName(), App::PropertyContainer::getTypeId(), App::Property::getTypeId(), Base::Type::isDerivedFrom(), Base::BoundBox3< _Precision >::LengthX(), Base::BoundBox3< _Precision >::LengthY(), Base::BoundBox3< _Precision >::LengthZ(), Base::Subject< _MessageType >::Notify(), draftTools::p, pcColorBar, pcCoords, pcLinkRoot, Gui::ViewProviderDocumentObject::pcObject, pcPointStyle, pts, setDistances(), Gui::SoFCColorBar::setRange(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Definition at line 58 of file ViewProviderInspection.h.
Referenced by onChanged().
Definition at line 89 of file ViewProviderInspection.h.
Referenced by attach(), onChanged(), setDistances(), updateData(), and ~ViewProviderInspection().
SoMaterial* InspectionGui::ViewProviderInspection::pcColorMat [protected] |
Definition at line 86 of file ViewProviderInspection.h.
Referenced by attach(), setDistances(), and ~ViewProviderInspection().
SoSeparator* InspectionGui::ViewProviderInspection::pcColorRoot [protected] |
Definition at line 92 of file ViewProviderInspection.h.
Referenced by attach(), getFrontRoot(), and ~ViewProviderInspection().
SoDrawStyle* InspectionGui::ViewProviderInspection::pcColorStyle [protected] |
Definition at line 90 of file ViewProviderInspection.h.
SoCoordinate3* InspectionGui::ViewProviderInspection::pcCoords [protected] |
Definition at line 93 of file ViewProviderInspection.h.
Referenced by inspectDistance(), setDistances(), updateData(), and ~ViewProviderInspection().
SoGroup* InspectionGui::ViewProviderInspection::pcLinkRoot [protected] |
Definition at line 88 of file ViewProviderInspection.h.
Referenced by attach(), updateData(), and ~ViewProviderInspection().
SoMaterialBinding* InspectionGui::ViewProviderInspection::pcMatBinding [protected] |
Definition at line 87 of file ViewProviderInspection.h.
Referenced by attach(), setDistances(), and ~ViewProviderInspection().
SoDrawStyle* InspectionGui::ViewProviderInspection::pcPointStyle [protected] |
Definition at line 91 of file ViewProviderInspection.h.
Referenced by onChanged(), updateData(), and ~ViewProviderInspection().
Definition at line 59 of file ViewProviderInspection.h.
Referenced by onChanged().