mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move most of the QtQuick code to its own directory, so that it can be reused in the future for the chart. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
29 lines
653 B
C++
29 lines
653 B
C++
// A regression line and confidence area
|
|
#ifndef REGRESSION_H
|
|
#define REGRESSION_H
|
|
|
|
#include "chartitem.h"
|
|
|
|
class StatsAxis;
|
|
class StatsTheme;
|
|
|
|
struct regression_data {
|
|
double a,b;
|
|
double res2, r2, sx2, xavg;
|
|
int n;
|
|
};
|
|
|
|
class RegressionItem : public ChartPixmapItem {
|
|
public:
|
|
RegressionItem(ChartView &view, const StatsTheme &theme, regression_data data, StatsAxis *xAxis, StatsAxis *yAxis);
|
|
~RegressionItem();
|
|
void updatePosition();
|
|
void setFeatures(bool regression, bool confidence);
|
|
private:
|
|
const StatsTheme &theme; // Initialized once in constructor
|
|
StatsAxis *xAxis, *yAxis;
|
|
regression_data reg;
|
|
bool regression, confidence;
|
|
};
|
|
|
|
#endif
|