File indexing completed on 2025-07-13 03:32:50

0001 /*
0002     File             : XYInterpolationCurveDock.h
0003     Project          : LabPlot
0004     Description      : widget for editing properties of interpolation curves
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2016-2021 Stefan Gerlach <stefan.gerlach@uni.kn>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef XYINTERPOLATIONCURVEDOCK_H
0012 #define XYINTERPOLATIONCURVEDOCK_H
0013 
0014 #include "backend/worksheet/plots/cartesian/XYAnalysisCurve.h"
0015 #include "backend/worksheet/plots/cartesian/XYInterpolationCurve.h"
0016 #include "kdefrontend/dockwidgets/XYAnalysisCurveDock.h"
0017 #include "ui_xyinterpolationcurvedockgeneraltab.h"
0018 
0019 class TreeViewComboBox;
0020 
0021 class XYInterpolationCurveDock : public XYAnalysisCurveDock {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit XYInterpolationCurveDock(QWidget* parent);
0026     void setCurves(QList<XYCurve*>);
0027     void setupGeneral() override;
0028 
0029 private:
0030     void initGeneralTab() override;
0031     void updateSettings(const AbstractColumn*) override;
0032     void showInterpolationResult();
0033 
0034     Ui::XYInterpolationCurveDockGeneralTab uiGeneralTab;
0035     XYInterpolationCurve* m_interpolationCurve{nullptr};
0036     XYInterpolationCurve::InterpolationData m_interpolationData;
0037     unsigned int dataPoints{0}; // number of data points in selected column
0038     bool m_dateTimeRange{false};
0039 
0040 protected:
0041     void setModel();
0042 
0043 private Q_SLOTS:
0044     // SLOTs for changes triggered in XYInterpolationCurveDock
0045     // general tab
0046     void dataSourceTypeChanged(int);
0047     void autoRangeChanged();
0048     void xRangeMinChanged();
0049     void xRangeMaxChanged();
0050     void xRangeMinDateTimeChanged(qint64);
0051     void xRangeMaxDateTimeChanged(qint64);
0052     void typeChanged(int);
0053     void variantChanged(int);
0054     void tensionChanged(double);
0055     void continuityChanged(double);
0056     void biasChanged(double);
0057     void evaluateChanged(int);
0058     void numberOfPointsChanged();
0059     void pointsModeChanged(int);
0060     void recalculateClicked();
0061 
0062     // SLOTs for changes triggered in XYCurve
0063     // General-Tab
0064     void curveInterpolationDataChanged(const XYInterpolationCurve::InterpolationData&);
0065 };
0066 
0067 #endif