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, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #include <libsigrokdecode/libsigrokdecode.h>
26 #include <libsigrokcxx/libsigrokcxx.hpp>
28 #include "pv/session.hpp"
29 #include "pv/util.hpp"
31 using std::shared_ptr;
36 ViewBase::ViewBase(Session &session, QWidget *parent) :
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()));
51 Session& ViewBase::session()
56 const Session& ViewBase::session() const
61 void ViewBase::clear_signals()
66 void ViewBase::clear_decode_signals()
70 void ViewBase::add_decode_signal(shared_ptr<data::SignalBase> signalbase)
75 void ViewBase::remove_decode_signal(shared_ptr<data::SignalBase> signalbase)
81 void ViewBase::save_settings(QSettings &settings) const
86 void ViewBase::restore_settings(QSettings &settings)
91 void ViewBase::trigger_event(util::Timestamp location)
96 void ViewBase::signals_changed()
100 void ViewBase::capture_state_updated(int state)
105 void ViewBase::data_updated()