mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 17:50:04 +01:00
[apps/regression] Create a class prediction parameter controller
Change-Id: I135096e00263cc427974870025cc310c6420dc33
This commit is contained in:
57
apps/regression/prediction_parameter_controller.cpp
Normal file
57
apps/regression/prediction_parameter_controller.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
#include "prediction_parameter_controller.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace Regression {
|
||||
|
||||
PredictionParameterController::PredictionParameterController(Responder * parentResponder, Data * data) :
|
||||
ViewController(parentResponder),
|
||||
m_selectableTableView(SelectableTableView(this, this, Metric::TopMargin, Metric::RightMargin,
|
||||
Metric::BottomMargin, Metric::LeftMargin))
|
||||
{
|
||||
}
|
||||
|
||||
const char * PredictionParameterController::title() const {
|
||||
return "Droite de regression";
|
||||
}
|
||||
|
||||
View * PredictionParameterController::view() {
|
||||
return &m_selectableTableView;
|
||||
}
|
||||
|
||||
void PredictionParameterController::didBecomeFirstResponder() {
|
||||
m_selectableTableView.selectCellAtLocation(0, 0);
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
bool PredictionParameterController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::OK) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int PredictionParameterController::numberOfRows() {
|
||||
return k_totalNumberOfCells;
|
||||
};
|
||||
|
||||
TableViewCell * PredictionParameterController::reusableCell(int index) {
|
||||
assert(index >= 0);
|
||||
assert(index < k_totalNumberOfCells);
|
||||
return &m_cells[index];
|
||||
}
|
||||
|
||||
int PredictionParameterController::reusableCellCount() {
|
||||
return k_totalNumberOfCells;
|
||||
}
|
||||
|
||||
KDCoordinate PredictionParameterController::cellHeight() {
|
||||
return 35;
|
||||
}
|
||||
|
||||
void PredictionParameterController::willDisplayCellForIndex(TableViewCell * cell, int index) {
|
||||
ChevronMenuListCell * myCell = (ChevronMenuListCell *)cell;
|
||||
const char * titles[3] = {"Prediction sachant x", "Prediction sachant y"};
|
||||
myCell->setText(titles[index]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user