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

Method typeChanged

src/frontend/dockwidgets/XYInterpolationCurveDock.cpp:385–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385void XYInterpolationCurveDock::typeChanged(int index) {
386 const auto type = (nsl_interp_type)index;
387 m_interpolationData.type = type;
388
389 switch (type) {
390 case nsl_interp_type_pch:
391 uiGeneralTab.lVariant->show();
392 uiGeneralTab.cbVariant->show();
393 break;
394 case nsl_interp_type_linear:
395 case nsl_interp_type_polynomial:
396 case nsl_interp_type_cspline:
397 case nsl_interp_type_cspline_periodic:
398 case nsl_interp_type_akima:
399 case nsl_interp_type_akima_periodic:
400 case nsl_interp_type_steffen:
401 case nsl_interp_type_cosine:
402 case nsl_interp_type_exponential:
403 case nsl_interp_type_rational:
404 uiGeneralTab.lVariant->hide();
405 uiGeneralTab.cbVariant->hide();
406 uiGeneralTab.cbVariant->setCurrentIndex(nsl_interp_pch_variant_finite_difference);
407 uiGeneralTab.lParameter->hide();
408 uiGeneralTab.lTension->hide();
409 uiGeneralTab.sbTension->hide();
410 uiGeneralTab.lContinuity->hide();
411 uiGeneralTab.sbContinuity->hide();
412 uiGeneralTab.lBias->hide();
413 uiGeneralTab.sbBias->hide();
414 }
415
416 enableRecalculate();
417}
418
419void XYInterpolationCurveDock::variantChanged(int index) {
420 const auto variant = (nsl_interp_pch_variant)index;

Callers 2

initGeneralTabMethod · 0.95

Calls 2

showMethod · 0.80
setCurrentIndexMethod · 0.45

Tested by

no test coverage detected