Salome HOME
Issue #2736: Provide help for toolbars management
authorvsv <vsv@opencascade.com>
Wed, 7 Nov 2018 15:26:53 +0000 (18:26 +0300)
committervsv <vsv@opencascade.com>
Wed, 7 Nov 2018 15:26:53 +0000 (18:26 +0300)
doc/gui/Introduction.rst
doc/gui/images/EditToolbar.png [new file with mode: 0644]
doc/gui/images/Toolbars.png [new file with mode: 0644]
src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp

index f1163d65a6c50a4f440eab12f9fe2b15ee3bce82..88447fc543d7574a8ff43332f06fa92cfe47dab5 100644 (file)
@@ -600,3 +600,65 @@ Viewer tab defines selection in OCC 3D viewer properties.
 \r
   - **Vertex** defines selection  sensitivity for vertices; \r
   - **Edge**  defines selection  sensitivity for edges.  \r
+\r
+\r
+.. _toolbars_management:\r
+\r
+Toolbars management\r
+-------------------\r
+\r
+There is a possibility to modify default toolbars structure.\r
+\r
+To edit the current tool bars structure select in the Main Menu *Edit - > Edit toolbars* item. Editing of tool bars can be done with help of two following dialog boxes:\r
+\r
+#. **Toolbars** provides possibility to create a new toolbar or delete an existing.\r
+#. **Edit toolbar** provides possibility to edit content of a toolbar.\r
+\r
+.. _toolbars_dialog:\r
+\r
+**Toolbars** dialog box\r
+^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+The dialog box looks like following:\r
+\r
+.. image:: images/Toolbars.png\r
+   :align: center\r
+\r
+.. centered::\r
+   **Toolbars** diaqlog box\r
+\r
+In this dialog box there are following controls:\r
+\r
+- **Toolbars** is a window with a list of toolbars names. Number of commands in each tool bar is shown in brackets.\r
+- **Add** a button for creation of a new toolbar. When this button is pressed then a small dialog box with a text input field will uppear. In this diaog box user has to input a name of the new tool bar. The name of tool bar has to be unique. If user defines a not unique name then a warning will be shown.\r
+- **Edit** a button which calls **Edit toolbar** dialog box for currently selected tool bar.\r
+- **Delete** a button to delete currently selected tool bar. If user presses this button then he will have to confirm deletion of the selected toolbar.\r
+- **Reset** a button to reset modified tool bars structure to default one.\r
+- **Ok** button to close the dialog box, store result of tool bars editing and update tool bars of the module.\r
+- **Cancel** closes the dialog box without modification of tool bars.\r
+\r
+.. _edit_toolbar:\r
+\r
+**Edit toolbar** dialog box\r
+^^^^^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+The dialog box like following:\r
+\r
+.. image:: images/EditToolbar.png\r
+   :align: center\r
+\r
+.. centered::\r
+   **Edit toolbar** diaqlog box\r
+\r
+In this dialog box there are following controls:\r
+\r
+- **Toolbar name** a non-editable field which displays a name of current tool bar.\r
+- **Out of toolbars** a left window with a list of commands which are out of any tool bar. Also this list contains an item for separator definition "------".\r
+- Right arrow button transfers currently selected item from left window to right one. If right window contains a selected item then new item will be placed before the selectged one. If there is no selected item in right window then new item will be added at the end of items list. In order to clear current selection in right window it is necessary to click in empty space or click by right button of the window.\r
+- Left arrow button removes currently selected item from right window and appends it to left window.\r
+- **In the toolbar** a right window with a list of commands which are defined in the current tool bar. Items in this window are listed according to order of commands in the toolbar.\r
+- Buttons **Up** and **Down** to change position of a selected command in right window.\r
+- **Ok** button to close the dialog box, store result of editing.\r
+- **Cancel** closes the dialog box without modification of tool bar content.\r
+\r
+\r
diff --git a/doc/gui/images/EditToolbar.png b/doc/gui/images/EditToolbar.png
new file mode 100644 (file)
index 0000000..72a45c6
Binary files /dev/null and b/doc/gui/images/EditToolbar.png differ
diff --git a/doc/gui/images/Toolbars.png b/doc/gui/images/Toolbars.png
new file mode 100644 (file)
index 0000000..032e6bc
Binary files /dev/null and b/doc/gui/images/Toolbars.png differ
index e390a4c366bfff536b443b8810513720ccf1c7f2..5e5238eeb3ab79567cb25bc1caec23ff0bafd765 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <CAM_Application.h>
 #include <SUIT_Desktop.h>
+#include <SUIT_Session.h>
 #include <QtxActionToolMgr.h>
 
 #include <QLayout>
@@ -248,7 +249,9 @@ void SHAPERGUI_ToolbarsDlg::onReset()
 
 void SHAPERGUI_ToolbarsDlg::onHelp()
 {
-
+  SUIT_Application* app = SUIT_Session::session()->activeApplication();
+  if (app)
+    app->onHelpContextModule("SHAPER", "Introduction.html", "toolbars_dialog");
 }
 
 
@@ -469,5 +472,7 @@ QIntList SHAPERGUI_ToolbarItemsDlg::getItems(QListWidget* theWidget, int theStar
 
 void SHAPERGUI_ToolbarItemsDlg::onHelp()
 {
-
+  SUIT_Application* app = SUIT_Session::session()->activeApplication();
+  if (app)
+    app->onHelpContextModule("SHAPER", "Introduction.html", "edit_toolbar");
 }