From: Joel Holdsworth Date: Sat, 20 Dec 2014 18:17:55 +0000 (+0000) Subject: Header: Renamed get_mouse_over_row_item to get_mouse_over_item X-Git-Tag: pulseview-0.3.0~327 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=859eed5994e0395cc7b69442f961b23ec0b19eed;p=pulseview.git Header: Renamed get_mouse_over_row_item to get_mouse_over_item --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 82c7dd05..c19d1088 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -80,7 +80,7 @@ QSize Header::extended_size_hint() const return sizeHint() + QSize(ViewItem::HighlightRadius, 0); } -shared_ptr Header::get_mouse_over_row_item(const QPoint &pt) +shared_ptr Header::get_mouse_over_item(const QPoint &pt) { const QRect r(0, 0, width() - BaselineOffset, height()); for (auto &i : view_) @@ -173,7 +173,7 @@ void Header::mousePressEvent(QMouseEvent *event) assert(event); mouse_down_point_ = event->pos(); - mouse_down_item_ = get_mouse_over_row_item(event->pos()); + mouse_down_item_ = get_mouse_over_item(event->pos()); if (event->button() & Qt::LeftButton) mouseLeftPressEvent(event); @@ -188,7 +188,7 @@ void Header::mouseLeftReleaseEvent(QMouseEvent *event) // Unselect everything if control is not pressed const shared_ptr mouse_over = - get_mouse_over_row_item(event->pos()); + get_mouse_over_item(event->pos()); for (auto &r : view_) r->drag_release(); @@ -273,7 +273,7 @@ void Header::leaveEvent(QEvent*) void Header::contextMenuEvent(QContextMenuEvent *event) { - const shared_ptr r = get_mouse_over_row_item(mouse_point_); + const shared_ptr r = get_mouse_over_item(mouse_point_); if (!r) return; diff --git a/pv/view/header.hpp b/pv/view/header.hpp index c5c8ae7a..10335cf5 100644 --- a/pv/view/header.hpp +++ b/pv/view/header.hpp @@ -59,7 +59,7 @@ public: static const int BaselineOffset; private: - std::shared_ptr get_mouse_over_row_item( + std::shared_ptr get_mouse_over_item( const QPoint &pt); void clear_selection();