A state machine for QwtPicker selections. More...
#include <qwt_picker_machine.h>

Public Types | |
| enum | Command { Begin, Append, Move, End } |
Commands - the output of the state machine. More... | |
| typedef QValueList< Command > | CommandList |
Public Member Functions | |
| virtual | ~QwtPickerMachine () |
| Destructor. | |
| virtual CommandList | transition (const QwtEventPattern &, const QEvent *)=0 |
| Transition. | |
| void | reset () |
| Set the current state to 0. | |
| int | state () const |
| Return the current state. | |
| void | setState (int) |
| Change the current state. | |
Protected Member Functions | |
| QwtPickerMachine () | |
| Constructor. | |
A state machine for QwtPicker selections.
QwtPickerMachine accepts key and mouse events and translates them into selection commands.
Definition at line 32 of file qwt_picker_machine.h.
| typedef QValueList<Command> QwtPickerMachine::CommandList |
Definition at line 45 of file qwt_picker_machine.h.
| QwtPickerMachine::~QwtPickerMachine | ( | ) | [virtual] |
| QwtPickerMachine::QwtPickerMachine | ( | ) | [protected] |
| void QwtPickerMachine::reset | ( | ) |
Set the current state to 0.
Definition at line 38 of file qwt_picker_machine.cpp.
References setState().
Referenced by QwtPicker::reset().
{
setState(0);
}
| void QwtPickerMachine::setState | ( | int | state ) |
Change the current state.
Definition at line 32 of file qwt_picker_machine.cpp.
References state().
Referenced by reset(), QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), and QwtPickerDragPointMachine::transition().
{
d_state = state;
}
| int QwtPickerMachine::state | ( | ) | const |
Return the current state.
Definition at line 26 of file qwt_picker_machine.cpp.
Referenced by setState(), QwtPickerPolygonMachine::transition(), QwtPickerDragRectMachine::transition(), QwtPickerClickRectMachine::transition(), and QwtPickerDragPointMachine::transition().
{
return d_state;
}
| virtual CommandList QwtPickerMachine::transition | ( | const QwtEventPattern & | , |
| const QEvent * | |||
| ) | [pure virtual] |
Transition.
Implemented in QwtPickerClickPointMachine, QwtPickerDragPointMachine, QwtPickerClickRectMachine, QwtPickerDragRectMachine, and QwtPickerPolygonMachine.
Referenced by QwtPicker::transition().
1.7.2