OpenHantek
postprocessing.h
1 // SPDX-License-Identifier: GPL-2.0+
2 
3 #pragma once
4 
5 #include "dsosamples.h"
6 #include "processor.h"
7 
8 #include <memory>
9 #include <vector>
10 
11 #include <QObject>
12 
13 struct DsoSettingsScope;
14 
20 class PostProcessing : public QObject {
21  Q_OBJECT
22  public:
23  PostProcessing(unsigned channelCount);
30  void registerProcessor(Processor *processor);
31 
32 
33  private:
35  const unsigned channelCount;
37  std::vector<Processor *> processors;
39  std::unique_ptr<PPresult> currentData;
40  static void convertData(const DSOsamples *source, PPresult *destination);
41  public slots:
47  void input(const DSOsamples *data);
48 signals:
49  void processingFinished(std::shared_ptr<PPresult> result);
50 };
51 
52 Q_DECLARE_METATYPE(std::shared_ptr<PPresult>)
Definition: dsosamples.h:10
Definition: postprocessing.h:20
Definition: processor.h:5
void input(const DSOsamples *data)
Definition: postprocessing.cpp:23
Holds the settings for the oscilloscope.
Definition: scopesettings.h:77
Post processing results.
Definition: ppresult.h:31
void registerProcessor(Processor *processor)
Definition: postprocessing.cpp:7