#include <ViewProvider2DObject.h>
Public Member Functions | |
virtual void | attach (App::DocumentObject *) |
Attaches the document object to this view provider. | |
SoSeparator * | createGrid (void) |
creates the grid | |
virtual const char * | getDefaultDisplayMode () const |
Get the default display mode. | |
virtual std::vector< std::string > | getDisplayModes (void) const |
returns a list of all possible modes | |
virtual Base::Type | getTypeId (void) const |
virtual void | updateData (const App::Property *) |
Gets called if some of the property hade bin changed. | |
ViewProvider2DObject () | |
constructor | |
virtual | ~ViewProvider2DObject () |
destructor | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
App::PropertyDistance | GridSize |
App::PropertyBool | GridSnap |
App::PropertyEnumeration | GridStyle |
App::PropertyBool | ShowGrid |
Property to switch the grid on and off. | |
App::PropertyBool | TightGrid |
Protected Member Functions | |
virtual const App::PropertyData & | getPropertyData (void) const |
virtual void | onChanged (const App::Property *prop) |
get called by the container whenever a property has been changed | |
virtual bool | setEdit (int ModNum) |
is called by the document when the provider goes in edit mode | |
virtual void | unsetEdit (int ModNum) |
is called when you loose the edit mode | |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
SoSeparator * | GridRoot |
float | MaxX |
float | MaxY |
float | MinX |
float | MinY |
Static Protected Attributes | |
static const char * | GridStyleEnums [] = {"Dashed","Light",NULL} |
Definition at line 45 of file ViewProvider2DObject.h.
ViewProvider2DObject::ViewProvider2DObject | ( | ) |
constructor
Definition at line 60 of file ViewProvider2DObject.cpp.
References ADD_PROPERTY_TYPE, and App::Prop_None.
ViewProvider2DObject::~ViewProvider2DObject | ( | ) | [virtual] |
void ViewProvider2DObject::attach | ( | App::DocumentObject * | pcObject | ) | [virtual] |
Attaches the document object to this view provider.
Reimplemented from PartGui::ViewProviderPartExt.
Reimplemented in SketcherGui::ViewProviderSketch.
Definition at line 231 of file ViewProvider2DObject.cpp.
References createGrid(), App::PropertyBool::getValue(), and ShowGrid.
void * PartGui::ViewProvider2DObject::create | ( | void | ) | [static] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
SoSeparator * ViewProvider2DObject::createGrid | ( | void | ) |
creates the grid
Definition at line 87 of file ViewProvider2DObject.cpp.
References Py::abs(), KDL::exp(), SketcherExample::f, App::PropertyInteger::getValue(), App::PropertyBool::getValue(), App::PropertyFloat::getValue(), GridRoot, GridSize, GridStyle, RobotExample::l, KDL::log(), MaxX, MaxY, MinX, MinY, and TightGrid.
Referenced by attach(), onChanged(), and updateData().
Base::Type PartGui::ViewProvider2DObject::getClassTypeId | ( | void | ) | [static] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
Referenced by updateData().
const char * ViewProvider2DObject::getDefaultDisplayMode | ( | ) | const [virtual] |
Get the default display mode.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 263 of file ViewProvider2DObject.cpp.
std::vector< std::string > ViewProvider2DObject::getDisplayModes | ( | void | ) | const [virtual] |
returns a list of all possible modes
Reimplemented from PartGui::ViewProviderPartExt.
Definition at line 249 of file ViewProvider2DObject.cpp.
const App::PropertyData & PartGui::ViewProvider2DObject::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
const App::PropertyData * PartGui::ViewProvider2DObject::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
Base::Type PartGui::ViewProvider2DObject::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
void PartGui::ViewProvider2DObject::init | ( | void | ) | [static] |
Reimplemented from PartGui::ViewProviderPart.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 58 of file ViewProvider2DObject.cpp.
Referenced by initPartGui().
void ViewProvider2DObject::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
get called by the container whenever a property has been changed
Reimplemented from PartGui::ViewProviderPartExt.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 212 of file ViewProvider2DObject.cpp.
References createGrid(), App::PropertyBool::getValue(), GridRoot, GridSize, GridStyle, ShowGrid, and TightGrid.
bool ViewProvider2DObject::setEdit | ( | int | ModNum | ) | [protected, virtual] |
is called by the document when the provider goes in edit mode
Reimplemented from PartGui::ViewProviderPartExt.
Reimplemented in SketcherGui::ViewProviderSketch.
Definition at line 239 of file ViewProvider2DObject.cpp.
void ViewProvider2DObject::unsetEdit | ( | int | ModNum | ) | [protected, virtual] |
is called when you loose the edit mode
Reimplemented from PartGui::ViewProviderPartExt.
Reimplemented in SketcherGui::ViewProviderSketch.
Definition at line 244 of file ViewProvider2DObject.cpp.
void ViewProvider2DObject::updateData | ( | const App::Property * | ) | [virtual] |
Gets called if some of the property hade bin changed.
Reimplemented from PartGui::ViewProviderPartExt.
Reimplemented in SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.
Definition at line 190 of file ViewProvider2DObject.cpp.
References createGrid(), getClassTypeId(), App::Property::getTypeId(), App::PropertyBool::getValue(), GridRoot, Base::Placement::invert(), Base::BoundBox3< _Precision >::IsValid(), MaxX, MaxY, MinX, MinY, Base::BoundBox3< _Precision >::ProjectBox(), ShowGrid, and Base::Placement::toMatrix().
SoSeparator* PartGui::ViewProvider2DObject::GridRoot [protected] |
Definition at line 76 of file ViewProvider2DObject.h.
Referenced by createGrid(), onChanged(), updateData(), and ~ViewProvider2DObject().
Definition at line 57 of file ViewProvider2DObject.h.
Referenced by createGrid(), onChanged(), SketcherGui::TaskSketcherGeneral::setGridSize(), and SketcherGui::ViewProviderSketch::snapToGrid().
Definition at line 60 of file ViewProvider2DObject.h.
Referenced by SketcherGui::ViewProviderSketch::snapToGrid(), and SketcherGui::TaskSketcherGeneral::toggleGridSnap().
Definition at line 58 of file ViewProvider2DObject.h.
Referenced by createGrid(), and onChanged().
const char * ViewProvider2DObject::GridStyleEnums = {"Dashed","Light",NULL} [static, protected] |
Definition at line 82 of file ViewProvider2DObject.h.
float PartGui::ViewProvider2DObject::MaxX [protected] |
Definition at line 79 of file ViewProvider2DObject.h.
Referenced by createGrid(), SketcherGui::ViewProviderSketch::draw(), and updateData().
float PartGui::ViewProvider2DObject::MaxY [protected] |
Definition at line 81 of file ViewProvider2DObject.h.
Referenced by createGrid(), SketcherGui::ViewProviderSketch::draw(), and updateData().
float PartGui::ViewProvider2DObject::MinX [protected] |
Definition at line 78 of file ViewProvider2DObject.h.
Referenced by createGrid(), SketcherGui::ViewProviderSketch::draw(), and updateData().
float PartGui::ViewProvider2DObject::MinY [protected] |
Definition at line 80 of file ViewProvider2DObject.h.
Referenced by createGrid(), SketcherGui::ViewProviderSketch::draw(), and updateData().
Property to switch the grid on and off.
Definition at line 56 of file ViewProvider2DObject.h.
Referenced by attach(), onChanged(), SketcherGui::ViewProviderSketch::setEdit(), SketcherGui::ViewProviderSketch::unsetEdit(), and updateData().
Definition at line 59 of file ViewProvider2DObject.h.
Referenced by createGrid(), onChanged(), SketcherGui::ViewProviderSketch::setEdit(), and SketcherGui::ViewProviderSketch::unsetEdit().