QGraphicsSceneMoveEvent 類

The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework. 更多...

頭: #include <QGraphicsSceneMoveEvent>
qmake: QT += widgets
Since: Qt 4.4
繼承: QGraphicsSceneEvent

公共函數

QGraphicsSceneMoveEvent ()
virtual ~QGraphicsSceneMoveEvent ()
QPointF newPos () const
QPointF oldPos () const

額外繼承成員

詳細描述

The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.

A QGraphicsWidget sends itself a QGraphicsSceneMoveEvent immediately when its local position changes. The delivery is implemented as part of QGraphicsItem::itemChange ().

它類似於 QMoveEvent ,但其位置 oldPos () 和 newPos (),使用 QPointF 而不是 QPoint .

另請參閱 QGraphicsItem::setPos (), QGraphicsItem::ItemPositionChange ,和 QGraphicsItem::ItemPositionHasChanged .

成員函數文檔編製

QGraphicsSceneMoveEvent:: QGraphicsSceneMoveEvent ()

構造 QGraphicsSceneMoveEvent .

[虛擬] QGraphicsSceneMoveEvent:: ~QGraphicsSceneMoveEvent ()

銷毀 QGraphicsSceneMoveEvent .

QPointF QGraphicsSceneMoveEvent:: newPos () const

返迴新位置 (即:當前位置)。

另請參閱 oldPos () 和 QGraphicsItem::setPos ().

QPointF QGraphicsSceneMoveEvent:: oldPos () const

返迴舊位置 (即:Widget 被移動之前的即時位置)。

另請參閱 newPos () 和 QGraphicsItem::setPos ().