Repository navigation
Expand file tree
/
Copy pathCartesianBarGraph2D.h
More file actions
64 lines (49 loc) · 1.51 KB
/
Copy pathCartesianBarGraph2D.h
File metadata and controls
64 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef WPLOT_CARTESIANBARGRAPH2D_H_
#define WPLOT_CARTESIANBARGRAPH2D_H_
#include "wplot/WPlotGlobal.h"
#include "wplot/CartesianScalarGraph2D.h"
#include <QColor>
#include <QPen>
#include <QBrush>
#include <memory>
namespace WPlot {
class Plot2D;
class WPLOTSHARED_EXPORT CartesianBarGraph2D : public CartesianScalarGraph2D
{
public:
typedef std::shared_ptr<CartesianBarGraph2D> Ptr;
public:
CartesianBarGraph2D();
virtual ~CartesianBarGraph2D() = default;
void setBarLineColor(const QColor &color);
void setBarLineWidth(const double &width);
void setBarLineStyle(const Qt::PenStyle &style);
void setBarColor(const QColor &color);
void enableBottomBarLine(const bool &enable);
void setBarWidth(const double &width);
public:
virtual void draw(Plot2D *plot);
private:
QColor m_lineColor;
QColor m_fillColor;
double m_lineWidth;
double m_barWidth;
Qt::PenStyle m_lineStyle;
QPen m_pen;
QBrush m_brush;
bool m_bottomLineEnabled;
};
} // namesapce WPlot
#endif // WPLOT_CARTESIANBARGRAPH2D_H_
///////////////////////////////////////////////////////////////////////////////
// DOCUMENTATION //
///////////////////////////////////////////////////////////////////////////////
/**
* @class WPlot::CartesianBarGraph2D
*
* This class allows to specify a line graph. In a line graph we have many
* scalar values that are joined by segments. It's possibile to specify the
* style of the segments.
*
* @image html barplot.svg "Black-white barplot example."
*/