# QwtPickerMachine Class Reference

Inheritance diagram for QwtPickerMachine:

[legend]
List of all members.

## Detailed Description

A state machine for QwtPicker selections.

QwtPickerMachine accepts key and mouse events and translates them into selection commands.

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

Definition at line 32 of file qwt_picker_machine.h.

## Public Types

typedef QList< Command > | CommandList
enum | Command { Begin, Append, Move, End }

## Public Member Functions

virtual | ~QwtPickerMachine ()
virtual CommandList | transition (const QwtEventPattern &, const QEvent *)=0
void | reset ()
int | state () const
void | setState (int)

## Protected Member Functions

| QwtPickerMachine ()

## Member Enumeration Documentation

enum QwtPickerMachine::Command

| Commands - the output of the state machine. Definition at line 36 of file qwt_picker_machine.h.

## Constructor & Destructor Documentation

QwtPickerMachine::~QwtPickerMachine | ( |  | ) | `[virtual]`

| Destructor. Definition at line 21 of file qwt_picker_machine.cpp.

QwtPickerMachine::QwtPickerMachine | ( |  | ) | `[protected]`

| Constructor. Definition at line 15 of file qwt_picker_machine.cpp.

## Member Function Documentation

void QwtPickerMachine::reset | ( |  | ) |

| Set the current state to 0. Definition at line 38 of file qwt_picker_machine.cpp. References setState().

void QwtPickerMachine::setState | ( | int |  | ) |

| Change the current state. Definition at line 32 of file qwt_picker_machine.cpp. Referenced by reset(), QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), and QwtPickerDragPointMachine::transition().

int QwtPickerMachine::state | ( |  | ) | const

| Return the current state. Definition at line 26 of file qwt_picker_machine.cpp. Referenced by QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), and QwtPickerDragPointMachine::transition().

virtual CommandList QwtPickerMachine::transition | ( | const QwtEventPattern & | ,
|  | const QEvent * |
| ) | `[pure virtual]`

| Transition. Implemented in QwtPickerClickPointMachine, QwtPickerDragPointMachine, QwtPickerClickRectMachine, QwtPickerDragRectMachine, and QwtPickerPolygonMachine.