X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fviewport.h;h=f72eee01e5e59f157739e67189ee9d8c52fbf41d;hp=b79526ac2c8d783685aa100b6df8d424dde821fd;hb=7c68ddaee897d069f817c2c0184bd8c1f73d826a;hpb=ccdd3ef548ce34f25c6c168598556a350831aa37 diff --git a/pv/view/viewport.h b/pv/view/viewport.h index b79526ac..f72eee01 100644 --- a/pv/view/viewport.h +++ b/pv/view/viewport.h @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the PulseView project. * * Copyright (C) 2012 Joel Holdsworth * @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PV_VIEW_VIEWPORT_H -#define PV_VIEW_VIEWPORT_H +#ifndef PULSEVIEW_PV_VIEW_VIEWPORT_H +#define PULSEVIEW_PV_VIEW_VIEWPORT_H -#include #include +#include class QPainter; class QPaintEvent; @@ -33,7 +33,7 @@ namespace view { class View; -class Viewport : public QGLWidget +class Viewport : public QWidget { Q_OBJECT @@ -43,20 +43,20 @@ public: int get_total_height() const; protected: - void initializeGL(); - - void resizeGL(int width, int height); - void paintEvent(QPaintEvent *event); private: void mousePressEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); void wheelEvent(QWheelEvent *event); private: - void setup_viewport(int width, int height); + void draw_cursors_background(QPainter &p); + + void draw_cursors_foreground(QPainter &p); + +private slots: + void on_signals_moved(); private: View &_view; @@ -68,4 +68,4 @@ private: } // namespace view } // namespace pv -#endif // PV_VIEW_VIEWPORT_H +#endif // PULSEVIEW_PV_VIEW_VIEWPORT_H