DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
shipsstatsplot.h
Go to the documentation of this file.
1 #ifndef SHIPSSTATSPLOT_H
2 #define SHIPSSTATSPLOT_H
3 
4 #include "BaseStatsPlotImpl.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 *mPlot;
20  QCPItemLine *mTimeline;
21  QPen pen;
22  double timelineMax = 1e20;
23  double timelineMin = -1e20;
24  Palette mPalette;
25 
26  DisplaceModel *lastModel;
28 
29  QString mSaveFilename;
30 public:
31  ShipsStatsPlot(QCustomPlot *plot, QCPItemLine *timeLine);
32 
33  void setTimelineLimits(double min, double max) {
34  timelineMin = min;
35  timelineMax = max;
36  }
37 
40 private:
41 // double getStatValue(DisplaceModel *model, displace::plot::ShipsStat stattype, displace::plot::AggregationType aggtype, int shipid, std::vector<int> shiptypeid);
42  void saveTo();
43  std::tuple<QVector<double>,QVector<double>> getData(DisplaceModel *model,
46  int shipid,
47  std::vector<int> shiptypeid);
48 
49 protected:
50  void update(QCustomPlot *plot) override;
51 };
52 
53 
54 
55 #endif // SHIPSSTATSPLOT_H
void createPopup(GraphInteractionController::PopupMenuLocation location, QMenu *menu)
Definition: shipsstatsplot.cpp:222
Definition: BaseStatsPlotImpl.h:13
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:3582
AggregationType
Definition: plottypes.h:29
Definition: displacemodel.h:71
Definition: shipsstatsplot.h:17
virtual void update()
Definition: StatsPlot.h:19
PopupMenuLocation
Definition: graphinteractioncontroller.h:56
A line from one point to another.
Definition: qcustomplot.h:6123
void setTimelineLimits(double min, double max)
Definition: shipsstatsplot.h:33
ShipsStat
Definition: plottypes.h:14
ShipsStatsPlot(QCustomPlot *plot, QCPItemLine *timeLine)
Definition: shipsstatsplot.cpp:12
Definition: palettemanager.h:62