Salome HOME
rnc : Made the AddStretch operation optional (previous behaviour is kept)
authorgdd <gdd>
Thu, 24 Feb 2011 16:21:51 +0000 (16:21 +0000)
committergdd <gdd>
Thu, 24 Feb 2011 16:21:51 +0000 (16:21 +0000)
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h

index 482fb62994d30a3d985060d0509be9d225c88a88..2d5b87f55260fa1b7edb2bbb86081b153e4bb0e8 100644 (file)
 //================================================================================
 
 StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
-( SUIT_SelectionFilter* f, QWidget* parent, bool multiSelection)
+( SUIT_SelectionFilter* f, QWidget* parent, bool multiSelection, bool stretch )
   : QWidget( parent ), myMultiSelection( multiSelection )
 {
   myFilter = f;
+  myStretchActivated = stretch;
   init();
 }
 
@@ -126,7 +127,9 @@ void StdMeshersGUI_ObjectReferenceParamWdg::init()
 
   aHBox->addWidget( mySelButton );
   aHBox->addWidget( myObjNameLineEdit );
-  aHBox->addStretch();
+  if (myStretchActivated){
+    aHBox->addStretch();
+  }
 
   connect( mySelButton, SIGNAL(clicked()), SLOT(activateSelection()));
 }
index 41bd98cfae72a3d2b0e43c07c020fc2762f49643..49b41ac9c82226fad859f49a14ca46f474e05555 100644 (file)
@@ -55,7 +55,8 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_ObjectReferenceParamWdg : public QWidge
 public:
   StdMeshersGUI_ObjectReferenceParamWdg( SUIT_SelectionFilter* filter, 
                                          QWidget*              parent,
-                                         bool                  multiSelection=false);
+                                         bool                  multiSelection=false,
+                                         bool                  stretch=true);
   StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType,
                                          QWidget*       parent,
                                          bool           multiSelection=false);
@@ -115,6 +116,7 @@ private:
 
  SUIT_SelectionFilter*  myFilter;
  bool                   mySelectionActivated;
+ bool                   myStretchActivated;
 
  SMESHGUI*              mySMESHGUI;
  LightApp_SelectionMgr* mySelectionMgr;
@@ -124,6 +126,7 @@ private:
  QString                myParamValue;
  QString                myEmptyText;
  QString                myEmptyStyleSheet;
+ //int                    spacing;
 };
 
 #endif // STDMESHERSGUI_OBJECTREFERENCEPARAMWDG_H