GaussianEstimateDialog.qo.h

Go to the documentation of this file.
00001 //# Copyright (C) 2005
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 #ifndef GAUSSIANESTIMATEDIALOG_QO_H_1
00026 #define GAUSSIANESTIMATEDIALOG_QO_H_1
00027 
00028 #include <QtGui/QDialog>
00029 #include <display/QtPlotter/GaussianEstimateDialog.ui.h>
00030 #include <display/QtPlotter/SearchMoleculesDialog.qo.h>
00031 #include <display/QtPlotter/SpecFitGaussian.h>
00032 #include <coordinates/Coordinates/SpectralCoordinate.h>
00033 
00034 class QScrollArea;
00035 
00036 namespace casa {
00037 
00038         class GaussianEstimateWidget;
00039         class Converter;
00040 
00041         class GaussianEstimateDialog : public QDialog {
00042                 Q_OBJECT
00043 
00044         public:
00045                 GaussianEstimateDialog(QWidget *parent = 0);
00046                 ~GaussianEstimateDialog();
00047                 void setGaussCount( int count );
00048                 void setCurveData( const Vector<float>& xValues, const Vector<float>& yValues);
00049                 void setRangeX( Float min, Float max );
00050                 void setRangeY( Float min, Float max );
00051                 void setSpecFitUnits( const QString& specUnits );
00052                 void setDisplayYUnits( const QString& units );
00053                 QString getDisplayYUnits() const;
00054                 QString getUnits() const;
00055                 void setCurveColor( QColor color );
00056                 SpecFitGaussian getEstimate(int index );
00057                 void setEstimates( QList<SpecFitGaussian>& estimates );
00058                 void setSpectralCoordinate( SpectralCoordinate& coord );
00059 
00060         private slots:
00061                 void unitsChanged( int index );
00062                 void plotsCoordinatedChanged( int );
00063                 void coordinatedValuesChanged( float );
00064 
00065         private:
00066                 void resetEstimates();
00067                 void clearPlots( int removeCount);
00068                 void setCurveData();
00069                 void setDisplayYUnits();
00070                 void setCurveColor();
00071                 void initializeLimits( const Vector<float>& values, Float* const min, Float* const max );
00072                 Vector<float> translateDataUnits( const Vector<float>& xValues, Converter* converter );
00073                 Vector<float> xVals;
00074                 Vector<float> yVals;
00075                 QColor curveColor;
00076                 QString specUnitStr;
00077                 QString displayYUnits;
00078                 QString unitStr;
00079                 QList<GaussianEstimateWidget*> plots;
00080                 Ui::GaussianEstimateDialogClass ui;
00081                 bool plotsCoordinated;
00082 
00083                 QWidget* plotHolderWidget;
00084                 SpectralCoordinate spectralCoordinate;
00085         };
00086 }
00087 #endif // GAUSSIANESTIMATEDIALOG_QO_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1