QwtPickerMachine(3)

πŸ’… QwtPickerMachine(3) β€” from the Library Functions Manual (Qwt User's Guide, bestie)

okay so picture this: you're deep in the Qwt docs, the vibe is immaculate, and you've just met QwtPickerMachine β€” a state machine for QwtPicker selections. she's giving main character energy fr fr πŸŽ€


✨ NAME ✨

QwtPickerMachine β€” a state machine for QwtPicker selections. no cap, that's literally her whole job πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qwt_picker_machine.h>

she's the blueprint, the moment, the base class β€” and these icons all inherited from her πŸ‘‘:

  • QwtPickerClickPointMachine
  • QwtPickerClickRectMachine
  • QwtPickerDragLineMachine
  • QwtPickerDragPointMachine
  • QwtPickerDragRectMachine
  • QwtPickerPolygonMachine
  • QwtPickerTrackerMachine

🌸 Public Types 🌸

enum SelectionType { NoSelection = -1, PointSelection, RectSelection,
    PolygonSelection }
enum Command { Begin, Append, Move, Remove, End }

the Command enum? that's Commands - the output of a state machine. she speaks in commands and we listen πŸ’…

πŸ’œ Public Member Functions πŸ’œ

  • QwtPickerMachine(SelectionType) β€” Constructor. birth of an icon ✨
  • virtual ~QwtPickerMachine() β€” Destructor. she's leaving but the legacy stays 🫢
  • virtual QList<Command> transition(const QwtEventPattern &, const QEvent *) = 0 β€” Transition. pure virtual, so she cannot do it alone β€” your subclasses gotta step up 😭
  • void reset() β€” Set the current state to 0. factory reset but make it cute 🧚
  • int state() const β€” Return the current state. where is she at emotionally? this tells you πŸ’€
  • void setState(int) β€” Change the current state. we're pivoting, we're rebranding πŸ”₯
  • SelectionType selectionType() const β€” Return the selection type. what kind of selection is this giving? 🌈

🌟 Detailed Description 🌟

A state machine for QwtPicker selections.

QwtPickerMachine accepts key and mouse events and translates them into selection commands. literally a translator for vibes β€” input goes in, commands come out, periodt πŸ’«

See also: QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode

Definition at line 28 of file qwt_picker_machine.h.

πŸŽ€ Member Enumeration Documentation πŸŽ€

enum QwtPickerMachine::Command

Commands - the output of a state machine.

Definition at line 51 of file qwt_picker_machine.h.

enum QwtPickerMachine::SelectionType

Type of a selection.

See also: selectionType()

Enumerator β€” each one has her own little personality πŸ“

  • NoSelection β€” The state machine not usable for any type of selection. she said "not me, not today" πŸ™ˆ
  • PointSelection β€” The state machine is for selecting a single point. one point, one moment, one icon ⭐
  • RectSelection β€” The state machine is for selecting a rectangle (2 points). two points, a whole rectangle, slay πŸ¦‹
  • PolygonSelection β€” The state machine is for selecting a polygon (many points). many points, so many, obsessed πŸ’–
Definition at line 35 of file qwt_picker_machine.h.

πŸ’« Constructor & Destructor Documentation πŸ’«

QwtPickerMachine::QwtPickerMachine(SelectionType type) [explicit]

Constructor. she's here, she's explicit, she's not being implicit about it πŸ’…

Definition at line 16 of file qwt_picker_machine.cpp.

QwtPickerMachine::~QwtPickerMachine() [virtual]

Destructor. the goodbye era 😭

Definition at line 23 of file qwt_picker_machine.cpp.

πŸ”₯ Member Function Documentation πŸ”₯

void QwtPickerMachine::reset()

Set the current state to 0.

Definition at line 46 of file qwt_picker_machine.cpp.

QwtPickerMachine::SelectionType QwtPickerMachine::selectionType() const

Return the selection type.

Definition at line 28 of file qwt_picker_machine.cpp.

void QwtPickerMachine::setState(int state)

Change the current state.

Definition at line 40 of file qwt_picker_machine.cpp.

int QwtPickerMachine::state() const

Return the current state.

Definition at line 34 of file qwt_picker_machine.cpp.

virtual QList<Command> QwtPickerMachine::transition(const QwtEventPattern &, const QEvent *) [pure virtual]

Transition.

Implemented in: QwtPickerClickPointMachine, QwtPickerClickRectMachine, QwtPickerDragLineMachine, QwtPickerDragPointMachine, QwtPickerDragRectMachine, QwtPickerPolygonMachine, and QwtPickerTrackerMachine.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Qwt User's Guide from the source code. yes bestie, the robots wrote the docs, but the vibe? the vibe is all hers ✨


and that's the whole page, no notes ✨ this little masterpiece comes to you from the Qwt User's Guide (source + version included, iykyk) and it's dated QwtPickerMachine(3) β€” go forth and select something iconic πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from