Eneboo - Documentación para desarrolladores
|
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_RASTERITEM_H 00011 #define QWT_PLOT_RASTERITEM_H 00012 00013 #include <qglobal.h> 00014 #include <qstring.h> 00015 #include <qimage.h> 00016 00017 #include "qwt_plot_item.h" 00018 00036 class QWT_EXPORT QwtPlotRasterItem: public QwtPlotItem 00037 { 00038 public: 00056 enum CachePolicy 00057 { 00058 NoCache, 00059 PaintCache, 00060 ScreenCache 00061 }; 00062 00063 explicit QwtPlotRasterItem(const QString& title = QString::null); 00064 explicit QwtPlotRasterItem(const QwtText& title); 00065 virtual ~QwtPlotRasterItem(); 00066 00067 void setAlpha(int alpha); 00068 int alpha() const; 00069 00070 void setCachePolicy(CachePolicy); 00071 CachePolicy cachePolicy() const; 00072 00073 void invalidateCache(); 00074 00075 virtual void draw(QPainter *p, 00076 const QwtScaleMap &xMap, const QwtScaleMap &yMap, 00077 const QRect &rect) const; 00078 00079 virtual QSize rasterHint(const QwtDoubleRect &) const; 00080 00081 protected: 00082 00093 virtual QImage renderImage(const QwtScaleMap &xMap, 00094 const QwtScaleMap &yMap, const QwtDoubleRect &area 00095 ) const = 0; 00096 00097 private: 00098 QwtPlotRasterItem( const QwtPlotRasterItem & ); 00099 QwtPlotRasterItem &operator=( const QwtPlotRasterItem & ); 00100 00101 void init(); 00102 00103 class PrivateData; 00104 PrivateData *d_data; 00105 }; 00106 00107 #endif