Salome HOME
Try to port quickly
[modules/paravis.git] / src / PVGUI / PVGUI_Module_actions.cxx
1 // PARAVIS : ParaView wrapper SALOME module
2 //
3 // Copyright (C) 2010-2016  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   // Output Window
347   anAction = new QAction(tr("MEN_OUTPUT_WINDOW"), this);
348   anAction->setToolTip(tr("TOP_OUTPUT_WINDOW"));
349   anAction->setStatusTip(tr("STB_OUTPUT_WINDOW"));
350   registerAction(OutputWindowId, anAction);
351   anAction << pqSetName("actionToolsOutputWindow");
352   connect(anAction, SIGNAL(triggered()), pqApplicationCore::instance(), SLOT(showOutputWindow()));
353   
354  // Python Shell
355   anAction = new QAction(tr("MEN_PYTHON_SHELL"), this);
356   anAction->setToolTip(tr("TOP_PYTHON_SHELL"));
357   anAction->setStatusTip(tr("STB_PYTHON_SHELL"));
358   registerAction(PythonShellId, anAction);
359   new pqPythonShellReaction(anAction << pqSetName("actionToolsPythonShell"));
360
361   //Show Trace
362   anAction = new QAction(tr("MEN_SHOW_TRACE"), this);
363   anAction->setToolTip(tr("TOP_SHOW_TRACE"));
364   anAction->setStatusTip(tr("STB_SHOW_TRACE"));
365   connect(anAction, SIGNAL(triggered()), this, SLOT(onShowTrace()));
366   registerAction(ShowTraceId, anAction);
367
368   //Restart Trace
369   anAction = new QAction(tr("MEN_RESTART_TRACE"), this);
370   anAction->setToolTip(tr("TOP_RESTART_TRACE"));
371   anAction->setStatusTip(tr("STB_RESTART_TRACE"));
372   connect(anAction, SIGNAL(triggered()), this, SLOT(onRestartTrace()));
373   registerAction(RestartTraceId, anAction);
374
375   // --- Menu "Help"
376
377   // About
378   anAction = new QAction(tr("MEN_ABOUT"), this);
379   anAction->setToolTip(tr("TOP_ABOUT"));
380   anAction->setStatusTip(tr("STB_ABOUT"));
381   registerAction(AboutParaViewId, anAction);
382   new pqAboutDialogReaction(anAction << pqSetName("actionAbout"));
383
384 #ifdef HAS_PV_DOC
385   // Native ParaView user documentation
386   aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_PARAVIEW_HELP"), false );
387   anAction = new QAction(tr("MEN_PARAVIEW_HELP"), this);
388   anAction->setToolTip(tr("TOP_PARAVIEW_HELP"));
389   anAction->setStatusTip(tr("STB_PARAVIEW_HELP"));
390   registerAction(ParaViewHelpId, anAction);
391   new pqHelpReaction(anAction);
392 #endif
393 }
394
395 /*!
396   \brief Create menus for ParaView GUI operations
397   duplicating menus in pqMainWindow ParaView class
398
399   In particular, ParaView is responsible for updating "Sources" and "Filters" menus. 
400   For this, specific menu managers created by pqMainWindowCore class are used, and PVGUI_Module
401   is responsible for creation of corresponding QMenu objects only.
402 */
403 void PVGUI_Module::pvCreateMenus()
404 {
405   SUIT_Desktop* desk = application()->desktop();
406   
407   // --- Menu "File"
408   int aPVMnu = createMenu( tr( "MEN_DESK_FILE" ), -1, -1 );
409
410   createMenu( OpenFileId, aPVMnu, 5 );
411
412   // Recent Files
413    myRecentMenuId = createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 );
414    QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId );
415    pqRecentFilesMenu* aRecentFilesMenu = new pqRecentFilesMenu( *aMenu, getApp()->desktop() );
416    QList<QAction*> anActns = aMenu->actions();
417    for (int i = 0; i < anActns.size(); ++i)
418      createMenu( anActns.at(i), myRecentMenuId );
419
420   createMenu( separator(), aPVMnu, -1, 5 );
421
422   createMenu( LoadStateId, aPVMnu, 15 );
423   createMenu( SaveStateId, aPVMnu, 15 );
424   createMenu( separator(), aPVMnu, -1, 15 );
425
426   createMenu( SaveDataId, aPVMnu, 25 );
427   createMenu( SaveScreenshotId, aPVMnu, 25 );
428   createMenu( ExportId, aPVMnu, 25 );
429   createMenu( separator(), aPVMnu, -1, 25 );
430
431   createMenu( SaveAnimationId, aPVMnu, 35 );
432   createMenu( SaveGeometryId, aPVMnu, 35 );
433   createMenu( separator(), aPVMnu, -1, 35 );
434
435   createMenu( ConnectId, aPVMnu, 45 );
436   createMenu( DisconnectId, aPVMnu, 45 );
437   createMenu( separator(), aPVMnu, -1, 45 );
438
439   // --- Menu "Edit"
440   aPVMnu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1 );
441
442   createMenu( UndoId, aPVMnu );
443   createMenu( RedoId, aPVMnu );
444   createMenu( separator(), aPVMnu );
445
446   createMenu( CameraUndoId, aPVMnu );
447   createMenu( CameraRedoId, aPVMnu );
448   createMenu( separator(), aPVMnu );
449
450   createMenu( FindDataId, aPVMnu );
451   createMenu( ChangeInputId, aPVMnu );
452   createMenu( IgnoreTimeId, aPVMnu );
453   createMenu( DeleteId, aPVMnu );
454   createMenu( DeleteAllId, aPVMnu );
455   createMenu( separator(), aPVMnu );
456
457   //createMenu( SettingsId, aPVMnu );
458   //createMenu( ViewSettingsId, aPVMnu );
459   createMenu( separator(), aPVMnu );
460
461   // --- Menu "View"
462   aPVMnu = createMenu( tr( "MEN_DESK_VIEW" ), -1, -1 );
463
464   createMenu( FullScreenId, aPVMnu );
465   
466   // --- Menu "Sources"
467   // Install ParaView managers for "Sources" menu
468   QMenu* aRes = 0;
469   PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk);
470   aRes = guiElements->getSourcesMenu();
471   mySourcesMenuId = createMenu( tr( "MEN_DESK_SOURCES" ), -1, -1, 60, -1, aRes);
472   
473   // --- Menu "Filters"
474   // Install ParaView managers for "Filters" menu
475   aRes = guiElements->getFiltersMenu();
476   myFiltersMenuId = createMenu( tr( "MEN_DESK_FILTERS" ), -1, -1, 70, -1, aRes);
477
478    // --- Menu "Macros"
479   aRes = guiElements->getMacrosMenu();
480   myMacrosMenuId = createMenu( tr( "MEN_MACROS" ), -1, -1, 80, -1, aRes);
481  
482   // --- Menu "Tools"
483   int aToolsMnu = createMenu( tr( "MEN_DESK_TOOLS" ), -1, -1, 90 );
484
485   createMenu( CreateCustomFilterId, aToolsMnu );
486   createMenu( AddCameraLinkId, aToolsMnu );
487   createMenu( separator(), aToolsMnu );
488   createMenu( ManageCustomFiltersId, aToolsMnu );
489   createMenu( ManageLinksId, aToolsMnu );
490   createMenu( ManagePluginsExtensionsId, aToolsMnu );
491   createMenu( separator(), aToolsMnu );
492
493   createMenu( RecordTestId, aToolsMnu );
494   createMenu( PlayTestId, aToolsMnu );
495   createMenu( MaxWindowSizeId, aToolsMnu );
496   createMenu( CustomWindowSizeId, aToolsMnu );
497   createMenu( separator(), aToolsMnu );
498
499   createMenu( TimerLogId, aToolsMnu );
500   createMenu( OutputWindowId, aToolsMnu );
501   createMenu( separator(), aToolsMnu );
502
503   createMenu( PythonShellId, aToolsMnu );
504   createMenu( separator(), aToolsMnu );
505   createMenu( ShowTraceId, aToolsMnu );
506   createMenu( RestartTraceId, aToolsMnu );
507
508   // --- Menu "Catalyst"
509   aRes = guiElements->getCatalystMenu();
510   myCatalystMenuId = createMenu( tr( "MEN_DESK_CATALYST" ), -1, -1, 100, -1, aRes);
511
512   // --- Menu "Help"
513
514   int aHelpMnu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1 );
515   int aUsersGuide = createMenu( tr( "User's Guide" ), aHelpMnu, -1 );
516   int aPVHelpMnu = createMenu( tr( "ParaViS module" ), aUsersGuide, -1, 5 );
517 #ifdef HAS_PV_DOC
518   createMenu( ParaViewHelpId,  aPVHelpMnu );
519   createMenu( separator(),     aPVHelpMnu );
520 #endif
521   createMenu( AboutParaViewId, aPVHelpMnu );
522
523   // -- Context menu in the pipeline browser
524   pqPipelineBrowserWidget * pq = guiElements->getPipelineBrowserWidget();
525   pqParaViewMenuBuilders::buildPipelineBrowserContextMenu( *(pq->contextMenu()) );
526 }
527
528 /*!
529   \brief Create toolbars for ParaView GUI operations
530   duplicating toolbars in pqMainWindow ParaView class
531 */
532 void PVGUI_Module::pvCreateToolBars()
533 {
534   SUIT_Desktop* desk = application()->desktop();
535 //  pqParaViewMenuBuilders::buildToolbars(*desk);
536   PVViewer_GUIElements * guiElements = PVViewer_GUIElements::GetInstance(desk);
537   guiElements->setToolBarVisible(true);
538 }