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 StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
( SUIT_SelectionFilter* f, QWidget* parent, bool multiSelection) ( SUIT_SelectionFilter* f, QWidget* parent, bool multiSelection, bool stretch )
: QWidget( parent ), myMultiSelection( multiSelection ) : QWidget( parent ), myMultiSelection( multiSelection )
{ {
myFilter = f; myFilter = f;
myStretchActivated = stretch;
init(); init();
} }
@ -126,7 +127,9 @@ void StdMeshersGUI_ObjectReferenceParamWdg::init()
aHBox->addWidget( mySelButton ); aHBox->addWidget( mySelButton );
aHBox->addWidget( myObjNameLineEdit ); aHBox->addWidget( myObjNameLineEdit );
if (myStretchActivated){
aHBox->addStretch(); aHBox->addStretch();
}
connect( mySelButton, SIGNAL(clicked()), SLOT(activateSelection())); connect( mySelButton, SIGNAL(clicked()), SLOT(activateSelection()));
} }

View File

@ -55,7 +55,8 @@ class STDMESHERSGUI_EXPORT StdMeshersGUI_ObjectReferenceParamWdg : public QWidge
public: public:
StdMeshersGUI_ObjectReferenceParamWdg( SUIT_SelectionFilter* filter, StdMeshersGUI_ObjectReferenceParamWdg( SUIT_SelectionFilter* filter,
QWidget* parent, QWidget* parent,
bool multiSelection=false); bool multiSelection=false,
bool stretch=true);
StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType, StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType,
QWidget* parent, QWidget* parent,
bool multiSelection=false); bool multiSelection=false);
@ -115,6 +116,7 @@ private:
SUIT_SelectionFilter* myFilter; SUIT_SelectionFilter* myFilter;
bool mySelectionActivated; bool mySelectionActivated;
bool myStretchActivated;
SMESHGUI* mySMESHGUI; SMESHGUI* mySMESHGUI;
LightApp_SelectionMgr* mySelectionMgr; LightApp_SelectionMgr* mySelectionMgr;
@ -124,6 +126,7 @@ private:
QString myParamValue; QString myParamValue;
QString myEmptyText; QString myEmptyText;
QString myEmptyStyleSheet; QString myEmptyStyleSheet;
//int spacing;
}; };
#endif // STDMESHERSGUI_OBJECTREFERENCEPARAMWDG_H #endif // STDMESHERSGUI_OBJECTREFERENCEPARAMWDG_H