From 0af19353657003c6c4c8111192fbbee05cb1b3c3 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 7 Aug 2018 17:07:28 +0300 Subject: [PATCH] Connect Sketcher pictures to its pages --- doc/gui/SketchPlugin/arcFeature.rst | 21 +++++++++++ doc/gui/SketchPlugin/circleFeature.rst | 14 ++++++++ doc/gui/SketchPlugin/filletFeature.rst | 7 ++++ doc/gui/SketchPlugin/intersectionFeature.rst | 7 ++++ doc/gui/SketchPlugin/lineFeature.rst | 7 ++++ doc/gui/SketchPlugin/pointFeature.rst | 7 ++++ doc/gui/SketchPlugin/projectionFeature.rst | 7 ++++ doc/gui/SketchPlugin/splitFeature.rst | 7 ++++ doc/gui/SketchPlugin/trimFeature.rst | 7 ++++ src/XGUI/XGUI_Workshop.cpp | 37 +++++++++++--------- 10 files changed, 104 insertions(+), 17 deletions(-) diff --git a/doc/gui/SketchPlugin/arcFeature.rst b/doc/gui/SketchPlugin/arcFeature.rst index cbc880f69..a830d1874 100644 --- a/doc/gui/SketchPlugin/arcFeature.rst +++ b/doc/gui/SketchPlugin/arcFeature.rst @@ -1,3 +1,24 @@ Arc === + + +.. image:: images/Arc1.png + :align: center + +.. centered:: + Create arc by center and two points + + +.. image:: images/Arc2.png + :align: center + +.. centered:: + Create arc by three points + + +.. image:: images/Arc3.png + :align: center + +.. centered:: + Create arc as tangent to an edge diff --git a/doc/gui/SketchPlugin/circleFeature.rst b/doc/gui/SketchPlugin/circleFeature.rst index 3142b2a9b..d0dc3f9e5 100644 --- a/doc/gui/SketchPlugin/circleFeature.rst +++ b/doc/gui/SketchPlugin/circleFeature.rst @@ -1,3 +1,17 @@ Circle ====== + + +.. image:: images/Circle1.png + :align: center + +.. centered:: + Create circle by center and point + + +.. image:: images/Circle2.png + :align: center + +.. centered:: + Create circle by tree points diff --git a/doc/gui/SketchPlugin/filletFeature.rst b/doc/gui/SketchPlugin/filletFeature.rst index 879ce5953..ea7850060 100644 --- a/doc/gui/SketchPlugin/filletFeature.rst +++ b/doc/gui/SketchPlugin/filletFeature.rst @@ -1,3 +1,10 @@ Fillet ====== + + +.. image:: images/Fillet.png + :align: center + +.. centered:: + Create a fillet diff --git a/doc/gui/SketchPlugin/intersectionFeature.rst b/doc/gui/SketchPlugin/intersectionFeature.rst index d48c825a1..f0998acaf 100644 --- a/doc/gui/SketchPlugin/intersectionFeature.rst +++ b/doc/gui/SketchPlugin/intersectionFeature.rst @@ -1,3 +1,10 @@ Intersection ============ + + +.. image:: images/Intersection.png + :align: center + +.. centered:: + Create an intersection diff --git a/doc/gui/SketchPlugin/lineFeature.rst b/doc/gui/SketchPlugin/lineFeature.rst index d50a2f6c7..a18275976 100644 --- a/doc/gui/SketchPlugin/lineFeature.rst +++ b/doc/gui/SketchPlugin/lineFeature.rst @@ -1,3 +1,10 @@ Line ==== + + +.. image:: images/Line.png + :align: center + +.. centered:: + Create a line diff --git a/doc/gui/SketchPlugin/pointFeature.rst b/doc/gui/SketchPlugin/pointFeature.rst index 64f21b167..b344fcce0 100644 --- a/doc/gui/SketchPlugin/pointFeature.rst +++ b/doc/gui/SketchPlugin/pointFeature.rst @@ -1,3 +1,10 @@ Point ===== + + +.. image:: images/Point.png + :align: center + +.. centered:: + Create a point diff --git a/doc/gui/SketchPlugin/projectionFeature.rst b/doc/gui/SketchPlugin/projectionFeature.rst index babf39569..27f83721e 100644 --- a/doc/gui/SketchPlugin/projectionFeature.rst +++ b/doc/gui/SketchPlugin/projectionFeature.rst @@ -1,3 +1,10 @@ Projection ========== + + +.. image:: images/Projection.png + :align: center + +.. centered:: + Create a projection diff --git a/doc/gui/SketchPlugin/splitFeature.rst b/doc/gui/SketchPlugin/splitFeature.rst index ad36430f9..1f3beaf1e 100644 --- a/doc/gui/SketchPlugin/splitFeature.rst +++ b/doc/gui/SketchPlugin/splitFeature.rst @@ -1,3 +1,10 @@ Split ===== + + +.. image:: images/Split.png + :align: center + +.. centered:: + Split a line diff --git a/doc/gui/SketchPlugin/trimFeature.rst b/doc/gui/SketchPlugin/trimFeature.rst index 7c9c2ce35..8ed752135 100644 --- a/doc/gui/SketchPlugin/trimFeature.rst +++ b/doc/gui/SketchPlugin/trimFeature.rst @@ -1,3 +1,10 @@ Trim ==== + + +.. image:: images/Trim.png + :align: center + +.. centered:: + Trim a line diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index cd19f500a..7597000b9 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -568,30 +568,33 @@ void XGUI_Workshop::onHelpActionClicked() if (anOperationMgr) { ModuleBase_Operation* aOperation = anOperationMgr->currentOperation(); if (aOperation) { - QString aDocDir; - const QChar aSep = QDir::separator(); - QString platform; - SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); + QString aHelpPage = aOperation->helpFileName(); + if (!aHelpPage.isEmpty()) { + QString aDocDir; + const QChar aSep = QDir::separator(); + QString platform; + SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr(); #ifdef WIN32 - platform = "winapplication"; + platform = "winapplication"; #else - platform = "application"; + platform = "application"; #endif - QString aBrowserName = aResMgr->stringValue("ExternalBrowser", platform); + QString aBrowserName = aResMgr->stringValue("ExternalBrowser", platform); #ifdef HAVE_SALOME - QString aDir(getenv("SHAPER_ROOT_DIR")); - if (!aDir.isEmpty()) { - aDocDir = aDir + aSep + "share" + aSep + "doc" + aSep + - "salome" + aSep + "gui" + aSep + "SHAPER"; - } + QString aDir(getenv("SHAPER_ROOT_DIR")); + if (!aDir.isEmpty()) { + aDocDir = aDir + aSep + "share" + aSep + "doc" + aSep + + "salome" + aSep + "gui" + aSep + "SHAPER"; + } #else - QString aDir(getenv("OPENPARTS_ROOT_DIR")); - aDocDir = aDir + aSep + "doc"; + QString aDir(getenv("OPENPARTS_ROOT_DIR")); + aDocDir = aDir + aSep + "doc"; #endif - QStringList aParams; - aParams << aDocDir + aSep + aOperation->helpFileName(); - QProcess::startDetached(aBrowserName, aParams); + QStringList aParams; + aParams << aDocDir + aSep + aHelpPage; + QProcess::startDetached(aBrowserName, aParams); + } } } } -- 2.39.2