]>
Commit | Line | Data |
---|---|---|
55d3603d JH |
1 | /* |
2 | * This file is part of the PulseView project. | |
3 | * | |
4 | * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk> | |
5 | * | |
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. | |
10 | * | |
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. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
19 | */ | |
20 | ||
21 | extern "C" { | |
22 | #include <libsigrokdecode/libsigrokdecode.h> | |
23 | } | |
24 | ||
25 | #include "decodesignal.h" | |
26 | ||
119aff65 | 27 | #include <pv/data/decoder.h> |
e0fc5810 | 28 | #include <pv/view/view.h> |
119aff65 | 29 | |
55d3603d JH |
30 | using namespace boost; |
31 | using namespace std; | |
32 | ||
33 | namespace pv { | |
34 | namespace view { | |
35 | ||
119aff65 JH |
36 | DecodeSignal::DecodeSignal(pv::SigSession &session, |
37 | boost::shared_ptr<pv::data::Decoder> decoder) : | |
38 | Trace(session, QString(decoder->get_decoder()->name)), | |
39 | _decoder(decoder) | |
55d3603d | 40 | { |
e0fc5810 JH |
41 | assert(_decoder); |
42 | ||
55d3603d JH |
43 | _colour = Qt::red; |
44 | } | |
45 | ||
82c7f640 JH |
46 | void DecodeSignal::init_context_bar_actions(QWidget *parent) |
47 | { | |
48 | (void)parent; | |
49 | } | |
50 | ||
55d3603d JH |
51 | bool DecodeSignal::enabled() const |
52 | { | |
53 | return true; | |
54 | } | |
55 | ||
e0fc5810 JH |
56 | void DecodeSignal::set_view(pv::view::View *view) |
57 | { | |
58 | assert(view); | |
59 | Trace::set_view(view); | |
60 | } | |
61 | ||
01fd3263 | 62 | void DecodeSignal::paint(QPainter &p, int left, int right) |
55d3603d JH |
63 | { |
64 | (void)p; | |
55d3603d JH |
65 | (void)left; |
66 | (void)right; | |
55d3603d JH |
67 | } |
68 | ||
69 | const list<QAction*> DecodeSignal::get_context_bar_actions() | |
70 | { | |
71 | list<QAction*> actions; | |
72 | return actions; | |
73 | } | |
74 | ||
75 | } // namespace view | |
76 | } // namespace pv |