casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GaussianEstimateDialog.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef GAUSSIANESTIMATEDIALOG_QO_H_1
26 #define GAUSSIANESTIMATEDIALOG_QO_H_1
27 
28 #include <QDialog>
29 #include <display/QtPlotter/GaussianEstimateDialog.ui.h>
33 
34 class QScrollArea;
35 
36 namespace casa {
37 
38  class GaussianEstimateWidget;
39  class Converter;
40 
41  class GaussianEstimateDialog : public QDialog {
42  Q_OBJECT
43 
44  public:
45  GaussianEstimateDialog(QWidget *parent = 0);
47  void setGaussCount( int count );
48  void setCurveData( const casacore::Vector<float>& xValues, const casacore::Vector<float>& yValues);
49  void setRangeX( float min, float max );
50  void setRangeY( float min, float max );
51  void setSpecFitUnits( const QString& specUnits );
52  void setDisplayYUnits( const QString& units );
53  QString getDisplayYUnits() const;
54  QString getUnits() const;
55  void setCurveColor( QColor color );
56  SpecFitGaussian getEstimate(int index );
57  void setEstimates( QList<SpecFitGaussian>& estimates );
59 
60  private slots:
61  void unitsChanged( int index );
62  void plotsCoordinatedChanged( int );
63  void coordinatedValuesChanged( float );
64 
65  private:
66  void resetEstimates();
67  void clearPlots( int removeCount);
68  void setCurveData();
69  void setDisplayYUnits();
70  void setCurveColor();
71  void initializeLimits( const casacore::Vector<float>& values, float* const min, float* const max );
75  QColor curveColor;
76  QString specUnitStr;
77  QString displayYUnits;
78  QString unitStr;
79  QList<GaussianEstimateWidget*> plots;
80  Ui::GaussianEstimateDialogClass ui;
82 
83  QWidget* plotHolderWidget;
85  };
86 }
87 #endif // GAUSSIANESTIMATEDIALOG_QO_H
QString getDisplayYUnits() const
Ui::GaussianEstimateDialogClass ui
#define max(a, b)
Definition: hio.h:44
#define min(a, b)
Definition: hio.h:45
GaussianEstimateDialog(QWidget *parent=0)
void setGaussCount(int count)
void setEstimates(QList< SpecFitGaussian > &estimates)
void setRangeY(float min, float max)
void initializeLimits(const casacore::Vector< float > &values, float *const min, float *const max)
casacore::SpectralCoordinate spectralCoordinate
void setRangeX(float min, float max)
void setSpectralCoordinate(casacore::SpectralCoordinate &coord)
void unitsChanged(int index)
Interconvert pixel and frequency values.
QList< GaussianEstimateWidget * > plots
void setSpecFitUnits(const QString &specUnits)
SpecFitGaussian getEstimate(int index)
void coordinatedValuesChanged(float)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
void clearPlots(int removeCount)
casacore::Vector< float > translateDataUnits(const casacore::Vector< float > &xValues, Converter *converter)