mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 12:10:03 +02:00
[apps/regression] Display a zoom view controller when clicking on the
zoom button on the graph view Change-Id: I82607bb99675d3c7c1b0d34c64c460a08c19b340
This commit is contained in:
@@ -7,12 +7,17 @@ GraphController::GraphController(Responder * parentResponder, HeaderViewControll
|
||||
HeaderViewDelegate(headerViewController),
|
||||
m_view(GraphView(data)),
|
||||
m_windowParameterController(WindowParameterController(this, data)),
|
||||
m_zoomParameterController(ZoomParameterController(this, data, &m_view)),
|
||||
m_windowButton(this, "Axes", Invocation([](void * context, void * sender) {
|
||||
GraphController * graphController = (GraphController *) context;
|
||||
StackViewController * stack = graphController->stackController();
|
||||
stack->push(graphController->windowParameterController());
|
||||
}, this)),
|
||||
m_zoomButton(this, "Zoom", Invocation([](void * context, void * sender) {}, this)),
|
||||
m_zoomButton(this, "Zoom", Invocation([](void * context, void * sender) {
|
||||
GraphController * graphController = (GraphController *) context;
|
||||
StackViewController * stack = graphController->stackController();
|
||||
stack->push(graphController->zoomParameterController());
|
||||
}, this)),
|
||||
m_defaultInitialisationButton(this, "Initialisation", Invocation([](void * context, void * sender) {}, this)),
|
||||
m_data(data)
|
||||
{
|
||||
@@ -74,10 +79,11 @@ bool GraphController::handleEvent(Ion::Events::Event event) {
|
||||
void GraphController::didBecomeFirstResponder() {
|
||||
headerViewController()->setSelectedButton(-1);
|
||||
m_view.selectMainView(true);
|
||||
// Layout view whe the graph view that might have been modified by the zoom page
|
||||
headerViewController()->layoutView();
|
||||
m_view.reload();
|
||||
}
|
||||
|
||||
|
||||
int GraphController::numberOfButtons() const {
|
||||
return 3;
|
||||
}
|
||||
@@ -110,6 +116,10 @@ ViewController * GraphController::windowParameterController() {
|
||||
return &m_windowParameterController;
|
||||
}
|
||||
|
||||
ViewController * GraphController::zoomParameterController() {
|
||||
return &m_zoomParameterController;
|
||||
}
|
||||
|
||||
Responder * GraphController::tabController() const {
|
||||
return (parentResponder()->parentResponder()->parentResponder()->parentResponder());
|
||||
}
|
||||
@@ -119,4 +129,3 @@ StackViewController * GraphController::stackController() const{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user