QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
QwtPickerMachine Class Referenceabstract

A state machine for QwtPicker selections. More...

#include <qwt_picker_machine.h>

Inheritance diagram for QwtPickerMachine:
QwtPickerClickPointMachine QwtPickerClickRectMachine QwtPickerDragLineMachine QwtPickerDragPointMachine QwtPickerDragRectMachine QwtPickerPolygonMachine QwtPickerTrackerMachine

Public Types

enum  SelectionType { NoSelection = -1 , PointSelection , RectSelection , PolygonSelection }
 Type of a selection. More...
 
enum  Command {
  Begin , Append , Move , Remove ,
  End
}
 Commands - the output of a state machine.
 

Public Member Functions

 QwtPickerMachine (SelectionType)
 Constructor.
 
virtual ~QwtPickerMachine ()
 Destructor.
 
virtual QList< Commandtransition (const QwtEventPattern &, const QEvent *)=0
 
void reset ()
 Set the current state to 0 (initial state)
 
int state () const
 Return the current state.
 
void setState (int)
 Change the current state.
 
SelectionType selectionType () const
 Return the selection type.
 

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

Member Enumeration Documentation

◆ SelectionType

Type of a selection.

See also
selectionType()
Enumerator
NoSelection 

The state machine not usable for any type of selection.

PointSelection 

The state machine is for selecting a single point.

RectSelection 

The state machine is for selecting a rectangle (2 points).

PolygonSelection 

The state machine is for selecting a polygon (many points).

Constructor & Destructor Documentation

◆ QwtPickerMachine()

QwtPickerMachine::QwtPickerMachine ( SelectionType  type)
explicit

Constructor.

Parameters
[in]typeSelection type for this state machine

Member Function Documentation

◆ selectionType()

QwtPickerMachine::SelectionType QwtPickerMachine::selectionType ( ) const

Return the selection type.

Returns
Selection type of this state machine

◆ setState()

void QwtPickerMachine::setState ( int  state)

Change the current state.

Parameters
[in]stateNew state value

◆ state()

int QwtPickerMachine::state ( ) const

Return the current state.

Returns
Current state value

◆ transition()

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

The documentation for this class was generated from the following files: