QwtScaleWidget(3)
π QwtScaleWidget π
okay bestie, welcome to the QwtScaleWidget(3) page from the Qwt User's Guide. This widget is literally a widget that contains a scale, and we're about to break it down like a group chat. No cap. β¨
πΈ NAME πΈ
QwtScaleWidget - yes, that's the whole NAME line. Just the class name and a dash, periodt. The description is giving minimal. π
π SYNOPSIS π
#include <qwt_scale_widget.h>
π£ Signals π£
void scaleDivChanged ()
π Public Member Functions π
QwtScaleWidget (QWidget *parent=NULL)
QwtScaleWidget (QwtScaleDraw::Alignment, QWidget *parent=NULL)
virtual ~QwtScaleWidget ()
QwtScaleDraw::Alignment alignment () const
QwtDoubleInterval colorBarInterval () const
QRect colorBarRect (const QRect &) const
int colorBarWidth () const
const QwtColorMap & colorMap () const
int dimForLength (int length, const QFont &scaleFont) const
void drawColorBar (QPainter *painter, const QRect &rect) const
void drawTitle (QPainter *painter, QwtScaleDraw::Alignment, const QRect
&rect) const
int endBorderDist () const
void getBorderDistHint (int &start, int &end) const
void getMinBorderDist (int &start, int &end) const
bool isColorBarEnabled () const
int margin () const
virtual QSize minimumSizeHint () const
int penWidth () const
const QwtScaleDraw * scaleDraw () const
QwtScaleDraw * scaleDraw ()
void setAlignment (QwtScaleDraw::Alignment)
void setBorderDist (int start, int end)
void setColorBarEnabled (bool)
void setColorBarWidth (int)
void setColorMap (const QwtDoubleInterval &, const QwtColorMap &)
void setLabelAlignment (Qt::Alignment)
void setLabelRotation (double rotation)
void setMargin (int)
void setMinBorderDist (int start, int end)
void setPenWidth (int)
void setScaleDiv (QwtScaleTransformation *, const QwtScaleDiv &sd)
void setScaleDraw (QwtScaleDraw *)
void setSpacing (int td)
void setTitle (const QString &title)
void setTitle (const QwtText &title)
virtual QSize sizeHint () const
int spacing () const
int startBorderDist () const
QwtText title () const
int titleHeightForWidth (int width) const
π‘οΈ Protected Member Functions π‘οΈ
void draw (QPainter *p) const
void layoutScale (bool update=true)
virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)
void scaleChange ()
π Detailed Description π
A Widget which contains a scale. That's the whole vibe β it's a widget, it contains a scale, and it's ready to serve looks. π This Widget can be used to decorate composite widgets with a scale. So if you need to add some scale energy to your composite widget, this is your bestie. π«Ά
π Constructor & Destructor Documentation π
QwtScaleWidget::QwtScaleWidget (QWidget *parent = NULL) [explicit]
Create a scale with the position QwtScaleWidget::Left. Parameters:
parentβ Parent widget
QwtScaleWidget::QwtScaleWidget (QwtScaleDraw::Alignmentalign, QWidget *parent = NULL) [explicit]
Constructor. Parameters:
alignβ Alignment.parentβ Parent widget
π Member Function Documentation π
QwtScaleDraw::Alignment QwtScaleWidget::alignment () const
Returns:
- position
See also: setPosition()
int QwtScaleWidget::dimForLength (intlength, const QFont &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 scalesscaleFontβ Font of the scale
Returns:
- height for horizontal, width for vertical scales
void QwtScaleWidget::drawTitle (QPainter *painter, QwtScaleDraw::Alignmentalign, const QRect &rect) const
Rotate and paint a title according to its position into a given rectangle.
Parameters:
painterβ Painteralignβ Alignmentrectβ Bounding rectangle
int QwtScaleWidget::endBorderDist () const
Returns:
- end border distance
See also: setBorderDist()
void QwtScaleWidget::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.
Warning: β’ The minimum border distance depends on the font.
See also: setMinBorderDist(), getMinBorderDist(), setBorderDist()
void QwtScaleWidget::getMinBorderDist (int &start, int &end) const
Get the minimum value for the distances of the scale's endpoints from the widget borders.
See also: setMinBorderDist(), getBorderDistHint()
int QwtScaleWidget::margin () const
Returns:
- margin
See also: setMargin()
QSize QwtScaleWidget::minimumSizeHint () const [virtual]
Returns:
- a minimum size hint
int QwtScaleWidget::penWidth () const
Returns:
- Scale pen width
See also: setPenWidth()
void QwtScaleWidget::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.
const QwtScaleDraw * QwtScaleWidget::scaleDraw () const
scaleDraw of this scale
See also: setScaleDraw(), QwtScaleDraw::setScaleDraw()
QwtScaleDraw * QwtScaleWidget::scaleDraw ()
scaleDraw of this scale
See also: QwtScaleDraw::setScaleDraw()
void QwtScaleWidget::setAlignment (QwtScaleDraw::Alignmentalignment)
Change the alignment
Parameters:
alignmentβ New alignment
See also: alignment()
void QwtScaleWidget::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 Distancedist2β Right or bottom distance
See also: borderDist()
void QwtScaleWidget::setLabelAlignment (Qt::Alignmentalignment)
Change the alignment for the labels.
See also: QwtScaleDraw::setLabelAlignment(), setLabelRotation()
void QwtScaleWidget::setLabelRotation (doublerotation)
Change the rotation for the labels. See QwtScaleDraw::setLabelRotation(). Parameters:
rotationβ Rotation
See also: QwtScaleDraw::setLabelRotation(), setLabelFlags()
void QwtScaleWidget::setMargin (intmargin)
Specify the margin to the colorBar/base line. Parameters:
marginβ Margin
See also: margin()
void QwtScaleWidget::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 borderendβ Minimum for the end border
See also: getMinBorderDist(), getBorderDistHint()
void QwtScaleWidget::setPenWidth (intwidth)
Specify the width of the scale pen. Parameters:
widthβ Pen width
See also: penWidth()
void QwtScaleWidget::setScaleDiv (QwtScaleTransformation *transformation, const QwtScaleDiv &scaleDiv)
Assign a scale division. The scale division determines where to set the tick marks.
Parameters:
transformationβ Transformation, needed to translate between scale and pixal valuesscaleDivβ Scale Division
See also: For more information about scale divisions, see QwtScaleDiv.
void QwtScaleWidget::setScaleDraw (QwtScaleDraw *sd)
Set a scale draw sd has to be created with new and will be deleted in ~QwtScaleWidget() or the next call of setScaleDraw().
Parameters:
sdβ ScaleDraw object
See also: scaleDraw()
void QwtScaleWidget::setSpacing (intspacing)
Specify the distance between color bar, scale and title. Parameters:
spacingβ Spacing
See also: spacing()
void QwtScaleWidget::setTitle (const QString &title)
Give title new text contents
Parameters:
titleβ New title
See also: title(), setTitle(const QwtText &);
void QwtScaleWidget::setTitle (const QwtText &title)
Give title new text contents
Parameters:
titleβ New title
See also: title()
Warning: The title flags are interpreted in direction of the label,AlignTop,AlignBottomcan't be set as the title will always be aligned to the scale.
QSize QwtScaleWidget::sizeHint () const [virtual]
Returns:
- a size hint
int QwtScaleWidget::spacing () const
Returns:
- distance between scale and title
See also: setMargin()
int QwtScaleWidget::startBorderDist () const
Returns:
- start border distance
See also: setBorderDist()
QwtText QwtScaleWidget::title () const
Returns:
- title
See also: setTitle()
int QwtScaleWidget::titleHeightForWidth (intwidth) const
Find the height of the title for a given width. Parameters:
widthβ Width
Returns:
- height Height
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
And that's the whole glow-up, bestie. Version 5.2.3, dated Tue Nov 20 2012 β that's the source/version stamp, no cap. πβ¨
π¦ where this page comes from
- epel 9: qwt5-qt5-devel 5.2.3a-12.20210522gita2b11e3.el9 Β· LGPLv2+ with exceptions
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 43: qwt5-qt5-devel 5.2.3a-22.20210522gita2b11e3.fc43 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- fedora 44: qwt5-qt5-devel 5.2.3a-23.20210522gita2b11e3.fc44 Β· LGPL-2.1-or-later WITH Qwt-exception-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms