diff --git a/core/include/Variable/Variable.h b/core/include/Variable/Variable.h index 117dd08..d766027 100644 --- a/core/include/Variable/Variable.h +++ b/core/include/Variable/Variable.h @@ -29,6 +29,7 @@ public: const QVariantHash &metadata = {}); QString name() const noexcept; + void setName(const QString &name) noexcept; SqpRange range() const noexcept; void setRange(const SqpRange &range) noexcept; SqpRange cacheRange() const noexcept; diff --git a/core/src/Variable/Variable.cpp b/core/src/Variable/Variable.cpp index 960b3bf..2d56bbb 100644 --- a/core/src/Variable/Variable.cpp +++ b/core/src/Variable/Variable.cpp @@ -75,6 +75,13 @@ QString Variable::name() const noexcept return name; } +void Variable::setName(const QString &name) noexcept +{ + impl->lockWrite(); + impl->m_Name = name; + impl->unlock(); +} + SqpRange Variable::range() const noexcept { impl->lockRead();