diff --git a/apps/graph/function.cpp b/apps/graph/function.cpp index 4e23cb7c5..227d0818f 100644 --- a/apps/graph/function.cpp +++ b/apps/graph/function.cpp @@ -10,6 +10,7 @@ Graph::Function::Function() : Graph::Function::Function(const char * text, KDColor color) : m_text(text), // FIXME: Copy !! m_color(color), + m_name("f(x)"), m_expression(nullptr), m_layout(nullptr) { @@ -29,6 +30,10 @@ const char * Graph::Function::text() { return m_text; } +const char * Graph::Function::name() { + return m_name; +} + Expression * Graph::Function::expression() { if (m_expression == nullptr) { m_expression = Expression::parse(m_text); diff --git a/apps/graph/function.h b/apps/graph/function.h index 764516858..3021f129a 100644 --- a/apps/graph/function.h +++ b/apps/graph/function.h @@ -12,11 +12,13 @@ public: Function(const char * text, KDColor m_color); ~Function(); // Delete expression and layout, if needed const char * text(); + const char * name(); KDColor color() const { return m_color; } Expression * expression(); ExpressionLayout * layout(); private: const char * m_text; + const char * m_name; KDColor m_color; Expression * m_expression; ExpressionLayout * m_layout;