GeopsyGui/WindowingParameterWidget.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of GeopsyGui.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created : 2005-09-13
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef WINDOWINGPARAMETERWIDGET_H
00029 #define WINDOWINGPARAMETERWIDGET_H
00030 
00031 #include <QtGui>
00032 #include <GeopsyCore.h>
00033 
00034 #include "ui_WindowingParameterWidget.h"
00035 #include "GeopsyGuiDLLExport.h"
00036 #include "FilterParameterWidget.h"
00037 
00038 namespace GeopsyGui {
00039 
00040 class FilterParameterWidget;
00041 
00042 class GEOPSYGUI_EXPORT WindowingParameterWidget : public QWidget, private Ui::WindowingParameterWidget
00043 {
00044   Q_OBJECT
00045 public:
00046   WindowingParameterWidget(QWidget* parent=0, Qt::WFlags fl=0);
00047 
00048   void removeFilterOption();
00049   void removeFreqDepOption();
00050 
00051   void clear();
00052   void addComponent(QString name);
00053   void addStation(QString name);
00054 
00055   void setLength(WindowingParameters::LengthType t, double min, double max=0.0);
00056 
00057   void getParameters(WindowingParameters & param) const;
00058   void setParameters(const WindowingParameters & param);
00059 
00060   void createSelectMenu(QToolButton * select);
00061   bool isAddWindowsManually() const {return _addWindowsAction->isChecked();}
00062   bool isRemoveWindowsManually() const {return _removeWindowsAction->isChecked();}
00063 public slots:
00064   void updateAllFields();
00065 signals:
00066   void autoWindows();
00067   void beginAddWindowsManually();
00068   void endAddWindowsManually();
00069   void beginRemoveWindowsManually();
00070   void endRemoveWindowsManually();
00071   void inverseWindows();
00072   void clearWindows();
00073   void loadWindows();
00074 private slots:
00075   void setRawEnabled(bool b);
00076   void setFilteredEnabled(bool b);
00077   void toggleAddWindows();
00078   void toggleRemoveWindows();
00079 
00080   void on_isRaw_toggled( );
00081   void on_isFiltered_toggled( );
00082   void on_isRawTab_toggled( );
00083   void on_isFilteredTab_toggled( );
00084   void on_isTolerance_toggled( );
00085   void on_isOverlap_toggled( );
00086   void on_isBadSample_toggled( );
00087   void on_badSampleRelative_activated(int);
00088   void on_windowLengthType_activated(int);
00089 signals:
00090   void parametersChanged();
00091 private:
00092   int _nComponents;
00093   QAction * _addWindowsAction, * _removeWindowsAction;
00094 };
00095 
00096 } // namespace GeopsyGui
00097 
00098 #endif // WINDOWINGPARAMETERWIDGET_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines