1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | /*!
|
---|
6 | * \file DataPlot1D.h
|
---|
7 | * \brief Class displaying a 1D plot on the ground station
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2011/10/07
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef DATAPLOT1D_H
|
---|
14 | #define DATAPLOT1D_H
|
---|
15 |
|
---|
16 | #include <DataPlot.h>
|
---|
17 | #include <stdint.h>
|
---|
18 |
|
---|
19 | namespace flair {
|
---|
20 | namespace core {
|
---|
21 | class IODataElement;
|
---|
22 | }
|
---|
23 |
|
---|
24 | namespace gui {
|
---|
25 |
|
---|
26 | class LayoutPosition;
|
---|
27 |
|
---|
28 | /*! \class DataPlot1D
|
---|
29 | *
|
---|
30 | * \brief Class displaying a 1D plot on the ground station
|
---|
31 | *
|
---|
32 | */
|
---|
33 | class DataPlot1D : private DataPlot {
|
---|
34 | public:
|
---|
35 | /*!
|
---|
36 | * \brief Constructor
|
---|
37 | *
|
---|
38 | * Construct a 1D plot at given position.
|
---|
39 | *
|
---|
40 | * \param position position to display the plot
|
---|
41 | * \param name name
|
---|
42 | * \param ymin default ymin of the plot
|
---|
43 | * \param ymax default ymax of the plot
|
---|
44 | */
|
---|
45 | DataPlot1D(const LayoutPosition *position, std::string name, float ymin,
|
---|
46 | float ymax);
|
---|
47 |
|
---|
48 | /*!
|
---|
49 | * \brief Destructor
|
---|
50 | *
|
---|
51 | */
|
---|
52 | ~DataPlot1D();
|
---|
53 |
|
---|
54 | /*!
|
---|
55 | * \brief Add a curve from an IODataElement to the plot.
|
---|
56 | *
|
---|
57 | * Curve's color can be selected by its name.
|
---|
58 | *
|
---|
59 | * \param element element to plot
|
---|
60 | * \param color color of the curve
|
---|
61 | * \param curve_name name of the curve for the legend, if unspecified,
|
---|
62 | *element->ObjectName() will be used
|
---|
63 | */
|
---|
64 | void AddCurve(const core::IODataElement *element, Color_t color,
|
---|
65 | std::string curve_name = "");
|
---|
66 |
|
---|
67 | /*!
|
---|
68 | * \brief Add a curve from an IODataElement to the plot.
|
---|
69 | *
|
---|
70 | * Curve's color can be selected by its RGB components.
|
---|
71 | *
|
---|
72 | * \param element element to plot
|
---|
73 | * \param r red component of the curve
|
---|
74 | * \param g green component of the curve
|
---|
75 | * \param b blue component of the curve
|
---|
76 | * \param curve_name name of the curve for the legend, if unspecified,
|
---|
77 | *element->ObjectName() will be used
|
---|
78 | */
|
---|
79 | void AddCurve(const core::IODataElement *element, uint8_t r = 255,
|
---|
80 | uint8_t g = 0, uint8_t b = 0, std::string curve_name = "");
|
---|
81 | };
|
---|
82 |
|
---|
83 | } // end namespace gui
|
---|
84 | } // end namespace flair
|
---|
85 |
|
---|
86 | #endif // DATAPLOT1D_H
|
---|