2 * This file is part of the PulseView project.
4 * Copyright (C) 2019 Soeren Apel <soeren@apelpie.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #include <libsigrokdecode/libsigrokdecode.h>
23 #include <QVBoxLayout>
27 #include "pv/session.hpp"
28 #include "pv/util.hpp"
30 using pv::util::TimeUnit;
31 using pv::util::Timestamp;
33 using std::shared_ptr;
37 namespace decoder_output {
39 View::View(Session &session, bool is_main_view, QWidget *parent) :
40 ViewBase(session, is_main_view, parent)
42 // Note: Place defaults in View::reset_view_state(), not here
44 QVBoxLayout *root_layout = new QVBoxLayout(this);
45 root_layout->setContentsMargins(0, 0, 0, 0);
54 void View::reset_view_state()
56 ViewBase::reset_view_state();
59 void View::clear_signals()
61 ViewBase::clear_signalbases();
64 void View::clear_decode_signals()
68 void View::add_decode_signal(shared_ptr<data::DecodeSignal> signal)
70 connect(signal.get(), SIGNAL(name_changed(const QString&)),
71 this, SLOT(on_signal_name_changed()));
74 void View::remove_decode_signal(shared_ptr<data::DecodeSignal> signal)
79 void View::save_settings(QSettings &settings) const
84 void View::restore_settings(QSettings &settings)
86 // Note: It is assumed that this function is only called once,
87 // immediately after restoring a previous session.
91 void View::on_signal_name_changed()
95 } // namespace decoder_output