/* * DefaultPlotConfiguration.cc * * Created on: 28 oct. 2013 * Author: CS */ #include "DefaultPlotConfiguration.hh" #include "PlotConfigurationLoader.hh" namespace plot { const std::string DefaultPlotConfiguration::TIME_DEFAULT_ID = "timeAxis"; const std::string DefaultPlotConfiguration::EPOCH_DEFAULT_ID = "epochAxis"; const std::string DefaultPlotConfiguration::COLORAXIS_ID = "colorAxis"; std::unique_ptr DefaultPlotConfiguration::_instance = nullptr; std::once_flag DefaultPlotConfiguration::_instanceOnceFlag; DefaultPlotConfiguration::DefaultPlotConfiguration() { PlotConfigurationLoader lPlotLoader = PlotConfigurationLoader(); lPlotLoader.load(this); } DefaultPlotConfiguration::~DefaultPlotConfiguration() { } void DefaultPlotConfiguration::applyDefaultDrawingProperties(const std::string& key_, DrawingProperties& p_){ auto p = _defaultDrawingProperties.find(key_); if( p != _defaultDrawingProperties.end() ){ p_.setXAxisId(p->second.getXAxisId()); p_.setZAxisId(p->second.getZAxisId()); //p_.setYAxisId(p->second.getXAxisId()); p_.setColor(p->second.getColor()); p_.setLineProperties(p->second.getLineProperties()); p_.setSymbolProperties(p->second.getSymbolProperties()); p_.setMaxResolution(_defaultPanel._resolution); } } } /* namespace plot */