labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XYCorrelationCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYCorrelationCurve.h
3  Project : LabPlot
4  Description : A xy-curve defined by a correlation
5  --------------------------------------------------------------------
6  Copyright : (C) 2018 Stefan Gerlach (stefan.gerlach@uni.kn)
7 
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  * This program is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU General Public License *
23  * along with this program; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25  * Boston, MA 02110-1301 USA *
26  * *
27  ***************************************************************************/
28 
29 #ifndef XYCORRELATIONCURVE_H
30 #define XYCORRELATIONCURVE_H
31 
33 
34 extern "C" {
35 #include "backend/nsl/nsl_corr.h"
36 }
37 
39 
41  Q_OBJECT
42 
43 public:
44  struct CorrelationData {
46 
47  double samplingInterval{1.}; // sampling interval used when no x-axis is present
50  bool autoRange{true}; // use all data?
51  QVector<double> xRange{0., 0.}; // x range for correlation
52  };
55 
56  bool available{false};
57  bool valid{false};
58  QString status;
59  qint64 elapsedTime{0};
60  };
61 
62  explicit XYCorrelationCurve(const QString& name);
63  ~XYCorrelationCurve() override;
64 
65  void recalculate() override;
66  QIcon icon() const override;
67  void save(QXmlStreamWriter*) const override;
68  bool load(XmlStreamReader*, bool preview) override;
69 
71  const CorrelationResult& correlationResult() const;
72 
74 
75 protected:
77 
78 private:
79  Q_DECLARE_PRIVATE(XYCorrelationCurve)
80 
81 signals:
83 };
84 
85 #endif
QString name() const
Base class for all analysis curves.
A xy-curve defined by a correlation.
XYCorrelationCurvePrivate Private
XYCorrelationCurve(const QString &name)
bool load(XmlStreamReader *, bool preview) override
Load from XML.
void save(QXmlStreamWriter *) const override
Save as XML.
~XYCorrelationCurve() override
QIcon icon() const override
const CorrelationResult & correlationResult() const
void correlationDataChanged(const XYCorrelationCurve::CorrelationData &)
void recalculate() override
XML stream parser that supports errors as well as warnings. This class also adds line and column numb...
#define CLASS_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:134
nsl_corr_type_type
Definition: nsl_corr.h:36
@ nsl_corr_type_linear
Definition: nsl_corr.h:36
nsl_corr_norm_type
Definition: nsl_corr.h:45
@ nsl_corr_norm_none
Definition: nsl_corr.h:45