]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/viewport.hpp
Fix depreciation warnings caused by newer Qt versions
[pulseview.git] / pv / views / trace / viewport.hpp
index 1b77a0d0699e7264170f869f39097216d923103b..8c82354ea8dcfb6f2e75ddeb8a34b35932087ef5 100644 (file)
@@ -17,8 +17,8 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP
 
 #include <boost/optional.hpp>
 
@@ -26,6 +26,8 @@
 #include <QTimer>
 #include <QTouchEvent>
 
+#include <pv/globalsettings.hpp>
+
 #include "pv/util.hpp"
 #include "viewwidget.hpp"
 
@@ -42,12 +44,13 @@ namespace trace {
 
 class View;
 
-class Viewport : public ViewWidget
+class Viewport : public ViewWidget, public GlobalSettingsInterface
 {
        Q_OBJECT
 
 public:
        explicit Viewport(View &parent);
+       ~Viewport();
 
        /**
         * Gets the first view item which has a hit-box that contains @c pt .
@@ -92,15 +95,18 @@ private:
         */
        bool touch_event(QTouchEvent *event);
 
-private:
        void paintEvent(QPaintEvent *event);
 
        void mouseDoubleClickEvent(QMouseEvent *event);
+
        void wheelEvent(QWheelEvent *event);
 
+       void on_setting_changed(const QString &key, const QVariant &value);
+
 private:
        boost::optional<pv::util::Timestamp> drag_offset_;
        int drag_v_offset_;
+       bool allow_vertical_dragging_;
 
        double pinch_offset0_;
        double pinch_offset1_;
@@ -111,4 +117,4 @@ private:
 } // namespace views
 } // namespace pv
 
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP