Commit 8ab3272a authored by Marc R.'s avatar Marc R.

added property and virtual function for user-triggered debug output

parent 065f70a5
......@@ -4,7 +4,7 @@
** three-dimensional visual exploration of numerical ensemble weather
** prediction data.
**
** Copyright 2015-2017 Marc Rautenhaus
** Copyright 2015-2018 Marc Rautenhaus
** Copyright 2016-2017 Bianca Tost
** Copyright 2017 Philipp Kaiser
**
......@@ -2459,6 +2459,12 @@ void MTrajectoryActor::updateEnsembleProperties()
}
void MTrajectoryActor::printDebugOutputOnUserRequest()
{
debugPrintPendingRequestsQueue();
}
/******************************************************************************
*** PRIVATE METHODS ***
*******************************************************************************/
......@@ -2831,8 +2837,9 @@ void MTrajectoryActor::asynchronousDataRequest(bool synchronizationRequest)
trqi.numPendingRequests++;
}
LOG4CPLUS_DEBUG(mlog, "Enqueuing with [" << trqi.numPendingRequests
<< "] pending requests.");
LOG4CPLUS_DEBUG(mlog, "Trajectories asynchronous data request: "
"Enqueuing [" << trqi.numPendingRequests
<< "] new pending requests.");
trajectoryRequests[t].pendingRequestsQueue.enqueue(trqi);
// debugPrintPendingRequestsQueue();
......
......@@ -4,7 +4,7 @@
** three-dimensional visual exploration of numerical ensemble weather
** prediction data.
**
** Copyright 2015-2017 Marc Rautenhaus
** Copyright 2015-2018 Marc Rautenhaus
** Copyright 2017 Bianca Tost
** Copyright 2017 Philipp Kaiser
**
......@@ -229,6 +229,8 @@ protected:
void updateEnsembleProperties();
void printDebugOutputOnUserRequest();
private:
/**
Loops over all seed actors and gather the type and region dimensions of
......
......@@ -98,19 +98,23 @@ MActor::MActor(QObject *parent)
saveConfigProperty = addProperty(CLICK_PROPERTY, "save",
actorConfigurationSupGroup);
// Rendering properties.
actorRenderingSupGroup = addProperty(
GROUP_PROPERTY, "graphics development aids",
// Development properties.
actorDevelopmentSupGroup = addProperty(
GROUP_PROPERTY, "development aids",
actorConfigurationSupGroup);
wireFrameProperty = addProperty(
BOOL_PROPERTY, "wire frame",
actorRenderingSupGroup);
actorDevelopmentSupGroup);
properties->mBool()->setValue(wireFrameProperty, renderAsWireFrame);
reloadShaderProperty = addProperty(
CLICK_PROPERTY, "reload shaders",
actorRenderingSupGroup);
actorDevelopmentSupGroup);
printDebugOutputProperty = addProperty(
CLICK_PROPERTY, "print debug output",
actorDevelopmentSupGroup);
// Actor properties.
actorPropertiesSupGroup = addProperty(GROUP_PROPERTY, "actor properties",
......@@ -703,6 +707,10 @@ void MActor::actOnQtPropertyChanged(QtProperty *property)
emitActorChangedSignal();
}
}
else if (property == printDebugOutputProperty)
{
printDebugOutputOnUserRequest();
}
// Invoke signal handling of derived classes.
onQtPropertyChanged(property);
......@@ -1004,6 +1012,12 @@ double MActor::computePositionLabelDistanceWeight(
}
void MActor::printDebugOutputOnUserRequest()
{
LOG4CPLUS_DEBUG(mlog, "No debug output has been provided for this actor.");
}
/******************************************************************************
*** PRIVATE METHODS ***
*******************************************************************************/
......
......@@ -646,6 +646,13 @@ protected:
void setActorSupportsMultipleEnsembleMemberVisualization(bool b)
{ actorSupportsMultipleEnsembleMemberVisualization = b; }
/**
Override this method in derived actors to print debug output upon user
request.
*/
virtual void printDebugOutputOnUserRequest();
// Properties common to all actors.
//=================================
......@@ -657,7 +664,7 @@ protected:
additional subgroups for, e.g.,
variables. */
QtProperty *actorConfigurationSupGroup;
QtProperty *actorRenderingSupGroup;
QtProperty *actorDevelopmentSupGroup;
bool actorIsEnabled; /* Whether actor will be rendered. */
QtProperty *actorEnabledProperty;
......@@ -671,6 +678,7 @@ protected:
QtProperty *loadConfigProperty;
QtProperty *reloadShaderProperty;
QtProperty *printDebugOutputProperty;
QtProperty *labelPropertiesSupGroup; /* Subgroup for label properties. */
QtProperty *labelColourProperty;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment