DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
nationsstatsplot.h
Go to the documentation of this file.
1 #ifndef NATIONSSTATSPLOT_H
2 #define NATIONSSTATSPLOT_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 *plotNations;
20  QCPItemLine *timeline;
21  double timelineMax = 1e20;
22  double timelineMin = -1e20;
23  Palette mPalette;
24 
25  DisplaceModel *lastModel;
27 public:
28  NationsStatsPlot(QCustomPlot *plotNations, QCPItemLine *timeLine);
29 
30  void update(DisplaceModel *model, displace::plot::NationsStat stat, QCustomPlot *theplot = nullptr);
32 private:
34  void saveTo();
35  std::tuple<QVector<double>,QVector<double>> getData(DisplaceModel *model, displace::plot::NationsStat stat, int nation);
36 
37 protected:
38  void doUpdate() override;
39 };
40 
41 #endif // NATIONSSTATSPLOT_H
void doUpdate() override
Definition: nationsstatsplot.cpp:316
Definition: StatsPlot.h:13
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:3582
void createPopup(GraphInteractionController::PopupMenuLocation location, QMenu *menu)
Definition: nationsstatsplot.cpp:219
Definition: displacemodel.h:71
virtual void update()
Definition: StatsPlot.h:19
PopupMenuLocation
Definition: graphinteractioncontroller.h:56
NationsStat
Definition: plottypes.h:17
A line from one point to another.
Definition: qcustomplot.h:6123
Definition: nationsstatsplot.h:17
NationsStatsPlot(QCustomPlot *plotNations, QCPItemLine *timeLine)
Definition: nationsstatsplot.cpp:16
Definition: palettemanager.h:62