]> sigrok.org Git - pulseview.git/blobdiff - sigview.h
Initial interractive zoom support
[pulseview.git] / sigview.h
index 318104b9385639f499b4d9e8fbdbeddf2333e04f..ccbc8c84eb78d8e944bff478b00cfdcc68fc55e4 100644 (file)
--- a/sigview.h
+++ b/sigview.h
 #ifndef SIGVIEW_H
 #define SIGVIEW_H
 
-#include <QAbstractScrollArea>
+#include <QtOpenGL/QGLWidget>
+#include <QTimer>
 
-class SigView : public QAbstractScrollArea
+class SigSession;
+
+class SigView : public QGLWidget
 {
        Q_OBJECT
+
+private:
+       static const int SignalHeight;
+
 public:
-       explicit SigView(QWidget *parent = 0);
-       
-signals:
-       
-public slots:
-       
+       explicit SigView(SigSession &session, QWidget *parent = 0);
+
+protected:
+
+       void initializeGL();
+
+       void resizeGL(int width, int height);
+
+       void paintGL();
+
+private:
+       void mouseMoveEvent(QMouseEvent *event);
+       void mousePressEvent(QMouseEvent *event);
+       void mouseReleaseEvent(QMouseEvent *event);
+
+private slots:
+       void dataUpdated();
+
+private:
+       SigSession &_session;
+
+       uint64_t _scale;
+       int64_t _offset;
 };
 
 #endif // SIGVIEW_H