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