X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fmathsignal.hpp;fp=pv%2Fdata%2Fmathsignal.hpp;h=04380cdc813f5d734f9dcaf7c356c0de5cb41747;hp=0000000000000000000000000000000000000000;hb=b0773a8aa01735d7220284ab7a3e8b5d02b48e9e;hpb=4b018bf1eeed0f7b80120d41d7881673a2f29e61 diff --git a/pv/data/mathsignal.hpp b/pv/data/mathsignal.hpp new file mode 100644 index 00000000..04380cdc --- /dev/null +++ b/pv/data/mathsignal.hpp @@ -0,0 +1,80 @@ +/* + * This file is part of the PulseView project. + * + * Copyright (C) 2020 Soeren Apel + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#ifndef PULSEVIEW_PV_DATA_MATHSIGNAL_HPP +#define PULSEVIEW_PV_DATA_MATHSIGNAL_HPP + +#include +#include + +#include +#include +#include + +using std::shared_ptr; + +namespace pv { +class Session; + +namespace data { + +class SignalBase; +class SignalData; + +class MathSignal : public SignalBase +{ + Q_OBJECT + +private: + static const int64_t ChunkLength; + +public: + MathSignal(pv::Session &session); + virtual ~MathSignal(); + + virtual void save_settings(QSettings &settings) const; + virtual void restore_settings(QSettings &settings); + +Q_SIGNALS: + void samples_cleared(); + + void samples_added(uint64_t segment_id, uint64_t start_sample, + uint64_t end_sample); + + void min_max_changed(float min, float max); + +//private Q_SLOTS: +// void on_data_cleared(); +// void on_data_received(); + +// void on_samples_added(SharedPtrToSegment segment, uint64_t start_sample, +// uint64_t end_sample); + +// void on_min_max_changed(float min, float max); + +private: + pv::Session &session_; + + QString error_message_; +}; + +} // namespace data +} // namespace pv + +#endif // PULSEVIEW_PV_DATA_MATHSIGNAL_HPP