X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshersGUI%2FStdMeshersGUI_SubShapeSelectorWdg.h;h=ed37875cecc15a49d87bd50120f738bbfd01a751;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hp=1b40658d95d11c4340fefa14924962f7f0bae927;hpb=193c49c87753b6ccabb2b5e6dc935aa480d2d43e;p=modules%2Fsmesh.git diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h index 1b40658d9..ed37875ce 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -50,26 +50,24 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_SubShapeSelectorWdg : public QWidget Q_OBJECT public: - StdMeshersGUI_SubShapeSelectorWdg( QWidget* parent = 0, - TopAbs_ShapeEnum aSubShType = TopAbs_EDGE ); + StdMeshersGUI_SubShapeSelectorWdg( QWidget* parent = 0, + TopAbs_ShapeEnum subShType = TopAbs_EDGE, + const bool toShowList = true, + const bool toShowSelectBtn = false, + const int minListWidth=300); ~StdMeshersGUI_SubShapeSelectorWdg(); SMESH::long_array_var GetListOfIDs(); bool SetListOfIDs( SMESH::long_array_var ); + const QList& GetSelectedIDs() const { return mySelectedIDs; } void SetGeomShapeEntry( const QString& theEntry, const QString& theMainShapeEntry); - //QString GetGeomShapeEntry() { return myEntry; } - - // void SetMainShapeEntry( const QString& theEntry ); const char* GetMainShapeEntry(); TopoDS_Shape GetGeomShape() { return myGeomShape; } TopoDS_Shape GetMainShape() { return myMainShape; } - // QList GetCorrectedListOfIDs( bool fromSubshapeToMainshape, - // bool* isOK=0); - static GEOM::GEOM_Object_var GetGeomObjectByEntry( const QString& ); static TopoDS_Shape GetTopoDSByEntry( const QString& ); @@ -85,8 +83,23 @@ public: SMESH_PreviewActorsCollection* GetActorCollection() { return myPreviewActor; } void ClearSelected(); + void AvoidSimultaneousSelection( StdMeshersGUI_SubShapeSelectorWdg* other); + +public slots: + + void ActivateSelection( bool ); + void deactivateSelection() { ActivateSelection( false ); } + signals: - void selectionChanged(); + void selectionChanged(); // in the list + void shapeSelected(); // globally + /*! + * \brief Emitted when selection is activated + * + * Useful to deactivate one Object Reference param widget when an other + * one is activated + */ + void selectionActivated(); private: void updateState(); @@ -116,6 +129,7 @@ private: vtkRenderer* myRenderer; QListWidget* myListWidget; + QPushButton* myActivateButton; QPushButton* myAddButton; QPushButton* myRemoveButton; QLabel* myInfoLabel; @@ -126,7 +140,6 @@ private: QString myParamValue; bool myIsShown; - bool myIsNotCorrected; // for manage possible size of myListOfIDs int myMaxSize;