QwtCompass(3)
β¨ NAME β¨
QwtCompass β bestie, that's genuinely the whole name. No long description, no subtitle, just the widget's name and the vibe. π
π SYNOPSIS π
#include <qwt_compass.h>
Inherits QwtDial.
π«Ά Public Member Functions π«Ά
QwtCompass (QWidget *parent=NULL)
virtual ~QwtCompass ()
const QMap< double, QString > & labelMap () const
QMap< double, QString > & labelMap ()
const QwtCompassRose * rose () const
QwtCompassRose * rose ()
void setLabelMap (const QMap< double, QString > &map)
void setRose (QwtCompassRose *rose)
π Protected Member Functions π
virtual void drawRose (QPainter *, const QPoint ¢er, int radius,
double north, QPalette::ColorGroup) const
virtual void drawScaleContents (QPainter *, const QPoint ¢er, int
radius) const
virtual void keyPressEvent (QKeyEvent *)
virtual QwtText scaleLabel (double value) const
πΈ Additional Inherited Members πΈ
lowkey iconic β there's a whole section here, and it's empty. The inherited stuff lives over in QwtDial, bestie. Go look there. π¦
π Detailed Description π
A Compass Widget.
Okay so QwtCompass is a widget that displays and lets you enter directions. What's it made of? A scale, an optional needle, and a rose. That's the whole lineup, no cap. π§β¨
Note: theexamples/dialsexample shows how to useQwtCompass. Go peek at it if you wanna see it in the wild. π«
π Constructor & Destructor Documentation π
QwtCompass::QwtCompass (QWidget *parent = NULL) [explicit]
Constructor.
Parameters:
parentβ Parent widget
So here's what you're getting when you spin one up: 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 it has no step size. The default mode is QwtDial::RotateNeedle. That's the whole starter pack. π
π Member Function Documentation π
void QwtCompass::drawRose (QPainter *painter, const QPoint ¢er, int radius, double north, QPalette::ColorGroup cg) const [protected], [virtual]
Draw the compass rose. yes, the rose, the moment, the main character πΉ
Parameters:
painterβ Paintercenterβ Center of the compassradiusβ radius of the circle, where to paint the rosenorthβ Direction pointing north, in degrees counter clockwisecgβ Color group
void QwtCompass::drawScaleContents (QPainter *painter, const QPoint ¢er, int radius) const [protected], [virtual]
Draw the contents of the scale. π¨
Parameters:
painterβ Paintercenterβ Center of the content circleradiusβ Radius of the content circle
Reimplemented from QwtDial.
void QwtCompass::keyPressEvent (QKeyEvent *kev) [protected], [virtual]
Handles key events. β¨οΈβ¨
Besides the keys described in QwtDial::keyPressEvent, numbers from 1-9 (without 5, she said what she said π) set the direction according to their position on the num pad. fr fr, the numpad layout is the map.
See also: isReadOnly()
Reimplemented from QwtDial.
const QMap< double, QString > & QwtCompass::labelMap () const
Returns: map, mapping values to labels
See also: setLabelMap()
QMap< double, QString > & QwtCompass::labelMap ()
Returns: map, mapping values to labels
See also: setLabelMap()
two flavours, same energy β one's const, one's not. pick your fighter. π«Ά
const QwtCompassRose * QwtCompass::rose () const
Returns: rose
See also: setRose()
QwtCompassRose * QwtCompass::rose ()
Returns: rose
See also: setRose()
again: const version and non-const version, both serving rose. πΉ
QwtText QwtCompass::scaleLabel (double value) const [protected], [virtual]
Map a value to a corresponding label. π·οΈ
Parameters:
valueβ Value that will be mapped
Returns: Label, or QString::null
label() looks in a map for a corresponding label for value or return an null text. (yes, "an null text" β we're keeping the original's words, bestie, no editing the ancestors π)
See also: labelMap(), setLabelMap()
Reimplemented from QwtDial.
void QwtCompass::setLabelMap (const QMap< double, QString > &map)
Set a map, mapping values to labels. πΊοΈ
Parameters:
mapβ value to label map
The values of the major ticks are found by looking into this map. The default map consists of the labels N, NE, E, SE, S, SW, W, NW. πΈ cute lil compass directions, obsessed.
Warning: The map will have no effect for values that are no major tick values. Major ticks can be changed by QwtScaleDraw::setScale. so likeβ¦ don't come crying when it doesn't render, bestie, check your ticks first. π
See also: labelMap(), scaleDraw(), setScale()
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 heads up β it takes ownership, it's giving "this is mine now" energy. π
See also: rose()
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. so likeβ¦ Doxygen wrote this, not me. I just gave it a glow-up. π
okay that's the whole page bestie!! π«Άπ this was Version 5.2.3, dated Tue Nov 20 2012, and it came to you straight from the Qwt User's Guide. go build something cute with a compass in it. mwah. π β¨ππ¦
π¦ 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