##// END OF EJS Templates
Refactoring handling of axes properties (1)...
Refactoring handling of axes properties (1) Creates helper used to determine which properties to set for the graph axes, depending on the type of the data hold (properties will be different if it's scalars/vectors or spectrograms)

File last commit:

r915:b92a8e838f6e
r915:b92a8e838f6e
Show More
AxisRenderingUtils.h
31 lines | 864 B | text/x-c | CLexer
#ifndef SCIQLOP_AXISRENDERINGUTILS_H
#define SCIQLOP_AXISRENDERINGUTILS_H
#include <memory>
#include <QtCore/QString>
class IDataSeries;
class QCPAxis;
class QCPColorScale;
class QCustomPlot;
/**
* Helper used to handle axes rendering
*/
struct IAxisHelper {
virtual ~IAxisHelper() noexcept = default;
/// Set properties of the plot's axes and the color scale associated to plot passed as
/// parameters
/// @param plot the plot for which to set axe properties
/// @param colorScale the color scale for which to set properties
virtual void setProperties(QCustomPlot &plot, QCPColorScale &colorScale) = 0;
};
struct IAxisHelperFactory {
/// Creates IAxisHelper according to a data series
static std::unique_ptr<IAxisHelper> create(std::shared_ptr<IDataSeries> dataSeries) noexcept;
};
#endif // SCIQLOP_AXISRENDERINGUTILS_H