Curve.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Plot2d
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2016, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeePlot2d/Base.h"
16 
17 #include "CeeCore/Color3f.h"
18 #include "CeeCore/Str.h"
19 #include "CeeCore/Vec2d.h"
20 
21 #include "CeeVisualization/Font.h"
22 
23 namespace cee {
24 
25 namespace plt {
26 
27 //==================================================================================================
28 //
29 //
30 //
31 //==================================================================================================
32 class CEE_PLT_EXPORT Curve
33 {
34 public:
35  Curve(const Curve& other);
36  ~Curve();
37 
38  Curve& operator=(const Curve& other);
39 
40  size_t valueCount() const;
41  void setValues(const std::vector<double>& xValues, const std::vector<double>& yValues);
42  std::vector<double> xValues() const;
43  std::vector<double> yValues() const;
44 
45  Vec2d value(size_t valueIndex) const;
46  Color3f color() const;
47  void setColor(const Color3f& color);
48 
49  Str title() const;
50  void setTitle(const Str& title);
51 
52  double xValuesMinimum() const;
53  double xValuesMaximum() const;
54  double yValuesMinimum() const;
55  double yValuesMaximum() const;
56 
57 private:
58  Curve();
59  Curve(const Str& title, const std::vector<double>& xValues, const std::vector<double>& yValues);
60 
61  void updateRange();
62 
63 private:
64  CEE_BASE_F(Plot);
65  CEE_PRIVATE_IMPL(Curve);
66 };
67 
68 } // namespace plt
69 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Vector class for a 2D double vector.
Definition: Vec2d.h:24
Class for storing an RGB color triplet.
Definition: Color3f.h:25
A 2D data series for use in an OverlayPlot.
Definition: Curve.h:32