QwtCompass(3)
π« QwtCompass(3) π«
okay bestie, welcome to the Library Functions Manual page for QwtCompass β and yes, it's literally as cute as it sounds π§β¨
πΈ NAME πΈ
QwtCompass β a Compass Widget, no cap π§π
π¦ SYNOPSIS π¦
#include <qwt_compass.h>
It inherits QwtDial β so everything the dial can do, the compass gets to do too, inherited bestie privileges fr fr π
β¨ Public Member Functions β¨
QwtCompass (QWidget *parent=NULL)β Constructor πvirtual ~QwtCompass ()β Destructor πvoid setRose (QwtCompassRose *rose)β sets the rose, more on this below πΉconst QwtCompassRose * rose () constβ the const-flavored getterQwtCompassRose * rose ()β the regular getter
π«Ά Public Member Functions inherited from QwtDial π«Ά
QwtDial (QWidget *parent=NULL)β Constructorvirtual ~QwtDial ()β Destructorvoid setFrameShadow (Shadow)Shadow frameShadow () constvoid setLineWidth (int)int lineWidth () constvoid setMode (Mode)β change the mode of the dialMode mode () constvoid setScaleArc (double minArc, double maxArc)void setMinScaleArc (double)double minScaleArc () constvoid setMaxScaleArc (double)double maxScaleArc () constvirtual void setOrigin (double)β change the origindouble origin () constvoid setNeedle (QwtDialNeedle *)const QwtDialNeedle * needle () constQwtDialNeedle * needle ()QRect boundingRect () constQRect innerRect () constvirtual QRect scaleInnerRect () constvirtual QSize sizeHint () const overridevirtual QSize minimumSizeHint () const overridevoid setScaleDraw (QwtRoundScaleDraw *)QwtRoundScaleDraw * scaleDraw ()const QwtRoundScaleDraw * scaleDraw () const
π Public Member Functions inherited from QwtAbstractSlider π
QwtAbstractSlider (QWidget *parent=NULL)β Constructorvirtual ~QwtAbstractSlider ()β Destructorvoid setValid (bool)bool isValid () constdouble value () constβ returns the current valuevoid setWrapping (bool)bool wrapping () constvoid setTotalSteps (uint)β set the number of stepsuint totalSteps () constvoid setSingleSteps (uint)β set the number of steps for a single incrementuint singleSteps () constvoid setPageSteps (uint)β set the number of steps for a page incrementuint pageSteps () constvoid setStepAlignment (bool)β enable step alignmentbool stepAlignment () constvoid setTracking (bool)β enables or disables trackingbool isTracking () constvoid setReadOnly (bool)bool isReadOnly () constvoid setInvertedControls (bool)bool invertedControls () const
π Public Member Functions inherited from QwtAbstractScale π
QwtAbstractScale (QWidget *parent=NULL)virtual ~QwtAbstractScale ()β Destructorvoid setScale (double lowerBound, double upperBound)β specify a scalevoid setScale (const QwtInterval &)β specify a scalevoid setScale (const QwtScaleDiv &)β specify a scaleconst QwtScaleDiv & scaleDiv () constvoid setLowerBound (double value)double lowerBound () constvoid setUpperBound (double value)double upperBound () constvoid setScaleStepSize (double stepSize)β set the step size used for calculating a scale divisiondouble scaleStepSize () constvoid setScaleMaxMajor (int ticks)β set the maximum number of major tick intervalsint scaleMaxMinor () constvoid setScaleMaxMinor (int ticks)β set the maximum number of minor tick intervalsint scaleMaxMajor () constvoid setScaleEngine (QwtScaleEngine *)β set a scale engineconst QwtScaleEngine * scaleEngine () constQwtScaleEngine * scaleEngine ()int transform (double) constdouble invTransform (int) constbool isInverted () constdouble minimum () constdouble maximum () constconst QwtScaleMap & scaleMap () const
π Protected Member Functions π
virtual void drawRose (QPainter *, const QPointF ¢er, double radius, double north, QPalette::ColorGroup) constvirtual void drawScaleContents (QPainter *, const QPointF ¢er, double radius) const overridevirtual void keyPressEvent (QKeyEvent *) override
π Protected Member Functions inherited from QwtDial π
virtual void wheelEvent (QWheelEvent *) overridevirtual void paintEvent (QPaintEvent *) overridevirtual void changeEvent (QEvent *) overridevirtual void drawFrame (QPainter *)virtual void drawContents (QPainter *) constβ draw the contents inside the framevirtual void drawFocusIndicator (QPainter *) constvoid invalidateCache ()virtual void drawScale (QPainter *, const QPointF ¢er, double radius) constvirtual void drawNeedle (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) constvirtual double scrolledTo (const QPoint &) const overrideβ determine the value for a new position of the slider handlevirtual bool isScrollPosition (const QPoint &) const overrideβ determine what to do when the user presses a mouse buttonvirtual void sliderChange () overrideβ callingupdate()virtual void scaleChange () override
β Protected Member Functions inherited from QwtAbstractSlider β
virtual void mousePressEvent (QMouseEvent *) overridevirtual void mouseReleaseEvent (QMouseEvent *) overridevirtual void mouseMoveEvent (QMouseEvent *) overridevoid incrementValue (int stepCount)double incrementedValue (double value, int stepCount) const
π Protected Member Functions inherited from QwtAbstractScale π
void rescale (double lowerBound, double upperBound, double stepSize)void setAbstractScaleDraw (QwtAbstractScaleDraw *)β set a scale drawconst QwtAbstractScaleDraw * abstractScaleDraw () constQwtAbstractScaleDraw * abstractScaleDraw ()void updateScaleDraw ()
π§ Additional Inherited Members π§
π Public Types inherited from QwtDial π
enum Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken }β frame shadowenum Mode { RotateNeedle, RotateScale }β mode controlling whether the needle or the scale is rotating
πΈ Public Slots inherited from QwtAbstractSlider πΈ
void setValue (double value)
π₯ Signals inherited from QwtAbstractSlider π₯
void valueChanged (double value)β notify a change of valuevoid sliderPressed ()void sliderReleased ()void sliderMoved (double value)
π Detailed Description π
A Compass Widget. That's the whole vibe π§
QwtCompass is a widget to display and enter directions β main character energy honestly. It consists of a scale, an optional needle and rose πΉ
Note β theexamples/dialsexample shows how to useQwtCompass. go look at it bestie, it's giving tutorial π
Definition at line 61 of file qwt_compass.h.
π Constructor & Destructor Documentation π
QwtCompass::QwtCompass (QWidget * parent = NULL) [explicit]
Constructor β¨
Parameters
- parent β parent widget
Create a compass widget with a scale, no needle and no rose. The default origin is 270.0 with no valid value. It accepts mouse and keyboard inputs and has no step size. The default mode is QwtDial::RotateNeedle.
Definition at line 158 of file qwt_compass.cpp.
QwtCompass::~QwtCompass () [virtual]
Destructor π rip little compass, slay while you were here.
Definition at line 176 of file qwt_compass.cpp.
π Member Function Documentation π
void QwtCompass::drawRose (QPainter * painter, const QPointF & center, double radius, double north, QPalette::ColorGroup cg) const [protected], [virtual]
Draw the compass rose πΉ β literal art moment.
Parameters
- painter β painter
- center β center of the compass
- radius β radius of the circle, where to paint the rose
- north β direction pointing north, in degrees counter clockwise
- cg β color group
Definition at line 218 of file qwt_compass.cpp.
void QwtCompass::drawScaleContents (QPainter * painter, const QPointF & center, double radius) const [override], [protected], [virtual]
Draw the contents of the scale π¨
Parameters
- painter β painter
- center β center of the content circle
- radius β radius of the content circle
Reimplemented from QwtDial.
Definition at line 189 of file qwt_compass.cpp.
void QwtCompass::keyPressEvent (QKeyEvent * kev) [override], [protected], [virtual]
Handles key events β¨οΈ β she listens, and she responds.
Beside the keys described in QwtDial::keyPressEvent, numbers from 1-9 (without 5) set the direction according to their position on the num pad. iykyk π’
See also isReadOnly()
Reimplemented from QwtAbstractSlider.
Definition at line 271 of file qwt_compass.cpp.
QwtCompassRose * QwtCompass::rose ()
Returns β rose πΉ
See also setRose()
Definition at line 257 of file qwt_compass.cpp.
const QwtCompassRose * QwtCompass::rose () const
Returns β rose πΉ (the const one, equally iconic)
See also setRose()
Definition at line 248 of file qwt_compass.cpp.
void QwtCompass::setRose (QwtCompassRose * rose)
Set a rose for the compass πΉβ¨
Parameters
- rose β compass rose
Warning β οΈ β the rose will be deleted when a different rose is set or in ~QwtCompass. so like, don't hold onto that pointer and then act surprised, bestie π
See also rose()
Definition at line 232 of file qwt_compass.cpp.
π«Ά Author π«Ά
Generated automatically by Doxygen for Qwt User's Guide from the source code. not a human author, just robot vibes doing its thing π€π
aaaand that's the page! this was QwtCompass(3) from the Qwt User's Guide, and the footer date is literally just the guide label itself, so consider this your official sign-off: Qwt User's Guide β QwtCompass(3) β stay compass-y, bestie π§ππ¦
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms