MCPcopy Create free account
hub / github.com/KDE/labplot / dataSourceTypeChanged

Method dataSourceTypeChanged

src/frontend/dockwidgets/XYInterpolationCurveDock.cpp:231–255  ·  view source on GitHub ↗

SLOTs for changes triggered in XYFitCurveDock

Source from the content-addressed store, hash-verified

229//**** SLOTs for changes triggered in XYFitCurveDock *****
230//*************************************************************
231void XYInterpolationCurveDock::dataSourceTypeChanged(int index) {
232 const auto type = (XYAnalysisCurve::DataSourceType)index;
233 if (type == XYAnalysisCurve::DataSourceType::Spreadsheet) {
234 uiGeneralTab.lDataSourceCurve->hide();
235 cbDataSourceCurve->hide();
236 uiGeneralTab.lXColumn->show();
237 cbXDataColumn->show();
238 uiGeneralTab.lYColumn->show();
239 cbYDataColumn->show();
240 } else {
241 uiGeneralTab.lDataSourceCurve->show();
242 cbDataSourceCurve->show();
243 uiGeneralTab.lXColumn->hide();
244 cbXDataColumn->hide();
245 uiGeneralTab.lYColumn->hide();
246 cbYDataColumn->hide();
247 }
248
249 CONDITIONAL_LOCK_RETURN;
250
251 for (auto* curve : m_curvesList)
252 static_cast<XYInterpolationCurve*>(curve)->setDataSourceType(type);
253
254 enableRecalculate();
255}
256
257void XYInterpolationCurveDock::updateSettings(const AbstractColumn* column) {
258 if (!column)

Callers 1

initGeneralTabMethod · 0.95

Calls 2

showMethod · 0.80
setDataSourceTypeMethod · 0.80

Tested by

no test coverage detected