Files
Upsilon/apps/calculation/additional_outputs/trigonometry_graph_cell.h
Émilie Feral be6f11208f [apps/calculation] additional_outputs: make a parent class to
TrigonometryGraphCell and ComplexGraphCell inheriting from
BorderedCell
2020-02-12 15:13:21 +01:00

31 lines
787 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:
char * label(Axis axis, int index) const override { return nullptr; }
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