1 /*************************************************************************** 2 * * 3 * copyright : (C) 2007 The University of Toronto * 4 * netterfield@astro.utoronto.ca * 5 * * 6 * This program is free software; you can redistribute it and/or modify * 7 * it under the terms of the GNU General Public License as published by * 8 * the Free Software Foundation; either version 2 of the License, or * 9 * (at your option) any later version. * 10 * * 11 ***************************************************************************/ 12 13 #ifndef FFTOPTIONS_H 14 #define FFTOPTIONS_H 15 16 #include <QWidget> 17 #include "ui_fftoptions.h" 18 19 #include "psd.h" 20 21 #include "kstwidgets_export.h" 22 23 namespace Kst { 24 25 class KSTWIDGETS_EXPORT FFTOptions : public QWidget, public Ui::FFTOptions 26 { 27 Q_OBJECT 28 29 public: 30 explicit FFTOptions(QWidget *parent = 0); 31 ~FFTOptions(); 32 33 double sampleRate() const; 34 bool sampleRateDirty() const; 35 void setSampleRate(const double sampleRate); 36 37 double sigma() const; 38 bool sigmaDirty() const; 39 void setSigma(const double sigma); 40 41 bool interleavedAverage() const; 42 bool interleavedAverageDirty() const; 43 void setInterleavedAverage(const bool interleavedAverage); 44 45 int FFTLength() const; 46 bool FFTLengthDirty() const; 47 void setFFTLength(const int FFTLength); 48 49 bool apodize() const; 50 bool apodizeDirty() const; 51 void setApodize(const bool apodize); 52 53 bool removeMean() const; 54 bool removeMeanDirty() const; 55 void setRemoveMean(const bool removeMean); 56 57 QString vectorUnits() const; 58 bool vectorUnitsDirty() const; 59 void setVectorUnits(const QString vectorUnits); 60 61 QString rateUnits() const; 62 bool rateUnitsDirty() const; 63 void setRateUnits(const QString rateUnits); 64 65 ApodizeFunction apodizeFunction() const; 66 bool apodizeFunctionDirty() const; 67 void setApodizeFunction(const ApodizeFunction apodizeFunction); 68 69 PSDType output() const; 70 bool outputDirty() const; 71 void setOutput(const PSDType output); 72 73 void clearValues(); 74 75 void setWidgetDefaults(); 76 void loadWidgetDefaults(); 77 78 Q_SIGNALS: 79 void modified(); 80 81 public slots: 82 void changedApodizeFxn(); 83 void clickedInterleaved(); 84 void clickedApodize(); 85 void synch(); 86 bool checkValues(); 87 bool checkGivenValues(double sampRate, int FFTLen); 88 89 private: 90 void init(); 91 }; 92 93 } 94 #endif 95 // vim: ts=2 sw=2 et 96