GeopsyGui/SignalsProperties.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-20
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (LGIT, Grenoble, France)
00025 **
00026 ***************************************************************************/
00027 
00028 #ifndef SIGNALSPROPERTIES_H
00029 #define SIGNALSPROPERTIES_H
00030 
00031 #include <QGpGuiTools.h>
00032 
00033 #include "ui_SignalsProperties.h"
00034 #include "GeopsyGuiDLLExport.h"
00035 #include "SignalLayer.h"
00036 
00037 namespace GeopsyGui {
00038 
00039 class GEOPSYGUI_EXPORT SignalsProperties : public PropertyWidget, public Ui::SignalsProperties
00040 {
00041   Q_OBJECT
00042 public:
00043   SignalsProperties(QWidget* parent=0);
00044   ~SignalsProperties();
00045 
00046   enum Properties {Colors, IsSpectrum, Wiggle, VariableArea,
00047                    Normalize, NormalizeValue, ClipMode, ClipValue, Overlap, Offset,
00048                    YAxis, TimeRange, AroundPickName, BeforePickDelay, AfterPickDelay, CustomRange};
00049 
00050   void setCurrentSubPool(SubSignalPool * subPool);
00051   virtual void setWidgets();
00052 
00053   static int normalize2item(SignalLayer::Normalize n);
00054   static SignalLayer::Normalize item2normalize(int index);
00055   static int clip2item(SignalLayer::Clip n);
00056   static SignalLayer::Clip item2clip(int index);
00057   static int offset2item(SignalLayer::Offset n);
00058   static SignalLayer::Offset item2offset(int index);
00059   static int yAxis2item(SignalLayer::YAxis n);
00060   static SignalLayer::YAxis item2yAxis(int index);
00061   static int timeRange2item(SignalLayer::TimeRange n);
00062   static SignalLayer::TimeRange item2timeRange(int index);
00063 private:
00064   virtual int determineCustomWidgetType(int pid, QWidget * w, QWidget * label);
00065   virtual bool connectCustomWidget(PropertyValue & );
00066   virtual QVariant customWidgetValue(PropertyValue & );
00067   virtual bool setCustomWidget(PropertyValue &  p);
00068 public slots:
00069   void on_colors_clicked();
00070   void on_normalize_currentIndexChanged();
00071   void on_clipMode_currentIndexChanged();
00072   void on_defaultPaletteValues_clicked();
00073   void on_timeRange_currentIndexChanged();
00074 signals:
00075   void setPaletteValues(ColorPalette pal);
00076 };
00077 
00078 } // namespace GeopsyGui
00079 
00080 #endif // SIGNALSPROPERTIES_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines