From a025af2d2669bdc7945d6b4a11da8be2dd94e3ce Mon Sep 17 00:00:00 2001 From: mos Date: Tue, 20 Feb 2024 17:25:29 +0100 Subject: [PATCH] removed deprecaded functions . . --- src/Gui/MouseSelection.cpp | 4 --- src/Gui/MouseSelection.h | 2 -- src/Gui/NavigationStyle.cpp | 5 --- src/Gui/NavigationStyle.h | 2 -- src/Gui/View3DInventorViewer.cpp | 3 -- src/Mod/Part/App/TopoShape.cpp | 35 ------------------- src/Mod/Part/App/TopoShape.h | 4 --- src/Mod/TechDraw/App/DrawViewPart.cpp | 6 ---- src/Mod/TechDraw/Gui/QGIPrimPath.cpp | 19 +--------- src/Mod/TechDraw/Gui/QGIPrimPath.h | 1 - src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp | 5 --- .../TechDraw/Gui/ViewProviderViewSection.cpp | 4 --- 12 files changed, 1 insertion(+), 89 deletions(-) diff --git a/src/Gui/MouseSelection.cpp b/src/Gui/MouseSelection.cpp index b05278cb09..bc15741e3b 100644 --- a/src/Gui/MouseSelection.cpp +++ b/src/Gui/MouseSelection.cpp @@ -67,10 +67,6 @@ void AbstractMouseSelection::releaseMouseModel(bool abort) } } -void AbstractMouseSelection::redraw() -{ - // obsolete -} int AbstractMouseSelection::handleEvent(const SoEvent* const ev, const SbViewportRegion& vp) { diff --git a/src/Gui/MouseSelection.h b/src/Gui/MouseSelection.h index f798e25c41..ed29f56edd 100644 --- a/src/Gui/MouseSelection.h +++ b/src/Gui/MouseSelection.h @@ -73,8 +73,6 @@ public: return m_selectedRole; } - void redraw(); - /** @name Mouse events*/ //@{ int handleEvent(const SoEvent* const ev, const SbViewportRegion& vp); diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 218711c993..f657f1a8b1 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -1082,11 +1082,6 @@ void NavigationStyle::moveCursorPosition() } } -void NavigationStyle::redraw() -{ - if (mouseSelection) - mouseSelection->redraw(); -} SbBool NavigationStyle::handleEventInForeground(const SoEvent* const e) { diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index c5a0d4f5ef..ccaf598ff3 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -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); diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index eb501e1c7d..b01142cf9e 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -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(); diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 53d7a393a2..4cbb2db9d6 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -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) { diff --git a/src/Mod/Part/App/TopoShape.h b/src/Mod/Part/App/TopoShape.h index fa0a7caa54..8c5e8cef07 100644 --- a/src/Mod/Part/App/TopoShape.h +++ b/src/Mod/Part/App/TopoShape.h @@ -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 diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index ae10bac894..67c3f150bc 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -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 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(scaledV)); ref->isReference(true); diff --git a/src/Mod/TechDraw/Gui/QGIPrimPath.cpp b/src/Mod/TechDraw/Gui/QGIPrimPath.cpp index 23e15a09e7..27cc9719e8 100644 --- a/src/Mod/TechDraw/Gui/QGIPrimPath.cpp +++ b/src/Mod/TechDraw/Gui/QGIPrimPath.cpp @@ -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(); diff --git a/src/Mod/TechDraw/Gui/QGIPrimPath.h b/src/Mod/TechDraw/Gui/QGIPrimPath.h index 20f42dff45..4251bbb8ef 100644 --- a/src/Mod/TechDraw/Gui/QGIPrimPath.h +++ b/src/Mod/TechDraw/Gui/QGIPrimPath.h @@ -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(); diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp index 94e53586a7..411ab91042 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp @@ -335,7 +335,6 @@ void ViewProviderViewPart::handleChangedPropertyType(Base::XMLReader &reader, co bool ViewProviderViewPart::onDelete(const std::vector & 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 removables = getSelectedCosmetics(subNames); @@ -367,7 +366,6 @@ bool ViewProviderViewPart::onDelete(const std::vector & 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 ViewProviderViewPart::getSelectedCosmetics(std::vector subNames) { -// Base::Console().Message("VPVP::getSelectedCosmetics(%d removables)\n", subNames.size()); std::vector result; // pick out any cosmetic vertices or edges in the selection @@ -399,7 +396,6 @@ std::vector ViewProviderViewPart::getSelectedCosmetics(std::vector< //! delete cosmetic elements for a list of subelement names void ViewProviderViewPart::deleteCosmeticElements(std::vector 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(); diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp index 42c853f82f..2195410174 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewSection.cpp @@ -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); }