mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
add start and end to HFActionEvent
This commit is contained in:
parent
d09c9233d8
commit
55735a3f0d
2 changed files with 15 additions and 11 deletions
|
@ -11,17 +11,20 @@
|
|||
|
||||
#include "HFActionEvent.h"
|
||||
|
||||
HFActionEvent::HFActionEvent(const QPointF& localPosition) :
|
||||
QEvent(HFActionEvent::type()),
|
||||
HFActionEvent::HFActionEvent(QEvent::Type type, const QPointF& localPosition) :
|
||||
QEvent(type),
|
||||
_localPosition(localPosition)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QEvent::Type HFActionEvent::type() {
|
||||
static QEvent::Type hfActionType = QEvent::None;
|
||||
if (hfActionType == QEvent::None) {
|
||||
hfActionType = static_cast<QEvent::Type>(QEvent::registerEventType());
|
||||
}
|
||||
return hfActionType;
|
||||
}
|
||||
QEvent::Type HFActionEvent::startType() {
|
||||
static QEvent::Type startType = static_cast<QEvent::Type>(QEvent::registerEventType());
|
||||
return startType;
|
||||
}
|
||||
|
||||
QEvent::Type HFActionEvent::endType() {
|
||||
static QEvent::Type endType = static_cast<QEvent::Type>(QEvent::registerEventType());
|
||||
return endType;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
class HFActionEvent : public QEvent {
|
||||
public:
|
||||
HFActionEvent(const QPointF& localPosition);
|
||||
HFActionEvent(QEvent::Type type, const QPointF& localPosition);
|
||||
|
||||
static QEvent::Type type();
|
||||
static QEvent::Type startType();
|
||||
static QEvent::Type endType();
|
||||
private:
|
||||
QPointF _localPosition;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue