QwtScaleDraw::AlignmentQwtScaleWidget::alignment()constReturns:
position
Seealso:
setPosition()
QwtIntervalQwtScaleWidget::colorBarInterval()constReturns:
Value interval for the color bar
Seealso:setColorMap(), colorMap()QRectFQwtScaleWidget::colorBarRect(constQRectF&rect)const
Calculate the the rectangle for the color bar
Parameters:rect Bounding rectangle for all components of the scale
Returns:
Rectangle for the color bar
intQwtScaleWidget::colorBarWidth()constReturns:
Width of the color bar
Seealso:setColorBarEnabled(), setColorBarEnabled()constQwtColorMap*QwtScaleWidget::colorMap()constReturns:
Color map
Seealso:setColorMap(), colorBarInterval()intQwtScaleWidget::dimForLength(intlength,constQFont&scaleFont)const
Find the minimum dimension for a given length. dim is the height, length the width seen in direction of
the title.
Parameters:length width for horizontal, height for vertical scales
scaleFont Font of the scale
Returns:
height for horizontal, width for vertical scales
voidQwtScaleWidget::drawColorBar(QPainter*painter,constQRectF&rect)const
Draw the color bar of the scale widget
Parameters:painter Painter
rect Bounding rectangle for the color bar
Seealso:setColorBarEnabled()voidQwtScaleWidget::drawTitle(QPainter*painter,QwtScaleDraw::Alignmentalign,constQRectF&rect)const
Rotate and paint a title according to its position into a given rectangle.
Parameters:painter Painter
align Alignment
rect Bounding rectangle
intQwtScaleWidget::endBorderDist()constReturns:
end border distance
Seealso:setBorderDist()voidQwtScaleWidget::getBorderDistHint(int&start,int&end)const
Calculate a hint for the border distances. This member function calculates the distance of the scale's
endpoints from the widget borders which is required for the mark labels to fit into the widget. The
maximum of this distance an the minimum border distance is returned.
Parameters:start Return parameter for the border width at the beginning of the scale
end Return parameter for the border width at the end of the scale
Warning:
• The minimum border distance depends on the font.
Seealso:setMinBorderDist(), getMinBorderDist(), setBorderDist()voidQwtScaleWidget::getMinBorderDist(int&start,int&end)const
Get the minimum value for the distances of the scale's endpoints from the widget borders.
Parameters:start Return parameter for the border width at the beginning of the scale
end Return parameter for the border width at the end of the scale
Seealso:setMinBorderDist(), getBorderDistHint()boolQwtScaleWidget::isColorBarEnabled()constReturns:
true, when the color bar is enabled
Seealso:setColorBarEnabled(), setColorBarWidth()voidQwtScaleWidget::layoutScale(boolupdate_geometry=true)[protected]
Recalculate the scale's geometry and layout based on the current geometry and fonts.
Parameters:update_geometry Notify the layout system and call update to redraw the scale
intQwtScaleWidget::margin()constReturns:
margin
Seealso:setMargin()QSizeQwtScaleWidget::minimumSizeHint()const[virtual]Returns:
a minimum size hint
voidQwtScaleWidget::resizeEvent(QResizeEvent*event)[protected],[virtual]
Event handler for resize events
Parameters:event Resize event
voidQwtScaleWidget::scaleChange()[protected]
Notify a change of the scale. This virtual function can be overloaded by derived classes. The default
implementation updates the geometry and repaints the widget.
constQwtScaleDraw*QwtScaleWidget::scaleDraw()constReturns:
scaleDraw of this scale
Seealso:setScaleDraw(), QwtScaleDraw::setScaleDraw()
QwtScaleDraw*QwtScaleWidget::scaleDraw()Returns:
scaleDraw of this scale
Seealso:
QwtScaleDraw::setScaleDraw()
voidQwtScaleWidget::setAlignment(QwtScaleDraw::Alignmentalignment)
Change the alignment
Parameters:alignment New alignment
Seealso:alignment()voidQwtScaleWidget::setBorderDist(intdist1,intdist2)
Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be
less than minimum border distance.
Parameters:dist1 Left or top Distance
dist2 Right or bottom distance
Seealso:
borderDist()
voidQwtScaleWidget::setColorBarEnabled(boolon)
En/disable a color bar associated to the scale
Seealso:isColorBarEnabled(), setColorBarWidth()voidQwtScaleWidget::setColorBarWidth(intwidth)
Set the width of the color bar
Parameters:width Width
Seealso:colorBarWidth(), setColorBarEnabled()voidQwtScaleWidget::setColorMap(constQwtInterval&interval,QwtColorMap*colorMap)
Set the color map and value interval, that are used for displaying the color bar.
Parameters:interval Value interval
colorMap Color map
Seealso:colorMap(), colorBarInterval()voidQwtScaleWidget::setLabelAlignment(Qt::Alignmentalignment)
Change the alignment for the labels.
Seealso:QwtScaleDraw::setLabelAlignment(), setLabelRotation()voidQwtScaleWidget::setLabelRotation(doublerotation)
Change the rotation for the labels. See QwtScaleDraw::setLabelRotation().
Parameters:rotation Rotation
Seealso:QwtScaleDraw::setLabelRotation(), setLabelFlags()
voidQwtScaleWidget::setLayoutFlag(LayoutFlagflag,boolon)
Toggle an layout flag
Parameters:flag Layout flag
on true/false
Seealso:testLayoutFlag(), LayoutFlagvoidQwtScaleWidget::setMargin(intmargin)
Specify the margin to the colorBar/base line.
Parameters:margin Margin
Seealso:margin()voidQwtScaleWidget::setMinBorderDist(intstart,intend)
Set a minimum value for the distances of the scale's endpoints from the widget borders. This is useful to
avoid that the scales are 'jumping', when the tick labels or their positions change often.
Parameters:start Minimum for the start border
end Minimum for the end border
Seealso:getMinBorderDist(), getBorderDistHint()voidQwtScaleWidget::setScaleDiv(constQwtScaleDiv&scaleDiv)
Assign a scale division. The scale division determines where to set the tick marks.
Parameters:scaleDiv Scale Division
Seealso:
For more information about scale divisions, see QwtScaleDiv.
voidQwtScaleWidget::setScaleDraw(QwtScaleDraw*scaleDraw)
Set a scale draw
scaleDraw has to be created with new and will be deleted in ~QwtScaleWidget() or the next call of
setScaleDraw(). scaleDraw will be initialized with the attributes of the previous scaleDraw object.
Parameters:scaleDraw ScaleDraw object
Seealso:scaleDraw()voidQwtScaleWidget::setSpacing(intspacing)
Specify the distance between color bar, scale and title.
Parameters:spacing Spacing
Seealso:spacing()voidQwtScaleWidget::setTitle(constQString&title)
Give title new text contents
Parameters:title New title
Seealso:title(), setTitle(constQwtText&);
voidQwtScaleWidget::setTitle(constQwtText&title)
Give title new text contents
Parameters:title New title
Seealso:title()Warning:
The title flags are interpreted in direction of the label, AlignTop, AlignBottom can't be set as the
title will always be aligned to the scale.
voidQwtScaleWidget::setTransformation(QwtTransform*transformation)
Set the transformation
Parameters:transformation Transformation
Seealso:
QwtAbstractScaleDraw::scaleDraw(), QwtScaleMapQSizeQwtScaleWidget::sizeHint()const[virtual]Returns:
a size hint
intQwtScaleWidget::spacing()constReturns:
distance between scale and title
Seealso:setMargin()intQwtScaleWidget::startBorderDist()constReturns:
start border distance
Seealso:setBorderDist()boolQwtScaleWidget::testLayoutFlag(LayoutFlagflag)const
Test a layout flag
Parameters:flag Layout flag
Returns:
true/false
Seealso:setLayoutFlag(), LayoutFlagQwtTextQwtScaleWidget::title()constReturns:
title
Seealso:setTitle()intQwtScaleWidget::titleHeightForWidth(intwidth)const
Find the height of the title for a given width.
Parameters:width Width
Returns:
height Height