From 34e83ccc66eb57259c55804023d94db20900875e Mon Sep 17 00:00:00 2001 From: Tristan Youngs Date: Wed, 22 Jan 2025 15:56:59 +0000 Subject: [PATCH] Return number of entities displayed. --- src/widget.cpp | 3 +++ src/widget.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/widget.cpp b/src/widget.cpp index a183827..ba0a213 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -177,6 +177,9 @@ RenderableMaterial *MildredWidget::createMaterial(Qt3DCore::QEntity *parent, Ren return material; } +// Return total number of data entities displayed on the graph +int MildredWidget::nDataEntities() const { return dataEntities_.size(); } + // Add new 1-dimensional data entity for supplied data Data1DEntity *MildredWidget::addData1D(const QString &tag) { diff --git a/src/widget.h b/src/widget.h index c983d08..b32a8c5 100644 --- a/src/widget.h +++ b/src/widget.h @@ -204,6 +204,8 @@ class MildredWidget : public QWidget RenderableMaterial::FragmentShaderType fragmentShader = RenderableMaterial::FragmentShaderType::Phong); public: + // Return total number of data entities displayed on the graph + int nDataEntities() const; // Add new data entity for supplied data Data1DEntity *addData1D(const QString &tag); // Remove data entity with the supplied data