add a class for custom HFActionEvent

This commit is contained in:
Stephen Birarda 2014-10-27 10:51:48 -07:00
parent d5a3ea77ff
commit b7ebc9e902
2 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,26 @@
//
// HFActionEvent.cpp
// interface/src
//
// Created by Stephen Birarda on 2014-10-27.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "HFActionEvent.h"
HFActionEvent::HFActionEvent() :
QEvent(HFActionEvent::type())
{
}
QEvent::Type HFActionEvent::type() {
static QEvent::Type hfActionType = QEvent::None;
if (hfActionType == QEvent::None) {
hfActionType = static_cast<QEvent::Type>(QEvent::registerEventType());
}
return hfActionType;
}

View file

@ -0,0 +1,24 @@
//
// HFActionEvent.h
// interface/src
//
// Created by Stephen Birarda on 2014-10-27.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_HFActionEvent_h
#define hifi_HFActionEvent_h
#include <qevent.h>
class HFActionEvent : public QEvent {
public:
HFActionEvent();
static QEvent::Type type();
};
#endif // hifi_HFActionEvent_h