#include <pv/widgets/popup.hpp>
using std::shared_ptr;
+using std::vector;
namespace pv {
namespace view {
void CursorHeader::clear_selection()
{
- CursorPair &cursors = view_.cursors();
- cursors.first()->select(false);
- cursors.second()->select(false);
+ const vector< shared_ptr<TimeItem> > items(view_.time_items());
+ for (auto &i : items)
+ i->select(false);
update();
}
return viewport_;
}
+vector< shared_ptr<TimeItem> > View::time_items() const
+{
+ vector< shared_ptr<TimeItem> > items;
+ items.push_back(cursors_.first());
+ items.push_back(cursors_.second());
+ return items;
+}
+
double View::scale() const
{
return scale_;
const Viewport* viewport() const;
+ /**
+ * Gets a list of time markers.
+ */
+ std::vector< std::shared_ptr<TimeItem> > time_items() const;
+
/**
* Returns the view time scale in seconds per pixel.
*/