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)  

XYFourierTransformCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYFourierTransformCurve.h
3  Project : LabPlot
4  Description : A xy-curve defined by a Fourier transform
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 XYFOURIERTRANSFORMCURVE_H
31 #define XYFOURIERTRANSFORMCURVE_H
32 
34 extern "C" {
35 #include "backend/nsl/nsl_dft.h"
37 }
38 
40 
42  Q_OBJECT
43 
44 public:
45  struct TransformData {
46  TransformData() : xRange(2) {};
47 
49  bool twoSided{false};
50  bool shifted{false};
53  bool autoRange{true}; // use all data?
54  QVector<double> xRange; // x range for transform
55  };
56  struct TransformResult {
58 
59  bool available{false};
60  bool valid{false};
61  QString status;
62  qint64 elapsedTime{0};
63  };
64 
65  explicit XYFourierTransformCurve(const QString& name);
67 
68  void recalculate() override;
69  QIcon icon() const override;
70  void save(QXmlStreamWriter*) const override;
71  bool load(XmlStreamReader*, bool preview) override;
72 
74  const TransformResult& transformResult() const;
75 
77 
78 protected:
80 
81 private:
82  Q_DECLARE_PRIVATE(XYFourierTransformCurve)
83 
84 signals:
86 };
87 
88 #endif
QString name() const
Base class for all analysis curves.
A xy-curve defined by a Fourier transform.
~XYFourierTransformCurve() override
XYFourierTransformCurve(const QString &name)
bool load(XmlStreamReader *, bool preview) override
Load from XML.
void save(QXmlStreamWriter *) const override
Save as XML.
void transformDataChanged(const XYFourierTransformCurve::TransformData &)
const TransformResult & transformResult() const
XYFourierTransformCurvePrivate Private
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_dft_result_type
Definition: nsl_dft.h:50
@ nsl_dft_result_magnitude
Definition: nsl_dft.h:50
nsl_dft_xscale
Definition: nsl_dft.h:56
@ nsl_dft_xscale_frequency
Definition: nsl_dft.h:56
nsl_sf_window_type
Definition: nsl_sf_window.h:35
@ nsl_sf_window_uniform
Definition: nsl_sf_window.h:35