return make_pair(-row_height, row_height * row_count);
}
-void DecodeTrace::paint_back(QPainter &p, const ViewItemPaintParams &pp)
+void DecodeTrace::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
Trace::paint_back(p, pp);
paint_axis(p, pp, get_visual_y());
}
-void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
+void DecodeTrace::paint_mid(QPainter &p, ViewItemPaintParams &pp)
{
using namespace pv::data::decode;
max_visible_rows_ = max(max_visible_rows_, (int)visible_rows_.size());
}
-void DecodeTrace::paint_fore(QPainter &p, const ViewItemPaintParams &pp)
+void DecodeTrace::paint_fore(QPainter &p, ViewItemPaintParams &pp)
{
using namespace pv::data::decode;
QPushButton *const stack_button =
new QPushButton(tr("Stack Decoder"), parent);
stack_button->setMenu(decoder_menu);
+ stack_button->setToolTip(tr("Stack a higher-level decoder on top of this one"));
QHBoxLayout *stack_button_box = new QHBoxLayout;
stack_button_box->addWidget(stack_button, 0, Qt::AlignRight);
annotations.begin(), annotations.end(),
[&](const Annotation &a) { return a.format() == format; });
+ const QRectF rect(start, top, end - start, bottom - top);
+ const int r = h / 4;
+
+ p.setPen(QPen(Qt::NoPen));
+ p.setBrush(Qt::white);
+ p.drawRoundedRect(rect, r, r);
+
p.setPen((single_format ? OutlineColours[colour] : Qt::gray));
p.setBrush(QBrush((single_format ? Colours[colour] : Qt::gray),
Qt::Dense4Pattern));
- p.drawRoundedRect(
- QRectF(start, top, end - start, bottom - top), h / 4, h / 4);
+ p.drawRoundedRect(rect, r, r);
}
void DecodeTrace::draw_instant(const pv::data::decode::Annotation &a, QPainter &p,
pv::widgets::DecoderGroupBox *const group =
new pv::widgets::DecoderGroupBox(
- QString::fromUtf8(decoder->name), nullptr, decoder_deletable);
+ QString::fromUtf8(decoder->name),
+ tr("%1:\n%2").arg(QString::fromUtf8(decoder->longname),
+ QString::fromUtf8(decoder->desc)),
+ nullptr, decoder_deletable);
group->set_decoder_visible(dec->shown());
if (decoder_deletable) {