source: flair-dev/trunk/include/FlairCore/DataPlot2D.h@ 77

Last change on this file since 77 was 13, checked in by Bayard Gildas, 9 years ago

formatting script + include reformatted

File size: 2.4 KB
Line 
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 DataPlot2D.h
7 * \brief Class displaying a 2D 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 DATAPLOT2D_H
14#define DATAPLOT2D_H
15
16#include <DataPlot.h>
17#include <stdint.h>
18
19namespace flair {
20namespace core {
21class IODataElement;
22}
23}
24namespace flair {
25namespace gui {
26
27class LayoutPosition;
28
29/*! \class DataPlot2D
30*
31* \brief Class displaying a 2D plot on the ground station
32*
33*/
34class DataPlot2D : private DataPlot {
35public:
36 /*!
37 * \brief Constructor
38 *
39 * Construct a 2D plot at given place position.
40 *
41 * \param position position to display the plot
42 * \param name name
43 * \param x_name name of x axis
44 * \param xmin default xmin of the plot
45 * \param xmax default xmax of the plot
46 * \param y_name name of y axis
47 * \param ymin default ymin of the plot
48 * \param ymax default ymax of the plot
49 */
50 DataPlot2D(const LayoutPosition *position, std::string name,
51 std::string x_name, float xmin, float xmax, std::string y_name,
52 float ymin, float ymax);
53
54 /*!
55 * \brief Destructor
56 *
57 */
58 ~DataPlot2D();
59
60 /*!
61 * \brief Add a curve from elements to the plot.
62 *
63 * Curve's color can be selected by its name.
64 *
65 * \param x_element element to plot for x coordinate
66 * \param y_element element to plot for y coordinate
67 * \param color color of the curve
68 * \param curve_name name of the curve ofr the legend
69 */
70 void AddCurve(const core::IODataElement *x_element,
71 const core::IODataElement *y_element, Color_t color,
72 std::string curve_name = "");
73
74 /*!
75 * \brief Add a curve from elements to the plot.
76 *
77 * Curve's color can be selected by its RGB components.
78 *
79 * \param x_element element to plot for x coordinate
80 * \param y_element element to plot for y coordinate
81 * \param r red component of the curve
82 * \param g green component of the curve
83 * \param b blue component of the curve
84 * \param curve_name name of the curve ofr the legend
85 */
86 void AddCurve(const core::IODataElement *x_element,
87 const core::IODataElement *y_element, uint8_t r = 255,
88 uint8_t g = 0, uint8_t b = 0, std::string curve_name = "");
89};
90
91} // end namespace gui
92} // end namespace flair
93
94#endif // DATAPLOT2D_H
Note: See TracBrowser for help on using the repository browser.