18 #include "qcustomplot.h"
35 throw std::runtime_error(
"ColorScalePlotController: axis is not initialized.");
53 color_scale->setDataScaleType(is_log ? QCPAxis::stLogarithmic : QCPAxis::stLinear);
99 auto on_property_change = [
this](
SessionItem*, std::string property_name) {
101 p_impl->update_log_scale();
105 p_impl->setup_components();
Establishes communication between QCPColorScale and ViewportAxisItem.
ColorScalePlotController(QCPColorScale *color_scale)
void subscribe() override
std::unique_ptr< ColorScalePlotControllerImpl > p_impl
~ColorScalePlotController() override
void setOnPropertyChange(Callbacks::item_str_t f)
Sets callback to be notified on item's property change.
The main object representing an editable/displayable/serializable entity.
static const std::string P_IS_LOG
materialitems.h Collection of materials to populate MaterialModel.
void setup_margins()
Setup margins of color scale to match top/bottom margins of axis rectangle.
QCPLayoutGrid * layout_grid
std::unique_ptr< ViewportAxisPlotController > axisController
QCPMarginGroup * margin_group
ColorScalePlotController * controller
QCPColorScale * color_scale
QCustomPlot * customPlot()
ColorScalePlotControllerImpl(ColorScalePlotController *controller, QCPColorScale *color_scale)
void update_log_scale()
Updates color scale for log10.