mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 01:00:50 +01:00
[apps/graph] Replace multiple pointers to evaluate context by
app()->evaluateContext() Change-Id: I21035aa357e9d2f2c471ad5751bed59cf05cebf3
This commit is contained in:
@@ -9,7 +9,7 @@ constexpr KDColor kSecondaryGridColor = KDColor(0xEEEEEE);
|
||||
constexpr int kNumberOfMainGridLines = 5;
|
||||
constexpr int kNumberOfSecondaryGridLines = 4;
|
||||
|
||||
GraphView::GraphView(FunctionStore * functionStore, EvaluateContext * evaluateContext) :
|
||||
GraphView::GraphView(FunctionStore * functionStore) :
|
||||
#if GRAPH_VIEW_IS_TILED
|
||||
TiledView(),
|
||||
#else
|
||||
@@ -22,7 +22,7 @@ GraphView::GraphView(FunctionStore * functionStore, EvaluateContext * evaluateCo
|
||||
m_yMin(-2.0f),
|
||||
m_yMax(2.0f),
|
||||
m_functionStore(functionStore),
|
||||
m_evaluateContext(evaluateContext)
|
||||
m_evaluateContext(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,6 +34,14 @@ View * GraphView::subviewAtIndex(int index) {
|
||||
return &m_cursorView;
|
||||
}
|
||||
|
||||
void GraphView::setContext(Context * context) {
|
||||
m_evaluateContext = (EvaluateContext *)context;
|
||||
}
|
||||
|
||||
Context * GraphView::context() const {
|
||||
return m_evaluateContext;
|
||||
}
|
||||
|
||||
void GraphView::moveCursorRight() {
|
||||
KDPoint offset = KDPoint(2,0);
|
||||
m_cursorPosition = m_cursorPosition.translatedBy(offset);
|
||||
|
||||
Reference in New Issue
Block a user