MonoStation/AbstractSummary.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of MonoStation.
00004 **
00005 **  This file may be distributed and/or modified under the terms of the
00006 **  GNU General Public License version 2 or 3 as published by the Free
00007 **  Software Foundation and appearing in the file LICENSE.GPL included
00008 **  in the packaging of this file.
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 General Public License for
00013 **  more details.
00014 **
00015 **  You should have received a copy of the GNU General Public License
00016 **  along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 **
00018 **  See http://www.geopsy.org for more information.
00019 **
00020 **  Created : 2007-08-23
00021 **  Authors:
00022 **    Marc Wathelet
00023 **    Marc Wathelet (LGIT, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef ABSTRACTSUMMARY_H
00028 #define ABSTRACTSUMMARY_H
00029 
00030 #include <SciFigs.h>
00031 
00032 #include "MonoStationDLLExport.h"
00033 #include "StationLine.h"
00034 
00035 namespace MonoStation {
00036 
00037 class AbstractStation;
00038 class StationResults;
00039 class SummaryMapOptions;
00040 
00041 class MONOSTATION_EXPORT AbstractSummary : public GraphicSheetMenu
00042 {
00043   Q_OBJECT
00044 public:
00045   AbstractSummary(QWidget* parent=0);
00046   ~AbstractSummary();
00047 
00048   virtual void setWindowTitle(QString subPoolName)=0;
00049   virtual void addActions();
00050   virtual void setStations(const QList<AbstractStation *>& stations);
00051   QMenu * menuTools;
00052 public slots:
00053   virtual void setLimits();
00054 private slots:
00055   void pickGridMaxima(bool on);
00056   void autoPickGridMaximum();
00057   void gridCrossSection();
00058   void mapOptions();
00059   void setMapOptions();
00060 protected:
00061   QMap<double, StationResults *> distance2Station();
00062 
00063   virtual void createGraphs(bool multiStations)=0;
00064   void createStackedGraph(QString yAxisTitle, double x, double y);
00065   void createAverageGraph(QString yAxisTitle, double x, double y);
00066   void createSpectrumGridGraph(double x, double y);
00067   void createGridCrossSectionGraph(double x, double y);
00068   void createBubbleGraph(double x, double y);
00069 
00070   virtual void setValues(const QMap<double, StationResults *> * dist2stat=0)=0;
00071   void setStackedValues();
00072   void setAverageValues();
00073   void setSpectrumGridValues(const QMap<double, StationResults *> * dist2stat);
00074   void setBubbleValues();
00075 
00076   LineLayer * stackedLayer() const {return _stackedLayer;}
00077   LineLayer * averageLayer() const {return _averageLayer;}
00078   IrregularGrid2DPlot * spectrumGridLayer() const {return _spectrumGridLayer;}
00079   GridMaxFollower * spectrumGridMaxLayer() const {return _spectrumGridMaxLayer;}
00080   LineLayer * gridCrossSectionLayer() const {return _gridCrossSectionLayer;}
00081   XYValuePlot * bubbleLayer() const {return _bubbleLayer;}
00082   NameLineLayer * bubbleNameLayer() const {return _bubbleNameLayer;}
00083 private:
00084   LineLayer * _stackedLayer;
00085   LineLayer * _averageLayer;
00086   ParallelBands * _averagePeakLayer;
00087   IrregularGrid2DPlot * _spectrumGridLayer;
00088   GridMaxFollower * _spectrumGridMaxLayer;
00089   LineLayer * _gridCrossSectionLayer;
00090   XYValuePlot * _bubbleLayer;
00091   NameLineLayer * _bubbleNameLayer;
00092   ColorPaletteWidget * _bubblePalette;
00093 
00094   QList<StationResults *> _stations;
00095   // Options
00096   StationLine::Label _mapLabels;
00097   StationLine::PeakSelection _mapPeakSelection;
00098   StationResults::PeakValue _mapPeakValue;
00099   int _mapPeakValueDecimals;
00100   int _mapPeakIndex;
00101   bool _mapShowBubbles;
00102   Legend _categories;
00103 
00104   SummaryMapOptions * _mapOptions;
00105 };
00106 
00107 } // namespace MonoStation
00108 
00109 #endif // ABSTRACTSUMMARY_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines