16 d_selectionType( type ),
60 QList<QwtPickerMachine::Command> cmdList;
65 case QEvent::MouseMove:
102 QList<QwtPickerMachine::Command> cmdList;
104 switch ( event->type() )
106 case QEvent::MouseButtonPress:
109 static_cast<const QMouseEvent *>( event ) ) )
117 case QEvent::KeyPress:
119 const QKeyEvent *keyEvent =
static_cast<const QKeyEvent *
> ( event );
122 if ( !keyEvent->isAutoRepeat() )
148 QList<QwtPickerMachine::Command> cmdList;
150 switch ( event->type() )
152 case QEvent::MouseButtonPress:
155 static_cast<const QMouseEvent *>( event ) ) )
166 case QEvent::MouseMove:
173 case QEvent::MouseButtonRelease:
182 case QEvent::KeyPress:
184 const QKeyEvent *keyEvent =
static_cast<const QKeyEvent *
> ( event );
187 if ( !keyEvent->isAutoRepeat() )
221 QList<QwtPickerMachine::Command> cmdList;
223 switch ( event->type() )
225 case QEvent::MouseButtonPress:
228 static_cast<const QMouseEvent *>( event ) ) )
253 case QEvent::MouseMove:
260 case QEvent::MouseButtonRelease:
263 static_cast<const QMouseEvent *>( event ) ) )
273 case QEvent::KeyPress:
275 const QKeyEvent *keyEvent =
static_cast<const QKeyEvent *
> ( event );
278 if ( !keyEvent->isAutoRepeat() )
293 else if (
state() == 2 )
320 QList<QwtPickerMachine::Command> cmdList;
322 switch ( event->type() )
324 case QEvent::MouseButtonPress:
327 static_cast<const QMouseEvent *>( event ) ) )
339 case QEvent::MouseMove:
346 case QEvent::MouseButtonRelease:
355 case QEvent::KeyPress:
358 static_cast<const QKeyEvent *> ( event ) ) )
392 QList<QwtPickerMachine::Command> cmdList;
394 switch ( event->type() )
396 case QEvent::MouseButtonPress:
399 static_cast<const QMouseEvent *>( event ) ) )
414 static_cast<const QMouseEvent *>( event ) ) )
424 case QEvent::MouseMove:
431 case QEvent::KeyPress:
433 const QKeyEvent *keyEvent =
static_cast<const QKeyEvent *
> ( event );
436 if ( !keyEvent->isAutoRepeat() )
453 if ( !keyEvent->isAutoRepeat() )
481 QList<QwtPickerMachine::Command> cmdList;
483 switch( event->type() )
485 case QEvent::MouseButtonPress:
488 static_cast<const QMouseEvent *>( event ) ) )
500 case QEvent::KeyPress:
503 static_cast<const QKeyEvent *> ( event ) ) )
520 case QEvent::MouseMove:
528 case QEvent::MouseButtonRelease:
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
QwtPickerDragLineMachine()
Constructor.
QwtPickerClickRectMachine()
Constructor.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
The state machine not usable for any type of selection.
QwtPickerMachine(SelectionType)
Constructor.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
void reset()
Set the current state to 0.
void setState(int)
Change the current state.
The state machine is for selecting a polygon (many points).
The state machine is for selecting a single point.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
A state machine for QwtPicker selections.
virtual ~QwtPickerMachine()
Destructor.
bool mouseMatch(MousePatternCode, const QMouseEvent *) const
Compare a mouse event with an event pattern.
QwtPickerDragPointMachine()
Constructor.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
A collection of event patterns.
bool keyMatch(KeyPatternCode, const QKeyEvent *) const
Compare a key event with an event pattern.
SelectionType selectionType() const
Return the selection type.
const SelectionType d_selectionType
QwtPickerClickPointMachine()
Constructor.
QwtPickerTrackerMachine()
Constructor.
int state() const
Return the current state.
virtual QList< Command > transition(const QwtEventPattern &, const QEvent *)
Transition.
QwtPickerDragRectMachine()
Constructor.
QwtPickerPolygonMachine()
Constructor.
The state machine is for selecting a rectangle (2 points).