#include <extdef.h>
+#include <QAction>
+
#include "decodesignal.h"
#include <pv/sigsession.h>
vector< shared_ptr<Annotation> > annotations(_decoder->annotations());
BOOST_FOREACH(shared_ptr<Annotation> a, annotations) {
assert(a);
- a->paint(p, _colour, _colour.darker(), get_text_colour(),
- _text_size.height(), left, right, samples_per_pixel,
- pixels_offset, y);
+ a->paint(p, get_text_colour(), _text_size.height(),
+ left, right, samples_per_pixel, pixels_offset, y);
}
}
return actions;
}
+QMenu* DecodeSignal::create_context_menu(QWidget *parent)
+{
+ QMenu *const menu = Trace::create_context_menu(parent);
+
+ menu->addSeparator();
+
+ QAction *const del = new QAction(tr("Delete"), this);
+ connect(del, SIGNAL(triggered()), this, SLOT(on_delete()));
+ menu->addAction(del);
+
+ return menu;
+}
+
void DecodeSignal::on_new_decode_data()
{
if (_view)
_view->update_viewport();
}
+void DecodeSignal::on_delete()
+{
+ _session.remove_decode_signal(this);
+}
+
} // namespace view
} // namespace pv