MCPcopy Create free account
hub / github.com/ZhuYanzhen1/miniFOC / QCPColorScale

Method QCPColorScale

tools/qcustomplot.cpp:20108–20119  ·  view source on GitHub ↗

! Constructs a new QCPColorScale. */

Source from the content-addressed store, hash-verified

20106 Constructs a new QCPColorScale.
20107*/
20108QCPColorScale::QCPColorScale(QCustomPlot *parentPlot) :
20109 QCPLayoutElement(parentPlot),
20110 mType(QCPAxis::atTop), // set to atTop such that setType(QCPAxis::atRight) below doesn't skip work because it thinks it's already atRight
20111 mDataScaleType(QCPAxis::stLinear),
20112 mGradient(QCPColorGradient::gpCold),
20113 mBarWidth(20),
20114 mAxisRect(new QCPColorScaleAxisRectPrivate(this))
20115{
20116 setMinimumMargins(QMargins(0, 6, 0, 6)); // for default right color scale types, keep some room at bottom and top (important if no margin group is used)
20117 setType(QCPAxis::atRight);
20118 setDataRange(QCPRange(0, 6));
20119}
20120
20121QCPColorScale::~QCPColorScale()
20122{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected