projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SignalBase: Also emit data related signals
[pulseview.git]
/
pv
/
data
/
analog.hpp
diff --git
a/pv/data/analog.hpp
b/pv/data/analog.hpp
index 58f5f3f70cda9545a7f0706e96d6f60b6adbbffe..5b6e5ee8600acf15452f52b40d1f815b9fc04f2d 100644
(file)
--- a/
pv/data/analog.hpp
+++ b/
pv/data/analog.hpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* 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, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PULSEVIEW_PV_DATA_ANALOG_HPP
*/
#ifndef PULSEVIEW_PV_DATA_ANALOG_HPP
@@
-26,30
+25,45
@@
#include <deque>
#include <memory>
#include <deque>
#include <memory>
+#include <QObject>
+
+using std::deque;
+using std::shared_ptr;
+using std::vector;
+
namespace pv {
namespace data {
class AnalogSegment;
namespace pv {
namespace data {
class AnalogSegment;
-class Analog : public SignalData
+class Analog : public
QObject, public
SignalData
{
{
+ Q_OBJECT
+
public:
Analog();
public:
Analog();
- void push_segment(
- std::shared_ptr<AnalogSegment> &segment);
+ void push_segment(shared_ptr<AnalogSegment> &segment);
- const std::deque< std::shared_ptr<AnalogSegment> >&
- analog_segments() const;
+ const deque< shared_ptr<AnalogSegment> >& analog_segments() const;
-
std::vector< std::
shared_ptr<Segment> > segments() const;
+
vector<
shared_ptr<Segment> > segments() const;
void clear();
uint64_t max_sample_count() const;
void clear();
uint64_t max_sample_count() const;
+ void notify_samples_added(QObject* segment, uint64_t start_sample,
+ uint64_t end_sample);
+
+Q_SIGNALS:
+ void samples_cleared();
+
+ void samples_added(QObject* segment, uint64_t start_sample,
+ uint64_t end_sample);
+
private:
private:
-
std::deque< std::
shared_ptr<AnalogSegment> > segments_;
+
deque<
shared_ptr<AnalogSegment> > segments_;
};
} // namespace data
};
} // namespace data