source: flair-src/trunk/lib/FlairCore/src/DataPlot1D.h@ 13

Last change on this file since 13 was 2, checked in by Sanahuja Guillaume, 9 years ago

flaircore

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 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
19namespace flair
20{
21namespace core
22{
23 class IODataElement;
24}
25
26namespace gui
27{
28
29 class LayoutPosition;
30
31 /*! \class DataPlot1D
32 *
33 * \brief Class displaying a 1D plot on the ground station
34 *
35 */
36 class DataPlot1D: private DataPlot
37 {
38 public:
39 /*!
40 * \brief Constructor
41 *
42 * Construct a 1D plot at given position.
43 *
44 * \param position position to display the plot
45 * \param name name
46 * \param ymin default ymin of the plot
47 * \param ymax default ymax of the plot
48 */
49 DataPlot1D(const LayoutPosition* position,std::string name,float ymin,float ymax);
50
51 /*!
52 * \brief Destructor
53 *
54 */
55 ~DataPlot1D();
56
57 /*!
58 * \brief Add a curve from an IODataElement to the plot.
59 *
60 * Curve's color can be selected by its name.
61 *
62 * \param element element to plot
63 * \param color color of the curve
64 * \param curve_name name of the curve for the legend, if unspecified, element->ObjectName() will be used
65 */
66 void AddCurve(const core::IODataElement* element,Color_t color,std::string curve_name="");
67
68 /*!
69 * \brief Add a curve from an IODataElement to the plot.
70 *
71 * Curve's color can be selected by its RGB components.
72 *
73 * \param element element to plot
74 * \param r red component of the curve
75 * \param g green component of the curve
76 * \param b blue component of the curve
77 * \param curve_name name of the curve for the legend, if unspecified, element->ObjectName() will be used
78 */
79 void AddCurve(const core::IODataElement* element,uint8_t r=255,uint8_t g=0,uint8_t b=0,std::string curve_name="");
80 };
81
82} // end namespace gui
83} // end namespace flair
84
85#endif // DATAPLOT1D_H
Note: See TracBrowser for help on using the repository browser.