mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 18:20:14 +01:00
[apps/graph] GraphView gets the function store through App
instead of passing a pointer at contruction.
This commit is contained in:
committed by
LeaNumworks
parent
9efe1515e8
commit
1908c9c674
@@ -1,14 +1,14 @@
|
||||
#include "graph_view.h"
|
||||
#include "../app.h"
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
namespace Graph {
|
||||
|
||||
GraphView::GraphView(CartesianFunctionStore * functionStore, InteractiveCurveViewRange * graphRange,
|
||||
CurveViewCursor * cursor, BannerView * bannerView, CursorView * cursorView) :
|
||||
GraphView::GraphView(InteractiveCurveViewRange * graphRange,
|
||||
CurveViewCursor * cursor, Shared::BannerView * bannerView, CursorView * cursorView) :
|
||||
FunctionGraphView(graphRange, cursor, bannerView, cursorView),
|
||||
m_functionStore(functionStore),
|
||||
m_tangent(false)
|
||||
{
|
||||
}
|
||||
@@ -23,9 +23,10 @@ void GraphView::reload() {
|
||||
|
||||
void GraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
FunctionGraphView::drawRect(ctx, rect);
|
||||
for (int i = 0; i < m_functionStore->numberOfActiveFunctions(); i++) {
|
||||
Ion::Storage::Record record = m_functionStore->activeRecordAtIndex(i);
|
||||
ExpiringPointer<CartesianFunction> f = m_functionStore->modelForRecord(record);;
|
||||
CartesianFunctionStore * functionStore = App::app()->functionStore();
|
||||
for (int i = 0; i < functionStore->numberOfActiveFunctions(); i++) {
|
||||
Ion::Storage::Record record = functionStore->activeRecordAtIndex(i);
|
||||
ExpiringPointer<CartesianFunction> f = functionStore->modelForRecord(record);;
|
||||
Shared::CartesianFunction::PlotType type = f->plotType();
|
||||
float tmin = f->tMin();
|
||||
float tmax = f->tMax();
|
||||
|
||||
Reference in New Issue
Block a user