Files
Upsilon/apps/calculation/additional_outputs/trigonometry_graph_cell.h
Romain Goyet 2bf83c43a8 [apps/shared] Factorize CurveView::label
There was a lot of code duplication.
I removed the initialization of xLabel{} and yLabels{} because those are
scratch buffers that shouldn't be accessed before being written to
anyway.
2020-03-11 09:51:33 +01:00

30 lines
715 B
C++

#ifndef CALCULATION_ADDITIONAL_OUTPUTS_TRIGONOMETRY_GRAPH_CELL_H
#define CALCULATION_ADDITIONAL_OUTPUTS_TRIGONOMETRY_GRAPH_CELL_H
#include "../../shared/curve_view.h"
#include "trigonometry_model.h"
#include "illustration_cell.h"
namespace Calculation {
class TrigonometryGraphView : public Shared::CurveView {
public:
TrigonometryGraphView(TrigonometryModel * model);
void drawRect(KDContext * ctx, KDRect rect) const override;
private:
TrigonometryModel * m_model;
};
class TrigonometryGraphCell : public IllustrationCell {
public:
TrigonometryGraphCell(TrigonometryModel * model) : m_view(model) {}
private:
View * view() override { return &m_view; }
TrigonometryGraphView m_view;
};
}
#endif