GeopsyGui/SubPoolWindow.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 : 2003-11-10
00022 **  Authors :
00023 **    Marc Wathelet
00024 **    Marc Wathelet (ULg, Liège, Belgium)
00025 **    Marc Wathelet (LGIT, Grenoble, France)
00026 **
00027 ***************************************************************************/
00028 
00029 #ifndef SUBPOOLWINDOW_H
00030 #define SUBPOOLWINDOW_H
00031 
00032 #include <QtGui>
00033 #include <GeopsyCore.h>
00034 
00035 #include "GeopsyGuiDLLExport.h"
00036 
00037 namespace GeopsyGui {
00038 
00039 class ToolBase;
00040 
00041 class GEOPSYGUI_EXPORT SubPoolWindow: public QWidget
00042 {
00043   Q_OBJECT
00044 public:
00045   SubPoolWindow(QWidget* parent=0);
00046   virtual ~SubPoolWindow();
00047 
00048   void setSubPool(const SubSignalPool& subPool);
00049   SubSignalPool& subPool() {return _subPool;}
00050   const SubSignalPool& subPool() const {return _subPool;}
00051 
00052   // Toolboxes
00053   virtual void setTool(ToolBase * tw) {_tool=tw;}
00054   ToolBase * tool() {return _tool;}
00055 
00056   // Function to redefine in child classes to update view after SubPool changes
00057   virtual void setWindowTitle(QString title);
00058   virtual void signalsUpdate();
00059   // Function to redefine in child class to make fft and attached updates
00060   virtual void fastFourierTransform(DoubleSignal::SignalType st)=0;
00061 
00062   void lock();
00063   void unlock();
00064   bool isLocked();
00065 
00066   // Waveform processing
00067   SignalProcessScript * signalProcess();
00068   bool run(const QString& script);
00069 public slots:
00070   void addSignals(const SubSignalPool& sel);
00071   void addFile(QString fileName);
00072   void addSignal(int id);
00073   void addSignal(SubPoolWindow * viewer, int index);
00074   virtual void subPoolUpdate()=0;
00075   virtual void refreshSignal(Signal * sig);
00076 protected:
00077   virtual void closeEvent (QCloseEvent * e);
00078 signals:
00079   void signalTypeChanged(DoubleSignal::SignalType);
00080   void aboutToClose();
00081 private:
00082   SubSignalPool _subPool;
00083   SignalProcessScript * _signalProcess;
00084   // Toolboxes
00085   ToolBase * _tool;
00086   bool _locked;
00087 };
00088 
00089 } // namespace GeopsyGui
00090 
00091 #endif // SUBPOOLWINDOW_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines