File: GribPlot.h

package info (click to toggle)
zygrib 8.0.1%2Bdfsg.1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 189,396 kB
  • ctags: 6,957
  • sloc: cpp: 59,202; makefile: 56
file content (92 lines) | stat: -rw-r--r-- 2,890 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**********************************************************************
zyGrib: meteorological GRIB file viewer
Copyright (C) 2008-2012 - Jacques Zaninetti - http://www.zygrib.org

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/

/*************************************
Dessin des données GRIB (avec QT)
*************************************/

#ifndef GRIBPLOT_H
#define GRIBPLOT_H

#include "RegularGridded.h"

#include "GribReader.h"
#include "DataPointInfo.h"
#include "IsoLine.h"
 
//===============================================================
class GribPlot : public RegularGridPlot
{
    public:
        GribPlot ();
        GribPlot (const GribPlot &);
        ~GribPlot ();
        
		void  loadFile (QString fileName,
						LongTaskProgress *taskProgress=NULL);
		
        GribReader *getReader()  const  {return gribReader;}

		virtual void  setCurrentDate (time_t t);

		virtual bool  isReaderOk() const  
						{return gribReader!=NULL && gribReader->isOk();}

		virtual void duplicateFirstCumulativeRecord (bool b);
		virtual void duplicateMissingWaveRecords (bool b);

		//-----------------------------------------------------
		// Draw a complete colored map
		//-----------------------------------------------------
		virtual void draw_ColoredMapPlain ( 
						DataCode dtc,
						bool smooth,
						QPainter &pnt, 
						const Projection *proj);

		virtual void draw_WIND_Arrows (
						Altitude altitude, 
						bool showBarbules, QColor windArrowsColor, 
						QPainter &pnt, const Projection *proj );

		virtual void draw_CURRENT_Arrows (
						Altitude altitude, 
						QColor currentArrowsColor, 
						QPainter &pnt, const Projection *proj );
		
		virtual void draw_WAVES_Arrows (
						const DataCode &dtc,
						QPainter &pnt, const Projection *proj );

		//-----------------------------------------------------        
		// draw a mark a each grid vertex
        virtual void draw_GridPoints (
						const DataCode &dtc,
						QPainter &pnt, const Projection *proj );
    
    private:
        void       	initNewGribPlot (
						bool interpolateValues=true, 
						bool windArrowsOnGribGrid=true,
						bool currentArrowsOnGribGrid=true );
        
		GribReader 	*gribReader;        
        QString 	fileName;
};

#endif