mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-21 14:50:44 +01:00
[apps/shared][apps/graph][apps/sequence] Reorganise list controllers,
function title cells and function expression cells Change-Id: Idbdae4975c8ed83a023c781dc14929b8c2053bb0
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#include "list_controller.h"
|
||||
#include "function_title_cell.h"
|
||||
#include "function_expression_cell.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace Shared {
|
||||
@@ -131,15 +129,9 @@ int ListController::reusableCellCount(int type) {
|
||||
void ListController::willDisplayCellAtLocation(TableViewCell * cell, int i, int j) {
|
||||
if (j < numberOfRows() - 1 || m_functionStore->numberOfFunctions() == m_functionStore->maxNumberOfFunctions()) {
|
||||
if (i == 0) {
|
||||
FunctionTitleCell * myFunctionCell = (FunctionTitleCell *)cell;
|
||||
Function * function = m_functionStore->functionAtIndex(j);
|
||||
char bufferName[5] = {*function->name(),'(','x',')', 0};
|
||||
myFunctionCell->setText(bufferName);
|
||||
KDColor functionNameColor = function->isActive() ? function->color() : Palette::GreyDark;
|
||||
myFunctionCell->setColor(functionNameColor);
|
||||
willDisplayTitleCellAtIndex(cell, j);
|
||||
} else {
|
||||
FunctionExpressionCell * myCell = (FunctionExpressionCell *)cell;
|
||||
myCell->setFunction(m_functionStore->functionAtIndex(j));
|
||||
willDisplayExpressionCellAtIndex(cell, j);
|
||||
}
|
||||
}
|
||||
EvenOddCell * myCell = (EvenOddCell *)cell;
|
||||
@@ -185,12 +177,12 @@ bool ListController::handleEvent(Ion::Events::Event event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Responder * ListController::tabController() const{
|
||||
return (parentResponder()->parentResponder()->parentResponder());
|
||||
}
|
||||
|
||||
StackViewController * ListController::stackController() const{
|
||||
return (StackViewController *)(parentResponder()->parentResponder());
|
||||
}
|
||||
|
||||
Responder * ListController::tabController() const{
|
||||
return (parentResponder()->parentResponder()->parentResponder());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user