mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-04 13:50:34 +05:00
PAL10953. Add possibility to have a custom widget for a hypo parameter
This commit is contained in:
parent
6b471bcc54
commit
3a1c4c87ae
@ -144,7 +144,8 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
|
||||
QLabel* lab = new QLabel( (*anIt).myName, GroupC1 );
|
||||
GroupC1Layout->addWidget( lab, i, 0 );
|
||||
|
||||
QWidget* w = 0;
|
||||
QWidget* w = getCustomWidget( *anIt, GroupC1 );
|
||||
if ( !w )
|
||||
switch( (*anIt).myValue.type() )
|
||||
{
|
||||
case QVariant::Int:
|
||||
@ -224,6 +225,11 @@ bool SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg( ListOfStdParams& par
|
||||
params.append( item );
|
||||
}
|
||||
|
||||
else if ( getParamFromCustomWidget( item, *anIt ))
|
||||
{
|
||||
params.append( item );
|
||||
}
|
||||
|
||||
else
|
||||
res = false;
|
||||
}
|
||||
@ -273,10 +279,15 @@ QString SMESHGUI_GenericHypothesisCreator::type() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QWidget* SMESHGUI_GenericHypothesisCreator::getCustomWidget( const StdParam & /*param*/,
|
||||
QWidget* /*parent*/) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
bool SMESHGUI_GenericHypothesisCreator::getParamFromCustomWidget( StdParam& , QWidget* ) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -77,6 +77,8 @@ protected:
|
||||
virtual bool stdParams ( ListOfStdParams& ) const;
|
||||
bool getStdParamFromDlg( ListOfStdParams& ) const;
|
||||
virtual void attuneStdWidget( QWidget*, const int ) const;
|
||||
virtual QWidget* getCustomWidget( const StdParam &, QWidget* ) const;
|
||||
virtual bool getParamFromCustomWidget( StdParam& , QWidget* ) const;
|
||||
virtual QString caption() const;
|
||||
virtual QPixmap icon() const;
|
||||
virtual QString type() const;
|
||||
|
Loading…
Reference in New Issue
Block a user