]> SALOME platform Git repositories - modules/yacs.git/blob - doc/gui_components.rst
Salome HOME
mergefrom branch BR_V511_PR tag mergeto_trunk_03feb09
[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 To see an example of the Object Browser data structure refer to the :ref:`mainwindow`.
15
16 .. _tree_view:
17
18 Tree View
19 ---------
20 YACS data structure is represented in a dedicated tree view using tree-like style.
21
22 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`.
23
24 .. _edition_mode:
25
26 Edition mode of the Tree View
27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 The proposed YACS tree view organization in edition mode is shown on figure below.
29
30
31
32 .. image:: images/tree_view_0.jpg
33   :align: center
34   :width: 40ex
35
36
37
38 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).
39
40 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.
41
42 The description of each object type is given in the table below.
43
44 .. |schema| image:: images/schema.png
45 .. |container| image:: images/container.png
46 .. |component| image:: images/component.png
47 .. |block| image:: images/block_node.png
48 .. |switch| image:: images/switch_node.png
49 .. |loop| image:: images/loop_node.png
50 .. |node| image:: images/node.png
51 .. |inport| image:: images/in_port.png
52 .. |outport| image:: images/out_port.png
53 .. |control| image:: images/control_link.png
54 .. |data| image:: images/data_link.png
55 .. |stream| image:: images/stream_link.png
56
57
58 ============================================================= ======================================= =====================================
59 **Object**                                                              **Icon**                          **Description** 
60 ============================================================= ======================================= =====================================
61 Schema_Name [note_]                                             |schema|                               A schema object, which has the same name as a name of loaded XML file of a graph, or 'Schema1', 'Schema2', etc. if this is a new created schema. The corresponding object is published as SObject in Object Browser for normal operation of SALOMEDS study persistence. The study persistence consists in saving the xml file of the schema. 
62
63 Data Types                                                                                             A folder under which a list of data types defined in the schema is represented. 
64 Simple                                                                                                 A folder under which simple data types (Double, Int, String, Bool) are published. 
65 Objref                                                                                                 A folder under which object reference data types are published. Objref data type is a predefined YACS data type for reference objects. It is obtained from a Catalog of Data Types. 
66 Sequence                                                                                               A folder under which sequence data types are published. Sequence data type is a predefined YACS data type for sequence objects. 
67 Array                                                                                                  A folder under which array data types are published. Array data type is a predefined YACS data type for array objects. 
68 Struct                                                                                                 A folder under which struct data types are published. Struct data type is a predefined YACS data type for struct objects. 
69 Nodes                                                                                                  A folder under which a list of nodes included into the edited schema is represented.
70
71 Block_Name [note_]                                               |block|                               A block node object. This object is published as a label under the schema/another composed node object in which it includes. A block node object is created when the corresponding schema object containing this block node is imported or a new block node is created inside this schema. 
72
73 Loop_Name [note_]                                                |loop|                                A loop node object. This object is published as a label under the schema/another composed node object in which it includes. A loop node object is created when the corresponding schema object containing this loop node is imported or a new loop node is created inside this schema. 
74 Switch_Name [note_]                                              |switch|                              A switch node object. This object is published as a label under the schema/another composed node object in which it includes. A switch node object is created when the corresponding schema object containing this switch node is imported or a new switch node is created inside this schema. 
75 Node_Name [note_]                                                |node|                                An elementary node object. This object is published as a label under the schema or composed node object in which it includes. An elementary node object is created when the corresponding schema object containing this node is imported or a new elementary node is created inside this schema. 
76 Input_Port_Name                                                  |inport|                              An input port object. It is published in the edition tree view under the node which is belong to. 
77 Output_Port_Name                                                 |outport|                             An output port object. It is published in the edition tree view under the node which is belong to. 
78 ============================================================= ======================================= =====================================
79
80 .. _description_of_link_objects:
81
82 Links, containers and components table.
83
84 ============================================================= ======================================= =====================================
85 **Object**                                                              **Icon**                          **Description** 
86 ============================================================= ======================================= =====================================
87 Links                                                                                                  A folder under which links are published. Links internal to a block (composed node) are represented under the block. Three kinds of links (control, dataflow, datastream) can be put directly into the 'Links' folder under the block if they exist. **NB!** A link is called internal to a block if it has its input and output on nodes inside the block. These concept and representation is convenient for cut and paste operations of block. 
88 Node_From_Name --> Node_To_Name                                  |control|                             A control link object with a symbolic name. This object is published as a label under the corresponding 'Links' folder. 
89 Node_From_Name.Port_From_Name --> Node_To_Name.Port_To_Name      |data|                                A data link object with a symbolic name. This object is published as a label under the corresponding 'Links' folder. 
90 Node_From_Name.Port_From_Name --> Node_To_Name.Port_To_Name      |stream|                              A datastream link object with a symbolic name. This object is published as a label under the corresponding 'Links' folder. 
91 Containers                                                                                             A folder under which a set of containers referenced from the currently edited schema is represented. 
92 Container_Name [note_]                                           |container|                           A container definition (not instanciated during the edition). This object is published as a label under Containers parent object, and gives acces by the corresponding property page to its properties (cf. SALOME life cycle CORBA & Container manager). 
93 SALOME_Component_Name [note_]                                    |component|                           A SALOME component instance definition (not instanciated during the edition). This object is published as a label under the container definition in which it includes. 
94 CORBA_Component_Name [note_]                                     |component|                           A CORBA component object, which has the same name as a name of created component. This object is published as a label under the 'Containers' folder directly. 
95 \*Node_Name                                                                                            A reference to the service node published above. This object is published under the component object from which its service is taken.
96 ============================================================= ======================================= =====================================
97
98 .. _note:
99
100 .. note::
101   The selection of an object in the Tree View displays its properties in the corresponding page of the Input Panel.
102
103
104 .. _run_mode:
105
106 Run mode of the Tree View
107 ~~~~~~~~~~~~~~~~~~~~~~~~~
108
109
110 .. image:: images/tree_view_1.jpg
111   :align: center
112   :width: 40ex
113
114
115
116 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.
117
118 There are three modes which are available in the run mode of the schema. They are the following.
119
120
121
122
123 #. **Without stop mode.** This is the simplest mode when the user don't influence on the execution flow of the schema.
124
125
126 #. **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.
127
128
129 #. **Step by step mode.** The execution of the schema is processed by steps, from one node to another, and paused after each subtask.
130
131
132
133
134 .. _viewer:
135
136 2D Viewer
137 ---------
138 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, however selection capabilities will not be used in YACS GUI for SALOME 4.1.
139
140
141
142 .. image:: images/2d_viewer_0.jpg
143   :align: center
144
145
146
147 .. _view_operations_toolbar:
148
149 The 2D Viewer has its own View Operations toolbar, which contains buttons for the following operations:
150
151
152
153
154 + Fit All,
155
156
157 + Fit Area,
158
159
160 + Zoom,
161
162
163 + Panning,
164
165
166 + Global Panning,
167
168
169 + Reset.
170
171
172 .. _input_panel:
173
174 Input Panel
175 -----------
176 The properties of each object type, such as container, component, schema, node and link (for the future version!), are displayed within the Input Panel placed in the right part of the desktop.
177
178 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).
179 The selection of an object either in the Tree View or 2D Viewer will display its property page in the Input Panel.
180
181 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.
182
183 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.
184
185
186
187 .. image:: images/input_panel_0.jpg
188   :align: center
189   :width: 47ex
190
191
192 .. centered::
193   **Node property page in edition mode**
194
195
196
197
198 .. image:: images/input_panel_1.jpg
199   :align: center
200   :width: 47ex
201
202
203 .. centered::
204   **Node property page in run mode**
205
206
207 Python Console
208 --------------
209 The Python Console permits the user to invoke some YACS functionality from Python, for example, import XML graph with old format (SALOME Supervisor) from Python Console. Example of usage:
210
211
212
213 .. image:: images/python_console_0.jpg
214   :align: center
215
216
217
218
219 Log Window
220 ----------
221 The Log Window permits the user to follow the execution process of the schema. The YACS engine console output, including error messages, is redirected to the Log Window.
222
223
224
225 .. image:: images/log_window_0.jpg
226   :align: center
227
228