#ifndef SEARCHREDSHIFTDIALOG_QO_H
#define SEARCHREDSHIFTDIALOG_QO_H
#include <QDialog>
#include <QProgressDialog>
#include <casa/BasicSL/String.h>
#include <ui/ui_SearchRedshiftDialog.h>
#include <coordinates/Coordinates/SpectralCoordinate.h>
#include <measures/Measures/MRadialVelocity.h>
#include <measures/Measures/MFrequency.h>
#include <measures/Measures/MDoppler.h>
namespace casa {
class SearchThread;
class SearchRedshiftDialog : public QDialog {
Q_OBJECT
public:
SearchRedshiftDialog(QWidget *parent = 0);
void setCenter( double centerVal );
void setUnits( QString unitStr );
void setDatabasePath( casacore::String path );
void setLocalSearch( bool local );
void setFrequencyType( casacore::MRadialVelocity::Types mType );
void setDopplerType( casacore::MDoppler::Types type );
void setIdentifiedLines( const QList<QString>& lineNames );
void setSpectralCoordinate( casacore::SpectralCoordinate coord );
~SearchRedshiftDialog();
public slots:
void show();
void findRedshift();
void searchFinished();
void stopSearch();
private:
void setResultsVisible( bool visible );
double getTargetFrequency() const;
Ui::SearchRedshiftDialogClass ui;
casacore::String databasePath;
bool localSearch;
bool searchInterrupted;
SearchThread* searchThread;
QProgressDialog progressBar;
casacore::MFrequency::Types frequencyType;
casacore::MRadialVelocity::Types radialVelocityType;
casacore::SpectralCoordinate spectralCoordinate;
casacore::MDoppler::Types dopplerType;
};
}
#endif