AxisLegendManager.hh 1.66 KB
/*
 * AxisLegendManager.hh
 *
 *  Created on: 23 jan. 2015
 *      Author: AKKA
 */

#ifndef AXISLEGENDMANAGER_HH_
#define AXISLEGENDMANAGER_HH_

#include "PanelPlotOutput.hh"
#include "XYPlot.hh"
#include "ParamMgr.hh"

using namespace AMDA::Info;

namespace plot {

class AxisLegendManager {
	public:
		static void configureYAxisLegendForSpectro(PanelPlotOutput* plot);

		static void configureYAxisLegendForSeries(PanelPlotOutput* plot);

		static void configureColorAxisLegendForSpectro(PanelPlotOutput* plot);

		static void configureColorAxisLegendForSeries(PanelPlotOutput* plot);

		static void configureXAxisLegendForSeries(XYPlot* plot);

	private:
		typedef std::map<std::string, std::list<AMDA::Common::ParameterIndexComponent> > AxisParamsComponents;

		static void addInfoPart(std::string& legend, std::string info);

		static void addIndexPart(std::string& legend, AMDA::Common::ParameterIndexComponent& index);

		static void addIndexPart(std::string& legend, int index);

		static void addBoundsPart(std::string& legend, PLFLT min, PLFLT max);

		static void addBreakLine(std::string& legend);

		static void pushComponentInList(std::string paramId, AMDA::Common::ParameterIndexComponent& index, AxisParamsComponents& axisParamsComponents);

		static void setAxisLegendForSeries(PanelPlotOutput* plot, boost::shared_ptr<Axis>& pAxis, AxisParamsComponents& axisParamsComponents);

		static std::string getParamLegend(AMDA::Info::ParamInfoSPtr paramInfo, AMDA::Common::ParameterIndexComponent& index);

		static std::string getParamLegend(AMDA::Info::ParamInfoSPtr paramInfo, int index);

		static std::string getMissionInstrumentInfo(AMDA::Info::ParamInfoSPtr paramInfo);
};

}

#endif