diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
index 3422d0616a..094d42b0ad 100644
--- a/src/Gui/CMakeLists.txt
+++ b/src/Gui/CMakeLists.txt
@@ -938,6 +938,7 @@ SET(Navigation_CPP_SRCS
Navigation/CADNavigationStyle.cpp
Navigation/RevitNavigationStyle.cpp
Navigation/BlenderNavigationStyle.cpp
+ Navigation/SolidWorksNavigationStyle.cpp
Navigation/MayaGestureNavigationStyle.cpp
Navigation/OpenCascadeNavigationStyle.cpp
Navigation/OpenSCADNavigationStyle.cpp
diff --git a/src/Gui/Navigation/NavigationStyle.h b/src/Gui/Navigation/NavigationStyle.h
index 1ff239b98d..cd2fccd0d3 100644
--- a/src/Gui/Navigation/NavigationStyle.h
+++ b/src/Gui/Navigation/NavigationStyle.h
@@ -384,6 +384,23 @@ private:
SbBool lockButton1{false};
};
+class GuiExport SolidWorksNavigationStyle : public UserNavigationStyle {
+ using inherited = UserNavigationStyle;
+
+ TYPESYSTEM_HEADER_WITH_OVERRIDE();
+
+public:
+SolidWorksNavigationStyle();
+ ~SolidWorksNavigationStyle() override;
+ const char* mouseButtons(ViewerMode) override;
+
+protected:
+ SbBool processSoEvent(const SoEvent * const ev) override;
+
+private:
+ SbBool lockButton1{false};
+};
+
class GuiExport MayaGestureNavigationStyle : public UserNavigationStyle {
using inherited = UserNavigationStyle;
diff --git a/src/Gui/Navigation/SolidWorksNavigationStyle.cpp b/src/Gui/Navigation/SolidWorksNavigationStyle.cpp
new file mode 100644
index 0000000000..aacebff1cd
--- /dev/null
+++ b/src/Gui/Navigation/SolidWorksNavigationStyle.cpp
@@ -0,0 +1,308 @@
+/***************************************************************************
+ * Copyright (c) 2011 Werner Mayer *
+ * *
+ * 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_
+# include
+# include
+#endif
+
+#include "Navigation/NavigationStyle.h"
+#include "View3DInventorViewer.h"
+
+
+using namespace Gui;
+
+// ----------------------------------------------------------------------------------
+
+/* TRANSLATOR Gui::SolidWorksNavigationStyle */
+
+TYPESYSTEM_SOURCE(Gui::SolidWorksNavigationStyle, Gui::UserNavigationStyle)
+
+SolidWorksNavigationStyle::SolidWorksNavigationStyle() : lockButton1(false)
+{
+}
+
+SolidWorksNavigationStyle::~SolidWorksNavigationStyle() = default;
+
+const char* SolidWorksNavigationStyle::mouseButtons(ViewerMode mode)
+{
+ switch (mode) {
+ case NavigationStyle::SELECTION:
+ return QT_TR_NOOP("Press left mouse button");
+ case NavigationStyle::PANNING:
+ return QT_TR_NOOP("Press CTRL and middle mouse button");
+ case NavigationStyle::DRAGGING:
+ return QT_TR_NOOP("Press middle mouse button");
+ case NavigationStyle::ZOOMING:
+ return QT_TR_NOOP("Scroll mouse wheel");
+ default:
+ return "No description";
+ }
+}
+
+SbBool SolidWorksNavigationStyle::processSoEvent(const SoEvent * const ev)
+{
+ // Events when in "ready-to-seek" mode are ignored, except those
+ // which influence the seek mode itself -- these are handled further
+ // up the inheritance hierarchy.
+ if (this->isSeekMode()) {
+ return inherited::processSoEvent(ev);
+ }
+ // Switch off viewing mode (Bug #0000911)
+ if (!this->isSeekMode() && !this->isAnimating() && this->isViewing())
+ this->setViewing(false); // by default disable viewing mode to render the scene
+
+ const SoType type(ev->getTypeId());
+
+ const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion();
+ const SbVec2s pos(ev->getPosition());
+ const SbVec2f posn = normalizePixelPos(pos);
+
+ const SbVec2f prevnormalized = this->lastmouseposition;
+ this->lastmouseposition = posn;
+
+ // Set to true if any event processing happened. Note that it is not
+ // necessary to restrict ourselves to only do one "action" for an
+ // event, we only need this flag to see if any processing happened
+ // at all.
+ SbBool processed = false;
+
+ const ViewerMode curmode = this->currentmode;
+ ViewerMode newmode = curmode;
+
+ // Mismatches in state of the modifier keys happens if the user
+ // presses or releases them outside the viewer window.
+ syncModifierKeys(ev);
+
+ // give the nodes in the foreground root the chance to handle events (e.g color bar)
+ if (!viewer->isEditing()) {
+ processed = handleEventInForeground(ev);
+ if (processed)
+ return true;
+ }
+
+ // Keyboard handling
+ if (type.isDerivedFrom(SoKeyboardEvent::getClassTypeId())) {
+ const auto event = static_cast(ev);
+ processed = processKeyboardEvent(event);
+ }
+
+ // Mouse Button / Spaceball Button handling
+ if (type.isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) {
+ const auto * const event = (const SoMouseButtonEvent *) ev;
+ const int button = event->getButton();
+ const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false;
+
+ //SoDebugError::postInfo("processSoEvent", "button = %d", button);
+ switch (button) {
+ case SoMouseButtonEvent::BUTTON1:
+ this->lockrecenter = true;
+ this->button1down = press;
+ if (press && (this->currentmode == NavigationStyle::SEEK_WAIT_MODE)) {
+ newmode = NavigationStyle::SEEK_MODE;
+ this->seekToPoint(pos); // implicitly calls interactiveCountInc()
+ processed = true;
+ }
+ else if (press && (this->currentmode == NavigationStyle::PANNING ||
+ this->currentmode == NavigationStyle::ZOOMING)) {
+ newmode = NavigationStyle::DRAGGING;
+ saveCursorPosition(ev);
+ this->centerTime = ev->getTime();
+ processed = true;
+ }
+ else if (!press && (this->currentmode == NavigationStyle::DRAGGING)) {
+ processed = true;
+ }
+ else if (viewer->isEditing() && (this->currentmode == NavigationStyle::SPINNING)) {
+ processed = true;
+ }
+ else {
+ processed = processClickEvent(event);
+ }
+ break;
+ case SoMouseButtonEvent::BUTTON2:
+ // If we are in edit mode then simply ignore the RMB events
+ // to pass the event to the base class.
+ this->lockrecenter = true;
+
+ // Don't show the context menu after dragging, panning or zooming
+ if (!press && (hasDragged || hasPanned || hasZoomed)) {
+ processed = true;
+ }
+ else if (!press && !viewer->isEditing()) {
+ if (this->currentmode != NavigationStyle::ZOOMING &&
+ this->currentmode != NavigationStyle::PANNING &&
+ this->currentmode != NavigationStyle::DRAGGING) {
+ if (this->isPopupMenuEnabled()) {
+ this->openPopupMenu(event->getPosition());
+ }
+ }
+ }
+ // Alternative way of rotating & zooming
+ if (press && (this->currentmode == NavigationStyle::PANNING ||
+ this->currentmode == NavigationStyle::ZOOMING)) {
+ newmode = NavigationStyle::DRAGGING;
+ saveCursorPosition(ev);
+ this->centerTime = ev->getTime();
+ processed = true;
+ }
+ this->button2down = press;
+ break;
+ case SoMouseButtonEvent::BUTTON3:
+ if (press) {
+ this->centerTime = ev->getTime();
+ setupPanningPlane(getCamera());
+ this->lockrecenter = false;
+ }
+ else {
+ SbTime tmp = (ev->getTime() - this->centerTime);
+ float dci = (float)QApplication::doubleClickInterval()/1000.0f;
+ // is it just a middle click?
+ if (tmp.getValue() < dci && !this->lockrecenter) {
+ lookAtPoint(pos);
+ processed = true;
+ }
+ }
+ this->button3down = press;
+ break;
+ default:
+ break;
+ }
+ }
+
+ // Mouse Movement handling
+ if (type.isDerivedFrom(SoLocation2Event::getClassTypeId())) {
+ this->lockrecenter = true;
+ const auto * const event = (const SoLocation2Event *) ev;
+ if (this->currentmode == NavigationStyle::ZOOMING) {
+ this->zoomByCursor(posn, prevnormalized);
+ processed = true;
+ }
+ else if (this->currentmode == NavigationStyle::PANNING) {
+ float ratio = vp.getViewportAspectRatio();
+ panCamera(viewer->getSoRenderManager()->getCamera(), ratio, this->panningplane, posn, prevnormalized);
+ processed = true;
+ }
+ else if (this->currentmode == NavigationStyle::DRAGGING) {
+ this->addToLog(event->getPosition(), event->getTime());
+ this->spin(posn);
+ moveCursorPosition();
+ processed = true;
+ }
+ }
+
+ // Spaceball & Joystick handling
+ if (type.isDerivedFrom(SoMotion3Event::getClassTypeId())) {
+ const auto * const event = static_cast(ev);
+ if (event)
+ this->processMotionEvent(event);
+ processed = true;
+ }
+
+ enum {
+ BUTTON1DOWN = 1 << 0,
+ BUTTON3DOWN = 1 << 1,
+ CTRLDOWN = 1 << 2,
+ SHIFTDOWN = 1 << 3,
+ BUTTON2DOWN = 1 << 4
+ };
+ unsigned int combo =
+ (this->button1down ? BUTTON1DOWN : 0) |
+ (this->button2down ? BUTTON2DOWN : 0) |
+ (this->button3down ? BUTTON3DOWN : 0) |
+ (this->ctrldown ? CTRLDOWN : 0) |
+ (this->shiftdown ? SHIFTDOWN : 0);
+
+ switch (combo) {
+ case 0:
+ if (curmode == NavigationStyle::SPINNING) { break; }
+ newmode = NavigationStyle::IDLE;
+ // The left mouse button has been released right now
+ if (this->lockButton1) {
+ this->lockButton1 = false;
+ if (curmode != NavigationStyle::SELECTION) {
+ processed = true;
+ }
+ }
+ break;
+ case BUTTON1DOWN:
+ case CTRLDOWN|BUTTON1DOWN:
+ // make sure not to change the selection when stopping spinning
+ if (curmode == NavigationStyle::SPINNING
+ || (this->lockButton1 && curmode != NavigationStyle::SELECTION)) {
+ newmode = NavigationStyle::IDLE;
+ }
+ else {
+ newmode = NavigationStyle::SELECTION;
+ }
+ break;
+ case SHIFTDOWN|BUTTON3DOWN:
+ newmode = NavigationStyle::ZOOMING;
+ break;
+ case BUTTON3DOWN:
+ if (newmode != NavigationStyle::DRAGGING) {
+ saveCursorPosition(ev);
+ }
+ newmode = NavigationStyle::DRAGGING;
+ break;
+ case CTRLDOWN|BUTTON3DOWN:
+ newmode = NavigationStyle::PANNING;
+ break;
+
+ default:
+ // Reset mode to IDLE when button 3 is released
+ // This stops the PANNING when button 3 is released but CTRL is still pressed
+ // This stops the ZOOMING when button 3 is released but SHIFT is still pressed
+ if ((curmode == NavigationStyle::PANNING || curmode == NavigationStyle::ZOOMING)
+ && !this->button3down) {
+ newmode = NavigationStyle::IDLE;
+ }
+ break;
+ }
+
+ // If the selection button is pressed together with another button
+ // and the other button is released, don't switch to selection mode.
+ // Process when selection button is pressed together with other buttons that could trigger different actions.
+ if (this->button1down && (this->button2down || this->button3down)) {
+ this->lockButton1 = true;
+ processed = true;
+ }
+
+ // Prevent interrupting rubber-band selection in sketcher
+ if (viewer->isEditing() && curmode == NavigationStyle::SELECTION && newmode != NavigationStyle::IDLE) {
+ newmode = NavigationStyle::SELECTION;
+ processed = false;
+ }
+
+ if (newmode != curmode) {
+ this->setViewingMode(newmode);
+ }
+
+ // If not handled in this class, pass on upwards in the inheritance
+ // hierarchy.
+ if (!processed)
+ processed = inherited::processSoEvent(ev);
+
+ return processed;
+}
diff --git a/src/Gui/SoFCDB.cpp b/src/Gui/SoFCDB.cpp
index 960270f208..da5bf7309c 100644
--- a/src/Gui/SoFCDB.cpp
+++ b/src/Gui/SoFCDB.cpp
@@ -189,6 +189,7 @@ void Gui::SoFCDB::init()
CADNavigationStyle ::init();
RevitNavigationStyle ::init();
BlenderNavigationStyle ::init();
+ SolidWorksNavigationStyle ::init();
MayaGestureNavigationStyle ::init();
TouchpadNavigationStyle ::init();
GestureNavigationStyle ::init();
diff --git a/src/Mod/TechDraw/Gui/CMakeLists.txt b/src/Mod/TechDraw/Gui/CMakeLists.txt
index 25b9dc116c..331a8789fc 100644
--- a/src/Mod/TechDraw/Gui/CMakeLists.txt
+++ b/src/Mod/TechDraw/Gui/CMakeLists.txt
@@ -366,6 +366,8 @@ SET(TechDrawGuiNav_SRCS
QGVNavStyleOpenSCAD.h
QGVNavStyleRevit.cpp
QGVNavStyleRevit.h
+ QGVNavStyleSolidWorks.cpp
+ QGVNavStyleSolidWorks.h
QGVNavStyleTinkerCAD.cpp
QGVNavStyleTinkerCAD.h
QGVNavStyleTouchpad.cpp
diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp
new file mode 100644
index 0000000000..ec7602e471
--- /dev/null
+++ b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp
@@ -0,0 +1,127 @@
+/***************************************************************************
+ * Copyright (c) 2022 Wanderer Fan *
+ * *
+ * 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_
+# include
+# include
+#endif
+
+#include "QGVNavStyleSolidWorks.h"
+#include "QGVPage.h"
+
+
+using namespace TechDrawGui;
+
+namespace TechDrawGui {
+
+QGVNavStyleSolidWorks::QGVNavStyleSolidWorks(QGVPage* qgvp) :
+ QGVNavStyle(qgvp)
+{
+}
+
+QGVNavStyleSolidWorks::~QGVNavStyleSolidWorks()
+{
+}
+
+void QGVNavStyleSolidWorks::handleKeyReleaseEvent(QKeyEvent *event)
+{
+ // zoom mode 2
+ if ((event->key() == Qt::Key_Shift) && zoomingActive) {
+ stopZoom();
+ event->accept();
+ }
+}
+
+void QGVNavStyleSolidWorks::handleMousePressEvent(QMouseEvent *event)
+{
+ Q_UNUSED(event)
+// Base::Console().Message("QGVNSSolidWorks::handleMousePressEvent() - button: %d buttons: %d\n", event->button(), event->buttons());
+}
+
+void QGVNavStyleSolidWorks::handleMouseMoveEvent(QMouseEvent *event)
+{
+
+ if (getViewer()->isBalloonPlacing()) {
+ balloonCursorMovement(event);
+ return;
+ }
+
+ if ((QGuiApplication::mouseButtons() & Qt::MiddleButton) &&
+ QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier) ) {
+ //zoom mode 2 Shift + MMB
+ if (zoomingActive) {
+ zoom(mouseZoomFactor(event->pos()));
+ } else {
+ startZoom(event->pos());
+ }
+ event->accept();
+ } else if ((QGuiApplication::mouseButtons() & Qt::MiddleButton) &&
+ QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier) ) {
+ // pan mode 1 - Ctrl + MMB
+ // I think this block may be unnecessary since pan mode 2 MMB also captures pan mode 1
+ // Ctrl + MMB, but I'll leave it in to make it clear that this is what's intended
+ // also nav style OCC has a similar block
+ if (panningActive) {
+ pan(event->pos());
+ } else {
+ startPan(event->pos());
+ }
+ event->accept();
+ } else if (QGuiApplication::mouseButtons() & Qt::MiddleButton) {
+ // pan mode 2 - MMB
+ if (panningActive) {
+ pan(event->pos());
+ } else {
+ startPan(event->pos());
+ }
+ event->accept();
+ }
+}
+
+void QGVNavStyleSolidWorks::handleMouseReleaseEvent(QMouseEvent *event)
+{
+// Base::Console().Message("QGVNSSolidWorks::handleMouseReleaseEvent() - button: %d buttons: %d\n", event->button(), event->buttons());
+ if (getViewer()->isBalloonPlacing()) {
+ placeBalloon(event->pos());
+ }
+
+ if (panningActive) {
+ if (event->button() == Qt::MiddleButton) {
+ //pan mode 1 or 2 - [Control] + MMB
+ //stop panning if MMB released
+ if (panningActive) {
+ stopPan();
+ event->accept();
+ }
+
+ //zoom mode 2 Shift + MMB
+ //stop zooming if MMB released
+ if (zoomingActive) {
+ stopZoom();
+ event->accept();
+ }
+ }
+ }
+}
+
+} // namespace TechDrawGui
diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.h b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.h
new file mode 100644
index 0000000000..9276590d88
--- /dev/null
+++ b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ * Copyright (c) 2022 Wanderer Fan *
+ * *
+ * 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 TECHDRAW_SOLIDWORKSNAVSTYLE_H
+#define TECHDRAW_SOLIDWORKSNAVSTYLE_H
+
+#include
+
+#include "QGVNavStyle.h"
+
+namespace TechDrawGui {
+
+class QGVPage;
+
+class TechDrawGuiExport QGVNavStyleSolidWorks : public QGVNavStyle
+{
+public:
+ explicit QGVNavStyleSolidWorks(QGVPage* qgvp);
+ ~QGVNavStyleSolidWorks() override;
+
+ void handleKeyReleaseEvent(QKeyEvent *event) override;
+ void handleMousePressEvent(QMouseEvent *event) override;
+ void handleMouseMoveEvent(QMouseEvent *event) override;
+ void handleMouseReleaseEvent(QMouseEvent *event) override;
+
+protected:
+private:
+
+};
+
+}
+#endif // TECHDRAW_SOLIDWORKSNAVSTYLE_H
diff --git a/src/Mod/TechDraw/Gui/QGVPage.cpp b/src/Mod/TechDraw/Gui/QGVPage.cpp
index 4931016d5b..9d6048efb9 100644
--- a/src/Mod/TechDraw/Gui/QGVPage.cpp
+++ b/src/Mod/TechDraw/Gui/QGVPage.cpp
@@ -59,6 +59,7 @@
#include "QGVNavStyleOCC.h"
#include "QGVNavStyleOpenSCAD.h"
#include "QGVNavStyleRevit.h"
+#include "QGVNavStyleSolidWorks.h"
#include "QGVNavStyleTinkerCAD.h"
#include "QGVNavStyleTouchpad.h"
#include "QGVPage.h"
@@ -246,6 +247,7 @@ void QGVPage::setNavigationStyle(std::string navParm)
std::size_t foundOCC = navParm.find("OpenCascade");
std::size_t foundOpenSCAD = navParm.find("OpenSCAD");
std::size_t foundRevit = navParm.find("Revit");
+ std::size_t foundSolidWorks = navParm.find("SolidWorks");
if (foundBlender != std::string::npos) {
m_navStyle = static_cast(new QGVNavStyleBlender(this));
@@ -277,6 +279,9 @@ void QGVPage::setNavigationStyle(std::string navParm)
else if (foundRevit != std::string::npos) {
m_navStyle = static_cast(new QGVNavStyleRevit(this));
}
+ else if (foundSolidWorks != std::string::npos) {
+ m_navStyle = static_cast(new QGVNavStyleSolidWorks(this));
+ }
else {
m_navStyle = new QGVNavStyle(this);
}
diff --git a/src/Mod/Tux/NavigationIndicatorGui.py b/src/Mod/Tux/NavigationIndicatorGui.py
index d9ed85323e..f2c8b8d81a 100644
--- a/src/Mod/Tux/NavigationIndicatorGui.py
+++ b/src/Mod/Tux/NavigationIndicatorGui.py
@@ -76,6 +76,7 @@ def RePopulateIcons():
a8.setIcon(QtGui.QIcon(":/icons/NavigationRevit_" + StyleSheetType + ".svg"))
a9.setIcon(QtGui.QIcon(":/icons/NavigationTinkerCAD_" + StyleSheetType + ".svg"))
a10.setIcon(QtGui.QIcon(":/icons/NavigationTouchpad_" + StyleSheetType + ".svg"))
+ a11.setIcon(QtGui.QIcon(":/icons/NavigationSolidWorks_" + StyleSheetType + ".svg"))
def retranslateUi():
@@ -566,6 +567,44 @@ def retranslateUi():
+ "
"
)
+ global t11
+ t11 = (
+ "SolidWorks "
+ + text06
+ + """
+
+
+ | """
+ + text01
+ + """ |
+ """
+ + text02
+ + """ |
+ """
+ + text02
+ + """ |
+ """
+ + text03
+ + """ |
+ """
+ + text04
+ + """ |
+
+
+  |
+  |
+  |
+  |
+  |
+
+
+ """
+ + text08
+ + ": "
+ + text10
+ + ""
+ )
+
menuSettings.setTitle(translate("NavigationIndicator", "Settings"))
menuOrbit.setTitle(translate("NavigationIndicator", "Orbit style"))
aCompact.setText(translate("NavigationIndicator", "Compact"))
@@ -670,6 +709,11 @@ a10.setText("Touchpad ")
a10.setData("Gui::TouchpadNavigationStyle")
a10.setObjectName("Indicator_NavigationTouchpad")
+a11 = QtGui.QAction(gStyle)
+a11.setText("SolidWorks ")
+a11.setData("Gui::SolidWorksNavigationStyle")
+a11.setObjectName("Indicator_NavigationSolidWorks")
+
RePopulateIcons()
menu.addMenu(menuSettings)
@@ -685,6 +729,7 @@ menu.addAction(a7)
menu.addAction(a8)
menu.addAction(a9)
menu.addAction(a10)
+menu.addAction(a11)
pView.Attach(indicator)
@@ -725,6 +770,7 @@ def onTooltip():
a8.setToolTip(t8)
a9.setToolTip(t9)
a10.setToolTip(t10)
+ a11.setToolTip(t11)
p.SetBool("Tooltip", 1)
else:
for i in gStyle.actions():
diff --git a/src/Mod/Tux/Resources/Tux.qrc b/src/Mod/Tux/Resources/Tux.qrc
index 9250e7596a..00e14efaae 100644
--- a/src/Mod/Tux/Resources/Tux.qrc
+++ b/src/Mod/Tux/Resources/Tux.qrc
@@ -47,6 +47,8 @@
icons/NavigationOpenSCAD_dark.svg
icons/NavigationRevit_light.svg
icons/NavigationRevit_dark.svg
+ icons/NavigationSolidWorks_light.svg
+ icons/NavigationSolidWorks_dark.svg
icons/NavigationTinkerCAD_light.svg
icons/NavigationTinkerCAD_dark.svg
icons/NavigationTouchpad_light.svg
diff --git a/src/Mod/Tux/Resources/icons/NavigationSolidWorks_dark.svg b/src/Mod/Tux/Resources/icons/NavigationSolidWorks_dark.svg
new file mode 100644
index 0000000000..d1379fe125
--- /dev/null
+++ b/src/Mod/Tux/Resources/icons/NavigationSolidWorks_dark.svg
@@ -0,0 +1,76 @@
+
+
+
+
diff --git a/src/Mod/Tux/Resources/icons/NavigationSolidWorks_light.svg b/src/Mod/Tux/Resources/icons/NavigationSolidWorks_light.svg
new file mode 100644
index 0000000000..d135f69f87
--- /dev/null
+++ b/src/Mod/Tux/Resources/icons/NavigationSolidWorks_light.svg
@@ -0,0 +1,72 @@
+
+
+
+