2 * This file is part of the PulseView project.
4 * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
5 * Copyright (C) 2016 Soeren Apel <soeren@apelpie.net>
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.
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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #include <libsigrokdecode/libsigrokdecode.h>
25 #include <libsigrokcxx/libsigrokcxx.hpp>
27 #include "pv/session.hpp"
28 #include "pv/util.hpp"
30 using std::shared_ptr;
35 ViewBase::ViewBase(Session &session, QWidget *parent) :
40 connect(&session_, SIGNAL(signals_changed()),
41 this, SLOT(signals_changed()));
42 connect(&session_, SIGNAL(capture_state_changed(int)),
43 this, SLOT(capture_state_updated(int)));
44 connect(&session_, SIGNAL(data_received()),
45 this, SLOT(data_updated()));
46 connect(&session_, SIGNAL(frame_ended()),
47 this, SLOT(data_updated()));
50 Session& ViewBase::session()
55 const Session& ViewBase::session() const
60 void ViewBase::clear_signals()
65 void ViewBase::clear_decode_signals()
69 void ViewBase::add_decode_signal(shared_ptr<data::SignalBase> signalbase)
74 void ViewBase::remove_decode_signal(shared_ptr<data::SignalBase> signalbase)
80 void ViewBase::save_settings(QSettings &settings) const
85 void ViewBase::restore_settings(QSettings &settings)
90 void ViewBase::trigger_event(util::Timestamp location)
95 void ViewBase::signals_changed()
99 void ViewBase::capture_state_updated(int state)
104 void ViewBase::data_updated()