return sizeHint() + QSize(ViewItem::HighlightRadius, 0);
}
+vector< shared_ptr<ViewItem> > Header::items()
+{
+ return vector< shared_ptr<ViewItem> >(view_.begin(), view_.end());
+}
+
shared_ptr<ViewItem> Header::get_mouse_over_item(const QPoint &pt)
{
const QRect r(0, 0, width() - BaselineOffset, height());
static const int BaselineOffset;
private:
+ /**
+ * Gets the row items.
+ */
+ std::vector< std::shared_ptr<pv::view::ViewItem> > items();
+
/**
* Gets the first view item which has a label that contains @c pt .
* @param pt the point to search with.
virtual QSize extended_size_hint() const = 0;
protected:
+ /**
+ * Gets the items in the margin widget.
+ */
+ virtual std::vector< std::shared_ptr<pv::view::ViewItem> > items() = 0;
+
/**
* Shows the popup of a the specified @c ViewItem .
* @param item The item to show the popup for.
ViewItem::HighlightRadius);
}
+vector< shared_ptr<ViewItem> > Ruler::items()
+{
+ const vector< shared_ptr<TimeItem> > time_items(view_.time_items());
+ return vector< shared_ptr<ViewItem> >(
+ time_items.begin(), time_items.end());
+}
+
shared_ptr<ViewItem> Ruler::get_mouse_over_item(const QPoint &pt)
{
const vector< shared_ptr<TimeItem> > items(view_.time_items());
QSize extended_size_hint() const;
private:
+ /**
+ * Gets the time items.
+ */
+ std::vector< std::shared_ptr<pv::view::ViewItem> > items();
+
/**
* Gets the first view item which has a label that contains @c pt .
* @param pt the point to search with.