]> sigrok.org Git - pulseview.git/blame - pv/data/mathsignal.hpp
Device binding: Notify user when a config option is ignored
[pulseview.git] / pv / data / mathsignal.hpp
CommitLineData
b0773a8a
SA
1/*
2 * This file is part of the PulseView project.
3 *
4 * Copyright (C) 2020 Soeren Apel <soeren@apelpie.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef PULSEVIEW_PV_DATA_MATHSIGNAL_HPP
21#define PULSEVIEW_PV_DATA_MATHSIGNAL_HPP
22
23#include <QSettings>
24#include <QString>
25
26#include <pv/data/analog.hpp>
27#include <pv/data/signalbase.hpp>
28#include <pv/util.hpp>
29
30using std::shared_ptr;
31
32namespace pv {
33class Session;
34
35namespace data {
36
37class SignalBase;
38class SignalData;
39
40class MathSignal : public SignalBase
41{
42 Q_OBJECT
43
44private:
45 static const int64_t ChunkLength;
46
47public:
48 MathSignal(pv::Session &session);
49 virtual ~MathSignal();
50
51 virtual void save_settings(QSettings &settings) const;
52 virtual void restore_settings(QSettings &settings);
53
54Q_SIGNALS:
55 void samples_cleared();
56
57 void samples_added(uint64_t segment_id, uint64_t start_sample,
58 uint64_t end_sample);
59
60 void min_max_changed(float min, float max);
61
62//private Q_SLOTS:
63// void on_data_cleared();
64// void on_data_received();
65
66// void on_samples_added(SharedPtrToSegment segment, uint64_t start_sample,
67// uint64_t end_sample);
68
69// void on_min_max_changed(float min, float max);
70
71private:
72 pv::Session &session_;
73
74 QString error_message_;
75};
76
77} // namespace data
78} // namespace pv
79
80#endif // PULSEVIEW_PV_DATA_MATHSIGNAL_HPP