removed deprecaded functions
. .
This commit is contained in:
@@ -67,10 +67,6 @@ void AbstractMouseSelection::releaseMouseModel(bool abort)
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractMouseSelection::redraw()
|
||||
{
|
||||
// obsolete
|
||||
}
|
||||
|
||||
int AbstractMouseSelection::handleEvent(const SoEvent* const ev, const SbViewportRegion& vp)
|
||||
{
|
||||
|
||||
@@ -73,8 +73,6 @@ public:
|
||||
return m_selectedRole;
|
||||
}
|
||||
|
||||
void redraw();
|
||||
|
||||
/** @name Mouse events*/
|
||||
//@{
|
||||
int handleEvent(const SoEvent* const ev, const SbViewportRegion& vp);
|
||||
|
||||
@@ -1082,11 +1082,6 @@ void NavigationStyle::moveCursorPosition()
|
||||
}
|
||||
}
|
||||
|
||||
void NavigationStyle::redraw()
|
||||
{
|
||||
if (mouseSelection)
|
||||
mouseSelection->redraw();
|
||||
}
|
||||
|
||||
SbBool NavigationStyle::handleEventInForeground(const SoEvent* const e)
|
||||
{
|
||||
|
||||
@@ -149,8 +149,6 @@ public:
|
||||
void setRotationCenter(const SbVec3f& cnt);
|
||||
SbVec3f getFocalPoint() const;
|
||||
|
||||
void redraw();
|
||||
|
||||
SoCamera* getCamera() const;
|
||||
void setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter = false);
|
||||
void translateCamera(const SbVec3f& translation);
|
||||
|
||||
@@ -2271,7 +2271,6 @@ void View3DInventorViewer::renderFramebuffer()
|
||||
glEnd();
|
||||
|
||||
printDimension();
|
||||
navigation->redraw();
|
||||
|
||||
for (auto it : this->graphicsItems) {
|
||||
it->paintGL();
|
||||
@@ -2305,7 +2304,6 @@ void View3DInventorViewer::renderGLImage()
|
||||
glDrawPixels(glImage.width(), glImage.height(), GL_BGRA,GL_UNSIGNED_BYTE, glImage.bits());
|
||||
|
||||
printDimension();
|
||||
navigation->redraw();
|
||||
|
||||
for (auto it : this->graphicsItems) {
|
||||
it->paintGL();
|
||||
@@ -2403,7 +2401,6 @@ void View3DInventorViewer::renderScene()
|
||||
}
|
||||
|
||||
printDimension();
|
||||
navigation->redraw();
|
||||
|
||||
for (auto it : this->graphicsItems) {
|
||||
it->paintGL();
|
||||
|
||||
@@ -654,41 +654,6 @@ Base::Matrix4D TopoShape::getTransform() const
|
||||
return mtrx;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \obsolete
|
||||
*/
|
||||
void TopoShape::setShapePlacement(const Base::Placement& rclTrf)
|
||||
{
|
||||
const Base::Vector3d& pos = rclTrf.getPosition();
|
||||
Base::Vector3d axis;
|
||||
double angle;
|
||||
rclTrf.getRotation().getValue(axis, angle);
|
||||
|
||||
gp_Trsf trsf;
|
||||
trsf.SetRotation(gp_Ax1(gp_Pnt(0.,0.,0.), gp_Dir(axis.x, axis.y, axis.z)), angle);
|
||||
trsf.SetTranslationPart(gp_Vec(pos.x, pos.y, pos.z));
|
||||
TopLoc_Location loc(trsf);
|
||||
_Shape.Location(loc);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \obsolete
|
||||
*/
|
||||
Base::Placement TopoShape::getShapePlacement() const
|
||||
{
|
||||
TopLoc_Location loc = _Shape.Location();
|
||||
gp_Trsf trsf = loc.Transformation();
|
||||
gp_XYZ pos = trsf.TranslationPart();
|
||||
|
||||
gp_XYZ axis;
|
||||
Standard_Real angle;
|
||||
trsf.GetRotation(axis, angle);
|
||||
|
||||
Base::Rotation rot(Base::Vector3d(axis.X(), axis.Y(), axis.Z()), angle);
|
||||
Base::Placement placement(Base::Vector3d(pos.X(), pos.Y(), pos.Z()), rot);
|
||||
|
||||
return placement;
|
||||
}
|
||||
|
||||
void TopoShape::read(const char *FileName)
|
||||
{
|
||||
|
||||
@@ -262,10 +262,6 @@ public:
|
||||
//@{
|
||||
/// set the transformation of the CasCade Shape
|
||||
void setTransform(const Base::Matrix4D& rclTrf) override;
|
||||
/// set the transformation of the CasCade Shape
|
||||
void setShapePlacement(const Base::Placement& rclTrf);
|
||||
/// get the transformation of the CasCade Shape
|
||||
Base::Placement getShapePlacement() const;
|
||||
/// get the transformation of the CasCade Shape
|
||||
Base::Matrix4D getTransform() const override;
|
||||
/// Bound box from the CasCade shape
|
||||
|
||||
@@ -1277,7 +1277,6 @@ Base::Vector3d DrawViewPart::getXDirection() const
|
||||
Base::Vector3d DrawViewPart::getLegacyX(const Base::Vector3d& pt, const Base::Vector3d& axis,
|
||||
const bool flip) const
|
||||
{
|
||||
// Base::Console().Message("DVP::getLegacyX() - %s\n", Label.getValue());
|
||||
gp_Ax2 viewAxis = ShapeUtils::legacyViewAxis1(pt, axis, flip);
|
||||
gp_Dir gXDir = viewAxis.XDirection();
|
||||
return Base::Vector3d(gXDir.X(), gXDir.Y(), gXDir.Z());
|
||||
@@ -1298,7 +1297,6 @@ void DrawViewPart::updateReferenceVert(std::string tag, Base::Vector3d loc2d)
|
||||
|
||||
void DrawViewPart::addReferencesToGeom()
|
||||
{
|
||||
// Base::Console().Message("DVP::addReferencesToGeom() - %s\n", getNameInDocument());
|
||||
std::vector<TechDraw::VertexPtr> gVerts = getVertexGeometry();
|
||||
gVerts.insert(gVerts.end(), m_referenceVerts.begin(), m_referenceVerts.end());
|
||||
getGeometryObject()->setVertexGeometry(gVerts);
|
||||
@@ -1308,11 +1306,7 @@ void DrawViewPart::addReferencesToGeom()
|
||||
//ex. LandmarkDimension as a reference
|
||||
std::string DrawViewPart::addReferenceVertex(Base::Vector3d v)
|
||||
{
|
||||
// Base::Console().Message("DVP::addReferenceVertex(%s) - %s\n",
|
||||
// DrawUtil::formatVector(v).c_str(), getNameInDocument());
|
||||
std::string refTag;
|
||||
// Base::Vector3d scaledV = v * getScale();
|
||||
// TechDraw::Vertex* ref = new TechDraw::Vertex(scaledV);
|
||||
Base::Vector3d scaledV = v;
|
||||
TechDraw::VertexPtr ref(std::make_shared<TechDraw::Vertex>(scaledV));
|
||||
ref->isReference(true);
|
||||
|
||||
@@ -48,7 +48,6 @@ QGIPrimPath::QGIPrimPath():
|
||||
m_width(0),
|
||||
m_capStyle(Qt::RoundCap),
|
||||
m_fillStyleCurrent (Qt::NoBrush),
|
||||
// m_fillStyleCurrent (Qt::SolidPattern),
|
||||
m_fillOverride(false)
|
||||
{
|
||||
setCacheMode(QGraphicsItem::NoCache);
|
||||
@@ -77,7 +76,6 @@ QGIPrimPath::QGIPrimPath():
|
||||
m_fillStyleCurrent = m_fillNormal;
|
||||
|
||||
m_colDefFill = Qt::white;
|
||||
// m_colDefFill = Qt::transparent;
|
||||
setFillColor(m_colDefFill);
|
||||
|
||||
setPrettyNormal();
|
||||
@@ -85,7 +83,6 @@ QGIPrimPath::QGIPrimPath():
|
||||
|
||||
QVariant QGIPrimPath::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
// Base::Console().Message("QGIPP::itemChange(%d) - type: %d\n", change, type() - QGraphicsItem::UserType);
|
||||
if (change == ItemSelectedHasChanged && scene()) {
|
||||
if(isSelected()) {
|
||||
setPrettySel();
|
||||
@@ -98,7 +95,6 @@ QVariant QGIPrimPath::itemChange(GraphicsItemChange change, const QVariant &valu
|
||||
|
||||
void QGIPrimPath::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
// Base::Console().Message("QGIPP::hoverEnter() - selected; %d\n", isSelected());
|
||||
if (!isSelected()) {
|
||||
setPrettyPre();
|
||||
}
|
||||
@@ -107,7 +103,6 @@ void QGIPrimPath::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
|
||||
void QGIPrimPath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
// Base::Console().Message("QGIPP::hoverLeave() - selected; %d\n", isSelected());
|
||||
if(!isSelected()) {
|
||||
setPrettyNormal();
|
||||
}
|
||||
@@ -115,25 +110,14 @@ void QGIPrimPath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
QGraphicsPathItem::hoverLeaveEvent(event);
|
||||
}
|
||||
|
||||
//set highlighted is obsolete
|
||||
void QGIPrimPath::setHighlighted(bool b)
|
||||
{
|
||||
isHighlighted = b;
|
||||
if(isHighlighted) {
|
||||
setPrettySel();
|
||||
} else {
|
||||
setPrettyNormal();
|
||||
}
|
||||
}
|
||||
|
||||
void QGIPrimPath::setPrettyNormal() {
|
||||
// Base::Console().Message("QGIPP::setPrettyNormal()\n");
|
||||
|
||||
m_colCurrent = m_colNormal;
|
||||
m_fillColorCurrent = m_colNormalFill;
|
||||
}
|
||||
|
||||
void QGIPrimPath::setPrettyPre() {
|
||||
// Base::Console().Message("QGIPP::setPrettyPre()\n");
|
||||
m_colCurrent = getPreColor();
|
||||
if (!m_fillOverride) {
|
||||
m_fillColorCurrent = getPreColor();
|
||||
@@ -141,7 +125,6 @@ void QGIPrimPath::setPrettyPre() {
|
||||
}
|
||||
|
||||
void QGIPrimPath::setPrettySel() {
|
||||
// Base::Console().Message("QGIPP::setPrettySel()\n");
|
||||
m_colCurrent = getSelectColor();
|
||||
if (!m_fillOverride) {
|
||||
m_fillColorCurrent = getSelectColor();
|
||||
|
||||
@@ -51,7 +51,6 @@ public:
|
||||
void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override;
|
||||
QPainterPath shape() const override { return path(); }
|
||||
|
||||
void setHighlighted(bool state);
|
||||
virtual void setPrettyNormal();
|
||||
virtual void setPrettyPre();
|
||||
virtual void setPrettySel();
|
||||
|
||||
@@ -335,7 +335,6 @@ void ViewProviderViewPart::handleChangedPropertyType(Base::XMLReader &reader, co
|
||||
|
||||
bool ViewProviderViewPart::onDelete(const std::vector<std::string> & subNames)
|
||||
{
|
||||
// Base::Console().Message("VPVP::onDelete() - subs: %d\n", subNames.size());
|
||||
// if a cosmetic subelement is in the list of selected subNames then we treat this
|
||||
// as a delete of the subelement and not a delete of the DVP
|
||||
std::vector<std::string> removables = getSelectedCosmetics(subNames);
|
||||
@@ -367,7 +366,6 @@ bool ViewProviderViewPart::onDelete(const std::vector<std::string> & subNames)
|
||||
|
||||
bool ViewProviderViewPart::canDelete(App::DocumentObject *obj) const
|
||||
{
|
||||
// Base::Console().Message("VPVP::canDelete()\n");
|
||||
// deletions of part objects (detail view, View etc.) are valid
|
||||
// that it cannot be deleted if it has a child view is handled in the onDelete() function
|
||||
Q_UNUSED(obj)
|
||||
@@ -377,7 +375,6 @@ bool ViewProviderViewPart::canDelete(App::DocumentObject *obj) const
|
||||
//! extract the names of cosmetic subelements from the list of all selected elements
|
||||
std::vector<std::string> ViewProviderViewPart::getSelectedCosmetics(std::vector<std::string> subNames)
|
||||
{
|
||||
// Base::Console().Message("VPVP::getSelectedCosmetics(%d removables)\n", subNames.size());
|
||||
|
||||
std::vector<std::string> result;
|
||||
// pick out any cosmetic vertices or edges in the selection
|
||||
@@ -399,7 +396,6 @@ std::vector<std::string> ViewProviderViewPart::getSelectedCosmetics(std::vector<
|
||||
//! delete cosmetic elements for a list of subelement names
|
||||
void ViewProviderViewPart::deleteCosmeticElements(std::vector<std::string> removables)
|
||||
{
|
||||
// Base::Console().Message("VPVP::deleteCosmeticElements(%d removables)\n", removables.size());
|
||||
for (auto& name : removables) {
|
||||
if (DU::getGeomTypeFromName(name) == "Vertex") {
|
||||
CosmeticVertex* vert = getViewObject()->getCosmeticVertexBySelection(name);
|
||||
@@ -445,7 +441,6 @@ int ViewProviderViewPart::prefHighlightStyle()
|
||||
// TODO: does this need to be implemented for Leaderlines and ???? others?
|
||||
void ViewProviderViewPart::fixSceneDependencies()
|
||||
{
|
||||
// Base::Console().Message("VPVP::fixSceneDependencies()\n");
|
||||
auto scene = getViewProviderPage()->getQGSPage();
|
||||
auto partQView = getQView();
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ ViewProviderViewSection::~ViewProviderViewSection()
|
||||
void ViewProviderViewSection::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &WeightPattern ||
|
||||
// prop == &HatchCutSurface ||
|
||||
prop == &HatchColor ||
|
||||
prop == &GeomHatchColor ||
|
||||
prop == &CutSurfaceColor ||
|
||||
@@ -156,9 +155,6 @@ void ViewProviderViewSection::getParameters()
|
||||
App::Color cutColor = App::Color((uint32_t) Preferences::getPreferenceGroup("Colors")->GetUnsigned("CutSurfaceColor", 0xD3D3D3FF));
|
||||
CutSurfaceColor.setValue(cutColor);
|
||||
|
||||
// App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
|
||||
// HatchColor.setValue(hatchColor);
|
||||
|
||||
double lineWeight = Preferences::getPreferenceGroup("PAT")->GetFloat("GeomWeight", 0.1);
|
||||
WeightPattern.setValue(lineWeight);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user