]> sigrok.org Git - pulseview.git/blame - pv/data/decode/row.hpp
DecodeTrace: Highlight row expand markers when a class is hidden
[pulseview.git] / pv / data / decode / row.hpp
CommitLineData
f9101a91
JH
1/*
2 * This file is part of the PulseView project.
3 *
4 * Copyright (C) 2014 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
efdec55a 17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
f9101a91
JH
18 */
19
7a01bd36
JH
20#ifndef PULSEVIEW_PV_DATA_DECODE_ROW_HPP
21#define PULSEVIEW_PV_DATA_DECODE_ROW_HPP
f9101a91
JH
22
23#include <vector>
24
6a26fc44
SA
25#include <pv/data/decode/annotation.hpp>
26#include <pv/data/decode/decoder.hpp>
f9101a91
JH
27
28struct srd_decoder;
29struct srd_decoder_annotation_row;
30
31namespace pv {
32namespace data {
33namespace decode {
34
6a26fc44 35struct AnnotationClass;
cbb2e4da
SA
36class Decoder;
37
f9101a91
JH
38class Row
39{
40public:
41 Row();
42
6a26fc44
SA
43 Row(uint32_t index, Decoder* decoder,
44 const srd_decoder_annotation_row* srd_row = nullptr);
f9101a91 45
cbb2e4da 46 const Decoder* decoder() const;
6a26fc44 47 const srd_decoder_annotation_row* get_srd_row() const;
f9101a91 48
88908838 49 const QString title() const;
6a26fc44
SA
50 const QString description() const;
51 vector<AnnotationClass*> ann_classes() const;
52 uint32_t index() const;
88908838 53
c6b4e925
SA
54 bool visible() const;
55 void set_visible(bool visible);
56
81dc0221
SA
57 bool has_hidden_classes() const;
58
cbb2e4da
SA
59 bool operator<(const Row& other) const;
60 bool operator==(const Row& other) const;
f9101a91
JH
61
62private:
6a26fc44
SA
63 uint32_t index_;
64 Decoder* decoder_;
65 const srd_decoder_annotation_row* srd_row_;
c6b4e925 66 bool visible_;
f9101a91
JH
67};
68
870ea3db
UH
69} // namespace decode
70} // namespace data
71} // namespace pv
f9101a91 72
7a01bd36 73#endif // PULSEVIEW_PV_DATA_DECODE_ROW_HPP