QwtSymbol(3)

πŸ“¦ version 5.2.3a, in epel 9, fedora 43, fedora 44

πŸ’– 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 Style
  • brush β€” brush to fill the interior
  • pen β€” outline pen
  • size β€” 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 β€” Painter
  • pos β€” 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 β€” Painter
  • r β€” 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 β€” Width
  • height β€” 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 circle
  • Rect β€” Rectangle
  • Diamond β€” Diamond
  • Triangle β€” Triangle pointing upwards
  • DTriangle β€” Triangle pointing downwards
  • UTriangle β€” Triangle pointing upwards
  • LTriangle β€” Triangle pointing left
  • RTriangle β€” Triangle pointing right
  • Cross β€” Cross (+)
  • XCross β€” Diagonal cross (X)
  • HLine β€” Horizontal line
  • VLine β€” Vertical line
  • Star1 β€” X combined with +
  • Star2 β€” Six-pointed star
  • Hexagon β€” Hexagon
πŸ’€ not both Triangle and UTriangle saying "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