ViewItem::HighlightRadius);
}
-shared_ptr<TimeItem> Ruler::get_mouse_over_item(const QPoint &pt)
+shared_ptr<ViewItem> Ruler::get_mouse_over_item(const QPoint &pt)
{
const vector< shared_ptr<TimeItem> > items(view_.time_items());
for (auto i = items.rbegin(); i != items.rend(); i++)
void Ruler::contextMenuEvent(QContextMenuEvent *event)
{
- const shared_ptr<TimeItem> r = get_mouse_over_item(mouse_point_);
+ const shared_ptr<ViewItem> r = get_mouse_over_item(mouse_point_);
if (!r)
return;
namespace view {
class TimeItem;
+class ViewItem;
class Ruler : public MarginWidget
{
QSize extended_size_hint() const;
private:
- std::shared_ptr<pv::view::TimeItem> get_mouse_over_item(
+ /**
+ * Gets the first view item which has a label that contains @c pt .
+ * @param pt the point to search with.
+ * @return the view item that has been found, or and empty
+ * @c shared_ptr if no item was found.
+ */
+ std::shared_ptr<pv::view::ViewItem> get_mouse_over_item(
const QPoint &pt);
private: