Qwt User's Guide
|
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_TEXT_LABEL_H 00011 #define QWT_PLOT_TEXT_LABEL_H 1 00012 00013 #include "qwt_global.h" 00014 #include "qwt_plot_item.h" 00015 #include "qwt_text.h" 00016 00047 class QWT_EXPORT QwtPlotTextLabel: public QwtPlotItem 00048 { 00049 public: 00050 QwtPlotTextLabel(); 00051 virtual ~QwtPlotTextLabel(); 00052 00053 virtual int rtti() const; 00054 00055 void setText( const QwtText & ); 00056 QwtText text() const; 00057 00058 void setMargin( int margin ); 00059 int margin() const; 00060 00061 virtual QRectF textRect( const QRectF &, const QSizeF & ) const; 00062 00063 protected: 00064 virtual void draw( QPainter *, 00065 const QwtScaleMap &, const QwtScaleMap &, 00066 const QRectF &) const; 00067 00068 void invalidateCache(); 00069 00070 private: 00071 class PrivateData; 00072 PrivateData *d_data; 00073 }; 00074 00075 #endif