From: vsv Date: Wed, 7 Nov 2018 15:26:53 +0000 (+0300) Subject: Issue #2736: Provide help for toolbars management X-Git-Tag: Jan2019~38^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=855824084e9997c80a179bbb3c273666a9501544;p=modules%2Fshaper.git Issue #2736: Provide help for toolbars management --- diff --git a/doc/gui/Introduction.rst b/doc/gui/Introduction.rst index f1163d65a..88447fc54 100644 --- a/doc/gui/Introduction.rst +++ b/doc/gui/Introduction.rst @@ -600,3 +600,65 @@ Viewer tab defines selection in OCC 3D viewer properties. - **Vertex** defines selection sensitivity for vertices; - **Edge** defines selection sensitivity for edges. + + +.. _toolbars_management: + +Toolbars management +------------------- + +There is a possibility to modify default toolbars structure. + +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: + +#. **Toolbars** provides possibility to create a new toolbar or delete an existing. +#. **Edit toolbar** provides possibility to edit content of a toolbar. + +.. _toolbars_dialog: + +**Toolbars** dialog box +^^^^^^^^^^^^^^^^^^^^^^^ + +The dialog box looks like following: + +.. image:: images/Toolbars.png + :align: center + +.. centered:: + **Toolbars** diaqlog box + +In this dialog box there are following controls: + +- **Toolbars** is a window with a list of toolbars names. Number of commands in each tool bar is shown in brackets. +- **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. +- **Edit** a button which calls **Edit toolbar** dialog box for currently selected tool bar. +- **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. +- **Reset** a button to reset modified tool bars structure to default one. +- **Ok** button to close the dialog box, store result of tool bars editing and update tool bars of the module. +- **Cancel** closes the dialog box without modification of tool bars. + +.. _edit_toolbar: + +**Edit toolbar** dialog box +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The dialog box like following: + +.. image:: images/EditToolbar.png + :align: center + +.. centered:: + **Edit toolbar** diaqlog box + +In this dialog box there are following controls: + +- **Toolbar name** a non-editable field which displays a name of current tool bar. +- **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 "------". +- 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. +- Left arrow button removes currently selected item from right window and appends it to left window. +- **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. +- Buttons **Up** and **Down** to change position of a selected command in right window. +- **Ok** button to close the dialog box, store result of editing. +- **Cancel** closes the dialog box without modification of tool bar content. + + diff --git a/doc/gui/images/EditToolbar.png b/doc/gui/images/EditToolbar.png new file mode 100644 index 000000000..72a45c653 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 index 000000000..032e6bc9c Binary files /dev/null and b/doc/gui/images/Toolbars.png differ diff --git a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp index e390a4c36..5e5238eeb 100644 --- a/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp +++ b/src/SHAPERGUI/SHAPERGUI_ToolbarsMgr.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -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"); }