DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
vesselsstatsplot.h
Go to the documentation of this file.
1 #ifndef VESSELSSTATSPLOT_H
2 #define VESSELSSTATSPLOT_H
3 
4 #include "StatsPlot.h"
5 #include "plottypes.h"
6 #include <palettemanager.h>
7 
8 #include <QPen>
9 #include <QColor>
10 
12 
13 class DisplaceModel;
14 class QCustomPlot;
15 class QCPItemLine;
16 
18 {
19  QCustomPlot *plotVessels;
20  QCPItemLine *timeline;
21  double timelineMax = 1e20;
22  double timelineMin = -1e20;
23  Palette mPalette;
24 
25  DisplaceModel *lastModel;
27 public:
28  VesselsStatsPlot(QCustomPlot *plotVessels, QCPItemLine *timeLine);
29 
30  void update(DisplaceModel *model, displace::plot::VesselsStat stat, QCustomPlot *theplot = nullptr);
32 private:
33  void update (QCustomPlot *);
35  void saveTo();
36  std::tuple<QVector<double>,QVector<double>> getData(DisplaceModel *model, displace::plot::VesselsStat stat,
37  std::string vesselId);
38 
39 protected:
40  void doUpdate() override;
41 };
42 
43 #endif // VESSELSSTATSPLOT_H
VesselsStat
Definition: plottypes.h:20
VesselsStatsPlot(QCustomPlot *plotVessels, QCPItemLine *timeLine)
Definition: vesselsstatsplot.cpp:15
Definition: StatsPlot.h:13
void createPopup(GraphInteractionController::PopupMenuLocation location, QMenu *menu)
Definition: vesselsstatsplot.cpp:181
void doUpdate() override
Definition: vesselsstatsplot.cpp:281
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:3582
Definition: vesselsstatsplot.h:17
Definition: displacemodel.h:71
virtual void update()
Definition: StatsPlot.h:19
PopupMenuLocation
Definition: graphinteractioncontroller.h:56
A line from one point to another.
Definition: qcustomplot.h:6123
Definition: palettemanager.h:62