qwt_plot_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_CANVAS_H
11 #define QWT_PLOT_CANVAS_H
12 
13 #include "qwt_global.h"
15 #include <qframe.h>
16 #include <qpainterpath.h>
17 
18 class QwtPlot;
19 class QPixmap;
20 
28 class QWT_EXPORT QwtPlotCanvas : public QFrame, public QwtPlotAbstractCanvas
29 {
30  Q_OBJECT
31 
32  Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
33 
34 public:
35 
44  {
56  BackingStore = 1,
57 
73  Opaque = 2,
74 
90  HackStyledBackground = 4,
91 
98  ImmediatePaint = 8,
99 
122  OpenGLBuffer = 16
123  };
124 
126  typedef QFlags<PaintAttribute> PaintAttributes;
127 
128  explicit QwtPlotCanvas( QwtPlot * = NULL );
129  virtual ~QwtPlotCanvas();
130 
131  void setPaintAttribute( PaintAttribute, bool on = true );
132  bool testPaintAttribute( PaintAttribute ) const;
133 
134  const QPixmap *backingStore() const;
135  Q_INVOKABLE void invalidateBackingStore();
136 
137  virtual bool event( QEvent * );
138 
139  Q_INVOKABLE QPainterPath borderPath( const QRect & ) const;
140 
141 public Q_SLOTS:
142  void replot();
143 
144 protected:
145  virtual void paintEvent( QPaintEvent * );
146  virtual void resizeEvent( QResizeEvent * );
147 
148  virtual void drawBorder( QPainter * );
149 
150 private:
151  QImage toImageFBO( const QSize &size );
152 
153  class PrivateData;
155 };
156 
157 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCanvas::PaintAttributes )
158 
159 #endif
PrivateData * d_data
QFlags< PaintAttribute > PaintAttributes
Paint attributes.
#define QWT_EXPORT
Definition: qwt_global.h:38
Canvas of a QwtPlot.
A 2-D plotting widget.
Definition: qwt_plot.h:74
PaintAttribute
Paint attributes.
virtual void drawBorder(QPainter *)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17