rnc : Made the AddStretch operation optional (previous behaviour is kept)

This commit is contained in:
gdd 2011-02-24 16:21:51 +00:00
parent 01f4ed1a85
commit 76d6063480
2 changed files with 9 additions and 3 deletions

View File

@ -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()));
}

View 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