]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewport.hpp
DecodeTrace: Speed up annotation drawing
[pulseview.git] / pv / view / viewport.hpp
index 78dfbb24bbfd485f7f12ae1f211145af06d8e933..704e73115514b2183cb4ce058b86bbc9a9000a9d 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PULSEVIEW_PV_VIEW_VIEWPORT_H
-#define PULSEVIEW_PV_VIEW_VIEWPORT_H
+#ifndef PULSEVIEW_PV_VIEW_VIEWPORT_HPP
+#define PULSEVIEW_PV_VIEW_VIEWPORT_HPP
+
+#include <boost/optional.hpp>
 
 #include <QTimer>
 #include <QTouchEvent>
 
+#include "pv/util.hpp"
 #include "viewwidget.hpp"
 
 class QPainter;
@@ -93,7 +96,8 @@ private:
        void wheelEvent(QWheelEvent *event);
 
 private:
-       double drag_offset_;
+       boost::optional<pv::util::Timestamp> drag_offset_;
+       int drag_v_offset_;
 
        double pinch_offset0_;
        double pinch_offset1_;
@@ -103,4 +107,4 @@ private:
 } // namespace view
 } // namespace pv
 
-#endif // PULSEVIEW_PV_VIEW_VIEWPORT_H
+#endif // PULSEVIEW_PV_VIEW_VIEWPORT_HPP