mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
40 lines
1 KiB
C++
40 lines
1 KiB
C++
//
|
|
// HFActionEvent.cpp
|
|
// script-engine/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::Type type, const PickRay& actionRay) :
|
|
HFMetaEvent(type),
|
|
actionRay(actionRay)
|
|
{
|
|
|
|
}
|
|
|
|
QEvent::Type HFActionEvent::startType() {
|
|
static QEvent::Type startType = HFMetaEvent::newEventType();
|
|
return startType;
|
|
}
|
|
|
|
QEvent::Type HFActionEvent::endType() {
|
|
static QEvent::Type endType = HFMetaEvent::newEventType();
|
|
return endType;
|
|
}
|
|
|
|
QScriptValue HFActionEvent::toScriptValue(QScriptEngine* engine, const HFActionEvent& event) {
|
|
QScriptValue obj = engine->newObject();
|
|
obj.setProperty("actionRay", pickRayToScriptValue(engine, event.actionRay));
|
|
return obj;
|
|
}
|
|
|
|
void HFActionEvent::fromScriptValue(const QScriptValue& object, HFActionEvent& event) {
|
|
// not yet implemented
|
|
}
|
|
|