assert(_decoder_stack);
const vector<Row> rows(_decoder_stack->get_visible_rows());
- _cur_row_headings.clear();
+ _visible_rows.clear();
for (size_t i = 0; i < rows.size(); i++)
{
const Row &row = rows[i];
base_colour);
y += _row_height;
- _cur_row_headings.push_back(row.title());
+ _visible_rows.push_back(rows[i]);
}
}
assert(_row_height);
- for (size_t i = 0; i < _cur_row_headings.size(); i++)
+ for (size_t i = 0; i < _visible_rows.size(); i++)
{
const int y = i * _row_height + get_y();
const QRect r(left + ArrowSize * 2, y - _row_height / 2,
right - left, _row_height);
- const QString h(_cur_row_headings[i]);
+ const QString h(_visible_rows[i].title());
const int f = Qt::AlignLeft | Qt::AlignVCenter |
Qt::TextDontClip;
// so we set trace.left to 1 to exclude this.
QRect trace(1, get_y() - (_row_height/2),
- _view->width(), _row_height * _cur_row_headings.size());
+ _view->width(), _row_height * _visible_rows.size());
// Note: We don't need to check for _row_height being 0 here but
// we do it anyway to be more robust.
QPoint hp = _view->hover_point();
int hover_row = (hp.y() - get_y() + (_row_height/2)) / _row_height;
- const vector<pv::data::decode::Row> rows(_decoder_stack->get_visible_rows());
-
- return min(hover_row, (int)rows.size() - 1);
+ return min(hover_row, (int)_visible_rows.size() - 1);
}
const QString DecodeTrace::get_annotation_at_hover_point()
pair<uint64_t, uint64_t> sample_range = get_sample_range(hp.x(), hp.x() + 1);
- assert(_decoder_stack);
- const vector<pv::data::decode::Row> rows(_decoder_stack->get_visible_rows());
-
const int hover_row = get_row_at_hover_point();
vector<pv::data::decode::Annotation> annotations;
- _decoder_stack->get_annotation_subset(annotations, rows[hover_row],
+ assert(_decoder_stack);
+ _decoder_stack->get_annotation_subset(annotations, _visible_rows[hover_row],
sample_range.first, sample_range.second);
return (annotations.empty()) ?
#include <QSignalMapper>
#include <pv/prop/binding/decoderoptions.h>
+#include <pv/data/decode/row.h>
struct srd_channel;
struct srd_decoder;
std::list<ChannelSelector> _channel_selectors;
std::vector<pv::widgets::DecoderGroupBox*> _decoder_forms;
- std::vector<QString> _cur_row_headings;
+ std::vector<data::decode::Row> _visible_rows;
int _text_height, _row_height;
QSignalMapper _delete_mapper, _show_hide_mapper;