Loading...
Searching...
No Matches
qwt_plot_canvas.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_PLOT_CANVAS_H
#define QWT_PLOT_CANVAS_H
#include "qwt_global.h"
#include "qwt_plot_abstract_canvas.h"
#include <qframe.h>
class QwtPlot;
class QPixmap;
class QPainterPath;
class QWT_EXPORT QwtPlotCanvas : public QFrame, public QwtPlotAbstractCanvas
{
Q_OBJECT
Q_PROPERTY( double borderRadius READ borderRadius WRITE setBorderRadius )
public:
enum PaintAttribute
{
BackingStore = 1,
Opaque = 2,
HackStyledBackground = 4,
ImmediatePaint = 8
};
Q_DECLARE_FLAGS( PaintAttributes, PaintAttribute )
explicit QwtPlotCanvas( QwtPlot* = NULL );
virtual ~QwtPlotCanvas();
void setPaintAttribute( PaintAttribute, bool on = true );
bool testPaintAttribute( PaintAttribute ) const;
const QPixmap* backingStore() const;
Q_INVOKABLE void invalidateBackingStore();
virtual bool event( QEvent* ) QWT_OVERRIDE;
Q_INVOKABLE QPainterPath borderPath( const QRect& ) const;
public Q_SLOTS:
void replot();
protected:
virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
virtual void drawBorder( QPainter* ) QWT_OVERRIDE;
private:
class PrivateData;
PrivateData* m_data;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotCanvas::PaintAttributes )
#endif
QwtPlotAbstractCanvas
Base class for all type of plot canvases.
Definition qwt_plot_abstract_canvas.h:22
QwtPlotAbstractCanvas::drawBorder
virtual void drawBorder(QPainter *)
Definition qwt_plot_abstract_canvas.cpp:628
QwtPlotCanvas
Canvas of a QwtPlot.
Definition qwt_plot_canvas.h:30
QwtPlotCanvas::PaintAttributes
QFlags< PaintAttribute > PaintAttributes
Definition qwt_plot_canvas.h:102
QwtPlotCanvas::PaintAttribute
PaintAttribute
Paint attributes.
Definition qwt_plot_canvas.h:45
QwtPlot
A 2-D plotting widget.
Definition qwt_plot.h:79