FeatherCurve.h

Go to the documentation of this file.
00001 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
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         //Change the data the curve contains.
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         //Change the scale of existing data (Log<-->No Log)
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 } /* namespace casa */
00108 #endif /* FEATHERCURVE_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1