Tree icons now display Part Plane, Torus, Sphere, Cylinder,Cone

Created ViewProviders for the above.
Fixed a minor typo in the Part Line ViewProvider
This commit is contained in:
jmaustpc 2013-03-14 04:01:43 +11:00 committed by Yorik van Havre
parent ecc28163bb
commit 59de0b5a9f
14 changed files with 736 additions and 1 deletions

View File

@ -117,6 +117,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::ViewProviderPlaneParametric";
}
//@}
};
@ -137,6 +141,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::ViewProviderSphereParametric";
}
//@}
};
@ -180,6 +188,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::ViewProviderCylinderParametric";
}
//@}
};
@ -200,6 +212,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::ViewProviderConeParametric";
}
//@}
};
@ -221,6 +237,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::ViewProviderTorusParametric";
}
//@}
};

View File

@ -41,6 +41,11 @@
#include "ViewProviderPointParametric.h"
#include "ViewProviderEllipseParametric.h"
#include "ViewProviderHelixParametric.h"
#include "ViewProviderPlaneParametric.h"
#include "ViewProviderSphereParametric.h"
#include "ViewProviderCylinderParametric.h"
#include "ViewProviderConeParametric.h"
#include "ViewProviderTorusParametric.h"
#include "DlgSettingsGeneral.h"
#include "DlgSettings3DViewPartImp.h"
@ -122,6 +127,11 @@ void PartGuiExport initPartGui()
PartGui::ViewProviderPointParametric ::init();
PartGui::ViewProviderEllipseParametric ::init();
PartGui::ViewProviderHelixParametric ::init();
PartGui::ViewProviderPlaneParametric ::init();
PartGui::ViewProviderSphereParametric ::init();
PartGui::ViewProviderCylinderParametric ::init();
PartGui::ViewProviderConeParametric ::init();
PartGui::ViewProviderTorusParametric ::init();
PartGui::Workbench ::init();

View File

@ -146,6 +146,16 @@ SET(PartGui_SRCS
ViewProviderEllipseParametric.h
ViewProviderHelixParametric.cpp
ViewProviderHelixParametric.h
ViewProviderPlaneParametric.cpp
ViewProviderPlaneParametric.h
ViewProviderSphereParametric.cpp
ViewProviderSphereParametric.h
ViewProviderCylinderParametric.cpp
ViewProviderCylinderParametric.h
ViewProviderConeParametric.cpp
ViewProviderConeParametric.h
ViewProviderTorusParametric.cpp
ViewProviderTorusParametric.h
ViewProviderCurveNet.cpp
ViewProviderCurveNet.h
ViewProviderImport.cpp

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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"
#ifndef _PreComp_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Parameter.h>
#include "ViewProviderConeParametric.h"
//#include "Tree.h"
using namespace PartGui;
using namespace std;
//**************************************************************************
// Construction/Destruction
PROPERTY_SOURCE(PartGui::ViewProviderConeParametric, PartGui::ViewProviderPart)
ViewProviderConeParametric::ViewProviderConeParametric()
{
sPixmap = "Tree_Part_Cone_Parametric.svg";
}
ViewProviderConeParametric::~ViewProviderConeParametric()
{
}
// **********************************************************************************
std::vector<std::string> ViewProviderConeParametric::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList;
// add your own modes
StrList.push_back("Flat Lines");
StrList.push_back("Shaded");
StrList.push_back("Wireframe");
StrList.push_back("Points");
return StrList;
}

View File

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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 PARTGUI_VIEWPROVIDERCONEPARAMETRIC_H
#define PARTGUI_VIEWPROVIDERCONEPARAMETRIC_H
#include "ViewProvider.h"
class TopoDS_Shape;
class TopoDS_Face;
class SoSeparator;
class SbVec3f;
class SoTransform;
namespace Gui {
class View3DInventorViewer;
class SoFCSelection;
}
namespace PartGui {
class PartGuiExport ViewProviderConeParametric:public ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProviderConeParametric);
public:
/// constructor
ViewProviderConeParametric();
/// destructor
virtual ~ViewProviderConeParametric();
std::vector<std::string> getDisplayModes(void) const;
protected:
};
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERCONEPARAMETRIC_H

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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"
#ifndef _PreComp_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Parameter.h>
#include "ViewProviderCylinderParametric.h"
//#include "Tree.h"
using namespace PartGui;
using namespace std;
//**************************************************************************
// Construction/Destruction
PROPERTY_SOURCE(PartGui::ViewProviderCylinderParametric, PartGui::ViewProviderPart)
ViewProviderCylinderParametric::ViewProviderCylinderParametric()
{
sPixmap = "Tree_Part_Cylinder_Parametric.svg";
}
ViewProviderCylinderParametric::~ViewProviderCylinderParametric()
{
}
// **********************************************************************************
std::vector<std::string> ViewProviderCylinderParametric::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList;
// add your own modes
StrList.push_back("Flat Lines");
StrList.push_back("Shaded");
StrList.push_back("Wireframe");
StrList.push_back("Points");
return StrList;
}

View File

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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 PARTGUI_VIEWPROVIDERCYLINDERPARAMETRIC_H
#define PARTGUI_VIEWPROVIDERCYLINDERPARAMETRIC_H
#include "ViewProvider.h"
class TopoDS_Shape;
class TopoDS_Face;
class SoSeparator;
class SbVec3f;
class SoTransform;
namespace Gui {
class View3DInventorViewer;
class SoFCSelection;
}
namespace PartGui {
class PartGuiExport ViewProviderCylinderParametric:public ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProviderCylinderParametric);
public:
/// constructor
ViewProviderCylinderParametric();
/// destructor
virtual ~ViewProviderCylinderParametric();
std::vector<std::string> getDisplayModes(void) const;
protected:
};
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERCYLINDERPARAMETRIC_H

View File

@ -60,5 +60,5 @@ protected:
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERCIRCLEPARAMETRIC_H
#endif // PARTGUI_VIEWPROVIDERLINEPARAMETRIC_H

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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"
#ifndef _PreComp_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Parameter.h>
#include "ViewProviderPlaneParametric.h"
//#include "Tree.h"
using namespace PartGui;
using namespace std;
//**************************************************************************
// Construction/Destruction
PROPERTY_SOURCE(PartGui::ViewProviderPlaneParametric, PartGui::ViewProviderPart)
ViewProviderPlaneParametric::ViewProviderPlaneParametric()
{
sPixmap = "Tree_Part_Plane_Parametric.svg";
}
ViewProviderPlaneParametric::~ViewProviderPlaneParametric()
{
}
// **********************************************************************************
std::vector<std::string> ViewProviderPlaneParametric::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList;
// add your own modes
StrList.push_back("Flat Lines");
StrList.push_back("Shaded");
StrList.push_back("Wireframe");
StrList.push_back("Points");
return StrList;
}

View File

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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 PARTGUI_VIEWPROVIDERPLANEPARAMETRIC_H
#define PARTGUI_VIEWPROVIDERPLANEPARAMETRIC_H
#include "ViewProvider.h"
class TopoDS_Shape;
class TopoDS_Face;
class SoSeparator;
class SbVec3f;
class SoTransform;
namespace Gui {
class View3DInventorViewer;
class SoFCSelection;
}
namespace PartGui {
class PartGuiExport ViewProviderPlaneParametric:public ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProviderPlaneParametric);
public:
/// constructor
ViewProviderPlaneParametric();
/// destructor
virtual ~ViewProviderPlaneParametric();
std::vector<std::string> getDisplayModes(void) const;
protected:
};
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERPLANEPARAMETRIC_H

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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"
#ifndef _PreComp_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Parameter.h>
#include "ViewProviderSphereParametric.h"
//#include "Tree.h"
using namespace PartGui;
using namespace std;
//**************************************************************************
// Construction/Destruction
PROPERTY_SOURCE(PartGui::ViewProviderSphereParametric, PartGui::ViewProviderPart)
ViewProviderSphereParametric::ViewProviderSphereParametric()
{
sPixmap = "Tree_Part_Sphere_Parametric.svg";
}
ViewProviderSphereParametric::~ViewProviderSphereParametric()
{
}
// **********************************************************************************
std::vector<std::string> ViewProviderSphereParametric::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList;
// add your own modes
StrList.push_back("Flat Lines");
StrList.push_back("Shaded");
StrList.push_back("Wireframe");
StrList.push_back("Points");
return StrList;
}

View File

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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 PARTGUI_VIEWPROVIDERSPHEREPARAMETRIC_H
#define PARTGUI_VIEWPROVIDERSPHEREPARAMETRIC_H
#include "ViewProvider.h"
class TopoDS_Shape;
class TopoDS_Face;
class SoSeparator;
class SbVec3f;
class SoTransform;
namespace Gui {
class View3DInventorViewer;
class SoFCSelection;
}
namespace PartGui {
class PartGuiExport ViewProviderSphereParametric:public ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProviderSphereParametric);
public:
/// constructor
ViewProviderSphereParametric();
/// destructor
virtual ~ViewProviderSphereParametric();
std::vector<std::string> getDisplayModes(void) const;
protected:
};
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERSPHEREPARAMETRIC_H

View File

@ -0,0 +1,75 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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"
#ifndef _PreComp_
#endif
/// Here the FreeCAD includes sorted by Base,App,Gui......
#include <Base/Parameter.h>
#include "ViewProviderTorusParametric.h"
//#include "Tree.h"
using namespace PartGui;
using namespace std;
//**************************************************************************
// Construction/Destruction
PROPERTY_SOURCE(PartGui::ViewProviderTorusParametric, PartGui::ViewProviderPart)
ViewProviderTorusParametric::ViewProviderTorusParametric()
{
sPixmap = "Tree_Part_Torus_Parametric.svg";
}
ViewProviderTorusParametric::~ViewProviderTorusParametric()
{
}
// **********************************************************************************
std::vector<std::string> ViewProviderTorusParametric::getDisplayModes(void) const
{
// get the modes of the father
std::vector<std::string> StrList;
// add your own modes
StrList.push_back("Flat Lines");
StrList.push_back("Shaded");
StrList.push_back("Wireframe");
StrList.push_back("Points");
return StrList;
}

View File

@ -0,0 +1,64 @@
/***************************************************************************
* Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.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 PARTGUI_VIEWPROVIDERTORUSPARAMETRIC_H
#define PARTGUI_VIEWPROVIDERTORUSPARAMETRIC_H
#include "ViewProvider.h"
class TopoDS_Shape;
class TopoDS_Face;
class SoSeparator;
class SbVec3f;
class SoTransform;
namespace Gui {
class View3DInventorViewer;
class SoFCSelection;
}
namespace PartGui {
class PartGuiExport ViewProviderTorusParametric:public ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProviderTorusParametric);
public:
/// constructor
ViewProviderTorusParametric();
/// destructor
virtual ~ViewProviderTorusParametric();
std::vector<std::string> getDisplayModes(void) const;
protected:
};
} // namespace PartGui
#endif // PARTGUI_VIEWPROVIDERTORUSPARAMETRIC_H