mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:17:01 +02:00
add a class for custom HFActionEvent
This commit is contained in:
parent
d5a3ea77ff
commit
b7ebc9e902
2 changed files with 50 additions and 0 deletions
26
interface/src/HFActionEvent.cpp
Normal file
26
interface/src/HFActionEvent.cpp
Normal 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;
|
||||||
|
}
|
24
interface/src/HFActionEvent.h
Normal file
24
interface/src/HFActionEvent.h
Normal 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
|
Loading…
Reference in a new issue