qwt_plot_marker.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 // vim: expandtab
00011 
00012 #ifndef QWT_PLOT_MARKER_H
00013 #define QWT_PLOT_MARKER_H
00014 
00015 #include <qpen.h>
00016 #include <qfont.h>
00017 #include <qstring.h>
00018 #include <qbrush.h>
00019 #include "qwt_global.h"
00020 #include "qwt_plot_item.h"
00021 
00022 class QRect;
00023 class QwtText;
00024 class QwtSymbol;
00025 
00045 class QWT_EXPORT QwtPlotMarker: public QwtPlotItem
00046 {
00047 public:
00048 
00053     enum LineStyle {NoLine, HLine, VLine, Cross};
00054    
00055     explicit QwtPlotMarker();
00056     virtual ~QwtPlotMarker();
00057 
00058     virtual int rtti() const;
00059 
00060     double xValue() const;
00061     double yValue() const;
00062     QwtDoublePoint value() const;
00063 
00064     void setXValue(double);
00065     void setYValue(double);
00066     void setValue(double, double);
00067     void setValue(const QwtDoublePoint &);
00068 
00069     void setLineStyle(LineStyle st);
00070     LineStyle lineStyle() const;
00071 
00072     void setLinePen(const QPen &p);
00073     const QPen &linePen() const;
00074 
00075     void setSymbol(const QwtSymbol &s);
00076     const QwtSymbol &symbol() const;
00077 
00078     void setLabel(const QwtText&);
00079     QwtText label() const;
00080 
00081 #if QT_VERSION < 0x040000
00082     void setLabelAlignment(int align);
00083     int labelAlignment() const;
00084 #else
00085     void setLabelAlignment(Qt::Alignment);
00086     Qt::Alignment labelAlignment() const;
00087 #endif
00088 
00089     virtual void draw(QPainter *p, 
00090         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00091         const QRect &) const;
00092     
00093     virtual QwtDoubleRect boundingRect() const;
00094 
00095 private:
00096     class PrivateData;
00097     PrivateData *d_data;
00098 };
00099 
00100 #endif

Generated on Mon Feb 26 21:22:38 2007 for Qwt User's Guide by  doxygen 1.4.6