@@ -38,36 +38,33 @@ Quasi::Quasi(QWidget *parent) : BayesFittingTab(parent), m_previewSpec(0) {
38
38
39
39
// Create range selector
40
40
auto eRangeSelector = m_uiForm.ppPlot ->addRangeSelector (" QuasiERange" );
41
- connect (eRangeSelector, SIGNAL ( minValueChanged ( double )) , this , SLOT ( minValueChanged ( double )) );
42
- connect (eRangeSelector, SIGNAL ( maxValueChanged ( double )) , this , SLOT ( maxValueChanged ( double )) );
41
+ connect (eRangeSelector, &MantidWidgets::RangeSelector:: minValueChanged, this , &Quasi:: minValueChanged);
42
+ connect (eRangeSelector, &MantidWidgets::RangeSelector:: maxValueChanged, this , &Quasi:: maxValueChanged);
43
43
44
44
setupFitOptions ();
45
45
setupPropertyBrowser ();
46
46
setupPlotOptions ();
47
47
48
48
// Connect optional form elements with enabling checkboxes
49
- connect (m_uiForm.chkFixWidth , SIGNAL (toggled (bool )), m_uiForm.mwFixWidthDat , SLOT (setEnabled (bool )));
50
- connect (m_uiForm.chkUseResNorm , SIGNAL (toggled (bool )), m_uiForm.dsResNorm , SLOT (setEnabled (bool )));
51
-
49
+ connect (m_uiForm.chkFixWidth , &QCheckBox::toggled, m_uiForm.mwFixWidthDat , &FileFinderWidget::setEnabled);
50
+ connect (m_uiForm.chkUseResNorm , &QCheckBox::toggled, m_uiForm.dsResNorm , &DataSelector::setEnabled);
52
51
// Connect the data selector for the sample to the mini plot
53
- connect (m_uiForm.dsSample , SIGNAL ( dataReady ( const QString &)) , this , SLOT ( handleSampleInputReady ( const QString &)) );
54
- connect (m_uiForm.dsSample , SIGNAL ( filesAutoLoaded ()), this , SLOT ( enableView ()) );
52
+ connect (m_uiForm.dsSample , &DataSelector::dataReady , this , &Quasi::handleSampleInputReady );
53
+ connect (m_uiForm.dsSample , &DataSelector:: filesAutoLoaded, [=] { this -> enableView (); } );
55
54
56
- connect (m_uiForm.dsResolution , SIGNAL (dataReady (const QString &)), this ,
57
- SLOT (handleResolutionInputReady (const QString &)));
58
- connect (m_uiForm.dsResolution , SIGNAL (filesAutoLoaded ()), this , SLOT (enableView ()));
55
+ connect (m_uiForm.dsResolution , &DataSelector::dataReady, this , &Quasi::handleResolutionInputReady);
56
+ connect (m_uiForm.dsResolution , &DataSelector::filesAutoLoaded, [=] { this ->enableView (); });
59
57
60
58
// Connect the program selector to its handler
61
- connect (m_uiForm.cbProgram , SIGNAL ( currentIndexChanged (int )), this , SLOT ( handleProgramChange ( int )));
62
-
59
+ connect (m_uiForm.cbProgram , static_cast < void (QComboBox::*) (int )>(&QComboBox::currentIndexChanged ), this ,
60
+ &Quasi::handleProgramChange);
63
61
// Connect preview spectrum spinner to handler
64
- connect (m_uiForm.spPreviewSpectrum , SIGNAL ( valueChanged (int )), this , SLOT ( previewSpecChanged ( int )));
65
-
62
+ connect (m_uiForm.spPreviewSpectrum , static_cast < void (QSpinBox::*) (int )>(&QSpinBox::valueChanged ), this ,
63
+ &Quasi::previewSpecChanged);
66
64
// Plot current preview
67
- connect (m_uiForm.pbPlotPreview , SIGNAL (clicked ()), this , SLOT (plotCurrentPreview ()));
68
-
69
- connect (m_uiForm.pbSave , SIGNAL (clicked ()), this , SLOT (saveClicked ()));
70
- connect (m_uiForm.pbPlot , SIGNAL (clicked ()), this , SLOT (plotClicked ()));
65
+ connect (m_uiForm.pbPlotPreview , &QPushButton::clicked, this , &Quasi::plotCurrentPreview);
66
+ connect (m_uiForm.pbSave , &QPushButton::clicked, this , &Quasi::saveClicked);
67
+ connect (m_uiForm.pbPlot , &QPushButton::clicked, this , &Quasi::plotClicked);
71
68
72
69
// Allows empty workspace selector when initially selected
73
70
m_uiForm.dsSample ->isOptional (true );
@@ -351,8 +348,7 @@ void Quasi::handleRun() {
351
348
352
349
m_QuasiAlg = runAlg;
353
350
m_batchAlgoRunner->addAlgorithm (runAlg);
354
- connect (m_batchAlgoRunner, SIGNAL (batchComplete (bool )), this , SLOT (algorithmComplete (bool )));
355
-
351
+ connect (m_batchAlgoRunner, &API::BatchAlgorithmRunner::batchComplete, this , &Quasi::algorithmComplete);
356
352
m_batchAlgoRunner->executeBatchAsync ();
357
353
}
358
354
@@ -496,10 +492,9 @@ void Quasi::handleResolutionInputReady(const QString &wsName) {
496
492
* @param min :: The new value of the lower guide
497
493
*/
498
494
void Quasi::minValueChanged (double min) {
499
- disconnect (m_dblManager, SIGNAL (valueChanged (QtProperty *, double )), this ,
500
- SLOT (updateProperties (QtProperty *, double )));
495
+ disconnect (m_dblManager, &QtDoublePropertyManager::valueChanged, this , &Quasi::updateProperties);
501
496
m_dblManager->setValue (m_properties[" EMin" ], min);
502
- connect (m_dblManager, SIGNAL ( valueChanged (QtProperty *, double )), this , SLOT ( updateProperties (QtProperty *, double )) );
497
+ connect (m_dblManager, &QtDoublePropertyManager:: valueChanged, this , &Quasi:: updateProperties);
503
498
}
504
499
505
500
/* *
@@ -508,10 +503,9 @@ void Quasi::minValueChanged(double min) {
508
503
* @param max :: The new value of the upper guide
509
504
*/
510
505
void Quasi::maxValueChanged (double max) {
511
- disconnect (m_dblManager, SIGNAL (valueChanged (QtProperty *, double )), this ,
512
- SLOT (updateProperties (QtProperty *, double )));
506
+ disconnect (m_dblManager, &QtDoublePropertyManager::valueChanged, this , &Quasi::updateProperties);
513
507
m_dblManager->setValue (m_properties[" EMax" ], max);
514
- connect (m_dblManager, SIGNAL ( valueChanged (QtProperty *, double )), this , SLOT ( updateProperties (QtProperty *, double )) );
508
+ connect (m_dblManager, &QtDoublePropertyManager:: valueChanged, this , &Quasi:: updateProperties);
515
509
}
516
510
517
511
/* *
@@ -523,16 +517,15 @@ void Quasi::maxValueChanged(double max) {
523
517
void Quasi::updateProperties (QtProperty *prop, double val) {
524
518
auto eRangeSelector = m_uiForm.ppPlot ->getRangeSelector (" QuasiERange" );
525
519
526
- disconnect (m_dblManager, SIGNAL (valueChanged (QtProperty *, double )), this ,
527
- SLOT (updateProperties (QtProperty *, double )));
520
+ disconnect (m_dblManager, &QtDoublePropertyManager::valueChanged, this , &Quasi::updateProperties);
528
521
529
522
if (prop == m_properties[" EMin" ]) {
530
523
setRangeSelectorMin (m_properties[" EMin" ], m_properties[" EMax" ], eRangeSelector, val);
531
524
} else if (prop == m_properties[" EMax" ]) {
532
525
setRangeSelectorMax (m_properties[" EMin" ], m_properties[" EMax" ], eRangeSelector, val);
533
526
}
534
527
535
- connect (m_dblManager, SIGNAL ( valueChanged (QtProperty *, double )), this , SLOT ( updateProperties (QtProperty *, double )) );
528
+ connect (m_dblManager, &QtDoublePropertyManager:: valueChanged, this , &Quasi:: updateProperties);
536
529
}
537
530
538
531
/* *
0 commit comments