IntervalsProperties.hh 2.62 KB
/*
 * IntervalsProperties.hh
 *
 *  Created on: Feb 4, 2019
 *      Author: AKKA
 */

#ifndef INTERVALSPROPERTIES_HH_
#define INTERVALSPROPERTIES_HH_

#include <iostream>
#include <cmath>
#include <string>

#include "DrawingProperties.hh"

namespace plot {

	/**
	 * Drawing properties for a parameter intervals.
	 */
	class IntervalsProperties : public DrawingProperties
	{
	public:
		friend std::ostream &operator<<(std::ostream &out_,
										const IntervalsProperties &lprop_);

		/*
		 * @brief Dumps properties for test.
		 */
		void dump(std::ostream &out_, std::string &prefix_);

		IntervalsProperties() : DrawingProperties(), _paramId(""), _indexDef(""), _font("sans-serif", 10), _position("POS_RIGHT")
		{
		}

		IntervalsProperties(const DrawingProperties &ref_) : DrawingProperties(ref_), _paramId(""), _indexDef(""), _font("sans-serif", 10),
															 _position("POS_RIGHT")
		{
		}

		IntervalsProperties(const IntervalsProperties &pParamDrawingProperties_) : DrawingProperties(pParamDrawingProperties_), _paramId(""),
																				   _indexDef(pParamDrawingProperties_._indexDef), _font("sans-serif", 10),
																				   _position("POS_RIGHT")
		{
		}

		IntervalsProperties &operator=(const IntervalsProperties &ref_)
		{
			DrawingProperties::operator=(ref_);
			_paramId = ref_._paramId;
			_indexDef = ref_._indexDef;
			return *this;
		}

		virtual ~IntervalsProperties()
		{
		}

		std::string getParamId()
		{
			return _paramId;
		}

		void setParamId(std::string paramId_)
		{
			_paramId = paramId_;
		}

		std::string getIndexDef() const
		{
			return _indexDef;
		}

		void setIndexDef(std::string indexDef)
		{
			_indexDef = indexDef;
		}

		std::string getPosition() const
		{
			return _position;
		}

		void setPosition(std::string position)
		{
			_position = position;
		}

		std::string getText() const
		{
			return _text;
		}

		void setText(std::string text)
		{
			_text = text;
		}

		Font getFont() const
		{
			return _font;
		}

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

		AMDA::Common::ParameterIndexComponentList &getIndexes()
		{
			return _indexList;
		}

		void setIndexes(AMDA::Common::ParameterIndexComponentList indexList)
		{
			_indexList = indexList;
		}

	private:
		/**
		 * @brief Calculated paramId (from resolution).
		 */
		std::string _paramId;

		/**
		 * @brief Index definition (give by the request)
		 */
		std::string _indexDef;

		std::string _position;

		std::string _text = "";

		Font _font;

		/*
		 * @brief List of components used by the spectro
		 */
		AMDA::Common::ParameterIndexComponentList _indexList;
	};

} /* namespace plot */

#endif /* INTERVALSPROPERTIES_HH_ */