Salome HOME
Copyright update 2022
[modules/paravis.git] / src / PVGUI / PVGUI_Module_actions.cxx
1 // PARAVIS : ParaView wrapper SALOME module
2 //
3 // Copyright (C) 2010-2022  CEA/DEN, EDF R&D
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 //
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 //
21 // File   : PVGUI_Module_MenuActions.cxx
22 // Author : Margarita KARPUNINA
23 //
24
25 #include "PVGUI_Module.h"
26 #include <PVViewer_GUIElements.h>
27 #include <PVViewer_ViewManager.h>
28
29 #include <QtxAction.h>
30 #include <QtxActionMenuMgr.h>
31 #include <QtxActionToolMgr.h>
32 #include <SUIT_Desktop.h>
33 #include <SUIT_ResourceMgr.h>
34 #include <SUIT_Session.h>
35 #include <LightApp_Application.h>
36
37 #include <QAction>
38 #include <QMenu>
39 #include <QToolBar>
40 #include <QFile>
41
42 #include <pqApplicationCore.h>
43
44 #include <pqSaveStateReaction.h>
45 #include <pqLoadDataReaction.h>
46 #include <pqLoadStateReaction.h>
47 #include <pqSaveDataReaction.h>
48 #include <pqSaveScreenshotReaction.h>
49 #include <pqExportReaction.h>
50 #include <pqSaveAnimationReaction.h>
51 #include <pqSaveAnimationGeometryReaction.h>
52 #include <pqServerConnectReaction.h>
53 #include <pqServerDisconnectReaction.h>
54 #include <pqCameraUndoRedoReaction.h>
55 #include <pqUndoRedoReaction.h>
56 #include <pqDeleteReaction.h>
57 #include <pqChangePipelineInputReaction.h>
58 #include <pqApplicationSettingsReaction.h>
59 #include <pqIgnoreSourceTimeReaction.h>
60 #include <pqCreateCustomFilterReaction.h>
61 #include <pqManageLinksReaction.h>
62 #include <pqManagePluginsReaction.h>
63 #include <pqCameraLinkReaction.h>
64 #include <pqManageCustomFiltersReaction.h>
65 #include <pqTimerLogReaction.h>
66 #include <pqTestingReaction.h>
67 #include <pqAboutDialogReaction.h>
68 #include <pqHelpReaction.h>
69 #include <pqDataQueryReaction.h>
70 //#include <pqPythonShellReaction.h>
71
72 #include <pqViewManager.h>
73 #include <pqViewMenuManager.h>
74 #include <pqParaViewMenuBuilders.h>
75 #include <pqProxyGroupMenuManager.h>
76 #include <pqSetName.h>
77 #include <pqRecentFilesMenu.h>
78 #include <pqPipelineBrowserWidget.h>
79
80 /*!
81   \brief Create actions for ParaView GUI operations
82   duplicating menus and toolbars in MainWindow class of
83   the standard ParaView GUI client application.
84 */
85 void PVGUI_Module::pvCreateActions()
86 {
87   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
88
89   QPixmap aPixmap;
90   QAction* anAction;
91   
92   // --- Menu "File"
93
94   // Open File
95   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_OPEN_FILE"), false );
96   anAction = new QAction(QIcon(aPixmap), tr("MEN_OPEN_FILE"), this);
97   anAction->setToolTip(tr("TOP_OPEN_FILE"));
98   anAction->setStatusTip(tr("STB_OPEN_FILE"));
99   registerAction(OpenFileId, anAction);
100   new pqLoadDataReaction(anAction);
101   
102   // Load State
103   anAction = new QAction(tr("MEN_LOAD_STATE"), this);
104   anAction->setToolTip(tr("TOP_LOAD_STATE"));
105   anAction->setStatusTip(tr("STB_LOAD_STATE"));
106   registerAction(LoadStateId, anAction);
107   new pqLoadStateReaction(anAction);
108   
109   // Save State
110   anAction = new QAction(tr("MEN_SAVE_STATE"), this);
111   anAction->setToolTip(tr("TOP_SAVE_STATE"));
112   anAction->setStatusTip(tr("STB_SAVE_STATE"));
113   registerAction(SaveStateId, anAction);
114   new pqSaveStateReaction(anAction);
115
116   // Save Data
117   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SAVE_DATA"), false );
118   anAction = new QAction(QIcon(aPixmap), tr("MEN_SAVE_DATA"), this);
119   anAction->setToolTip(tr("TOP_SAVE_DATA"));
120   anAction->setStatusTip(tr("STB_SAVE_DATA"));
121   registerAction(SaveDataId, anAction);
122   new pqSaveDataReaction(anAction);
123
124   // Save Screenshot
125   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SAVE_SCREENSHOT"), false );
126   anAction = new QAction(QIcon(aPixmap), tr("MEN_SAVE_SCREENSHOT"), this);
127   anAction->setToolTip(tr("TOP_SAVE_SCREENSHOT"));
128   anAction->setStatusTip(tr("STB_SAVE_SCREENSHOT"));
129   registerAction(SaveScreenshotId, anAction);
130   new pqSaveScreenshotReaction(anAction);
131
132   // Export
133   anAction = new QAction(tr("MEN_EXPORT"), this);
134   anAction->setToolTip(tr("TOP_EXPORT"));
135   anAction->setStatusTip(tr("STB_EXPORT"));
136   registerAction(ExportId, anAction);
137   new pqExportReaction(anAction);
138
139   // Save Animation
140   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SAVE_ANIMATION"), false );
141   anAction = new QAction(QIcon(aPixmap), tr("MEN_SAVE_ANIMATION"), this);
142   anAction->setToolTip(tr("TOP_SAVE_ANIMATION"));
143   anAction->setStatusTip(tr("STB_SAVE_ANIMATION"));
144   registerAction(SaveAnimationId, anAction);
145   new pqSaveAnimationReaction(anAction);
146
147   // Save Geometry
148   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_SAVE_GEOMETRY"), false );
149   anAction = new QAction(QIcon(aPixmap), tr("MEN_SAVE_GEOMETRY"), this);
150   anAction->setToolTip(tr("TOP_SAVE_GEOMETRY"));
151   anAction->setStatusTip(tr("STB_SAVE_GEOMETRY"));
152   registerAction(SaveGeometryId, anAction);
153   new pqSaveAnimationGeometryReaction(anAction);
154
155   // Connect
156   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CONNECT"), false );
157   anAction = new QAction(QIcon(aPixmap), tr("MEN_CONNECT"), this);
158   anAction->setToolTip(tr("TOP_CONNECT"));
159   anAction->setStatusTip(tr("STB_CONNECT"));
160   registerAction(ConnectId, anAction);
161   new pqServerConnectReaction(anAction);
162
163   // Disconnect
164   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_DISCONNECT"), false );
165   anAction = new QAction(QIcon(aPixmap), tr("MEN_DISCONNECT"), this);
166   anAction->setToolTip(tr("TOP_DISCONNECT"));
167   anAction->setStatusTip(tr("STB_DISCONNECT"));
168   registerAction(DisconnectId, anAction);
169   new pqServerDisconnectReaction(anAction);
170
171   // --- Menu "Edit"
172
173   // Undo
174   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_UNDO"), false );
175   anAction = new QAction(QIcon(aPixmap), tr("MEN_UNDO"), this);
176   anAction->setToolTip(tr("TOP_UNDO"));
177   anAction->setStatusTip(tr("STB_UNDO"));
178   registerAction(UndoId, anAction);
179   new pqUndoRedoReaction(anAction, true);
180
181   // Redo
182   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_REDO"), false );
183   anAction = new QAction(QIcon(aPixmap), tr("MEN_REDO"), this);
184   anAction->setToolTip(tr("TOP_REDO"));
185   anAction->setStatusTip(tr("STB_REDO"));
186   registerAction(RedoId, anAction);
187   new pqUndoRedoReaction(anAction, false);
188
189   // Camera Undo
190   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CAMERA_UNDO"), false );
191   anAction = new QAction(QIcon(aPixmap), tr("MEN_CAMERA_UNDO"), this);
192   anAction->setToolTip(tr("TOP_CAMERA_UNDO"));
193   anAction->setStatusTip(tr("STB_CAMERA_UNDO"));
194   registerAction(CameraUndoId, anAction);
195   new pqCameraUndoRedoReaction(anAction, true);
196   
197   // Camera Redo
198   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CAMERA_REDO"), false );
199   anAction = new QAction(QIcon(aPixmap), tr("MEN_CAMERA_REDO"), this);
200   anAction->setToolTip(tr("TOP_CAMERA_REDO"));
201   anAction->setStatusTip(tr("STB_CAMERA_REDO"));
202   registerAction(CameraRedoId, anAction);
203   new pqCameraUndoRedoReaction(anAction, false);
204
205   // Find Data
206   anAction = new QAction(tr("MEN_FIND_DATA"), this);
207   anAction->setToolTip("");
208   anAction->setStatusTip("");
209   registerAction(FindDataId, anAction);
210   new pqDataQueryReaction(anAction);
211   
212   // Change Input
213   anAction = new QAction(tr("MEN_CHANGE_INPUT"), this);
214   anAction->setToolTip(tr("TOP_CHANGE_INPUT"));
215   anAction->setStatusTip(tr("STB_CHANGE_INPUT"));
216   registerAction(ChangeInputId, anAction);
217   new pqChangePipelineInputReaction(anAction);
218
219   // Ignore source time
220   anAction = new QAction(tr("MEN_IGNORE_TIME"), this);
221   anAction->setToolTip(tr("TOP_IGNORE_TIME"));
222   anAction->setStatusTip(tr("STB_IGNORE_TIME"));
223   anAction->setCheckable(true);
224   registerAction(IgnoreTimeId, anAction);
225   new pqIgnoreSourceTimeReaction(anAction);
226
227   // Delete
228   anAction = new QAction(tr("MEN_DELETE"), this);
229   anAction->setToolTip(tr("TOP_DELETE"));
230   anAction->setStatusTip(tr("STB_DELETE"));
231   registerAction(DeleteId, anAction);
232   new pqDeleteReaction(anAction);
233
234   // Delete All
235   anAction = new QAction(tr("MEN_DELETE_ALL"), this);
236   anAction->setToolTip(tr("TOP_DELETE_ALL"));
237   anAction->setStatusTip(tr("STB_DELETE_ALL"));
238   registerAction(DeleteAllId, anAction);
239   new pqDeleteReaction(anAction, true);
240
241
242   // Setting
243   /*anAction = new QAction(tr("MEN_SETTINGS"), this);
244   anAction->setToolTip(tr("TOP_SETTINGS"));
245   anAction->setStatusTip(tr("STB_SETTINGS"));
246   registerAction(SettingsId, anAction);
247   new pqApplicationSettingsReaction(anAction);*/
248   
249   // View Settings
250 //  anAction = new QAction(tr("MEN_VIEW_SETTINGS"), this);
251 //  anAction->setToolTip(tr("TOP_VIEW_SETTINGS"));
252 //  anAction->setStatusTip(tr("STB_VIEW_SETTINGS"));
253 //  registerAction(ViewSettingsId, anAction);
254 //  new pqViewSettingsReaction(anAction);
255
256   // --- Menu "View"
257   //pqViewManager* viewManager = qobject_cast<pqViewManager*>(
258   //                             pqApplicationCore::instance()->manager("MULTIVIEW_WIDGET"));
259
260   //rnv: Commented to implement issue 
261   //21318: EDF 1615 ALL: Display in full screen mode
262   //Switching to the "Full screen" mode added in the SALOME GUI module.
263   //if (viewManager) {
264   //anAction = new QAction("Full Screen", this);
265   //anAction->setObjectName("actionFullScreen");
266   //anAction->setShortcut(QKeySequence("F11"));
267   //connect(anAction, SIGNAL(triggered()), viewManager, SLOT(toggleFullScreen()));
268   //registerAction(FullScreenId, anAction);
269   //}
270
271   // --- Menu "Tools"
272   // Create Custom Filter
273   anAction = new QAction(tr("MEN_CREATE_CUSTOM_FILTER"), this);
274   anAction->setToolTip(tr("TOP_CREATE_CUSTOM_FILTER"));
275   anAction->setStatusTip(tr("STB_CREATE_CUSTOM_FILTER"));
276   registerAction(CreateCustomFilterId, anAction);
277   new pqCreateCustomFilterReaction(anAction << pqSetName("actionToolsCreateCustomFilter"));
278
279   // Manage Custom Filters
280   anAction = new QAction(tr("MEN_MANAGE_CUSTOM_FILTERS"), this);
281   anAction->setToolTip(tr("TOP_MANAGE_CUSTOM_FILTERS"));
282   anAction->setStatusTip(tr("STB_MANAGE_CUSTOM_FILTERS"));
283   registerAction(ManageCustomFiltersId, anAction);
284   new pqManageCustomFiltersReaction(anAction << pqSetName("actionToolsManageCustomFilters"));
285
286   // Manage Links
287   anAction = new QAction(tr("MEN_MANAGE_LINKS"), this);
288   anAction->setToolTip(tr("TOP_MANAGE_LINKS"));
289   anAction->setStatusTip(tr("STB_MANAGE_LINKS"));
290   registerAction(ManageLinksId, anAction);
291   new pqManageLinksReaction(anAction << pqSetName("actionToolsManageLinks"));
292
293   // Add Camera Link
294   anAction = new QAction(tr("MEN_ADD_CAMERA_LINK"), this);
295   anAction->setToolTip(tr("TOP_ADD_CAMERA_LINK"));
296   anAction->setStatusTip(tr("STB_ADD_CAMERA_LINK"));
297   registerAction(AddCameraLinkId, anAction);
298   new pqCameraLinkReaction(anAction << pqSetName("actionToolsAddCameraLink"));
299
300   // Manage Plugins/Extensions
301   anAction = new QAction(tr("MEN_MANAGE_PLUGINS"), this);
302   anAction->setToolTip(tr("TOP_MANAGE_PLUGINS"));
303   anAction->setStatusTip(tr("STB_MANAGE_PLUGINS"));
304   registerAction(ManagePluginsExtensionsId, anAction);
305   new pqManagePluginsReaction(anAction << pqSetName("actionManage_Plugins"));
306
307   // Record Test
308   anAction = new QAction(tr("MEN_RECORD_TEST"), this);
309   anAction->setToolTip(tr("TOP_RECORD_TEST"));
310   anAction->setStatusTip(tr("STB_RECORD_TEST"));
311   registerAction(RecordTestId, anAction);
312   new pqTestingReaction(anAction << pqSetName("actionToolsRecordTest"), pqTestingReaction::RECORD);
313
314   // Play Test
315   anAction = new QAction(tr("MEN_PLAY_TEST"), this);
316   anAction->setToolTip(tr("TOP_PLAY_TEST"));
317   anAction->setStatusTip(tr("STB_PLAY_TEST"));
318   registerAction(PlayTestId, anAction);
319   new pqTestingReaction(anAction << pqSetName("actionToolsPlayTest"), pqTestingReaction::PLAYBACK);
320
321   // Max Window Size
322   anAction = new QAction(tr("MEN_MAX_WINDOW_SIZE"), this);
323   anAction->setToolTip(tr("TOP_MAX_WINDOW_SIZE"));
324   anAction->setStatusTip(tr("PRP_APP_MAX_WINDOW_SIZE"));
325   anAction->setCheckable(true);
326   registerAction(MaxWindowSizeId, anAction);
327   new pqTestingReaction(anAction << pqSetName("actionTesting_Window_Size"),
328                         pqTestingReaction::LOCK_VIEW_SIZE);
329
330   // Custom Window Size
331   anAction = new QAction(tr("MEN_CUSTOM_WINDOW_SIZE"), this);
332   anAction->setToolTip(tr(""));
333   anAction->setStatusTip(tr(""));
334   anAction->setCheckable(true);
335   registerAction(CustomWindowSizeId, anAction);
336   new pqTestingReaction(anAction << pqSetName("actionTesting_Window_Size_Custom"),
337                         pqTestingReaction::LOCK_VIEW_SIZE_CUSTOM);
338
339   // Timer Log
340   anAction = new QAction(tr("MEN_TIMER_LOG"), this);
341   anAction->setToolTip(tr("TOP_TIMER_LOG"));
342   anAction->setStatusTip(tr("STB_TIMER_LOG"));
343   registerAction(TimerLogId, anAction);
344   new pqTimerLogReaction(anAction << pqSetName("actionToolsTimerLog"));
345
346   // Python Shell
347   // ???
348   // No more pqPythonShellReaction class, but there is a pqPythonShell class.
349   // Is that equivalent? I don't know what to do at this stage.
350   anAction = new QAction(tr("MEN_PYTHON_SHELL"), this);
351   anAction->setToolTip(tr("TOP_PYTHON_SHELL"));
352   anAction->setStatusTip(tr("STB_PYTHON_SHELL"));
353   registerAction(PythonShellId, anAction);
354   /*
355   new pqPythonShellReaction(anAction << pqSetName("actionToolsPythonShell"));
356   */
357
358   //Show Trace
359   anAction = new QAction(tr("MEN_SHOW_TRACE"), this);
360   anAction->setToolTip(tr("TOP_SHOW_TRACE"));
361   anAction->setStatusTip(tr("STB_SHOW_TRACE"));
362   connect(anAction, SIGNAL(triggered()), this, SLOT(onShowTrace()));
363   registerAction(ShowTraceId, anAction);
364
365   //Restart Trace
366   anAction = new QAction(tr("MEN_RESTART_TRACE"), this);
367   anAction->setToolTip(tr("TOP_RESTART_TRACE"));
368   anAction->setStatusTip(tr("STB_RESTART_TRACE"));
369   connect(anAction, SIGNAL(triggered()), this, SLOT(onRestartTrace()));
370   registerAction(RestartTraceId, anAction);
371
372   // --- Menu "Help"
373
374   // About
375   anAction = new QAction(tr("MEN_ABOUT"), this);
376   anAction->setToolTip(tr("TOP_ABOUT"));
377   anAction->setStatusTip(tr("STB_ABOUT"));
378   registerAction(AboutParaViewId, anAction);
379   new pqAboutDialogReaction(anAction << pqSetName("actionAbout"));
380
381 #ifdef HAS_PV_DOC
382   // Native ParaView user documentation
383   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PARAVIEW_HELP"), false );
384   anAction = new QAction(tr("MEN_PARAVIEW_HELP"), this);
385   anAction->setToolTip(tr("TOP_PARAVIEW_HELP"));
386   anAction->setStatusTip(tr("STB_PARAVIEW_HELP"));
387   registerAction(ParaViewHelpId, anAction);
388   new pqHelpReaction(anAction);
389 #endif
390 }
391
392 /*!
393   \brief Create menus for ParaView GUI operations
394   duplicating menus in pqMainWindow ParaView class
395
396   In particular, ParaView is responsible for updating "Sources" and "Filters" menus. 
397   For this, specific menu managers created by pqMainWindowCore class are used, and PVGUI_Module
398   is responsible for creation of corresponding QMenu objects only.
399 */
400 void PVGUI_Module::pvCreateMenus()
401 {
402   SUIT_Desktop* desk = application()->desktop();
403   
404   // --- Menu "File"
405   int aPVMnu = createMenu( tr( "MEN_DESK_FILE" ), -1, -1 );
406
407   createMenu( OpenFileId, aPVMnu, 5 );
408
409   // Recent Files
410    myRecentMenuId = createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 );
411    QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
412    /*pqRecentFilesMenu* aRecentFilesMenu = */new pqRecentFilesMenu( *aMenu, getApp()->desktop() );
413    QList<QAction*> anActns = aMenu->actions();
414    for (int i = 0; i < anActns.size(); ++i)
415      createMenu( anActns.at(i), myRecentMenuId );
416
417   createMenu( separator(), aPVMnu, -1, 5 );
418
419   createMenu( LoadStateId, aPVMnu, 15 );
420   createMenu( SaveStateId, aPVMnu, 15 );
421   createMenu( separator(), aPVMnu, -1, 15 );
422
423   createMenu( SaveDataId, aPVMnu, 25 );
424   createMenu( SaveScreenshotId, aPVMnu, 25 );
425   createMenu( ExportId, aPVMnu, 25 );
426   createMenu( separator(), aPVMnu, -1, 25 );
427
428   createMenu( SaveAnimationId, aPVMnu, 35 );
429   createMenu( SaveGeometryId, aPVMnu, 35 );
430   createMenu( separator(), aPVMnu, -1, 35 );
431
432   createMenu( ConnectId, aPVMnu, 45 );
433   createMenu( DisconnectId, aPVMnu, 45 );
434   createMenu( separator(), aPVMnu, -1, 45 );
435
436   // --- Menu "Edit"
437   aPVMnu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1 );
438
439   createMenu( UndoId, aPVMnu );
440   createMenu( RedoId, aPVMnu );
441   createMenu( separator(), aPVMnu );
442
443   createMenu( CameraUndoId, aPVMnu );
444   createMenu( CameraRedoId, aPVMnu );
445   createMenu( separator(), aPVMnu );
446
447   createMenu( FindDataId, aPVMnu );
448   createMenu( ChangeInputId, aPVMnu );
449   createMenu( IgnoreTimeId, aPVMnu );
450   createMenu( DeleteId, aPVMnu );
451   createMenu( DeleteAllId, aPVMnu );
452   createMenu( separator(), aPVMnu );
453
454   //createMenu( SettingsId, aPVMnu );
455   //createMenu( ViewSettingsId, aPVMnu );
456   createMenu( separator(), aPVMnu );
457
458   // --- Menu "View"
459   aPVMnu = createMenu( tr( "MEN_DESK_VIEW" ), -1, -1 );
460
461   createMenu( FullScreenId, aPVMnu );
462   
463   // --- Menu "Sources"
464   // Install ParaView managers for "Sources" menu
465   QMenu* aRes = 0;
466   PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk);
467   aRes = guiElements->getSourcesMenu();
468   mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60, -1, aRes);
469   
470   // --- Menu "Filters"
471   // Install ParaView managers for "Filters" menu
472   aRes = guiElements->getFiltersMenu();
473   myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70, -1, aRes);
474
475    // --- Menu "Macros"
476   aRes = guiElements->getMacrosMenu();
477   myMacrosMenuId = createMenu( tr( "MEN_MACROS" ), -1, -1, 80, -1, aRes);
478  
479   // --- Menu "Tools"
480   int aToolsMnu = createMenu( tr( "MEN_DESK_TOOLS" ), -1, -1, 90 );
481
482   createMenu( CreateCustomFilterId, aToolsMnu );
483   createMenu( AddCameraLinkId, aToolsMnu );
484   createMenu( separator(), aToolsMnu );
485   createMenu( ManageCustomFiltersId, aToolsMnu );
486   createMenu( ManageLinksId, aToolsMnu );
487   createMenu( ManagePluginsExtensionsId, aToolsMnu );
488   createMenu( separator(), aToolsMnu );
489
490   createMenu( RecordTestId, aToolsMnu );
491   createMenu( PlayTestId, aToolsMnu );
492   createMenu( MaxWindowSizeId, aToolsMnu );
493   createMenu( CustomWindowSizeId, aToolsMnu );
494   createMenu( separator(), aToolsMnu );
495
496   createMenu( TimerLogId, aToolsMnu );
497   createMenu( separator(), aToolsMnu );
498
499   createMenu( PythonShellId, aToolsMnu );
500   createMenu( separator(), aToolsMnu );
501   createMenu( ShowTraceId, aToolsMnu );
502   createMenu( RestartTraceId, aToolsMnu );
503
504   // --- Menu "Catalyst"
505   aRes = guiElements->getCatalystMenu();
506   myCatalystMenuId = createMenu( tr( "MEN_DESK_CATALYST" ), -1, -1, 100, -1, aRes);
507
508   // --- Menu "Help"
509
510   int aHelpMnu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1 );
511   int aUsersGuide = createMenu( tr( "User's Guide" ), aHelpMnu, -1 );
512   int aPVHelpMnu = createMenu( tr( "ParaViS module" ), aUsersGuide, -1, 5 );
513 #ifdef HAS_PV_DOC
514   createMenu( ParaViewHelpId,  aPVHelpMnu );
515   createMenu( separator(),     aPVHelpMnu );
516 #endif
517   createMenu( AboutParaViewId, aPVHelpMnu );
518
519   // -- Context menu in the pipeline browser
520   pqPipelineBrowserWidget * pq = guiElements->getPipelineBrowserWidget();
521   pqParaViewMenuBuilders::buildPipelineBrowserContextMenu( *(pq->contextMenu()) );
522 }
523
524 /*!
525   \brief Create toolbars for ParaView GUI operations
526   duplicating toolbars in pqMainWindow ParaView class
527 */
528 void PVGUI_Module::pvCreateToolBars()
529 {
530   SUIT_Desktop* desk = application()->desktop();
531 //  pqParaViewMenuBuilders::buildToolbars(*desk);
532   PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk);
533   guiElements->setToolBarVisible(true);
534 }