Commit 905e260c authored by Victor Poughon's avatar Victor Poughon

REFAC: continue upgrade to qt5 signal/slot syntax

parent 5174f8a9
......@@ -60,8 +60,8 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_Input->setToolTip(
QString::fromStdString( 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()) );
connect( m_Input, &QLineEdit::textChanged, this, &QtWidgetComplexOutputImageParameter::SetFileName );
connect( m_Input, &QLineEdit::textChanged, GetModel(), &QtWidgetModel::NotifyUpdate );
m_HLayout->addWidget(m_Input);
// Set the Output PixelType choice Combobox
......@@ -72,8 +72,8 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_ComboBox->addItem( "cfloat");
m_ComboBox->addItem( "cdouble");
m_ComboBox->setCurrentIndex(m_OutputImageParam->GetComplexPixelType());
connect( m_ComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(SetPixelType(int)) );
connect( m_ComboBox, SIGNAL(currentIndexChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
connect( m_ComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &QtWidgetComplexOutputImageParameter::SetPixelType );
connect( m_ComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), GetModel(), &QtWidgetModel::NotifyUpdate );
m_HLayout->addWidget(m_ComboBox);
// Set up input text edit
......@@ -81,7 +81,7 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_Button->setText("...");
m_Button->setToolTip("Select output filename...");
m_Button->setMaximumWidth(m_Button->width());
connect( m_Button, SIGNAL(clicked()), this, SLOT(SelectFile()) );
connect( m_Button, &QPushButton::clicked, this, &QtWidgetComplexOutputImageParameter::SelectFile );
m_HLayout->addWidget(m_Button);
this->setLayout(m_HLayout);
......
......@@ -59,8 +59,8 @@ void QtWidgetDirectoryParameter::DoCreateWidget()
m_Input->setToolTip(
QString::fromStdString( m_DirectoryParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
connect( m_Input, &QLineEdit::textChanged, this, &QtWidgetDirectoryParameter::SetFileName );
connect( m_Input, &QLineEdit::textChanged, GetModel(), &QtWidgetModel::NotifyUpdate );
m_HLayout->addWidget(m_Input);
......@@ -69,7 +69,7 @@ void QtWidgetDirectoryParameter::DoCreateWidget()
m_Button->setText("...");
m_Button->setToolTip("Select d Directory...");
m_Button->setMaximumWidth(m_Button->width());
connect( m_Button, SIGNAL(clicked()), this, SLOT(SelectFile()) );
connect( m_Button, &QPushButton::clicked, this, &QtWidgetDirectoryParameter::SelectFile );
m_HLayout->addWidget(m_Button);
this->setLayout(m_HLayout);
......
......@@ -63,8 +63,8 @@ void QtWidgetInputProcessXMLParameter::DoCreateWidget()
m_Input->setToolTip(
QString::fromStdString( m_XMLParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
connect( m_Input, &QLineEdit::textChanged, this, &QtWidgetInputProcessXMLParameter::SetFileName );
connect( m_Input, &QLineEdit::textChanged, GetModel(), &QtWidgetModel::NotifyUpdate );
m_HLayout->addWidget(m_Input);
......@@ -73,7 +73,7 @@ void QtWidgetInputProcessXMLParameter::DoCreateWidget()
m_Button->setText("...");
m_Button->setToolTip("Select file...");
m_Button->setMaximumWidth(m_Button->width());
connect( m_Button, SIGNAL(clicked()), this, SLOT(SelectFile()) );
connect( m_Button, &QPushButton::clicked, this, &QtWidgetInputProcessXMLParameter::SelectFile );
m_HLayout->addWidget(m_Button);
this->setLayout(m_HLayout);
......
......@@ -58,8 +58,8 @@ void QtWidgetOutputProcessXMLParameter::DoCreateWidget()
m_Input->setToolTip(
QString::fromStdString( m_XMLParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
connect( m_Input, &QLineEdit::textChanged, this, &QtWidgetOutputProcessXMLParameter::SetFileName );
connect( m_Input, &QLineEdit::textChanged, GetModel(), &QtWidgetModel::NotifyUpdate );
m_HLayout->addWidget(m_Input);
......@@ -68,7 +68,7 @@ void QtWidgetOutputProcessXMLParameter::DoCreateWidget()
m_Button->setText("...");
m_Button->setToolTip("Select file...");
m_Button->setMaximumWidth(m_Button->width());
connect( m_Button, SIGNAL(clicked()), this, SLOT(SelectFile()) );
connect( m_Button, &QPushButton::clicked, this, &QtWidgetOutputProcessXMLParameter::SelectFile );
m_HLayout->addWidget(m_Button);
this->setLayout(m_HLayout);
......
......@@ -35,10 +35,10 @@ QtWidgetProgressReport::QtWidgetProgressReport(QtWidgetModel * model, QWidget *
, m_CurrentProcess()
{
m_Model = model;
connect(model, SIGNAL(SetProgressReportBegin()), this, SLOT(show()) );
connect(model, SIGNAL(SetProgressReportDone()), this, SLOT(close()) );
connect(model, SIGNAL(SetProgressReportDone()), this, SLOT(RemoveLayout()) );
connect(this, SIGNAL(AddNewProcessToReport()), this, SLOT(ReportProcess()) );
connect(model, &QtWidgetModel::SetProgressReportBegin, this, &QtWidgetProgressReport::show );
connect(model, &QtWidgetModel::SetProgressReportDone, this, &QtWidgetProgressReport::close );
connect(model, &QtWidgetModel::SetProgressReportDone, this, &QtWidgetProgressReport::RemoveLayout );
connect(this, &QtWidgetProgressReport::AddNewProcessToReport, this, &QtWidgetProgressReport::ReportProcess );
m_Layout = new QVBoxLayout(this);
this->setLayout(m_Layout);
......@@ -83,8 +83,8 @@ void QtWidgetProgressReport::ReportProcess ( )
// Create a itk::QtProgressBar, observing the event ProgressEvent
itk::QtProgressBar * bar = new itk::QtProgressBar(this);
connect( bar, SIGNAL(SetValueChanged(int)), bar, SLOT(setValue(int)) );
connect( m_Model, SIGNAL(SetProgressReportDone()), bar, SLOT(reset()) );
connect( bar, &itk::QtProgressBar::SetValueChanged, bar, &itk::QtProgressBar::setValue );
connect( m_Model, &QtWidgetModel::SetProgressReportDone, bar, &itk::QtProgressBar::reset );
bar->Observe(m_CurrentProcess);
// label
......
......@@ -47,8 +47,8 @@ void QtWidgetRAMParameter::DoCreateWidget()
QString::fromStdString( m_RAMParam->GetDescription() )
);
connect( m_QSpinBox, SIGNAL(valueChanged(int)), this, SLOT(SetValue(int)) );
connect( m_QSpinBox, SIGNAL(valueChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
connect( m_QSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &QtWidgetRAMParameter::SetValue );
connect( m_QSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), GetModel(), &QtWidgetModel::NotifyUpdate );
// Set a valid range
// Using m_UnsignedIntParam->GetMaximum() to set the maximum range
......
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