Salome HOME
bos #29864 Irrelevant assert in test.
[modules/yacs.git] / doc / gui_components.rst
1
2
3 YACS GUI components
4 ===================
5
6 .. _object_browser:
7
8 Object Browser
9 --------------
10 The Object Browser is a reusable SALOME GUI component. All schemas created or imported during working session will be referenced in it.
11
12 The SALOME Object Browser is only used to publish the run of the schema as a whole, i.e. just a name for the run, and under this name, the outputs of the run that are published in study for the use of other SALOME modules.
13
14
15 .. image:: images/objectBrowser.png
16   :align: center
17
18 .. centered::
19   **SALOME Object Browser tab**
20
21 The Object Browser is in a tab, with tree_view: see the :ref:`Main window <mainwindow>`.
22
23 .. _tree_view:
24
25 Tree View
26 ---------
27 YACS data structure is represented in a dedicated tree view using tree-like style.
28
29 The dedicated tree view shows only one schema during edition, and only one run of a schema during execution. The informations displayed during edition and execution are not the same, and the specific actions (popup menu) on the items in the tree are also different. So, it is needed to distinguish the :ref:`run_mode` and the :ref:`edition_mode`.
30
31 .. _edition_mode:
32
33 Edition mode of the Tree View
34 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 The proposed YACS tree view organization in edition mode is shown on figure below.
36
37
38
39 .. image:: images/tree_view_edition.png
40   :align: center
41
42
43
44 The content of schema tree view in edition mode is updated automatically after each operation that affects the list of objects displayed in it. Each object presented in the edition tree view has its own icon to distinguish types of objects (in particular, it is important for types of nodes or links).
45
46 With help of edition tree view user can interact with objects using context dependent popup menu (see :ref:`activate_context_popup_menu` section). For example, commands such as "Display", "Erase", "Delete", etc. are accessible from that menu.
47
48 The description of each object type is given in the table below.
49
50 .. |schema| image:: images/schema.png
51 .. |container| image:: images/container.png
52 .. |component| image:: images/component.png
53 .. |block| image:: images/block_node.png
54 .. |switch| image:: images/switch_node.png
55 .. |loop| image:: images/loop_node.png
56 .. |node| image:: images/node.png
57 .. |inport| image:: images/in_port.png
58 .. |outport| image:: images/out_port.png
59 .. |control| image:: images/control_link.png
60 .. |data| image:: images/data_link.png
61 .. |stream| image:: images/stream_link.png
62
63
64 ==================================== ======================================= =======================================================
65 **Object**                                     **Icon**                          **Description** 
66 ==================================== ======================================= =======================================================
67 Schema_Name [note_]                     |block|                                A schema object, which has the same name as a name of 
68                                                                                loaded XML file of a graph, or 
69                                                                                'Schema1', 'Schema2', etc. if this is a new 
70                                                                                created schema. The corresponding object is 
71                                                                                published as SObject in Object Browser for 
72                                                                                normal operation of SALOMEDS study persistence.
73                                                                                The study persistence consists in saving the xml file 
74                                                                                of the schema. 
75                                                                                The list of nodes included into the edited
76                                                                                schema is represented.
77
78 Types                                                                          A folder under which a list of data types 
79                                                                                defined in the schema is represented. 
80
81 Block_Name [note_]                      |block|                                A block node object. This object is published as a 
82                                                                                label under the schema/another composed node object 
83                                                                                in which it includes. A block node object is created 
84                                                                                when the corresponding schema object containing this 
85                                                                                block node is imported or a new block node is created 
86                                                                                inside this schema. 
87
88 Loop_Name [note_]                       |loop|                                 A loop node object. This object is published as a label 
89                                                                                under the schema/another composed node object in which it 
90                                                                                includes. A loop node object is created when the 
91                                                                                corresponding schema object containing this loop node is 
92                                                                                imported or a new loop node is created inside this schema. 
93
94 Switch_Name [note_]                     |switch|                               A switch node object. This object is published as a label 
95                                                                                under the schema/another composed node object in which it 
96                                                                                includes. A switch node object is created when the 
97                                                                                corresponding schema object containing this switch node 
98                                                                                is imported or a new switch node is created inside 
99                                                                                this schema. 
100
101 Node_Name [note_]                       |node|                                 An elementary node object. This object is published as a 
102                                                                                label under the schema or composed node object in which 
103                                                                                it includes. An elementary node object is created when 
104                                                                                the corresponding schema object containing this node is 
105                                                                                imported or a new elementary node is created inside 
106                                                                                this schema. 
107
108 Input_Port_Name                         |inport|                               An input port object. It is published in the edition tree 
109                                                                                view under the node which is belong to. 
110
111 Output_Port_Name                        |outport|                              An output port object. It is published in the edition tree 
112                                                                                view under the node which is belong to. 
113 ==================================== ======================================= =======================================================
114
115 .. _description_of_link_objects:
116
117 Links, containers and components table.
118
119 ======================================= ======================================= ==============================================================================
120 **Object**                                       **Icon**                                **Description** 
121 ======================================= ======================================= ==============================================================================
122 Links                                                                            A folder under which links are published. Links internal to a 
123                                                                                  block (composed node) are represented under the block. Three kinds 
124                                                                                  of links (control, dataflow, datastream) can be put directly into 
125                                                                                  the 'Links' folder under the block if they exist. 
126                                                                                  **NB!** A link is called internal to a block if it has its input and 
127                                                                                  output on nodes inside the block. These concept and representation 
128                                                                                  is convenient for cut and paste operations of block. 
129
130 Node_From -->> Node_To                      |control|                            A control link object with a symbolic name. This object is published as 
131                                                                                  a label under the corresponding 'Links' folder. 
132
133 Node.Port_From -> Node.Port_To              |data|                               A data link object with a symbolic name. This object is published as 
134                                                                                  a label under the corresponding 'Links' folder. 
135
136 Node.Port_From -> Node.Port_To              |stream|                             A datastream link object with a symbolic name. This object is published as 
137                                                                                  a label under the corresponding 'Links' folder. 
138
139 Containers                                                                       A folder under which a set of containers referenced from the currently 
140                                                                                  edited schema is represented. 
141
142 Container_Name [note_]                      |container|                          A container definition (not instanciated during the edition). This object 
143                                                                                  is published as a label under Containers parent object, and gives access 
144                                                                                  by the corresponding property page to its properties (cf. SALOME life 
145                                                                                  cycle CORBA & Container manager). 
146
147 SALOME_Component_Name [note_]               |component|                          A SALOME component instance definition (not instanciated during the edition). 
148                                                                                  This object is published as a label under the container definition in which 
149                                                                                  it includes. 
150
151 \*Node_Name                                                                      A reference to the service node published above. This object is published 
152                                                                                  under the component object from which its service is taken.
153 ======================================= ======================================= ==============================================================================
154
155 .. _note:
156
157 .. note::
158   The selection of an object in the Tree View displays its properties in the corresponding page of the Input Panel.
159
160
161 .. _run_mode:
162
163 Run mode of the Tree View
164 ~~~~~~~~~~~~~~~~~~~~~~~~~
165
166
167 .. image:: images/tree_view_1.png
168   :align: center
169
170
171
172 The run tree view shows the nodes and their hierarchy in the schema (same as in edition mode). Only the nodes are shown, with their current state of execution. The current execution state is updated by notification from execution engine.
173
174 There are three modes which are available in the run mode of the schema. They are the following.
175
176
177
178
179 #. **Without stop mode.** This is the simplest mode when the user don't influence on the execution flow of the schema.
180
181
182 #. **Breakpoints mode.** Before/during the execution of the schema it is possible to set breakpoints using checkboxes, but only on elementary nodes. In such a case the execution will be paused when checked node(s) will be ready to start.
183
184
185 #. **Step by step mode.** The execution of the schema is processed by steps, from one node to another, and paused after each subtask.
186
187
188
189
190 .. _viewer:
191
192
193 2D Viewer
194 ---------
195 The user can display a presentation of the schema in the 2D Viewer based on the Qt drawing capabilities. The high-level 2D Viewer classes from SALOME GUI QxGraph package are used for this purpose. QxGraph classes also support interactive selection/hilighting in 2D View with the mouse.
196
197
198
199 .. image:: images/2d_viewer_0.png
200   :align: center
201
202 .. centered::
203   **2D Viewer**
204
205
206 .. _view_operations_toolbar:
207
208 The 2D Viewer has its own View Operations toolbar, which contains buttons for the following operations:
209
210
211
212
213 + Fit All,
214
215
216 + Fit Area,
217
218
219 + Zoom,
220
221
222 + Panning,
223
224
225 + Global Panning,
226
227
228 + Reset.
229
230
231 .. _input_panel:
232
233 Input Panel
234 -----------
235 The properties of each object type, such as container, component, schema, node and link, are displayed within the Input Panel placed in the right part of the desktop.
236
237 The Input Panel is a dock window and consists of the several property pages. Each property page allows seeing or modifying the properties of the object with the certain type (see :ref:`edit_object` section). The user can see property pages of the several types of objects at the same time (for example, property page for a service node and for a container).
238 The selection of an object either in the Tree View or 2D Viewer will display its property page in the Input Panel.
239
240 The content of Input Panels' property pages in edition mode of the schema is differ from the same one in run mode. There are more possibilities to edit objects' properties with help of Input Panel in edition mode than in run mode.
241
242 As an example, there are two property pages for inline script node on the pictures below: the first corresponds to the edition mode, and the second - to the run mode.
243
244
245
246 .. image:: images/input_panel_0.png
247   :align: center
248
249
250 .. centered::
251   **Node property page in edition mode**
252
253
254
255
256 .. image:: images/input_panel_1.png
257   :align: center
258
259
260 .. centered::
261   **Node property page in run mode**
262
263
264
265 .. _catalogs_tree_view:
266
267 Catalogs Tree View
268 ------------------
269 The Catalog tree give acces to data types and node types from several catalogs. By default, the Builtin Catalog, the Session Catalog and the
270 Preference Catalog are available. Builtin Catalog provides standard data types, standard elementary node types and all the Composed Nodes types.
271 Session Catalog is built with all the Module Catalogs defined in the current SALOME Session. Preference Catalog is defined in the preferences.
272 Any existing YACS schema file can be imported as a catalog, to allow reutilization of data types or component definition. 
273
274
275 .. image:: images/catalogs.png
276   :align: center
277
278
279 .. centered::
280   **Catalog Tree View**
281