Qwt User's Guide svn
qwt_plot_directpainter.h
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_PLOT_DIRECT_PAINTER_H
00011 #define QWT_PLOT_DIRECT_PAINTER_H
00012 
00013 #include "qwt_global.h"
00014 #include <qobject.h>
00015 
00016 class QRegion;
00017 class QwtPlotAbstractSeriesItem;
00018 
00039 class QWT_EXPORT QwtPlotDirectPainter: public QObject
00040 {
00041 public:
00046     enum Attribute
00047     {
00054         AtomicPainter = 0x01,
00055 
00060         FullRepaint = 0x02,
00061 
00070         CopyBackingStore = 0x04
00071     };
00072 
00074     typedef QFlags<Attribute> Attributes;
00075 
00076     QwtPlotDirectPainter( QObject *parent = NULL );
00077     virtual ~QwtPlotDirectPainter();
00078 
00079     void setAttribute( Attribute, bool on );
00080     bool testAttribute( Attribute ) const;
00081 
00082     void setClipping( bool );
00083     bool hasClipping() const;
00084 
00085     void setClipRegion( const QRegion & );
00086     QRegion clipRegion() const;
00087 
00088     void drawSeries( QwtPlotAbstractSeriesItem *, int from, int to );
00089     void reset();
00090 
00091     virtual bool eventFilter( QObject *, QEvent * );
00092 
00093 private:
00094     class PrivateData;
00095     PrivateData *d_data;
00096 };
00097 
00098 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotDirectPainter::Attributes )
00099 
00100 #endif
qmi style