00001 /***************************************************************** 00002 * 00003 * This file is part of the FLIRTLib project 00004 * 00005 * FLIRTLib Copyright (c) 2010 Gian Diego Tipaldi and Kai O. Arras 00006 * 00007 * This software is licensed under the "Creative Commons 00008 * License (Attribution-NonCommercial-ShareAlike 3.0)" 00009 * and is copyrighted by Gian Diego Tipaldi and Kai O. Arras 00010 * 00011 * Further information on this license can be found at: 00012 * http://creativecommons.org/licenses/by-nc-sa/3.0/ 00013 * 00014 * FLIRTLib is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied 00016 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 * 00019 *****************************************************************/ 00020 00021 00022 00023 #ifndef BETGRIDPRESENTER_H_ 00024 #define BETGRIDPRESENTER_H_ 00025 00026 #include <gui/DescriptorPresenter.h> 00027 #include <gui/ParameterWidget.h> 00028 #include <feature/BetaGrid.h> 00029 #include <QtGui/QWidget> 00030 #include <QtCore/QObject> 00031 00032 class BetaGridPresenter: public DescriptorPresenter{ 00033 Q_OBJECT 00034 00035 public: 00036 BetaGridPresenter(BetaGridGenerator* descriptor, ParameterWidget* peakParameter); 00037 00038 virtual void setDescriptor(DescriptorGenerator* descriptor); 00039 00040 virtual void setDescriptorParameter(ParameterWidget* peakParameter); 00041 00042 void insertDistanceFunction(const QString& name, const HistogramDistance<double>* distanceFunction); 00043 00044 signals: 00045 void descriptorChanged(); 00046 00047 public slots: 00048 void changeParameter(const QString& name); 00049 void changeMinRho(double value); 00050 void changeMaxRho(double value); 00051 void changeBinRho(int value); 00052 void changeBinPhi(int value); 00053 void changeDistanceFunction(int value); 00054 00055 protected: 00056 void syncronize(); 00057 void reconnect(); 00058 00059 const HistogramDistance<double>* m_currentDistanceFunction; 00060 int m_currentDistanceFunctionIndex; 00061 QVector< const HistogramDistance<double>* > m_distanceFunctions; 00062 QStringList m_distanceFunctionNames; 00063 }; 00064 00065 #endif