Surface: ViewProviderExtend for Surface::Extend object

This is created by the Surface_ExtendFace command.
This commit is contained in:
vocx-fc
2020-09-30 13:45:32 -05:00
committed by wmayer
parent 3ec05cefcb
commit 7750c4dfbf
5 changed files with 92 additions and 2 deletions

View File

@@ -53,6 +53,10 @@ public:
// recalculate the feature
App::DocumentObjectExecReturn *execute(void) override;
short mustExecute() const override;
/// returns the type name of the view provider
const char* getViewProviderName(void) const override {
return "SurfaceGui::ViewProviderExtend";
}
protected:
virtual void onChanged(const App::Property* prop) override;

View File

@@ -37,6 +37,7 @@
#include "TaskGeomFillSurface.h"
#include "TaskFilling.h"
#include "TaskSections.h"
#include "ViewProviderExtend.h"
// use a different name to CreateCommand()
void CreateSurfaceCommands(void);
@@ -81,8 +82,8 @@ PyMOD_INIT_FUNC(SurfaceGui)
SurfaceGui::ViewProviderGeomFillSurface ::init();
SurfaceGui::ViewProviderFilling ::init();
SurfaceGui::ViewProviderSections ::init();
// SurfaceGui::ViewProviderCut::init();
SurfaceGui::ViewProviderExtend::init();
// SurfaceGui::ViewProviderCut::init();
PyObject* mod = SurfaceGui::initModule();
Base::Console().Log("Loading GUI of Surface module... done\n");

View File

@@ -70,6 +70,8 @@ SET(SurfaceGui_SRCS
Command.cpp
PreCompiled.cpp
PreCompiled.h
ViewProviderExtend.cpp
ViewProviderExtend.h
Workbench.cpp
Workbench.h
# ViewProviderCut.cpp

View File

@@ -0,0 +1,41 @@
/***************************************************************************
* Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#include <Gui/BitmapFactory.h>
#include <Mod/Part/Gui/ViewProvider.h>
#include "ViewProviderExtend.h"
using namespace SurfaceGui;
PROPERTY_SOURCE(SurfaceGui::ViewProviderExtend, PartGui::ViewProviderSpline)
namespace SurfaceGui {
QIcon ViewProviderExtend::getIcon(void) const
{
return Gui::BitmapFactory().pixmap("Surface_Extend");
}
} //namespace SurfaceGui

View File

@@ -0,0 +1,42 @@
/***************************************************************************
* Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef SURFACEGUI_VIEWPROVIDEREXTEND_H
#define SURFACEGUI_VIEWPROVIDEREXTEND_H
#include <Mod/Part/Gui/ViewProviderSpline.h>
#include <Mod/Surface/App/FeatureExtend.h>
namespace SurfaceGui
{
class ViewProviderExtend : public PartGui::ViewProviderSpline
{
PROPERTY_HEADER(SurfaceGui::ViewProviderExtend);
public:
QIcon getIcon(void) const;
};
} //namespace SurfaceGui
#endif // SURFACEGUI_VIEWPROVIDEREXTEND_H