DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
benthosstatsplot.h
Go to the documentation of this file.
1 #ifndef BENTHOSSTATSPLOT_H
2 #define BENTHOSSTATSPLOT_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 *mPlot;
20  QCPItemLine *mTimeline;
21  QPen pen;
22  double timelineMax = 1e20;
23  double timelineMin = -1e20;
24  Palette mPalette;
25 
26  QString mSaveFilename;
27 
28  DisplaceModel *lastModel;
30 
31 public:
32  BenthosStatsPlot(QCustomPlot *plot, QCPItemLine *timeLine);
33 
34  void setTimelineLimits(double min, double max) {
35  timelineMin = min;
36  timelineMax = max;
37  }
38 
39  void update(DisplaceModel *model, displace::plot::BenthosStat stat, QCustomPlot *theplot);
41 
42 private:
43  void update (QCustomPlot *);
44  std::tuple<QVector<double>,QVector<double>> getData(DisplaceModel *model, displace::plot::BenthosStat stattype, displace::plot::AggregationType aggtype, int grpid, const std::vector<int> &btype);
45 
46 protected:
47  void doUpdate() override;
48 };
49 
50 #endif // BENTHOSSTATSPLOT_H
BenthosStatsPlot(QCustomPlot *plot, QCPItemLine *timeLine)
Definition: benthosstatsplot.cpp:13
Definition: StatsPlot.h:13
void doUpdate() override
Definition: benthosstatsplot.cpp:199
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:3582
Definition: benthosstatsplot.h:17
AggregationType
Definition: plottypes.h:29
Definition: displacemodel.h:71
void setTimelineLimits(double min, double max)
Definition: benthosstatsplot.h:34
virtual void update()
Definition: StatsPlot.h:19
PopupMenuLocation
Definition: graphinteractioncontroller.h:56
A line from one point to another.
Definition: qcustomplot.h:6123
BenthosStat
Definition: plottypes.h:10
void createPopup(GraphInteractionController::PopupMenuLocation location, QMenu *menu)
Definition: benthosstatsplot.cpp:179
Definition: palettemanager.h:62