Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

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     QwtPlotMarker(const QwtPlotMarker&);
00059     QwtPlotMarker &operator=(const QwtPlotMarker&);
00060     
00061     virtual int rtti() const;
00062 
00063     double xValue() const;
00064     double yValue() const;
00065     QwtDoublePoint value() const;
00066 
00067     void setXValue(double);
00068     void setYValue(double);
00069     void setValue(double, double);
00070     void setValue(const QwtDoublePoint &);
00071 
00072     void setLineStyle(LineStyle st);
00073     LineStyle lineStyle() const;
00074 
00075     void setSymbol(const QwtSymbol &s);
00076     const QwtSymbol &symbol() const;
00077 
00078     void setLabel(const QString &text, const QFont &font = QFont(),
00079        const QColor &color = QColor(), const QPen &pen = QPen(Qt::NoPen),
00080        const QBrush &brush = QBrush(Qt::NoBrush));
00081 
00082     void setLabelText(const QString &text);
00083     const QString label() const;
00084 
00085     void setLabelAlignment(int align);
00086     int labelAlignment() const;
00087 
00088     void setLabelColor(const QColor &c);
00089     const QColor labelColor() const;
00090 
00091     void setLabelPen(const QPen &p);
00092     const QPen labelPen() const;
00093 
00094     void setLinePen(const QPen &p);
00095     const QPen &linePen() const;
00096 
00097     void setFont(const QFont &f);
00098     const QFont font() const;
00099     
00100     virtual void draw(QPainter *p, 
00101         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
00102         const QRect &) const;
00103     
00104     virtual QwtDoubleRect boundingRect() const;
00105 
00106 private:
00107     class PrivateData;
00108     PrivateData *d_data;
00109 };
00110 
00111 #endif

Generated on Wed Aug 31 23:02:29 2005 for Qwt User's Guide by  doxygen 1.4.1