QwtArrowButton(3)

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

🌸 NAME 🌸

QwtArrowButton β€” that's the whole name bestie, the manpage literally just drops it and dips πŸ’€ but it's from the Qwt User's Guide, section 3, and we're gonna get into it.


✨ SYNOPSIS ✨

First things first, you gotta pull it in:

#include <qwt_arrow_button.h>

πŸ’– Public Member Functions πŸ’–

QwtArrowButton (int num, Qt::ArrowType, QWidget *parent=NULL)
virtual ~QwtArrowButton ()
Qt::ArrowType arrowType () const
virtual QSize minimumSizeHint () const
int num () const
virtual QSize sizeHint () const

πŸŽ€ Protected Member Functions πŸŽ€

virtual QSize arrowSize (Qt::ArrowType, const QSize &boundingSize) const
virtual void drawArrow (QPainter *, const QRect &, Qt::ArrowType) const
virtual void drawButtonLabel (QPainter *p)
virtual void keyPressEvent (QKeyEvent *)
virtual QRect labelRect () const
virtual void paintEvent (QPaintEvent *event)

πŸ¦‹ Detailed Description πŸ¦‹

Okay so, Arrow Button. Periodt.

It's a push button, right? But instead of just vibes and a label, it's got one or more filled triangles chillin' on its front. πŸ‘‘

And the range? An Arrow button can have 1 to 3 arrows in a row, and they can point up, down, left or right. That's it, that's the whole aesthetic. No cap.


πŸ’… Constructor & Destructor Documentation πŸ’…

🌟 QwtArrowButton::QwtArrowButton (int num, Qt::ArrowType arrowType, QWidget *parent = NULL) [explicit] 🌟

The glow-up moment where your button is born, bestie. It's explicit, so no sneaky implicit conversions, we don't do that here. πŸ’…

Parameters:

  • num β€” Number of arrows
  • arrowType β€” see Qt::ArowType in the Qt docs.
  • parent β€” Parent widget
Not me leaving the Qt::ArowType spelling exactly as written, iykyk β€” that's how the page says it, so that's how it stays. πŸ™ˆ

🌈 Member Function Documentation 🌈

🫢 QSize QwtArrowButton::arrowSize (Qt::ArrowType arrowType, const QSize &boundingSize) const [protected], [virtual] 🫢

Calculate the size for a arrow that fits into a rect of a given size. Literally math-ing out how big the little triangle gets to be inside the space it's given. ✨

Parameters:

  • arrowType β€” Arrow type
  • boundingSize β€” Bounding size

Returns:

  • Size of the arrow

πŸ”₯ void QwtArrowButton::drawArrow (QPainter *painter, const QRect &r, Qt::ArrowType arrowType) const [protected], [virtual] πŸ”₯

Draw an arrow int a bounding rect. (Yes, "int" β€” iconic typo behavior, I am not touching it, that's the original's main character energy. πŸ’€)

Parameters:

  • painter β€” Painter
  • r β€” Rectangle where to paint the arrow
  • arrowType β€” Arrow type

🌸 void QwtArrowButton::drawButtonLabel (QPainter *painter) [protected], [virtual] 🌸

Draw the button label.

Parameters:

  • painter β€” Painter

See also:

  • The Qt Manual on QPushButton
Like, if you wanna know how the label actually goes down, the Qt Manual on QPushButton is your girl. Go look. πŸŽ€

πŸ¦‹ QRect QwtArrowButton::labelRect () const [protected], [virtual] πŸ¦‹

Returns:

  • the bounding rect for the label

πŸ’œ void QwtArrowButton::paintEvent (QPaintEvent *event) [protected], [virtual] πŸ’œ

Paint event handler. The moment the button gets told to show up and show out. ✨

Parameters:

  • event β€” Paint event

⭐ QSize QwtArrowButton::sizeHint () const [virtual] ⭐

Returns:

  • a size hint

Quick lil note bestie: keyPressEvent (QKeyEvent *) is listed up there in the Protected Member Functions, but the page doesn't give it its own little section. Just so you're not out here searching for docs that aren't there. 🫢

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. So nobody hand-wrote this, the robot did it, and honestly? It ate. πŸ’…


And that's the whole page, bestie! πŸŽ€ This was Version 5.2.3, dated Tue Nov 20 2012 β€” a whole vintage era, and we're still obsessed. Byeeee, go build your cute lil triangle button! πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from