diff --git a/src/Mod/Part/App/PrimitiveFeature.h b/src/Mod/Part/App/PrimitiveFeature.h index 7a1f60397..5d081eec2 100644 --- a/src/Mod/Part/App/PrimitiveFeature.h +++ b/src/Mod/Part/App/PrimitiveFeature.h @@ -351,6 +351,10 @@ public: /// recalculate the feature App::DocumentObjectExecReturn *execute(void); short mustExecute() const; + /// returns the type name of the ViewProvider + const char* getViewProviderName(void) const { + return "PartGui::ViewProviderWedge"; + } //@} protected: diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 66f820a3d..10f5c40f6 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -110,6 +110,7 @@ void PartGuiExport initPartGui() PartGui::ViewProviderPython ::init(); PartGui::ViewProviderBox ::init(); PartGui::ViewProviderPrism ::init(); + PartGui::ViewProviderWedge ::init(); PartGui::ViewProviderImport ::init(); PartGui::ViewProviderCurveNet ::init(); PartGui::ViewProviderExtrusion ::init(); diff --git a/src/Mod/Part/Gui/Resources/Part.qrc b/src/Mod/Part/Gui/Resources/Part.qrc index 9a848287b..be6965e8f 100644 --- a/src/Mod/Part/Gui/Resources/Part.qrc +++ b/src/Mod/Part/Gui/Resources/Part.qrc @@ -47,6 +47,8 @@ icons/Tree_Part_Ellipsoid_Parametric.svg icons/Tree_Part_Torus_Parametric.svg icons/Tree_Part_Plane_Parametric.svg + icons/Tree_Part_Prism.svg + icons/Tree_Part_Wedge.svg translations/Part_af.qm translations/Part_de.qm translations/Part_fi.qm diff --git a/src/Mod/Part/Gui/Resources/icons/Tree_Part_Prism.svg b/src/Mod/Part/Gui/Resources/icons/Tree_Part_Prism.svg new file mode 100644 index 000000000..b9224b630 --- /dev/null +++ b/src/Mod/Part/Gui/Resources/icons/Tree_Part_Prism.svg @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Part/Gui/Resources/icons/Tree_Part_Wedge.svg b/src/Mod/Part/Gui/Resources/icons/Tree_Part_Wedge.svg new file mode 100644 index 000000000..a84969cb1 --- /dev/null +++ b/src/Mod/Part/Gui/Resources/icons/Tree_Part_Wedge.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Part/Gui/ViewProviderPrism.cpp b/src/Mod/Part/Gui/ViewProviderPrism.cpp index aa10b73f3..be783be6a 100644 --- a/src/Mod/Part/Gui/ViewProviderPrism.cpp +++ b/src/Mod/Part/Gui/ViewProviderPrism.cpp @@ -38,10 +38,10 @@ using namespace std; PROPERTY_SOURCE(PartGui::ViewProviderPrism, PartGui::ViewProviderPart) - + ViewProviderPrism::ViewProviderPrism() { - //sPixmap = "Tree_Part_Cone_Parametric.svg"; + sPixmap = "Tree_Part_Prism.svg"; } ViewProviderPrism::~ViewProviderPrism() @@ -49,8 +49,6 @@ ViewProviderPrism::~ViewProviderPrism() } - - // ********************************************************************************** std::vector ViewProviderPrism::getDisplayModes(void) const @@ -66,3 +64,35 @@ std::vector ViewProviderPrism::getDisplayModes(void) const return StrList; } + +//************************************************************************** +// Construction/Destruction + +PROPERTY_SOURCE(PartGui::ViewProviderWedge, PartGui::ViewProviderPart) + + +ViewProviderWedge::ViewProviderWedge() +{ + sPixmap = "Tree_Part_Wedge.svg"; +} + +ViewProviderWedge::~ViewProviderWedge() +{ + +} + +// ********************************************************************************** + +std::vector ViewProviderWedge::getDisplayModes(void) const +{ + // get the modes of the father + std::vector StrList; + + // add your own modes + StrList.push_back("Flat Lines"); + StrList.push_back("Shaded"); + StrList.push_back("Wireframe"); + StrList.push_back("Points"); + + return StrList; +} diff --git a/src/Mod/Part/Gui/ViewProviderPrism.h b/src/Mod/Part/Gui/ViewProviderPrism.h index 92b1ccc05..e21574493 100644 --- a/src/Mod/Part/Gui/ViewProviderPrism.h +++ b/src/Mod/Part/Gui/ViewProviderPrism.h @@ -46,6 +46,22 @@ protected: }; +class PartGuiExport ViewProviderWedge : public ViewProviderPart +{ + PROPERTY_HEADER(PartGui::ViewProviderWedge); + +public: + /// constructor + ViewProviderWedge(); + /// destructor + virtual ~ViewProviderWedge(); + + std::vector getDisplayModes(void) const; + +protected: + +}; + } // namespace PartGui