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

# qwt_plot_classes.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 #ifndef QWT_PLOT_CLASSES_H
    00011 #define QWT_PLOT_CLASSES_H
    00012
    00013 #include "qwt_global.h"
    00014 #include "qwt_plot_item.h"
    00015 #include "qwt_marker.h"
    00016 #include "qwt_curve.h"
    00017 #include "qwt_grid.h"
    00018
    00023 class QWT_EXPORT QwtPlotCurve: public QwtCurve, public QwtPlotMappedItem
    00024 {
    00025 public:
    00027     QwtPlotCurve(QwtPlot* parent, const QString &title = QString::null):
    00028         QwtCurve(title),
    00029         QwtPlotMappedItem(parent)
    00030     {}
    00031
    00033     const QwtPlotCurve& operator=(const QwtPlotCurve &c)
    00034     {
    00035         QwtPlotMappedItem::operator=((const QwtPlotMappedItem &)c);
    00036         QwtCurve::operator=(c);
    00037         return *this;
    00038     }
    00039
    00041     virtual void curveChanged() { itemChanged(); }
    00042 };
    00043
    00047 class QWT_EXPORT QwtPlotGrid: public QwtGrid, public QwtPlotMappedItem
    00048 {
    00049 public:
    00051     QwtPlotGrid(QwtPlot *parent):
    00052         QwtPlotMappedItem(parent) {}
    00053
    00055     virtual void gridChanged() { itemChanged(); }
    00056 };
    00057
    00058
    00062 class QWT_EXPORT QwtPlotMarker: public QwtMarker, public QwtPlotMappedItem
    00063 {
    00064 public:
    00066     QwtPlotMarker(QwtPlot *parent):
    00067         QwtPlotMappedItem(parent),
    00068         d_xValue(0.0),
    00069         d_yValue(0.0)
    00070     {}
    00071
    00073     double xValue() const { return d_xValue; }
    00074
    00076     double yValue() const { return d_yValue; }
    00077
    00079     void setXValue(double val) { d_xValue = val; markerChanged(); }
    00080
    00082     void setYValue(double val) { d_yValue = val; markerChanged(); }
    00083
    00085     virtual void markerChanged() { itemChanged(); }
    00086
    00087 private:
    00088     double d_xValue;
    00089     double d_yValue;
    00090 };
    00091
    00092 #endif