mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/reg] Rename PredictionParameterController->GraphOptionsController
This commit is contained in:
@@ -10,9 +10,9 @@ app_objs += $(addprefix apps/regression/,\
|
||||
even_odd_double_buffer_text_cell_with_separator.o\
|
||||
go_to_parameter_controller.o\
|
||||
graph_controller.o\
|
||||
graph_options_controller.o\
|
||||
graph_view.o\
|
||||
initialisation_parameter_controller.o\
|
||||
prediction_parameter_controller.o\
|
||||
regression_context.o\
|
||||
regression_controller.o\
|
||||
store.o\
|
||||
|
||||
@@ -15,7 +15,7 @@ GraphController::GraphController(Responder * parentResponder, ButtonRowControlle
|
||||
m_view(store, m_cursor, &m_bannerView, &m_crossCursorView, this),
|
||||
m_store(store),
|
||||
m_initialisationParameterController(this, m_store),
|
||||
m_predictionParameterController(this, m_store, m_cursor, this),
|
||||
m_graphOptionsController(this, m_store, m_cursor, this),
|
||||
m_selectedDotIndex(selectedDotIndex),
|
||||
m_selectedSeriesIndex(selectedSeriesIndex)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ InteractiveCurveViewRange * GraphController::interactiveCurveViewRange() {
|
||||
}
|
||||
|
||||
bool GraphController::handleEnter() {
|
||||
stackController()->push(&m_predictionParameterController);
|
||||
stackController()->push(&m_graphOptionsController);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include <escher.h>
|
||||
#include "banner_view.h"
|
||||
#include "store.h"
|
||||
#include "graph_options_controller.h"
|
||||
#include "graph_view.h"
|
||||
#include "initialisation_parameter_controller.h"
|
||||
#include "prediction_parameter_controller.h"
|
||||
#include "../shared/interactive_curve_view_controller.h"
|
||||
#include "../shared/curve_view_cursor.h"
|
||||
#include "../shared/cursor_view.h"
|
||||
@@ -46,7 +46,7 @@ private:
|
||||
GraphView m_view;
|
||||
Store * m_store;
|
||||
InitialisationParameterController m_initialisationParameterController;
|
||||
PredictionParameterController m_predictionParameterController;
|
||||
GraphOptionsController m_graphOptionsController;
|
||||
/* The selectedDotIndex is -1 when no dot is selected, m_numberOfPairs when
|
||||
* the mean dot is selected and the dot index otherwise */
|
||||
int * m_selectedDotIndex;
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
#include "prediction_parameter_controller.h"
|
||||
#include "graph_options_controller.h"
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
namespace Regression {
|
||||
|
||||
PredictionParameterController::PredictionParameterController(Responder * parentResponder, Store * store, CurveViewCursor * cursor, GraphController * graphController) :
|
||||
GraphOptionsController::GraphOptionsController(Responder * parentResponder, Store * store, CurveViewCursor * cursor, GraphController * graphController) :
|
||||
ViewController(parentResponder),
|
||||
m_selectableTableView(this),
|
||||
m_goToParameterController(this, store, cursor, graphController)
|
||||
{
|
||||
}
|
||||
|
||||
const char * PredictionParameterController::title() {
|
||||
const char * GraphOptionsController::title() {
|
||||
return I18n::translate(I18n::Message::RegressionSlope);
|
||||
}
|
||||
|
||||
View * PredictionParameterController::view() {
|
||||
View * GraphOptionsController::view() {
|
||||
return &m_selectableTableView;
|
||||
}
|
||||
|
||||
void PredictionParameterController::didBecomeFirstResponder() {
|
||||
void GraphOptionsController::didBecomeFirstResponder() {
|
||||
if (selectedRow() < 0) {
|
||||
selectCellAtLocation(0, 0);
|
||||
}
|
||||
app()->setFirstResponder(&m_selectableTableView);
|
||||
}
|
||||
|
||||
bool PredictionParameterController::handleEvent(Ion::Events::Event event) {
|
||||
bool GraphOptionsController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right) {
|
||||
m_goToParameterController.setXPrediction(selectedRow() == 0);
|
||||
StackViewController * stack = (StackViewController *)parentResponder();
|
||||
@@ -37,25 +37,25 @@ bool PredictionParameterController::handleEvent(Ion::Events::Event event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int PredictionParameterController::numberOfRows() {
|
||||
int GraphOptionsController::numberOfRows() {
|
||||
return k_totalNumberOfCells;
|
||||
};
|
||||
|
||||
HighlightCell * PredictionParameterController::reusableCell(int index) {
|
||||
HighlightCell * GraphOptionsController::reusableCell(int index) {
|
||||
assert(index >= 0);
|
||||
assert(index < k_totalNumberOfCells);
|
||||
return &m_cells[index];
|
||||
}
|
||||
|
||||
int PredictionParameterController::reusableCellCount() {
|
||||
int GraphOptionsController::reusableCellCount() {
|
||||
return k_totalNumberOfCells;
|
||||
}
|
||||
|
||||
KDCoordinate PredictionParameterController::cellHeight() {
|
||||
KDCoordinate GraphOptionsController::cellHeight() {
|
||||
return Metric::ParameterCellHeight;
|
||||
}
|
||||
|
||||
void PredictionParameterController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
void GraphOptionsController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
MessageTableCellWithChevron * myCell = (MessageTableCellWithChevron *)cell;
|
||||
I18n::Message titles[2] = {I18n::Message::XPrediction, I18n::Message::YPrediction};
|
||||
myCell->setMessage(titles[index]);
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef REGRESSION_PREDICTION_PARAMETER_CONTROLLER_H
|
||||
#define REGRESSION_PREDICTION_PARAMETER_CONTROLLER_H
|
||||
#ifndef REGRESSION_GRAPH_OPTIONS_CONTROLLER_H
|
||||
#define REGRESSION_GRAPH_OPTIONS_CONTROLLER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "store.h"
|
||||
@@ -10,9 +10,9 @@ namespace Regression {
|
||||
|
||||
class GraphController;
|
||||
|
||||
class PredictionParameterController : public ViewController, public SimpleListViewDataSource, public SelectableTableViewDataSource {
|
||||
class GraphOptionsController : public ViewController, public SimpleListViewDataSource, public SelectableTableViewDataSource {
|
||||
public:
|
||||
PredictionParameterController(Responder * parentResponder, Store * store, Shared::CurveViewCursor * cursor, GraphController * graphController);
|
||||
GraphOptionsController(Responder * parentResponder, Store * store, Shared::CurveViewCursor * cursor, GraphController * graphController);
|
||||
View * view() override;
|
||||
const char * title() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
Reference in New Issue
Block a user