Files
Upsilon/apps/regression/graph_view.h
Émilie Feral b0a9d23ce3 [apps/regression] Make graph view inherits from Curve view with banner
and cursor

Change-Id: I3d63eb2b0750ba7c11374bb608347efc2418ccfd
2017-01-09 15:08:55 +01:00

34 lines
903 B
C++

#ifndef REGRESSION_GRAPH_VIEW_H
#define REGRESSION_GRAPH_VIEW_H
#include <escher.h>
#include "data.h"
#include "banner_view.h"
#include "../constant.h"
#include "../cursor_view.h"
#include "../curve_view_with_banner_and_cursor.h"
namespace Regression {
class GraphView : public CurveViewWithBannerAndCursor {
public:
GraphView(Data * m_data);
void reloadSelection() override;
void reload();
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
constexpr static KDCoordinate k_dotSize = 5;
char * label(Axis axis, int index) const override;
View * bannerView() override;
float evaluateModelWithParameter(Model * curve, float t) const override;
Data * m_data;
char m_xLabels[k_maxNumberOfXLabels][Constant::FloatBufferSizeInScientificMode];
char m_yLabels[k_maxNumberOfYLabels][Constant::FloatBufferSizeInScientificMode];
BannerView m_bannerView;
};
}
#endif