mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
47 lines
1006 B
C++
47 lines
1006 B
C++
#include "calculation_controller.h"
|
|
#include <assert.h>
|
|
|
|
namespace Probability {
|
|
|
|
CalculationController::ContentView::ContentView(Responder * parentResponder, Law * law) :
|
|
m_lawCurveView(LawCurveView(law))
|
|
{
|
|
}
|
|
|
|
int CalculationController::ContentView::numberOfSubviews() const {
|
|
return 1;
|
|
}
|
|
|
|
View * CalculationController::ContentView::subviewAtIndex(int index) {
|
|
assert(index == 0);
|
|
return &m_lawCurveView;
|
|
}
|
|
|
|
void CalculationController::ContentView::layoutSubviews() {
|
|
m_lawCurveView.setFrame(bounds());
|
|
}
|
|
|
|
CalculationController::CalculationController(Responder * parentResponder, Law * law) :
|
|
ViewController(parentResponder),
|
|
m_contentView(ContentView(this, law)),
|
|
m_law(law)
|
|
{
|
|
}
|
|
|
|
View * CalculationController::view() {
|
|
return &m_contentView;
|
|
}
|
|
|
|
const char * CalculationController::title() const {
|
|
return "Calculer les probabilites";
|
|
}
|
|
|
|
bool CalculationController::handleEvent(Ion::Events::Event event) {
|
|
return false;
|
|
}
|
|
|
|
void CalculationController::didBecomeFirstResponder() {
|
|
}
|
|
|
|
}
|