Increase decoding chunk size for much better performance.
[pulseview.git] / pv / views / viewbase.cpp
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
18  * along with this program; if not, see <http://www.gnu.org/licenses/>.
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
30 using std::shared_ptr;
31
32 namespace pv {
33 namespace views {
34
35 ViewBase::ViewBase(Session &session, QWidget *parent) :
36         session_(session)
37 {
38         (void)parent;
39
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()));
48 }
49
50 Session& ViewBase::session()
51 {
52         return session_;
53 }
54
55 const Session& ViewBase::session() const
56 {
57         return session_;
58 }
59
60 void ViewBase::clear_signals()
61 {
62 }
63
64 #ifdef ENABLE_DECODE
65 void ViewBase::clear_decode_signals()
66 {
67 }
68
69 void ViewBase::add_decode_signal(shared_ptr<data::SignalBase> signalbase)
70 {
71         (void)signalbase;
72 }
73
74 void ViewBase::remove_decode_signal(shared_ptr<data::SignalBase> signalbase)
75 {
76         (void)signalbase;
77 }
78 #endif
79
80 void ViewBase::save_settings(QSettings &settings) const
81 {
82         (void)settings;
83 }
84
85 void ViewBase::restore_settings(QSettings &settings)
86 {
87         (void)settings;
88 }
89
90 void ViewBase::trigger_event(util::Timestamp location)
91 {
92         (void)location;
93 }
94
95 void ViewBase::signals_changed()
96 {
97 }
98
99 void ViewBase::capture_state_updated(int state)
100 {
101         (void)state;
102 }
103
104 void ViewBase::data_updated()
105 {
106 }
107
108 } // namespace view
109 } // namespace pv