projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ruler: Make get_mouse_over_item return shared_ptr<ViewItem>
[pulseview.git]
/
pv
/
view
/
marginwidget.cpp
diff --git
a/pv/view/marginwidget.cpp
b/pv/view/marginwidget.cpp
index f8302f646f73867589e68027580fb8435e378895..b4b12140276c0b4faf11f9dab36a4d6a6ed7c117 100644
(file)
--- a/
pv/view/marginwidget.cpp
+++ b/
pv/view/marginwidget.cpp
@@
-22,6
+22,10
@@
#include "marginwidget.hpp"
#include "marginwidget.hpp"
+#include <pv/widgets/popup.hpp>
+
+using std::shared_ptr;
+
namespace pv {
namespace view {
namespace pv {
namespace view {
@@
-35,6
+39,19
@@
MarginWidget::MarginWidget(View &parent) :
setMouseTracking(true);
}
setMouseTracking(true);
}
+void MarginWidget::show_popup(const shared_ptr<ViewItem> &item)
+{
+ pv::widgets::Popup *const p = item->create_popup(this);
+ if (p)
+ p->show();
+}
+
+void MarginWidget::leaveEvent(QEvent*)
+{
+ mouse_point_ = QPoint(-1, -1);
+ update();
+}
+
void MarginWidget::clear_selection()
{
}
void MarginWidget::clear_selection()
{
}