View providers for sweep and loft
This commit is contained in:
parent
642a3e5094
commit
1c158ef924
|
@ -67,6 +67,9 @@ public:
|
|||
/// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
const char* getViewProviderName(void) const {
|
||||
return "PartGui::ViewProviderLoft";
|
||||
}
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
@ -91,6 +94,9 @@ public:
|
|||
/// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
const char* getViewProviderName(void) const {
|
||||
return "PartGui::ViewProviderSweep";
|
||||
}
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -103,6 +103,8 @@ void PartGuiExport initPartGui()
|
|||
PartGui::ViewProviderFillet ::init();
|
||||
PartGui::ViewProviderChamfer ::init();
|
||||
PartGui::ViewProviderRevolution ::init();
|
||||
PartGui::ViewProviderLoft ::init();
|
||||
PartGui::ViewProviderSweep ::init();
|
||||
PartGui::ViewProviderCustom ::init();
|
||||
PartGui::ViewProviderCustomPython ::init();
|
||||
PartGui::ViewProviderBoolean ::init();
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include <Mod/Part/App/FeatureFillet.h>
|
||||
#include <Mod/Part/App/FeatureChamfer.h>
|
||||
#include <Mod/Part/App/FeatureRevolution.h>
|
||||
#include <Mod/Part/App/PartFeatures.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/Document.h>
|
||||
|
@ -348,3 +349,49 @@ bool ViewProviderRevolution::onDelete(const std::vector<std::string> &)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
PROPERTY_SOURCE(PartGui::ViewProviderLoft, PartGui::ViewProviderPart)
|
||||
|
||||
ViewProviderLoft::ViewProviderLoft()
|
||||
{
|
||||
sPixmap = "Part_Loft";
|
||||
}
|
||||
|
||||
ViewProviderLoft::~ViewProviderLoft()
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderLoft::claimChildren() const
|
||||
{
|
||||
return static_cast<Part::Loft*>(getObject())->Sections.getValues();
|
||||
}
|
||||
|
||||
bool ViewProviderLoft::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------
|
||||
|
||||
PROPERTY_SOURCE(PartGui::ViewProviderSweep, PartGui::ViewProviderPart)
|
||||
|
||||
ViewProviderSweep::ViewProviderSweep()
|
||||
{
|
||||
sPixmap = "Part_Sweep";
|
||||
}
|
||||
|
||||
ViewProviderSweep::~ViewProviderSweep()
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderSweep::claimChildren() const
|
||||
{
|
||||
return static_cast<Part::Sweep*>(getObject())->Sections.getValues();
|
||||
}
|
||||
|
||||
bool ViewProviderSweep::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -108,6 +108,36 @@ public:
|
|||
bool onDelete(const std::vector<std::string> &);
|
||||
};
|
||||
|
||||
class ViewProviderLoft : public ViewProviderPart
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderLoft);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderLoft();
|
||||
/// destructor
|
||||
virtual ~ViewProviderLoft();
|
||||
|
||||
/// grouping handling
|
||||
std::vector<App::DocumentObject*> claimChildren(void)const;
|
||||
bool onDelete(const std::vector<std::string> &);
|
||||
};
|
||||
|
||||
class ViewProviderSweep : public ViewProviderPart
|
||||
{
|
||||
PROPERTY_HEADER(PartGui::ViewProviderSweep);
|
||||
|
||||
public:
|
||||
/// constructor
|
||||
ViewProviderSweep();
|
||||
/// destructor
|
||||
virtual ~ViewProviderSweep();
|
||||
|
||||
/// grouping handling
|
||||
std::vector<App::DocumentObject*> claimChildren(void)const;
|
||||
bool onDelete(const std::vector<std::string> &);
|
||||
};
|
||||
|
||||
} // namespace PartGui
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user