qwt_plot_canvas.h
Go to the documentation of this file.
1 /******************************************************************************
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 
16 #include <qframe.h>
17 
18 class QwtPlot;
19 class QPixmap;
20 class QPainterPath;
21 
29 class QWT_EXPORT QwtPlotCanvas : public QFrame, public QwtPlotAbstractCanvas
30 {
31  Q_OBJECT
32 
33  Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
34 
35  public:
36 
45  {
57  BackingStore = 1,
58 
74  Opaque = 2,
75 
91  HackStyledBackground = 4,
92 
99  ImmediatePaint = 8
100  };
101 
102  Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
103 
104  explicit QwtPlotCanvas( QwtPlot* = NULL );
105  virtual ~QwtPlotCanvas();
106 
107  void setPaintAttribute( PaintAttribute, bool on = true );
108  bool testPaintAttribute( PaintAttribute ) const;
109 
110  const QPixmap* backingStore() const;
111  Q_INVOKABLE void invalidateBackingStore();
112 
113  virtual bool event( QEvent* ) QWT_OVERRIDE;
114 
115  Q_INVOKABLE QPainterPath borderPath( const QRect& ) const;
116 
117  public Q_SLOTS:
118  void replot();
119 
120  protected:
121  virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
122  virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
123 
124  virtual void drawBorder( QPainter* ) QWT_OVERRIDE;
125 
126  private:
127  class PrivateData;
129 };
130 
131 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCanvas::PaintAttributes )
132 
133 #endif
qwt_plot_abstract_canvas.h
QwtPlotAbstractCanvas::drawBorder
virtual void drawBorder(QPainter *)
Definition: qwt_plot_abstract_canvas.cpp:628
QwtPlot
A 2-D plotting widget.
Definition: qwt_plot.h:78
qwt_global.h
QwtPlotCanvas::m_data
PrivateData * m_data
Definition: qwt_plot_canvas.h:127
QwtPlotCanvas::PaintAttribute
PaintAttribute
Paint attributes.
Definition: qwt_plot_canvas.h:44
QwtPlotCanvas
Canvas of a QwtPlot.
Definition: qwt_plot_canvas.h:29
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtPlotCanvas::PrivateData
Definition: qwt_plot_canvas.cpp:18
QwtPlotAbstractCanvas
Base class for all type of plot canvases.
Definition: qwt_plot_abstract_canvas.h:21


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45