X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVGUI%2FPVGUI_Module.h;h=0b30e767f72741eb8006aa13d4bc198d7a372652;hb=2323d9818282b17d8c199c6c807db387513e58ac;hp=15f87ef9f8ed0568afee66c86442501df0b62e18;hpb=c7c9039d845fb2a5e2eb391139af089b4bed26a5;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 15f87ef9..0b30e767 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -1,11 +1,11 @@ // PARAVIS : ParaView wrapper SALOME module // -// Copyright (C) 2010-2013 CEA/DEN, EDF R&D +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -47,6 +47,7 @@ class pqPVApplicationCore; class pqDataRepresentation; class pqRepresentation; +class PyConsole_Interp; class PVGUI_Module : public SalomeApp_Module { @@ -54,84 +55,85 @@ class PVGUI_Module : public SalomeApp_Module //! Menu actions enum { // Menu "File" - OpenFileId, - - LoadStateId, - SaveStateId, - - SaveDataId, - SaveScreenshotId, - ExportId, - - SaveAnimationId, - SaveGeometryId, - - ConnectId, - DisconnectId, - - // Menu "Edit" - UndoId, - RedoId, - - CameraUndoId, - CameraRedoId, - - FindDataId, - ChangeInputId, - IgnoreTimeId, - DeleteId, - DeleteAllId, - - SettingsId, - ViewSettingsId, - - // Menu "View" - FullScreenId, - - // Menu "Animation" - FirstFrameId, - PreviousFrameId, - PlayId, - NextFrameId, - LastFrameId, - LoopId, - - // Menu "Tools" - CreateCustomFilterId, - ManageCustomFiltersId, - CreateLookmarkId, - ManageLinksId, - AddCameraLinkId, - ManagePluginsExtensionsId, - DumpWidgetNamesId, - RecordTestId, - RecordTestScreenshotId, - PlayTestId, - MaxWindowSizeId, - CustomWindowSizeId, - TimerLogId, - OutputWindowId, - PythonShellId, - ShowTraceId, - - // Menu "Help" - AboutParaViewId, - ParaViewHelpId, - EnableTooltipsId, - - // Menu "Window" - "New Window" - ParaViewNewWindowId, - - // "Save state" ParaVis module root object popup - SaveStatePopupId, - - // "Add state" and "Reload state" popups - AddStatePopupId, - CleanAndAddStatePopupId, - - // "Rename" and "Delete" popups (Object Browser) - ParaVisRenameId, - ParaVisDeleteId + OpenFileId, + + LoadStateId, + SaveStateId, + + SaveDataId, + SaveScreenshotId, + ExportId, + + SaveAnimationId, + SaveGeometryId, + + ConnectId, + DisconnectId, + + // Menu "Edit" + UndoId, + RedoId, + + CameraUndoId, + CameraRedoId, + + FindDataId, + ChangeInputId, + IgnoreTimeId, + DeleteId, + DeleteAllId, + + SettingsId, + ViewSettingsId, + + // Menu "View" + FullScreenId, + + // Menu "Animation" + FirstFrameId, + PreviousFrameId, + PlayId, + NextFrameId, + LastFrameId, + LoopId, + + // Menu "Tools" + CreateCustomFilterId, + ManageCustomFiltersId, + CreateLookmarkId, + ManageLinksId, + AddCameraLinkId, + ManagePluginsExtensionsId, + DumpWidgetNamesId, + RecordTestId, + RecordTestScreenshotId, + PlayTestId, + MaxWindowSizeId, + CustomWindowSizeId, + TimerLogId, + OutputWindowId, + PythonShellId, + ShowTraceId, + RestartTraceId, + + // Menu "Help" + AboutParaViewId, + ParaViewHelpId, + EnableTooltipsId, + + // Menu "Window" - "New Window" + ParaViewNewWindowId, + + // "Save state" ParaVis module root object popup + SaveStatePopupId, + + // "Add state" and "Reload state" popups + AddStatePopupId, + CleanAndAddStatePopupId, + + // "Rename" and "Delete" popups (Object Browser) + ParaVisRenameId, + ParaVisDeleteId }; public: @@ -207,9 +209,21 @@ private: //! Load selected state void loadSelectedState(bool toClear); + //! Get list of embedded macros files + QStringList getEmbeddedMacrosList(); + //! update macros state void updateMacros(); + //! store visibility of the common dockable windows (OB, PyConsole, ... etc.) + void storeCommonWindowsState(); + + //! restore visibility of the common dockable windows (OB, PyConsole, ... etc.) + void restoreCommonWindowsState(); + + //! run Python command (either in SALOME's Python interpreter, or in ParaView's Python's interpreter) + void execPythonCommand(const QString& cmd, bool inSalomeConsole=false); + private slots: void showHelpForProxy( const QString&, const QString& ); @@ -232,6 +246,7 @@ private slots: void onStartProgress(); void onEndProgress(); void onShowTrace(); + void onRestartTrace(); void onNewParaViewWindow(); @@ -271,6 +286,9 @@ private: WgMap myToolbarBreaks; QList myMenus; + typedef QMap DockWindowMap; + DockWindowMap myCommonMap; + QStringList myTemporaryFiles; QtMsgHandler myOldMsgHandler;