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 getter
  • QwtCompassRose * rose () β€” the regular getter

🫢 Public Member Functions inherited from QwtDial 🫢

  • QwtDial (QWidget *parent=NULL) β€” Constructor
  • virtual ~QwtDial () β€” Destructor
  • void setFrameShadow (Shadow)
  • Shadow frameShadow () const
  • void setLineWidth (int)
  • int lineWidth () const
  • void setMode (Mode) β€” change the mode of the dial
  • Mode mode () const
  • void setScaleArc (double minArc, double maxArc)
  • void setMinScaleArc (double)
  • double minScaleArc () const
  • void setMaxScaleArc (double)
  • double maxScaleArc () const
  • virtual void setOrigin (double) β€” change the origin
  • double origin () const
  • void setNeedle (QwtDialNeedle *)
  • const QwtDialNeedle * needle () const
  • QwtDialNeedle * needle ()
  • QRect boundingRect () const
  • QRect innerRect () const
  • virtual QRect scaleInnerRect () const
  • virtual QSize sizeHint () const override
  • virtual QSize minimumSizeHint () const override
  • void setScaleDraw (QwtRoundScaleDraw *)
  • QwtRoundScaleDraw * scaleDraw ()
  • const QwtRoundScaleDraw * scaleDraw () const

πŸ’œ Public Member Functions inherited from QwtAbstractSlider πŸ’œ

  • QwtAbstractSlider (QWidget *parent=NULL) β€” Constructor
  • virtual ~QwtAbstractSlider () β€” Destructor
  • void setValid (bool)
  • bool isValid () const
  • double value () const β€” returns the current value
  • void setWrapping (bool)
  • bool wrapping () const
  • void setTotalSteps (uint) β€” set the number of steps
  • uint totalSteps () const
  • void setSingleSteps (uint) β€” set the number of steps for a single increment
  • uint singleSteps () const
  • void setPageSteps (uint) β€” set the number of steps for a page increment
  • uint pageSteps () const
  • void setStepAlignment (bool) β€” enable step alignment
  • bool stepAlignment () const
  • void setTracking (bool) β€” enables or disables tracking
  • bool isTracking () const
  • void setReadOnly (bool)
  • bool isReadOnly () const
  • void setInvertedControls (bool)
  • bool invertedControls () const

🌈 Public Member Functions inherited from QwtAbstractScale 🌈

  • QwtAbstractScale (QWidget *parent=NULL)
  • virtual ~QwtAbstractScale () β€” Destructor
  • void setScale (double lowerBound, double upperBound) β€” specify a scale
  • void setScale (const QwtInterval &) β€” specify a scale
  • void setScale (const QwtScaleDiv &) β€” specify a scale
  • const QwtScaleDiv & scaleDiv () const
  • void setLowerBound (double value)
  • double lowerBound () const
  • void setUpperBound (double value)
  • double upperBound () const
  • void setScaleStepSize (double stepSize) β€” set the step size used for calculating a scale division
  • double scaleStepSize () const
  • void setScaleMaxMajor (int ticks) β€” set the maximum number of major tick intervals
  • int scaleMaxMinor () const
  • void setScaleMaxMinor (int ticks) β€” set the maximum number of minor tick intervals
  • int scaleMaxMajor () const
  • void setScaleEngine (QwtScaleEngine *) β€” set a scale engine
  • const QwtScaleEngine * scaleEngine () const
  • QwtScaleEngine * scaleEngine ()
  • int transform (double) const
  • double invTransform (int) const
  • bool isInverted () const
  • double minimum () const
  • double maximum () const
  • const QwtScaleMap & scaleMap () const

πŸŽ€ Protected Member Functions πŸŽ€

  • virtual void drawRose (QPainter *, const QPointF &center, double radius, double north, QPalette::ColorGroup) const
  • virtual void drawScaleContents (QPainter *, const QPointF &center, double radius) const override
  • virtual void keyPressEvent (QKeyEvent *) override

πŸ’– Protected Member Functions inherited from QwtDial πŸ’–

  • virtual void wheelEvent (QWheelEvent *) override
  • virtual void paintEvent (QPaintEvent *) override
  • virtual void changeEvent (QEvent *) override
  • virtual void drawFrame (QPainter *)
  • virtual void drawContents (QPainter *) const β€” draw the contents inside the frame
  • virtual void drawFocusIndicator (QPainter *) const
  • void invalidateCache ()
  • virtual void drawScale (QPainter *, const QPointF &center, double radius) const
  • virtual void drawNeedle (QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const
  • virtual double scrolledTo (const QPoint &) const override β€” determine the value for a new position of the slider handle
  • virtual bool isScrollPosition (const QPoint &) const override β€” determine what to do when the user presses a mouse button
  • virtual void sliderChange () override β€” calling update()
  • virtual void scaleChange () override

⭐ Protected Member Functions inherited from QwtAbstractSlider ⭐

  • virtual void mousePressEvent (QMouseEvent *) override
  • virtual void mouseReleaseEvent (QMouseEvent *) override
  • virtual void mouseMoveEvent (QMouseEvent *) override
  • void 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 draw
  • const QwtAbstractScaleDraw * abstractScaleDraw () const
  • QwtAbstractScaleDraw * abstractScaleDraw ()
  • void updateScaleDraw ()

🧚 Additional Inherited Members 🧚

πŸ‘‘ Public Types inherited from QwtDial πŸ‘‘

  • enum Shadow { Plain = QFrame::Plain, Raised = QFrame::Raised, Sunken = QFrame::Sunken } β€” frame shadow
  • enum 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 value
  • void 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 β€” the examples/dials example shows how to use QwtCompass. 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