SLOTs for changes triggered in XYFitCurveDock
| 181 | //**** SLOTs for changes triggered in XYFitCurveDock ***** |
| 182 | //************************************************************* |
| 183 | void XYDataReductionCurveDock::dataSourceTypeChanged(int index) { |
| 184 | const auto type = (XYAnalysisCurve::DataSourceType)index; |
| 185 | if (type == XYAnalysisCurve::DataSourceType::Spreadsheet) { |
| 186 | uiGeneralTab.lDataSourceCurve->hide(); |
| 187 | cbDataSourceCurve->hide(); |
| 188 | uiGeneralTab.lXColumn->show(); |
| 189 | cbXDataColumn->show(); |
| 190 | uiGeneralTab.lYColumn->show(); |
| 191 | cbYDataColumn->show(); |
| 192 | } else { |
| 193 | uiGeneralTab.lDataSourceCurve->show(); |
| 194 | cbDataSourceCurve->show(); |
| 195 | uiGeneralTab.lXColumn->hide(); |
| 196 | cbXDataColumn->hide(); |
| 197 | uiGeneralTab.lYColumn->hide(); |
| 198 | cbYDataColumn->hide(); |
| 199 | } |
| 200 | |
| 201 | CONDITIONAL_LOCK_RETURN; |
| 202 | |
| 203 | for (auto* curve : m_curvesList) |
| 204 | static_cast<XYDataReductionCurve*>(curve)->setDataSourceType(type); |
| 205 | |
| 206 | enableRecalculate(); |
| 207 | } |
| 208 | |
| 209 | void XYDataReductionCurveDock::xDataColumnChanged(const QModelIndex& index) { |
| 210 | CONDITIONAL_LOCK_RETURN; |
no test coverage detected