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)  

XYAnalysisCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYAnalysisCurve.h
3  Project : LabPlot
4  Description : Base class for all analysis curves
5  --------------------------------------------------------------------
6  Copyright : (C) 2017 Alexander Semke (alexander.semke@web.de)
7  Copyright : (C) 2018 Stefan Gerlach (stefan.gerlach@uni.kn)
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 XYANALYSISCURVE_H
31 #define XYANALYSISCURVE_H
32 
34 
36 
37 class XYAnalysisCurve : public XYCurve {
38  Q_OBJECT
39 
40 public:
42 
43  XYAnalysisCurve(const QString&, AspectType type);
44  ~XYAnalysisCurve() override;
45 
46  static void copyData(QVector<double>& xData, QVector<double>& yData, const AbstractColumn* xDataColumn, const AbstractColumn* yDataColumn, double xMin, double xMax);
47 
48  virtual void recalculate() = 0;
49  void save(QXmlStreamWriter*) const override;
50  bool load(XmlStreamReader*, bool preview) override;
51 
53  POINTER_D_ACCESSOR_DECL(const XYCurve, dataSourceCurve, DataSourceCurve)
54  const QString& dataSourceCurvePath() const;
55 
56  POINTER_D_ACCESSOR_DECL(const AbstractColumn, xDataColumn, XDataColumn)
57  POINTER_D_ACCESSOR_DECL(const AbstractColumn, yDataColumn, YDataColumn)
58  POINTER_D_ACCESSOR_DECL(const AbstractColumn, y2DataColumn, Y2DataColumn) // optional
59  CLASS_D_ACCESSOR_DECL(QString, xDataColumnPath, XDataColumnPath)
60  CLASS_D_ACCESSOR_DECL(QString, yDataColumnPath, YDataColumnPath)
61  CLASS_D_ACCESSOR_DECL(QString, y2DataColumnPath, Y2DataColumnPath)
62 
64 
65 protected:
67 
68 private:
69  Q_DECLARE_PRIVATE(XYAnalysisCurve)
70  void init();
71 
72 public slots:
74 private slots:
81 
82 signals:
83  void sourceDataChanged(); //emitted when the source data used in the analysis curves was changed to enable the recalculation in the dock widgets
89 };
90 
91 #endif
AspectType
Base class of all persistent objects in a Project.
AspectType type() const
QString name() const
Interface definition for data with column logic.
Definition: Curve.h:34
Base class for all analysis curves.
void yDataColumnChanged(const AbstractColumn *)
POINTER_D_ACCESSOR_DECL(const AbstractColumn, y2DataColumn, Y2DataColumn) typedef XYAnalysisCurvePrivate Private
static void copyData(QVector< double > &xData, QVector< double > &yData, const AbstractColumn *xDataColumn, const AbstractColumn *yDataColumn, double xMin, double xMax)
void xDataColumnAboutToBeRemoved(const AbstractAspect *)
void y2DataColumnAboutToBeRemoved(const AbstractAspect *)
~XYAnalysisCurve() override
void save(QXmlStreamWriter *) const override
Save as XML.
void yDataColumnAboutToBeRemoved(const AbstractAspect *)
XYAnalysisCurve(const QString &, AspectType type)
const QString & dataSourceCurvePath() const
void dataSourceTypeChanged(XYAnalysisCurve::DataSourceType)
void y2DataColumnNameChanged()
virtual void recalculate()=0
void dataSourceCurveChanged(const XYCurve *)
bool load(XmlStreamReader *, bool preview) override
Load from XML.
void xDataColumnChanged(const AbstractColumn *)
void y2DataColumnChanged(const AbstractColumn *)
void handleSourceDataChanged()
void sourceDataChanged()
A 2D-curve, provides an interface for editing many properties of the curve.
Definition: XYCurve.h:46
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
#define BASIC_D_ACCESSOR_DECL(type, method, Method)
Definition: macros.h:107