src/GradientRenderer.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include "common.h"
00004 #include "HoverPoints.h"
00005 #include  <QtGui/QWidget>
00006 
00007 class GradientRenderer : public QWidget
00008 {
00009     Q_OBJECT
00010 public:
00011     GradientRenderer(QWidget *parent);
00012     void paint(QPainter *p);
00013 
00014 //    QSize sizeHint() const { return QSize(400, 400); }
00015 
00016     //HoverPoints *hoverPoints() const { return m_hoverPoints; }
00017     void paintEvent(QPaintEvent* event);
00018 
00019 public slots:
00020     void setGradientStops(const QGradientStops &stops);
00021 
00022     void setPadSpread() { m_spread = QGradient::PadSpread; update(); }
00023     void setRepeatSpread() { m_spread = QGradient::RepeatSpread; update(); }
00024     void setReflectSpread() { m_spread = QGradient::ReflectSpread; update(); }
00025 
00026     void setLinearGradient() { m_gradientType = Qt::LinearGradientPattern; update(); }
00027     void setRadialGradient() { m_gradientType = Qt::RadialGradientPattern; update(); }
00028     void setConicalGradient() { m_gradientType = Qt::ConicalGradientPattern; update(); }
00029 
00030 
00031 private:
00032     QGradientStops m_stops;
00033     //HoverPoints *m_hoverPoints;
00034 
00035     QGradient::Spread m_spread;
00036     Qt::BrushStyle m_gradientType;
00037 };

Generated on Mon Dec 10 18:18:11 2007 for VisLU by  doxygen 1.5.4