X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fmarginwidget.cpp;h=6b646832690974b21d77720e858141afc9b3677f;hb=786b76785856c6cf8f5916c0b8d76a61695762f9;hp=e44233c80291c8a1cb1bdd2a5078ef9d505d6211;hpb=f4433aa958fb9c85ce82ef5545d722625cb64f9e;p=pulseview.git diff --git a/pv/view/marginwidget.cpp b/pv/view/marginwidget.cpp index e44233c..6b64683 100644 --- a/pv/view/marginwidget.cpp +++ b/pv/view/marginwidget.cpp @@ -22,6 +22,10 @@ #include "marginwidget.hpp" +#include + +using std::shared_ptr; + namespace pv { namespace view { @@ -31,6 +35,15 @@ MarginWidget::MarginWidget(View &parent) : dragging_(false) { setAttribute(Qt::WA_NoSystemBackground, true); + setFocusPolicy(Qt::ClickFocus); + setMouseTracking(true); +} + +void MarginWidget::show_popup(const shared_ptr &item) +{ + pv::widgets::Popup *const p = item->create_popup(this); + if (p) + p->show(); } void MarginWidget::clear_selection()