mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 22:00:28 +01:00
[apps/graph/list] handle deleting functions from the parameter page
Change-Id: I34eff520f40ed5901011499c770c1b06d72b3cc7
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
#include "parameter_controller.h"
|
||||
#include <assert.h>
|
||||
|
||||
ParameterController::ParameterController(Responder * parentResponder) :
|
||||
ParameterController::ParameterController(Responder * parentResponder, Graph::FunctionStore * functionStore) :
|
||||
ViewController(parentResponder),
|
||||
m_colorCell(TableViewCell((char*)"Couleur de la fonction")),
|
||||
m_enableCell(SwitchTableViewCell((char*)"Activer/Desactiver")),
|
||||
m_deleteCell(TableViewCell((char*)"Supprimer la fonction")),
|
||||
m_tableView(TableView(this)),
|
||||
m_activeCell(0)
|
||||
m_activeCell(0),
|
||||
m_functionStore(functionStore)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -78,13 +79,19 @@ bool ParameterController::handleEnter() {
|
||||
return true;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_functionStore->removeFunction(m_function);
|
||||
StackViewController * stack = (StackViewController *)(parentResponder());
|
||||
stack->pop();
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int ParameterController::numberOfCells() {
|
||||
return k_totalNumberOfCell;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user