Skip to content
Snippets Groups Projects
Commit 7c5adaf9 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: make SetFileName public slot + implement DoUpdateGUI to be able to fill it programmatically

parent 67a649ae
Branches
Tags
No related merge requests found
......@@ -35,7 +35,11 @@ QtWidgetOutputImageParameter::~QtWidgetOutputImageParameter()
void QtWidgetOutputImageParameter::DoUpdateGUI()
{
// Update the lineEdit
if (m_Input->text() != m_OutputImageParam->GetFileName())
{
m_Input->setText(m_OutputImageParam->GetFileName());
}
}
void QtWidgetOutputImageParameter::DoCreateWidget()
......@@ -44,7 +48,7 @@ void QtWidgetOutputImageParameter::DoCreateWidget()
m_HLayout = new QHBoxLayout;
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input = new QLineEdit();
m_Input->setToolTip( m_OutputImageParam->GetDescription() );
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -41,8 +41,10 @@ public:
/** Get the PixelType*/
//itkGetMacro(PixelType, int);
protected slots:
public slots:
void SetFileName( const QString& value );
protected slots:
void SelectFile();
void SetPixelType(int pixelType);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment