mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
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.
30 lines
715 B
C++
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
|
|
|