From: gdd Date: Thu, 24 Feb 2011 16:21:51 +0000 (+0000) Subject: rnc : Made the AddStretch operation optional (previous behaviour is kept) X-Git-Tag: StartingPortingMED3~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76d6063480a678241103a0a51dbc3226fd8a622a;p=modules%2Fsmesh.git rnc : Made the AddStretch operation optional (previous behaviour is kept) --- diff --git a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx index 482fb6299..2d5b87f55 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx @@ -56,10 +56,11 @@ //================================================================================ 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())); } diff --git a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h index 41bd98cfa..49b41ac9c 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h +++ b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h @@ -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