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)  

XYIntegrationCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYIntegrationCurve.h
3  Project : LabPlot
4  Description : A xy-curve defined by an integration
5  --------------------------------------------------------------------
6  Copyright : (C) 2016 Stefan Gerlach (stefan.gerlach@uni.kn)
7  Copyright : (C) 2017 Alexander Semke (alexander.semke@web.de)
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 
30 #ifndef XYINTEGRATIONCURVE_H
31 #define XYINTEGRATIONCURVE_H
32 
34 extern "C" {
35 #include "backend/nsl/nsl_int.h"
36 }
37 
39 
41  Q_OBJECT
42 
43 public:
44  struct IntegrationData {
46 
48  bool absolute{false}; // absolute area?
49  bool autoRange{true}; // use all data?
50  QVector<double> xRange; // x range for integration
51  };
54 
55  bool available{false};
56  bool valid{false};
57  QString status;
58  qint64 elapsedTime{0};
59  double value{0.0}; // final result of integration
60  };
61 
62  explicit XYIntegrationCurve(const QString& name);
63  ~XYIntegrationCurve() 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 IntegrationResult& integrationResult() const;
72 
74 
75 protected:
77 
78 private:
79  Q_DECLARE_PRIVATE(XYIntegrationCurve)
80 
81 signals:
83 };
84 
85 #endif
QString name() const
Base class for all analysis curves.
A xy-curve defined by an integration.
bool load(XmlStreamReader *, bool preview) override
Load from XML.
QIcon icon() const override
void recalculate() override
const IntegrationResult & integrationResult() const
XYIntegrationCurve(const QString &name)
XYIntegrationCurvePrivate Private
~XYIntegrationCurve() override
void integrationDataChanged(const XYIntegrationCurve::IntegrationData &)
void save(QXmlStreamWriter *) const override
Save as XML.
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_int_method_type
Definition: nsl_int.h:35
@ nsl_int_method_trapezoid
Definition: nsl_int.h:35