Blame view

src/ParamOutputImpl/Plot/TimeTickProperties.hh 2.51 KB
fbe3c2bb   Benjamin Renard   First commit
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 * TimeTickProperties.hh
 *
 *  Created on: Jul 22, 2014
 *      Author: AKKA
 */

#ifndef TIMETICKPROPERTIES_HH_
#define TIMETICKPROPERTIES_HH_

#include <iostream>
#include <map>
#include <string>

#include "Font.hh"
#include "SymbolProperties.hh"

namespace plot {

/**
 * TimeTick properties. Defines major/minor tick number and characteristics for each series
 * on XYPlot
 */
class TimeTickProperties {
public:
	friend std::ostream& operator<<(std::ostream& out_, const TimeTickProperties& prop_);
	/*
	 * Dumps properties for test.
	 */
	void dump(std::ostream& out_, std::string& prefix_);

	TimeTickProperties() :
			_step("0"), _number(0), _minor(0), _firstSymbol(), _symbol(), _color(), _font("sans-serif", 11)
			{
	}
	TimeTickProperties(const TimeTickProperties& pTimeTickProperties_) :
		_step(pTimeTickProperties_._step),
		_number(pTimeTickProperties_._number),
		_minor(pTimeTickProperties_._minor),
		_firstSymbol(pTimeTickProperties_._firstSymbol),
		_symbol(pTimeTickProperties_._symbol),
		_color(pTimeTickProperties_._color),
		_font(pTimeTickProperties_._font)
		{
	}

	TimeTickProperties& operator=(const TimeTickProperties& pTimeTickProperties_) {
		_step = pTimeTickProperties_._step;
		_number = pTimeTickProperties_._number;
		_minor = pTimeTickProperties_._minor;
		_firstSymbol = pTimeTickProperties_._firstSymbol;
		_symbol = pTimeTickProperties_._symbol;
		_color = pTimeTickProperties_._color;
		_font = pTimeTickProperties_._font;
		return *this;
	}

	virtual ~TimeTickProperties() {
	}

	SymbolProperties& getFirstSymbol() {
		return _firstSymbol;
	}

	void setFirstSymbol(const SymbolProperties& firstSymbol) {
		_firstSymbol = firstSymbol;
	}

	const Font& getFont() const {
		return _font;
	}

	void setFont(const Font& font) {
		_font = font;
	}

	int getMinor() const {
		return _minor;
	}

	void setMinor(int minor) {
		_minor = minor;
	}

	int getNumber() const {
		return _number;
	}

	void setNumber(int number) {
		_number = number;
	}

	const std::string& getStep() const {
		return _step;
	}

	void setStep(const std::string& step) {
		_step = step;
	}

	SymbolProperties& getSymbol() {
		return _symbol;
	}

	void setSymbol(const SymbolProperties& symbol) {
		_symbol = symbol;
	}

	Color& getColor() {
		return _color;
	}

	void setColor(const Color& color) {
		_color = color;
	}

private:

	std::string 	_step;
	int 			_number;
	int 			_minor;

	SymbolProperties _firstSymbol;
	SymbolProperties _symbol;
	Color			 _color;

public:

	Font			_font;
};




} /* namespace plot */

#endif /* TIMETICKPROPERTIES_HH_ */