]> sigrok.org Git - pulseview.git/blame - pv/views/viewbase.cpp
Don't use deprecated headers.
[pulseview.git] / pv / views / viewbase.cpp
CommitLineData
f4e57597
SA
1/*
2 * This file is part of the PulseView project.
3 *
4 * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
5 * Copyright (C) 2016 Soeren Apel <soeren@apelpie.net>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
efdec55a 18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
f4e57597
SA
19 */
20
21#ifdef ENABLE_DECODE
22#include <libsigrokdecode/libsigrokdecode.h>
23#endif
24
25#include <libsigrokcxx/libsigrokcxx.hpp>
26
27#include "pv/session.hpp"
28#include "pv/util.hpp"
29
30using std::shared_ptr;
31
32namespace pv {
33namespace views {
34
143d322d
SA
35ViewBase::ViewBase(Session &session, bool is_main_view, QWidget *parent) :
36 session_(session),
37 is_main_view_(is_main_view)
f4e57597
SA
38{
39 (void)parent;
40
41 connect(&session_, SIGNAL(signals_changed()),
42 this, SLOT(signals_changed()));
43 connect(&session_, SIGNAL(capture_state_changed(int)),
44 this, SLOT(capture_state_updated(int)));
45 connect(&session_, SIGNAL(data_received()),
46 this, SLOT(data_updated()));
47 connect(&session_, SIGNAL(frame_ended()),
48 this, SLOT(data_updated()));
49}
50
51Session& ViewBase::session()
52{
53 return session_;
54}
55
56const Session& ViewBase::session() const
57{
58 return session_;
59}
60
61void ViewBase::clear_signals()
62{
63}
64
65#ifdef ENABLE_DECODE
66void ViewBase::clear_decode_signals()
67{
68}
69
70void ViewBase::add_decode_signal(shared_ptr<data::SignalBase> signalbase)
71{
72 (void)signalbase;
73}
74
75void ViewBase::remove_decode_signal(shared_ptr<data::SignalBase> signalbase)
76{
77 (void)signalbase;
78}
79#endif
80
81void ViewBase::save_settings(QSettings &settings) const
82{
83 (void)settings;
84}
85
86void ViewBase::restore_settings(QSettings &settings)
87{
88 (void)settings;
89}
90
91void ViewBase::trigger_event(util::Timestamp location)
92{
93 (void)location;
94}
95
96void ViewBase::signals_changed()
97{
98}
99
100void ViewBase::capture_state_updated(int state)
101{
102 (void)state;
103}
104
105void ViewBase::data_updated()
106{
107}
108
109} // namespace view
110} // namespace pv