00001 #ifndef SMOOTHPREFERENCES_QO_H 00002 #define SMOOTHPREFERENCES_QO_H 00003 00004 #include <QtGui/QDialog> 00005 #include <casa/Arrays/Vector.h> 00006 #include <display/QtPlotter/SmoothPreferences.ui.h> 00007 #include <scimath/Mathematics/VectorKernel.h> 00008 namespace casa { 00009 00010 class SmoothSpinBox; 00011 00012 class SmoothPreferences : public QDialog 00013 { 00014 Q_OBJECT 00015 00016 public: 00017 SmoothPreferences(QWidget *parent = 0); 00018 Vector<Float> applySmoothing( Vector<Float> values) const; 00019 QString toString() const; 00020 ~SmoothPreferences(); 00021 00022 signals: 00023 void smoothingChanged(); 00024 00025 private slots: 00026 void smoothingAccepted(); 00027 void smoothingRejected(); 00028 void smoothingMethodChanged(); 00029 00030 private: 00031 void initialize(); 00032 void persist(); 00033 void reset(); 00034 Vector<Float> doConvolve( const Vector<Float>& input, 00035 int baseKernelSize, VectorKernel::KernelTypes kernelType ) const; 00036 Ui::SmoothPreferencesClass ui; 00037 QString smoothMethod; 00038 int smoothRadius; 00039 SmoothSpinBox* smoothSpinBox; 00040 const QString SMOOTH_NONE; 00041 const QString SMOOTH_BOXCAR; 00042 const QString SMOOTH_HANNING; 00043 const static QString APPLICATION; 00044 const static QString ORGANIZATION; 00045 const static QString SMOOTH_METHOD; 00046 const static QString SMOOTH_RADIUS; 00047 00048 }; 00049 } 00050 #endif // SMOOTHPREFERENCES_QO_H