FeatherCurve.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef FEATHERCURVE_H_
00027 #define FEATHERCURVE_H_
00028
00029 #include <qwt_plot.h>
00030 #include <limits>
00031 #include <casa/aipstype.h>
00032 #include <guitools/Feather/ColorProvider.h>
00033 class QwtPlotCurve;
00034 class QwtLegendItem;
00035 namespace casa {
00036
00037 class FeatherPlot;
00038 class LegendCurve;
00039
00044 class FeatherCurve : public ColorProvider {
00045
00046 public:
00047 FeatherCurve( FeatherPlot* plot, QwtPlot::Axis xAxis, QwtPlot::Axis yAxis, bool sumCurve);
00048 void initScatterPlot( int dotSize );
00049 void setTitle( const QString& title );
00050 void setFunctionColor( const QColor& color, bool diagonalLine );
00051
00052
00053 void setCurveData( const QVector<double>& xVals, const QVector<double>& yVals );
00054 QVector<double> getXValues() const;
00055 QVector<double> getYValues() const;
00056 QColor getRectColor() const;
00057
00058
00059 void adjustData( bool uvLog, bool ampLog );
00060
00061 void setCurveSize( bool scatterPlot, bool diagonalLine,
00062 int dotSize, int lineThickness );
00063
00064 std::pair<double,double> getBoundsX() const;
00065 std::pair<double,double> getBoundsY() const;
00066 QwtPlot::Axis getVerticalAxis() const;
00067 QString getTitle() const;
00068 virtual ~FeatherCurve();
00069
00070 private:
00071 FeatherCurve( const FeatherCurve& other );
00072 FeatherCurve operator=( const FeatherCurve& other );
00073
00074 void setCurvePenColor( const QColor& color );
00075
00076 bool isSumCurve() const;
00077 bool isWeightCurve() const;
00078 double logarithm( double value, Bool& valid ) const;
00079 QList<int> doLogs( double* values, int count ) const;
00080
00081 void resetDataBounds();
00082 bool scatterPlot;
00083 bool scaleLogUV;
00084 bool scaleLogAmplitude;
00094 bool sumCurve;
00095 bool firstTime;
00096 double minX;
00097 double maxX;
00098 double minY;
00099 double maxY;
00100 LegendCurve* plotCurve;
00101 QColor functionColor;
00102 QVector<double> xValues;
00103 QVector<double> yValues;
00104
00105 };
00106
00107 }
00108 #endif