QwtSymbol(3)
π QwtSymbol π
okay bestie, welcome to the QwtSymbol page from the Qwt User's Guide β and yes, this one is iconic. it's a whole class, it draws symbols, it's giving shape-shifting main character energy, and we're gonna go through every last flag together. no skimming, no skipping, periodt. π
β¨ NAME β¨
QwtSymbol β the class for drawing symbols. that's it, that's the name, short and slay. π
π¦ SYNOPSIS π¦
#include <qwt_symbol.h>
π Public Types
enum Style { NoSymbol = -1, Ellipse, Rect, Diamond, Triangle,
DTriangle, UTriangle, LTriangle, RTriangle, Cross, XCross, HLine,
VLine, Star1, Star2, Hexagon, StyleCnt }
πΈ Public Member Functions
QwtSymbol ()
QwtSymbol (Style st, const QBrush &bd, const QPen &pn, const QSize &s)
virtual ~QwtSymbol ()
const QBrush & brush () const
virtual QwtSymbol * clone () const
void draw (QPainter *p, const QPoint &pt) const
void draw (QPainter *p, int x, int y) const
virtual void draw (QPainter *p, const QRect &r) const
bool operator!= (const QwtSymbol &) const
virtual bool operator== (const QwtSymbol &) const
const QPen & pen () const
void setBrush (const QBrush &b)
void setPen (const QPen &p)
void setSize (const QSize &s)
void setSize (int a, int b=-1)
void setStyle (Style s)
const QSize & size () const
Style style () const
like, look at that list. every single one of those is here and every single one is getting its moment. π
π Detailed Description π
A class for drawing symbols.
that's the whole vibe check. it draws symbols. that's the assignment and it ate. β¨
π§ Member Enumeration Documentation π§
π« enum QwtSymbol::Style
Style
See also:
setStyle(),style()
π Constructor & Destructor Documentation π
QwtSymbol::QwtSymbol ()
Default Constructor
so when you make one with no args, the symbol shows up with a gray interior, a black outline with zero width, no size, and style 'NoSymbol'. it's literally a blank canvas, a soft launch, an empty group chat. π
QwtSymbol::QwtSymbol (QwtSymbol::Style style, const QBrush &brush, const QPen &pen, const QSize &size)
Constructor. Parameters:
styleβ Symbol Stylebrushβ brush to fill the interiorpenβ outline pensizeβ size
like, you're just handing it the whole fit upfront. obsessed. π«Ά
π Member Function Documentation π
QwtSymbol * QwtSymbol::clone () const [virtual]
Allocate and return a symbol with the same attributes.
Returns:
- Cloned symbol
it's giving identical twin energy. same attributes, brand new object. π
void QwtSymbol::draw (QPainter *painter, const QPoint &pos) const
Draw the symbol at a specified point. Parameters:
painterβ Painterposβ Center of the symbol
void QwtSymbol::draw (QPainter *painter, const QRect &r) const [virtual]
Draw the symbol into a bounding rectangle. This function assumes that the painter has been initialized with brush and pen before. This allows a much more performant implementation when painting many symbols with the same brush and pen, like in curves.
Parameters:
painterβ Painterrβ Bounding rectangle
β οΈ read that caveat again bestie β this overload is assuming your painter already has the brush and pen set up. it does not do it for you. it's the "trust me bro, I already prepped" of draw calls. π«
void QwtSymbol::setBrush (const QBrush &brush)
Assign a brush. The brush is used to draw the interior of the symbol.
Parameters:
brushβ Brush
void QwtSymbol::setPen (const QPen &pen)
Assign a pen.
The pen is used to draw the symbol's outline.
The width of non cosmetic pens is scaled according to the resolution of the paint device.
Parameters:
penβ Pen
See also:
pen(),setBrush(),QwtPainter::scaledPen()
void QwtSymbol::setSize (const QSize &size)
Set the symbol's size.
Parameters:
sizeβ Size
void QwtSymbol::setSize (int width, int height = -1)
Specify the symbol's size. If the 'h' parameter is left out or less than 0, and the 'w' parameter is greater than or equal to 0, the symbol size will be set to (w,w).
Parameters:
widthβ Widthheightβ Height (defaults to-1)
so basically leave the height off and it squares up for you. cute, efficient, no notes. β¨
void QwtSymbol::setStyle (QwtSymbol::Style s)
Specify the symbol style. The following styles are defined:
NoSymbolβ No Style. The symbol cannot be drawn.Ellipseβ Ellipse or circleRectβ RectangleDiamondβ DiamondTriangleβ Triangle pointing upwardsDTriangleβ Triangle pointing downwardsUTriangleβ Triangle pointing upwardsLTriangleβ Triangle pointing leftRTriangleβ Triangle pointing rightCrossβ Cross (+)XCrossβ Diagonal cross (X)HLineβ Horizontal lineVLineβ Vertical lineStar1β X combined with +Star2β Six-pointed starHexagonβ Hexagon
π not bothTriangleandUTrianglesaying "Triangle pointing upwards" in the docs. that's exactly what's written up there, bestie β I'm not touching it, I'm just reporting it. iykyk.
Parameters:
sβ style
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
and that's the whole page, bestie!! π this was Version 5.2.3, dated Tue Nov 20 2012 β so yeah, a lil vintage, but still serving. thanks for reading all the way to the bottom, you're literally the main character. πβ¨π¦πΈπ π«Άπ
π¦ 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