qwt_plot_opengl_canvas.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PLOT_OPENGL_CANVAS_H
11 #define QWT_PLOT_OPENGL_CANVAS_H
12 
13 #include "qwt_global.h"
15 
16 #include <qopenglwidget.h>
17 
18 class QwtPlot;
19 
20 class QWT_EXPORT QwtPlotOpenGLCanvas: public QOpenGLWidget, public QwtPlotAbstractGLCanvas
21 {
22  Q_OBJECT
23 
24  Q_PROPERTY( QFrame::Shadow frameShadow READ frameShadow WRITE setFrameShadow )
25  Q_PROPERTY( QFrame::Shape frameShape READ frameShape WRITE setFrameShape )
26  Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
27  Q_PROPERTY( int midLineWidth READ midLineWidth WRITE setMidLineWidth )
28  Q_PROPERTY( int frameWidth READ frameWidth )
29  Q_PROPERTY( QRect frameRect READ frameRect DESIGNABLE false )
30 
31  Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
32 
33 public:
34  explicit QwtPlotOpenGLCanvas( QwtPlot * = NULL );
35  explicit QwtPlotOpenGLCanvas( const QSurfaceFormat &, QwtPlot * = NULL);
36  virtual ~QwtPlotOpenGLCanvas();
37 
38  Q_INVOKABLE virtual void invalidateBackingStore() QWT_OVERRIDE;
39  Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
40 
41  virtual bool event( QEvent * ) QWT_OVERRIDE;
42 
43 public Q_SLOTS:
44  void replot();
45 
46 protected:
47  virtual void paintEvent( QPaintEvent * ) QWT_OVERRIDE;
48 
49  virtual void initializeGL() QWT_OVERRIDE;
50  virtual void paintGL() QWT_OVERRIDE;
51  virtual void resizeGL( int width, int height ) QWT_OVERRIDE;
52 
53 private:
54  void init( const QSurfaceFormat & );
55  virtual void clearBackingStore() QWT_OVERRIDE;
56 
57  class PrivateData;
58  PrivateData *d_data;
59 };
60 
61 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
A 2-D plotting widget.
Definition: qwt_plot.h:75
#define QWT_OVERRIDE
Definition: qwt_global.h:53


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10