X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPVGUI%2FPVGUI_Module_actions.cxx;h=175d1e82fb1600954f2ddd3dc1acbb3a8628f48d;hb=527dca69e6df8aac1191bf0a34fa1c7d5a60a5fd;hp=9a9eac4655a2548d553164cc35f95ce928ae6a92;hpb=87c60830827b4017db01414c8f48a58382278aed;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_Module_actions.cxx b/src/PVGUI/PVGUI_Module_actions.cxx index 9a9eac46..175d1e82 100644 --- a/src/PVGUI/PVGUI_Module_actions.cxx +++ b/src/PVGUI/PVGUI_Module_actions.cxx @@ -1,6 +1,6 @@ // PARAVIS : ParaView wrapper SALOME module // -// Copyright (C) 2010-2016 CEA/DEN, EDF R&D +// Copyright (C) 2010-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ #include #include #include -#include +//#include #include #include @@ -152,6 +153,14 @@ void PVGUI_Module::pvCreateActions() registerAction(SaveGeometryId, anAction); new pqSaveAnimationGeometryReaction(anAction); + // Load Path Tracer Materials + aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_LOAD_MATERIAL"), false ); + anAction = new QAction(QIcon(aPixmap), tr("MEN_LOAD_MATERIAL"), this); + anAction->setToolTip(tr("TOP_LOAD_MATERIAL")); + anAction->setStatusTip(tr("STB_LOAD_MATERIAL")); + registerAction(LoadMaterialsId, anAction); + new pqLoadMaterialsReaction(anAction); + // Connect aPixmap = resMgr->loadPixmap( "ParaView", tr("ICON_CONNECT"), false ); anAction = new QAction(QIcon(aPixmap), tr("MEN_CONNECT"), this); @@ -236,7 +245,7 @@ void PVGUI_Module::pvCreateActions() anAction->setToolTip(tr("TOP_DELETE_ALL")); anAction->setStatusTip(tr("STB_DELETE_ALL")); registerAction(DeleteAllId, anAction); - new pqDeleteReaction(anAction, true); + new pqDeleteReaction(anAction, pqDeleteReaction::DeleteModes::ALL); // Setting @@ -343,20 +352,17 @@ void PVGUI_Module::pvCreateActions() registerAction(TimerLogId, anAction); new pqTimerLogReaction(anAction << pqSetName("actionToolsTimerLog")); - // Output Window - anAction = new QAction(tr("MEN_OUTPUT_WINDOW"), this); - anAction->setToolTip(tr("TOP_OUTPUT_WINDOW")); - anAction->setStatusTip(tr("STB_OUTPUT_WINDOW")); - registerAction(OutputWindowId, anAction); - anAction << pqSetName("actionToolsOutputWindow"); - connect(anAction, SIGNAL(triggered()), pqApplicationCore::instance(), SLOT(showOutputWindow())); - - // Python Shell + // Python Shell + // ??? + // No more pqPythonShellReaction class, but there is a pqPythonShell class. + // Is that equivalent? I don't know what to do at this stage. anAction = new QAction(tr("MEN_PYTHON_SHELL"), this); anAction->setToolTip(tr("TOP_PYTHON_SHELL")); anAction->setStatusTip(tr("STB_PYTHON_SHELL")); registerAction(PythonShellId, anAction); + /* new pqPythonShellReaction(anAction << pqSetName("actionToolsPythonShell")); + */ //Show Trace anAction = new QAction(tr("MEN_SHOW_TRACE"), this); @@ -412,7 +418,7 @@ void PVGUI_Module::pvCreateMenus() // Recent Files myRecentMenuId = createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 ); QMenu* aMenu = menuMgr()->findMenu( myRecentMenuId ); - pqRecentFilesMenu* aRecentFilesMenu = new pqRecentFilesMenu( *aMenu, getApp()->desktop() ); + /*pqRecentFilesMenu* aRecentFilesMenu = */new pqRecentFilesMenu( *aMenu, getApp()->desktop() ); QList anActns = aMenu->actions(); for (int i = 0; i < anActns.size(); ++i) createMenu( anActns.at(i), myRecentMenuId ); @@ -432,10 +438,13 @@ void PVGUI_Module::pvCreateMenus() createMenu( SaveGeometryId, aPVMnu, 35 ); createMenu( separator(), aPVMnu, -1, 35 ); - createMenu( ConnectId, aPVMnu, 45 ); - createMenu( DisconnectId, aPVMnu, 45 ); + createMenu( LoadMaterialsId, aPVMnu, 45); createMenu( separator(), aPVMnu, -1, 45 ); + createMenu( ConnectId, aPVMnu, 55 ); + createMenu( DisconnectId, aPVMnu, 55 ); + createMenu( separator(), aPVMnu, -1, 55 ); + // --- Menu "Edit" aPVMnu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1 ); @@ -497,7 +506,6 @@ void PVGUI_Module::pvCreateMenus() createMenu( separator(), aToolsMnu ); createMenu( TimerLogId, aToolsMnu ); - createMenu( OutputWindowId, aToolsMnu ); createMenu( separator(), aToolsMnu ); createMenu( PythonShellId, aToolsMnu ); @@ -513,7 +521,7 @@ void PVGUI_Module::pvCreateMenus() int aHelpMnu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1 ); int aUsersGuide = createMenu( tr( "User's Guide" ), aHelpMnu, -1 ); - int aPVHelpMnu = createMenu( tr( "ParaViS module" ), aUsersGuide, -1, 0 ); + int aPVHelpMnu = createMenu( tr( "ParaViS module" ), aUsersGuide, -1, 5 ); #ifdef HAS_PV_DOC createMenu( ParaViewHelpId, aPVHelpMnu ); createMenu( separator(), aPVHelpMnu ); @@ -522,7 +530,7 @@ void PVGUI_Module::pvCreateMenus() // -- Context menu in the pipeline browser pqPipelineBrowserWidget * pq = guiElements->getPipelineBrowserWidget(); - pqParaViewMenuBuilders::buildPipelineBrowserContextMenu( *pq ); + pqParaViewMenuBuilders::buildPipelineBrowserContextMenu( *(pq->contextMenu()) ); } /*!