Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 67ee71df authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Function added to UIParamSet to recover the list of parameters.

parent b4b4eb96
......@@ -36,6 +36,63 @@ m_Layout->setContentsMargins( 4, 4, 4, 4 );
}
UIParamSet::~UIParamSet()
{
for( QMap<QString,UIParam*>::iterator p=m_ParamById.begin(); p!=m_ParamById.end(); ++p )
delete p.value();
}
void UIParamSet::Add( UIParam *param )
{
UIParamAction *act = dynamic_cast<UIParamAction*>( param );
if( act )
m_Actions.push_back( act );
if( dynamic_cast<UIParamAnimation*>( param ) )
{
m_AnimationCtrl = reinterpret_cast<UIParamAnimation*>( param );
}
else
{
if( dynamic_cast<UIParamChildren*>( param ) )
m_ChildrenLists.push_back( reinterpret_cast<UIParamChildren*>( param ) );
param->ConnectModificationSignal();
connect( param, SIGNAL(parameterUpdated(UIParam*)), this, SLOT(triggerParameterUpdate(UIParam*)) );
m_ParamById[ param->Id() ] = param;
}
param->ArrangeInLayout( /*(QGridLayout*)layout()*/m_Layout, m_RowCount );
++ m_RowCount;
}
void UIParamSet::AddSeparator()
{
m_Layout->addWidget( new QLabel(""), m_RowCount, 0, 1, 2 );
++ m_RowCount;
}
void UIParamSet::AddTitle( const QString &labelText )
{
QLabel *label = new QLabel( labelText );
label->setAlignment( Qt::AlignHCenter );
m_Layout->addWidget( label, m_RowCount, 0, 1, 2 );
++ m_RowCount;
}
UIParam* UIParamSet::Get( const QString &paramName ) const
{
QMap<QString,UIParam*>::const_iterator p = m_ParamById.find( paramName );
if( p != m_ParamById.end() )
return p.value();
return NULL;
}
void UIParamSet::updateChildrenLists( GenericUIData *d )
{
for( auto l : m_ChildrenLists )
......
......@@ -58,56 +58,13 @@ class UIParamSet : public QGroupBox
public:
UIParamSet( const QString &title, QWidget *parent );
~UIParamSet();
inline ~UIParamSet()
{
for( QMap<QString,UIParam*>::iterator p=m_ParamById.begin(); p!=m_ParamById.end(); ++p )
delete p.value();
}
inline void Add( UIParam *param )
{
UIParamAction *act = dynamic_cast<UIParamAction*>( param );
if( act )
m_Actions.push_back( act );
if( dynamic_cast<UIParamAnimation*>( param ) )
{
m_AnimationCtrl = reinterpret_cast<UIParamAnimation*>( param );
}
else
{
if( dynamic_cast<UIParamChildren*>( param ) )
m_ChildrenLists.push_back( reinterpret_cast<UIParamChildren*>( param ) );
param->ConnectModificationSignal();
connect( param, SIGNAL(parameterUpdated(UIParam*)), this, SLOT(triggerParameterUpdate(UIParam*)) );
m_ParamById[ param->Id() ] = param;
}
param->ArrangeInLayout( /*(QGridLayout*)layout()*/m_Layout, m_RowCount );
++ m_RowCount;
}
inline void AddSeparator()
{
m_Layout->addWidget( new QLabel(""), m_RowCount, 0, 1, 2 );
++ m_RowCount;
}
inline void AddTitle( const QString &labelText )
{
QLabel *label = new QLabel( labelText );
label->setAlignment( Qt::AlignHCenter );
m_Layout->addWidget( label, m_RowCount, 0, 1, 2 );
++ m_RowCount;
}
inline UIParam* Get( const QString &paramName ) const
{
QMap<QString,UIParam*>::const_iterator p = m_ParamById.find( paramName );
if( p != m_ParamById.end() )
return p.value();
return NULL;
}
void Add( UIParam *param );
void AddSeparator();
void AddTitle( const QString &labelText );
UIParam* Get( const QString &paramName ) const;
inline QList<UIParam*> GetAll() const { return m_ParamById.values(); }
inline UIParamBoolean* GetBoolean ( const QString &paramName ) const { return GetParam<UIParamBoolean >( paramName ); }
inline UIParamInteger* GetInteger ( const QString &paramName ) const { return GetParam<UIParamInteger >( paramName ); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment