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)  

XYFourierFilterCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XYFourierFilterCurve.h
3  Project : LabPlot
4  Description : A xy-curve defined by a Fourier filter
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 XYFOURIERFILTERCURVE_H
31 #define XYFOURIERFILTERCURVE_H
32 
34 extern "C" {
35 #include "backend/nsl/nsl_filter.h"
36 }
37 
39 
41  Q_OBJECT
42 
43 public:
44  struct FilterData {
45  FilterData() : xRange(2) {};
46 
49  int order{1};
50  double cutoff{0.0}; // (low) cutoff
52  double cutoff2{0.0}; // high cutoff
54  bool autoRange{true}; // use all data?
55  QVector<double> xRange; // x range for integration
56  };
57  struct FilterResult {
59 
60  bool available{false};
61  bool valid{false};
62  QString status;
63  qint64 elapsedTime{0};
64  };
65 
66  explicit XYFourierFilterCurve(const QString& name);
68 
69  void recalculate() override;
70  QIcon icon() const override;
71  void save(QXmlStreamWriter*) const override;
72  bool load(XmlStreamReader*, bool preview) override;
73 
75  const FilterResult& filterResult() const;
76 
78 
79 protected:
81 
82 private:
83  Q_DECLARE_PRIVATE(XYFourierFilterCurve)
84 
85 signals:
87 };
88 
89 #endif
QString name() const
Base class for all analysis curves.
A xy-curve defined by a Fourier filter.
bool load(XmlStreamReader *, bool preview) override
Load from XML.
void save(QXmlStreamWriter *) const override
Save as XML.
const FilterResult & filterResult() const
XYFourierFilterCurvePrivate Private
void filterDataChanged(const XYFourierFilterCurve::FilterData &)
~XYFourierFilterCurve() override
XYFourierFilterCurve(const QString &name)
QIcon icon() const 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_filter_form
Definition: nsl_filter.h:39
@ nsl_filter_form_ideal
Definition: nsl_filter.h:39
nsl_filter_cutoff_unit
Definition: nsl_filter.h:46
@ nsl_filter_cutoff_unit_frequency
Definition: nsl_filter.h:46
nsl_filter_type
Definition: nsl_filter.h:35
@ nsl_filter_type_low_pass
Definition: nsl_filter.h:35