[apps/graph] add methods to handle function names and colors.

Change-Id: Ic11f2dd6bd9cb473b436d5e7769e2660c173c733
This commit is contained in:
Émilie Feral
2016-09-30 17:53:17 +02:00
parent b250795e2d
commit e109a23485
5 changed files with 55 additions and 22 deletions

View File

@@ -1,10 +1,12 @@
#include "function.h"
#include <string.h>
Graph::Function::Function() :
m_name(nullptr),
Graph::Function::Function(const char * text, KDColor color) :
m_name(text),
m_color(color),
m_expression(nullptr),
m_layout(nullptr)
m_layout(nullptr),
m_active(true)
{
}
@@ -23,10 +25,6 @@ void Graph::Function::setColor(KDColor color) {
m_color = color;
}
void Graph::Function::setName(const char * c) {
m_name = c;
}
Graph::Function::~Function() {
//FIXME: Free m_text!
if (m_layout != nullptr) {