X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fmarginwidget.cpp;h=6b646832690974b21d77720e858141afc9b3677f;hb=786b76785856c6cf8f5916c0b8d76a61695762f9;hp=f3abe361feedae833531f7d54529f9e902c4a3bd;hpb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;p=pulseview.git diff --git a/pv/view/marginwidget.cpp b/pv/view/marginwidget.cpp index f3abe36..6b64683 100644 --- a/pv/view/marginwidget.cpp +++ b/pv/view/marginwidget.cpp @@ -22,14 +22,28 @@ #include "marginwidget.hpp" +#include + +using std::shared_ptr; + namespace pv { namespace view { MarginWidget::MarginWidget(View &parent) : QWidget(&parent), - view_(parent) + 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()