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

事件模式的集合 更多...

#include <qwt_event_pattern.h>

类 QwtEventPattern 继承关系图:
QwtPicker QwtCanvasPicker QwtPlotPanner QwtPlotPicker QwtPolarPicker QwtPlotCanvasZoomer QwtPlotSeriesDataPicker QwtPlotAxisZoomer

class  KeyPattern
 A pattern for key events 更多...
 
class  MousePattern
 A pattern for mouse events 更多...
 

Public 类型

enum  MousePatternCode {
  MouseSelect1 , MouseSelect2 , MouseSelect3 , MouseSelect4 ,
  MouseSelect5 , MouseSelect6 , MousePatternCount
}
 Symbolic mouse input codes 更多...
 
enum  KeyPatternCode {
  KeySelect1 , KeySelect2 , KeyAbort , KeyLeft ,
  KeyRight , KeyUp , KeyDown , KeyRedo ,
  KeyUndo , KeyHome , KeyPatternCount
}
 Symbolic keyboard input codes 更多...
 

Public 成员函数

 QwtEventPattern ()
 构造函数
 
virtual ~QwtEventPattern ()
 析构函数
 
void initMousePattern (int numButtons)
 根据鼠标按钮数量设置默认鼠标模式
 
void initKeyPattern ()
 设置默认按键模式
 
void setMousePattern (MousePatternCode, Qt::MouseButton button, Qt::KeyboardModifiers=Qt::NoModifier)
 更改一个鼠标模式
 
void setKeyPattern (KeyPatternCode, int key, Qt::KeyboardModifiers modifiers=Qt::NoModifier)
 更改一个按键模式
 
void setMousePattern (const QVector< MousePattern > &)
 更改鼠标事件模式
 
void setKeyPattern (const QVector< KeyPattern > &)
 更改按键事件模式
 
const QVector< MousePattern > & mousePattern () const
 返回鼠标模式向量
 
const QVector< KeyPattern > & keyPattern () const
 返回按键模式向量
 
QVector< MousePattern > & mousePattern ()
 返回鼠标模式向量
 
QVector< KeyPattern > & keyPattern ()
 返回按键模式向量
 
bool mouseMatch (MousePatternCode, const QMouseEvent *) const
 将鼠标事件与事件模式进行比较
 
bool keyMatch (KeyPatternCode, const QKeyEvent *) const
 将按键事件与事件模式进行比较
 

Protected 成员函数

virtual bool mouseMatch (const MousePattern &, const QMouseEvent *) const
 Compare a mouse event with an event pattern.
 
virtual bool keyMatch (const KeyPattern &, const QKeyEvent *) const
 Compare a key event with an event pattern.
 

详细描述

事件模式的集合

成员枚举类型说明

◆ KeyPatternCode

Symbolic keyboard input codes

Individual settings can be configured using setKeyPattern()

参见
setKeyPattern(), setMousePattern()
枚举值
KeySelect1 

Qt::Key_Return

KeySelect2 

Qt::Key_Space

KeyAbort 

Qt::Key_Escape

KeyLeft 

Qt::Key_Left

KeyRight 

Qt::Key_Right

KeyUp 

Qt::Key_Up

KeyDown 

Qt::Key_Down

KeyRedo 

Qt::Key_Plus

KeyUndo 

Qt::Key_Minus

KeyHome 

Qt::Key_Escape

KeyPatternCount 

Number of key patterns

◆ MousePatternCode

Symbolic mouse input codes

QwtEventPattern implements 3 different settings for mice with 1, 2, or 3 buttons that can be activated using initMousePattern(). The default setting is for 3 button mice.

Individual settings can be configured using setMousePattern().

参见
initMousePattern(), setMousePattern(), setKeyPattern()
枚举值
MouseSelect1 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton
  • Qt::LeftButton
  • Qt::LeftButton
MouseSelect2 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton + Qt::ControlModifier
  • Qt::RightButton
  • Qt::RightButton
MouseSelect3 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton + Qt::AltModifier
  • Qt::LeftButton + Qt::AltModifier
  • Qt::MidButton
MouseSelect4 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton + Qt::ShiftModifier
  • Qt::LeftButton + Qt::ShiftModifier
  • Qt::LeftButton + Qt::ShiftModifier
MouseSelect5 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifier
  • Qt::RightButton + Qt::ShiftModifier
  • Qt::RightButton + Qt::ShiftModifier
MouseSelect6 

The default setting for 1, 2 and 3 button mice is:

  • Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifier
  • Qt::LeftButton + Qt::AltModifier | Qt::ShiftModifier
  • Qt::MidButton + Qt::ShiftModifier
MousePatternCount 

Number of mouse patterns

构造及析构函数说明

◆ QwtEventPattern()

QwtEventPattern::QwtEventPattern ( )

构造函数

◆ ~QwtEventPattern()

QwtEventPattern::~QwtEventPattern ( )
virtual

析构函数

成员函数说明

◆ initKeyPattern()

void QwtEventPattern::initKeyPattern ( )

设置默认按键模式

◆ initMousePattern()

void QwtEventPattern::initMousePattern ( int  numButtons)

根据鼠标按钮数量设置默认鼠标模式

◆ keyMatch() [1/2]

bool QwtEventPattern::keyMatch ( const KeyPattern pattern,
const QKeyEvent *  event 
) const
protectedvirtual

Compare a key event with an event pattern.

A key event matches the pattern when both have the same key value and in the state value the same key flags (Qt::KeyButtonMask) are set.

参数
patternKey event pattern
eventKey event
返回
true if matches
参见
mouseMatch()

◆ keyMatch() [2/2]

bool QwtEventPattern::keyMatch ( KeyPatternCode  code,
const QKeyEvent *  event 
) const

将按键事件与事件模式进行比较

◆ keyPattern() [1/2]

QVector< QwtEventPattern::KeyPattern > & QwtEventPattern::keyPattern ( )

返回按键模式向量

◆ keyPattern() [2/2]

const QVector< QwtEventPattern::KeyPattern > & QwtEventPattern::keyPattern ( ) const

返回按键模式向量

◆ mouseMatch() [1/2]

bool QwtEventPattern::mouseMatch ( const MousePattern pattern,
const QMouseEvent *  event 
) const
protectedvirtual

Compare a mouse event with an event pattern.

A mouse event matches the pattern when both have the same button value and in the state value the same key flags(Qt::KeyButtonMask) are set.

参数
patternMouse event pattern
eventMouse event
返回
true if matches
参见
keyMatch()

◆ mouseMatch() [2/2]

bool QwtEventPattern::mouseMatch ( MousePatternCode  code,
const QMouseEvent *  event 
) const

将鼠标事件与事件模式进行比较

◆ mousePattern() [1/2]

QVector< QwtEventPattern::MousePattern > & QwtEventPattern::mousePattern ( )

返回鼠标模式向量

◆ mousePattern() [2/2]

const QVector< QwtEventPattern::MousePattern > & QwtEventPattern::mousePattern ( ) const

返回鼠标模式向量

◆ setKeyPattern() [1/2]

void QwtEventPattern::setKeyPattern ( const QVector< KeyPattern > &  pattern)

更改按键事件模式

◆ setKeyPattern() [2/2]

void QwtEventPattern::setKeyPattern ( KeyPatternCode  pattern,
int  key,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)

更改一个按键模式

◆ setMousePattern() [1/2]

void QwtEventPattern::setMousePattern ( const QVector< MousePattern > &  pattern)

更改鼠标事件模式

◆ setMousePattern() [2/2]

void QwtEventPattern::setMousePattern ( MousePatternCode  pattern,
Qt::MouseButton  button,
Qt::KeyboardModifiers  modifiers = Qt::NoModifier 
)

更改一个鼠标模式


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