mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Logging category and filter
This commit is contained in:
parent
19d5b8750a
commit
147474e19a
5 changed files with 38 additions and 9 deletions
|
@ -469,7 +469,7 @@ void EntityTreeRenderer::connectSignalsToSlots(EntityScriptingInterface* entityS
|
|||
connect(this, &EntityTreeRenderer::hoverOverEntity, entityScriptingInterface, &EntityScriptingInterface::hoverOverEntity);
|
||||
|
||||
connect(this, &EntityTreeRenderer::hoverLeaveEntity, entityScriptingInterface, &EntityScriptingInterface::hoverLeaveEntity);
|
||||
connect(this, &EntityTreeRenderer::hoverEnterEntity, hoverOverlayInterface, &HoverOverlayInterface::destroyHoverOverlay);
|
||||
connect(this, &EntityTreeRenderer::hoverLeaveEntity, hoverOverlayInterface, &HoverOverlayInterface::destroyHoverOverlay);
|
||||
|
||||
connect(this, &EntityTreeRenderer::enterEntity, entityScriptingInterface, &EntityScriptingInterface::enterEntity);
|
||||
connect(this, &EntityTreeRenderer::leaveEntity, entityScriptingInterface, &EntityScriptingInterface::leaveEntity);
|
||||
|
|
|
@ -12,19 +12,15 @@
|
|||
#include "HoverOverlayInterface.h"
|
||||
|
||||
HoverOverlayInterface::HoverOverlayInterface() {
|
||||
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("hifi.hover_overlay.debug=false"));
|
||||
}
|
||||
|
||||
void HoverOverlayInterface::createHoverOverlay(const EntityItemID& entityItemID, const PointerEvent& event) {
|
||||
if (_verboseLogging) {
|
||||
qDebug() << "Creating Hover Overlay on top of entity with ID: " << entityItemID;
|
||||
}
|
||||
qCDebug(hover_overlay) << "Creating Hover Overlay on top of entity with ID: " << entityItemID;
|
||||
setCurrentHoveredEntity(entityItemID);
|
||||
}
|
||||
|
||||
void HoverOverlayInterface::destroyHoverOverlay(const EntityItemID& entityItemID, const PointerEvent& event) {
|
||||
if (_verboseLogging) {
|
||||
qDebug() << "Destroying Hover Overlay on top of entity with ID: " << entityItemID;
|
||||
}
|
||||
qCDebug(hover_overlay) << "Destroying Hover Overlay on top of entity with ID: " << entityItemID;
|
||||
setCurrentHoveredEntity(QUuid());
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <PointerEvent.h>
|
||||
|
||||
#include "EntityTree.h"
|
||||
|
||||
#include "HoverOverlayLogging.h"
|
||||
|
||||
class HoverOverlayInterface : public QObject, public Dependency {
|
||||
Q_OBJECT
|
||||
|
|
14
libraries/entities/src/HoverOverlayLogging.cpp
Normal file
14
libraries/entities/src/HoverOverlayLogging.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// HoverOverlayLogging.cpp
|
||||
// libraries/entities/src
|
||||
//
|
||||
// Created by Zach Fox on 2017-07-17
|
||||
// Copyright 2017 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 "HoverOverlayLogging.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(hover_overlay, "hifi.hover_overlay")
|
19
libraries/entities/src/HoverOverlayLogging.h
Normal file
19
libraries/entities/src/HoverOverlayLogging.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// HoverOverlayLogging.h
|
||||
// libraries/entities/src
|
||||
//
|
||||
// Created by Zach Fox on 2017-07-17
|
||||
// Copyright 2017 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_HoverOverlayLogging_h
|
||||
#define hifi_HoverOverlayLogging_h
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(hover_overlay)
|
||||
|
||||
#endif // hifi_HoverOverlayLogging_h
|
Loading…
Reference in a new issue