From c7028b4894dd635bc57253d20743f108883d068d 2017-09-01 07:10:56 From: Alexandre Leroux Date: 2017-09-01 07:10:56 Subject: [PATCH] Adds method to get all variables from model This method will be used to generate forbidden names when renaming a variable (i.e. names of existing variables) --- diff --git a/core/include/Variable/VariableModel.h b/core/include/Variable/VariableModel.h index 02c0ca6..f4d30fa 100644 --- a/core/include/Variable/VariableModel.h +++ b/core/include/Variable/VariableModel.h @@ -45,6 +45,7 @@ public: std::shared_ptr variable(int index) const; + std::vector > variables() const; void setDataProgress(std::shared_ptr variable, double progress); diff --git a/core/src/Variable/VariableModel.cpp b/core/src/Variable/VariableModel.cpp index 7e29f47..94f0a7f 100644 --- a/core/src/Variable/VariableModel.cpp +++ b/core/src/Variable/VariableModel.cpp @@ -114,6 +114,11 @@ std::shared_ptr VariableModel::variable(int index) const return (index >= 0 && index < impl->m_Variables.size()) ? impl->m_Variables[index] : nullptr; } +std::vector > VariableModel::variables() const +{ + return impl->m_Variables; +} + void VariableModel::setDataProgress(std::shared_ptr variable, double progress) { if (progress > 0.0) {