mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 01:08:15 +01:00
[apps/graph] Add a name attribute to functions
Change-Id: I7a8fd1701b026b27d1dfcfc87fc92398c494e7fd
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user