X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISUGUI%2FVisuGUI.h;h=e6e1210a76e801df7d53453f296d7985bff229a1;hb=6255f79f80594409f8e726c1706941b56769c592;hp=5b64c53a4f1145d384b9d15e9ea2e32b8ca4b65f;hpb=70ae0b0139868088804efbc29a4ac170c2b62127;p=modules%2Fvisu.git diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index 5b64c53a..e6e1210a 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -1,48 +1,69 @@ -// VISU VISUGUI : GUI of VISU component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // -// 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. +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// 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. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + +// VISU VISUGUI : GUI of VISU component // File : VisuGUI.h // Author : Laurent CORNABE & Hubert ROLLAND // Module : VISU -// $Header$ - +// #ifndef VisuGUI_HeaderFile #define VisuGUI_HeaderFile -#include "SalomeApp_Module.h" +#include + +#include +#include + +#include "VisuGUI_Panel.h" + +#include +#include class SUIT_ViewManager; +class VisuGUI_Slider; +class VisuGUI_Sweep; + +namespace VISU +{ + class Prs3d_i; + typedef std::pair TPrs3dToInd; // prs pointer and default index of scalar bar placement + typedef std::set TSetPrs3d; + typedef std::map TViewToPrs3d; +} class VisuGUI: public SalomeApp_Module { Q_OBJECT; public: + enum PanelId { SelectionPanelId = 0, + FeatureEdgesPanelId, + ClippingPlanesPanelId }; +public: VisuGUI(); virtual ~VisuGUI(); - virtual SalomeApp_Displayer* displayer(); + virtual LightApp_Displayer* displayer(); virtual void initialize( CAM_Application* ); virtual void windows( QMap& ) const; virtual void viewManagers( QStringList& ) const; @@ -51,7 +72,7 @@ public: virtual void studyActivated(); - virtual void contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle ); + virtual void contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle ); virtual void createPreferences(); virtual void preferencesChanged( const QString&, const QString& ); @@ -59,19 +80,35 @@ public: virtual SUIT_ViewManager* getViewManager(const QString& theType, - const bool theIsCreate); + const bool theIsCreate); + + VISU::TViewToPrs3d& + getScalarBarsMap(); + + virtual bool renameAllowed( const QString& ) const; + virtual bool renameObject( const QString&, const QString& ); + + +signals: + void moduleDeactivated(); + void moduleActivated(); + void presentationCreated(VISU::Prs3d_i* thePrs); + void beforeObjectDelete(QString theEntry); public slots: virtual bool deactivateModule( SUIT_Study* ); virtual bool activateModule( SUIT_Study* ); + virtual void OnEraseAll(); protected slots: void OnImportFromFile(); - void OnExploreMEDFile(); + void OnImportFromSauvFile(); void OnImportTableFromFile(); void OnExportTableToFile(); void OnImportMedField(); + void OnLoadComponentData(); + void OnCreateMesh(); void OnCreateScalarMap(); void OnCreateDeformedShape(); @@ -79,24 +116,32 @@ protected slots: void OnCreateIsoSurfaces(); void OnCreateCutPlanes(); void OnCreateCutLines(); + void OnCreateCutSegment(); void OnCreateStreamLines(); void OnCreatePlot3D(); void OnCreateManyMesh(); void OnCreatePlot2dView(); + void OnCreateDeformedShapeAndScalarMap(); void OnEditScalarMap(); void OnEditDeformedShape(); void OnEditCutPlanes(); void OnEditCutLines(); + void OnEditCutSegment(); void OnEditIsoSurfaces(); void OnEditVectors(); void OnEditStreamLines(); void OnEditPlot3D(); + void OnEditDeformedShapeAndScalarMap(); virtual void OnDisplayPrs(); virtual void OnDisplayOnlyPrs(); virtual void OnErasePrs(); - virtual void OnEraseAll(); + // virtual void OnEraseAll(); + + void OnToggleSelectionPanel(); + void OnSwitchSelectionMode(); + void OnSwitchSelectionMode( int ); void OnMakeSurfaceframe(); void OnMakeInsideframe(); @@ -105,6 +150,8 @@ protected slots: void OnMakePoints(); void OnMakeShrink(); + void OnMakeFeatureEdges(); + void OnSetShadingOn(); void OnSetShadingOff(); @@ -112,48 +159,88 @@ protected slots: void OnChangeWireframeColor(); void OnChangeOpacity(); void OnChangeLines(); + void OnChangePointMarker(); + void OnChangeShrinkFactor(); void OnShowTable(); + void OnShowTablePlot(); + void OnShowScalarBar(); + void OnHideScalarBar(); void OnCreateTable(); void OnDeleteObjects(); void OnPlotData(); void OnCurveProperties(); + void OnCurveScale(); void OnClearContainer(); void OnEditContainer(); void OnMergeScalarBars(); void OnFreeScalarBars(); - void OnSaveViewParams(); - void OnRestoreViewParams(); + virtual void OnSaveViewParams(); + virtual void OnRestoreViewParams(); - void OnRename(); void OnClippingPlanes(); void OnSweep(); - void OnTimeAnimation(); + void OnParallelTimeAnimation(); + void OnSucccessiveTimeAnimation(); void OnShowAnimation(); - void OnCopyPresentation(); + void OnPointEvolution(); + void OnShowEvolution(); - void OnSelectionInfo(); + void OnCopyPresentation(); void OnTranslatePrs(); void OnArrangeActors(); + void OnPlot3dFromCutPlane(); + + void OnManageCache(); - void OnScaling(); - void OnCubeAxes(); + void OnFilterScalars(); + + void OnValuesLabeling(); + void OnValuesLabelingParams(); + + void OnArcQuadMode(); + void OnLineQuadMode(); + + void OnShowDeviation(); + + // MULTIPR + void OnMultiprViewFullRes(); + void OnMultiprViewMediumRes(); + void OnMultiprViewLowRes(); + void OnMultiprViewHide(); + void OnMultiprChangeRes(VISU::Result::Resolution theResolution); + + void OnFileInfo(); + void OnExportMED(); protected: - virtual SalomeApp_Selection* createSelection() const; + virtual LightApp_Selection* createSelection() const; + + virtual void processPresentationCreated( VISU::Prs3d_i* thePrs ); + + void OnTimeAnimation(VISU::Animation::AnimationMode theMode); private: void createActions(); void createMenus(); void createToolBars(); void createPopupMenus(); + void createPanels(); + void SetScalarBarVisibility( bool ); + void activateAppropriateViewer( Handle(SALOME_InteractiveObject) theIO ); + int addVtkFontPref( const QString& label, const int pId, const QString& param, const bool useSize ); private: - SalomeApp_Displayer* myDisplayer; + QMap myPanels; + VisuGUI_Slider* mySlider; + VisuGUI_Sweep* mySweep; + + LightApp_Displayer* myDisplayer; + VISU::TViewToPrs3d myScalarBarsMap; }; #endif