From f3428f28e522808b14cb1052f99ea549d58d4d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 14 Oct 2016 10:03:33 +0200 Subject: [PATCH] [apps/graph/value] Add methods -get/set- to the class interval Change-Id: I77a506a9bd689979a09706bb10403f5db0a90758 --- apps/graph/values/interval.cpp | 24 ++++++++++++++++++++++++ apps/graph/values/interval.h | 7 +++++++ 2 files changed, 31 insertions(+) diff --git a/apps/graph/values/interval.cpp b/apps/graph/values/interval.cpp index 7b86d2148..46da19820 100644 --- a/apps/graph/values/interval.cpp +++ b/apps/graph/values/interval.cpp @@ -23,4 +23,28 @@ float Interval::element(int i) { return m_start + i*m_step; } +float Interval::start() { + return m_start; +} + +float Interval::end() { + return m_end; +} + +float Interval::step() { + return m_step; +} + +void Interval::setStart(float f) { + m_start = f; +} + +void Interval::setEnd(float f) { + m_end = f; +} + +void Interval::setStep(float f) { + m_step = f; +} + } diff --git a/apps/graph/values/interval.h b/apps/graph/values/interval.h index 68d3a0c77..7bc7f84b3 100644 --- a/apps/graph/values/interval.h +++ b/apps/graph/values/interval.h @@ -9,6 +9,13 @@ public: int numberOfElements(); float element(int i); + float start(); + float end(); + float step(); + void setStart(float f); + void setEnd(float f); + void setStep(float f); + private: float m_start; float m_end;