- // Plot the signal
- BOOST_FOREACH(const shared_ptr<Trace> t, traces)
- {
- assert(t);
- t->paint_back(p, 0, width());
+void Viewport::drag_release()
+{
+ drag_offset_ = boost::none;
+}
+
+vector< shared_ptr<ViewItem> > Viewport::items()
+{
+ vector< shared_ptr<ViewItem> > items;
+ const std::vector< shared_ptr<ViewItem> > view_items(
+ view_.list_by_type<ViewItem>());
+ copy(view_items.begin(), view_items.end(), back_inserter(items));
+ const vector< shared_ptr<TimeItem> > time_items(view_.time_items());
+ copy(time_items.begin(), time_items.end(), back_inserter(items));
+ return items;
+}
+
+bool Viewport::touch_event(QTouchEvent *event)
+{
+ QList<QTouchEvent::TouchPoint> touchPoints = event->touchPoints();
+
+ if (touchPoints.count() != 2) {
+ pinch_zoom_active_ = false;
+ return false;