- Main Page
- Related Pages
- Classes
- Files

- File List

# 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
    00054     {
    00055         NoLine,
    00056         HLine,
    00057         VLine,
    00058         Cross
    00059     };
    00060
    00061     explicit QwtPlotMarker();
    00062     virtual ~QwtPlotMarker();
    00063
    00064     virtual int rtti() const;
    00065
    00066     double xValue() const;
    00067     double yValue() const;
    00068     QwtDoublePoint value() const;
    00069
    00070     void setXValue(double);
    00071     void setYValue(double);
    00072     void setValue(double, double);
    00073     void setValue(const QwtDoublePoint &);
    00074
    00075     void setLineStyle(LineStyle st);
    00076     LineStyle lineStyle() const;
    00077
    00078     void setLinePen(const QPen &p);
    00079     const QPen &linePen() const;
    00080
    00081     void setSymbol(const QwtSymbol &s);
    00082     const QwtSymbol &symbol() const;
    00083
    00084     void setLabel(const QwtText&);
    00085     QwtText label() const;
    00086
    00087 #if QT_VERSION < 0x040000
    00088     void setLabelAlignment(int align);
    00089     int labelAlignment() const;
    00090 #else
    00091     void setLabelAlignment(Qt::Alignment);
    00092     Qt::Alignment labelAlignment() const;
    00093 #endif
    00094
    00095     void setLabelOrientation(Qt::Orientation);
    00096     Qt::Orientation labelOrientation() const;
    00097
    00098     void setSpacing(int);
    00099     int spacing() const;
    00100
    00101     virtual void draw(QPainter *p,
    00102         const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    00103         const QRect &) const;
    00104
    00105     virtual QwtDoubleRect boundingRect() const;
    00106
    00107 protected:
    00108     void drawAt(QPainter *,const QRect &, const QPoint &) const;
    00109
    00110 private:
    00111     void drawLabel(QPainter *, const QRect &, const QPoint &) const;
    00112
    00113     class PrivateData;
    00114     PrivateData *d_data;
    00115 };
    00116
    00117 #endif