QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 所有成员列表
QwtPickerMachine类 参考abstract

A state machine for QwtPicker selections 更多...

#include <qwt_picker_machine.h>

类 QwtPickerMachine 继承关系图:
QwtPickerClickPointMachine QwtPickerClickRectMachine QwtPickerDragLineMachine QwtPickerDragPointMachine QwtPickerDragRectMachine QwtPickerPolygonMachine QwtPickerTrackerMachine

Public 类型

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

Public 成员函数

 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
 

详细描述

A state machine for QwtPicker selections

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

参见
QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode

成员枚举类型说明

◆ SelectionType

Type of a selection.

参见
selectionType()
枚举值
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).

构造及析构函数说明

◆ QwtPickerMachine()

QwtPickerMachine::QwtPickerMachine ( SelectionType  type)
explicit

Constructor

参数
[in]typeSelection type for this state machine

成员函数说明

◆ selectionType()

QwtPickerMachine::SelectionType QwtPickerMachine::selectionType ( ) const

Return the selection type

返回
Selection type of this state machine

◆ setState()

void QwtPickerMachine::setState ( int  state)

Change the current state

参数
[in]stateNew state value

◆ state()

int QwtPickerMachine::state ( ) const

Return the current state

返回
Current state value

◆ transition()

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

该类的文档由以下文件生成: