Go to the documentation of this file.
44 scaleWidget->setObjectName( name );
48 const QFont fscl( plot->fontInfo().family(), 10 );
49 const QFont fttl( plot->fontInfo().family(), 12, QFont::Bold );
52 scaleWidget->setTransformation( scaleEngine->transformation() );
54 scaleWidget->setFont( fscl );
55 scaleWidget->setMargin( 2 );
59 scaleWidget->setTitle( text );
171 if (
isAxisValid( axisId ) && scaleEngine != NULL )
175 delete d.scaleEngine;
176 d.scaleEngine = scaleEngine;
289 return dummyScaleDiv;
483 d.doAutoScale =
false;
488 d.stepSize = stepSize;
512 d.doAutoScale =
false;
513 d.scaleDiv = scaleDiv;
586 maxMinor = qBound( 0, maxMinor, 100 );
589 if ( maxMinor !=
d.maxMinor )
591 d.maxMinor = maxMinor;
610 maxMajor = qBound( 1, maxMajor, 10000 );
613 if ( maxMajor !=
d.maxMajor )
615 d.maxMajor = maxMajor;
680 for ( it = itmList.begin(); it != itmList.end(); ++it )
698 boundingIntervals[xAxis] |=
QwtInterval( rect.left(), rect.right() );
701 boundingIntervals[yAxis] |=
QwtInterval( rect.top(), rect.bottom() );
714 double minValue =
d.minValue;
715 double maxValue =
d.maxValue;
716 double stepSize =
d.stepSize;
718 const QwtInterval& interval = boundingIntervals[axisId];
720 if (
d.doAutoScale && interval.
isValid() )
727 d.scaleEngine->autoScale(
d.maxMajor,
728 minValue, maxValue, stepSize );
732 d.scaleDiv =
d.scaleEngine->divideScale(
733 minValue, maxValue,
d.maxMajor,
d.maxMinor, stepSize );
740 int startDist, endDist;
746 for ( it = itmList.begin(); it != itmList.end(); ++it )
const QwtPlotItemList & itemList() const
A QwtPlotItemList of all attached plot items.
A class for drawing scales.
@ RightScale
The scale is right.
int axisMaxMajor(QwtAxisId) const
void setAxisLabelAlignment(QwtAxisId, Qt::Alignment)
double transform(QwtAxisId, double value) const
Transform a value into a coordinate in the plotting region.
@ LeftScale
The scale is left.
QwtTransform * transformation() const
void setAxisScale(QwtAxisId, double min, double max, double stepSize=0)
Disable autoscaling and specify a fixed scale for a selected axis.
void setAxisScaleEngine(QwtAxisId, QwtScaleEngine *)
A scale engine for linear scales.
QwtInterval axisInterval(QwtAxisId) const
Return the current interval of the specified axis.
QFont axisFont(QwtAxisId) const
void setAxisLabelRotation(QwtAxisId, double rotation)
@ YLeft
Y axis left of the canvas.
QwtAxisId xAxis() const
Return xAxis.
const AxisData & axisData(QwtAxisId axisId) const
void setAxisTitle(QwtAxisId, const QString &)
Change the title of a specified axis.
virtual QRectF boundingRect() const
const QwtScaleWidget * axisWidget(QwtAxisId) const
double invTransform(QwtAxisId, double pos) const
void autoRefresh()
Replots the plot if autoReplot() is true.
QwtText axisTitle(QwtAxisId) const
AxisData & axisData(QwtAxisId axisId)
void setAxisScaleDraw(QwtAxisId, QwtScaleDraw *)
Set a scale draw.
A class representing an interval.
void setAxisFont(QwtAxisId, const QFont &)
Change the font of an axis.
A class representing a text.
@ TopScale
The scale is above.
double axisStepSize(QwtAxisId) const
Return the step size parameter that has been set in setAxisScale.
Base class for items on the plot canvas.
void setAxisMaxMinor(QwtAxisId, int maxMinor)
const QwtScaleDiv & axisScaleDiv(QwtAxisId) const
Return the scale division of a specified axis.
const QwtScaleDraw * axisScaleDraw(QwtAxisId) const
Return the scale draw of a specified axis.
int QwtAxisId
Axis identifier.
QList< QwtPlotItem * >::ConstIterator QwtPlotItemIterator
Base class for scale engines.
void setAxisScaleDiv(QwtAxisId, const QwtScaleDiv &)
Disable autoscaling and specify a fixed scale for a selected axis.
bool testItemInterest(ItemInterest) const
@ BottomScale
The scale is below.
void setAxisAutoScale(QwtAxisId, bool on=true)
Enable autoscaling for a specified axis.
bool axisAutoScale(QwtAxisId) const
virtual void updateScaleDiv(const QwtScaleDiv &, const QwtScaleDiv &)
Update the item to changes of the axes scale division.
AxisData m_axisData[QwtAxis::AxisPositions]
@ XTop
X axis above the canvas.
void setAxisMaxMajor(QwtAxisId, int maxMajor)
A class representing a scale division.
void setAxisVisible(QwtAxisId, bool on=true)
Hide or show a specified axis.
bool isAxisValid(QwtAxisId) const
virtual QwtScaleMap canvasMap(QwtAxisId) const
int axisMaxMinor(QwtAxisId) const
bool isAxisVisible(QwtAxisId) const
bool testItemAttribute(ItemAttribute) const
QwtAxisId yAxis() const
Return yAxis.
bool isValid(int axisPos)
@ YRight
Y axis right of the canvas.
QwtScaleEngine * axisScaleEngine(QwtAxisId)
virtual void updateLayout()
Adjust plot content to its current size.
void updateAxes()
Rebuild the axes scales.
@ XBottom
X axis below the canvas.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45