-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph_curve.h
executable file
·90 lines (64 loc) · 2.28 KB
/
graph_curve.h
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
////////////////////////////////////////////////////////////////////////////////
/**
\file
\brief \ru Ăđŕôč÷ĺńęŕ˙ ęđčâŕ˙. \~
*/
////////////////////////////////////////////////////////////////////////////////
#ifndef __GRAPH_CURVE_H_
#define __GRAPH_CURVE_H_
#include <vector>
#include <QColor>
#include <QSharedPointer>
#include <fstream>
using std::ofstream;
using std::ifstream;
using std::vector;
class QPixmap;
class MbVector;
class MbCartPoint;
class MbCurve;
typedef QSharedPointer< MbCurve > MbCurvePtr;
//------------------------------------------------------------------------------
/** \brief \ru Ęëŕńń GraphCurve. \~
\details \ru Ăđŕôč÷ĺńęŕ˙ ęđčâŕ˙. \n
*/
//------------------------------------------------------------------------------
class GraphCurve
{
private:
MbCurvePtr curve; ///< \ru Óęŕçŕňĺëü íŕ ęđčâóţ.
bool isSelected; ///< \ru Ôëŕă, îďđĺäĺë˙ţůčé ńĺëĺęňčđîâŕííîńňü ęđčâîé.
QColor color; ///< \ru Öâĺň đčńîâŕíč˙ ęđčâîé.
public:
/// \ru Ęîíóńňđóęňîđ ďî óěîë÷ŕíčţ.
GraphCurve();
/// \ru Ęîíńňđóęňîđ ďî ęđčâîé č ĺĺ ńâîéńňâŕě.
GraphCurve( MbCurvePtr, bool, const QColor & );
/// \ru Äĺńňđóęňîđ.
~GraphCurve();
/// \ru Ęîíńňđóęňîđ ęîďčđîâŕíč˙.
GraphCurve( const GraphCurve & );
/// \ru Îďĺđŕňîđ ďđčńâŕčâŕíč˙.
GraphCurve & operator= ( const GraphCurve & );
/// \ru Ďîëó÷ĺíčĺ smart óęŕçŕňĺë˙ íŕ ęđčâóţ.
MbCurvePtr GetCurve() const;
/// \ru Ďîëó÷ĺíčĺ óęŕçŕňĺë˙ íŕ ęđčâóţ.
MbCurve * GetCurvePointer() const;
/// \ru Ďîëó÷ĺíčĺ ďđčçíŕęŕ ńĺëĺęňčđîâŕííîńňč ęđčâîé.
bool IsSelected() const;
/// \ru Ďîëó÷ĺíčĺ öâĺňŕ ęđčâîé.
const QColor & GetColor() const;
/// \ru Óńňŕíîâčňü óęŕçŕňĺëü íŕ ęđčâóţ.
void SetCurve( MbCurvePtr );
/// \ru Óńňŕíîâčňü ďđčçíŕę ńĺëĺęňčđîâŕííîńňč.
void SetCurveSelected( bool );
/// \ru Óńňŕíîâčňü öâĺň ęđčâîé.
void SetColor( QColor & );
/// \ru Đčńîâŕíčĺ ęđčâîé.
void PaintCurve( QPixmap *, const QColor & , const QColor &, size_t & problemPaint );
/// \ru Îďĺđŕňîđ âűâîäŕ â ďîňîę.
friend ofstream & operator<< ( ofstream & out, const GraphCurve & );
/// \ru Îďĺđŕňîđ ââîäŕ â ďîňîę.
friend ifstream & operator>> ( ifstream & in, GraphCurve & );
};
#endif // GRAPH_CURVE_H