mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps] Sort out private and protected methods
Change-Id: I7cd1965388ad002c9e5516fa122cfe637a883506
This commit is contained in:
@@ -26,21 +26,13 @@ public:
|
||||
|
||||
protected:
|
||||
void setCurveViewRange(CurveViewRange * curveViewRange);
|
||||
|
||||
// Drawing methods
|
||||
constexpr static KDColor k_axisColor = KDColor::RGB24(0x000000);
|
||||
constexpr static KDColor k_gridColor = KDColor::RGB24(0xEEEEEE);
|
||||
constexpr static KDCoordinate k_labelMargin = 4;
|
||||
constexpr static int k_maxNumberOfXLabels = 18;
|
||||
constexpr static int k_maxNumberOfYLabels = 13;
|
||||
constexpr static int k_maxNumberOfXLabels = CurveViewRange::k_maxNumberOfXGridUnits;
|
||||
constexpr static int k_maxNumberOfYLabels = CurveViewRange::k_maxNumberOfYGridUnits;
|
||||
constexpr static KDCoordinate k_cursorSize = 9;
|
||||
/* The window bounds are deduced from the model bounds but also take into
|
||||
account a margin (computed with k_marginFactor) */
|
||||
float min(Axis axis) const;
|
||||
float max(Axis axis) const;
|
||||
float gridUnit(Axis axis) const;
|
||||
virtual char * label(Axis axis, int index) const = 0;
|
||||
KDCoordinate pixelLength(Axis axis) const;
|
||||
float pixelToFloat(Axis axis, KDCoordinate p) const;
|
||||
float floatToPixel(Axis axis, float f) const;
|
||||
void drawLine(KDContext * ctx, KDRect rect, Axis axis,
|
||||
@@ -60,6 +52,13 @@ protected:
|
||||
|
||||
private:
|
||||
constexpr static int k_externRectMargin = 1;
|
||||
/* The window bounds are deduced from the model bounds but also take into
|
||||
account a margin (computed with k_marginFactor) */
|
||||
float min(Axis axis) const;
|
||||
float max(Axis axis) const;
|
||||
float gridUnit(Axis axis) const;
|
||||
KDCoordinate pixelLength(Axis axis) const;
|
||||
virtual char * label(Axis axis, int index) const = 0;
|
||||
int numberOfLabels(Axis axis) const;
|
||||
virtual float evaluateModelWithParameter(Model * curve, float t) const;
|
||||
/* Recursively join two dots (dichotomy). The method stops when the
|
||||
|
||||
@@ -8,7 +8,7 @@ public:
|
||||
float x();
|
||||
float y();
|
||||
void moveTo(float x, float y);
|
||||
protected:
|
||||
private:
|
||||
float m_x;
|
||||
float m_y;
|
||||
};
|
||||
|
||||
@@ -14,11 +14,11 @@ public:
|
||||
virtual float xGridUnit() = 0;
|
||||
virtual float yGridUnit();
|
||||
float computeGridUnit(Axis axis, float min, float max);
|
||||
protected:
|
||||
constexpr static float k_minNumberOfXGridUnits = 7.0f;
|
||||
constexpr static float k_maxNumberOfXGridUnits = 18.0f;
|
||||
constexpr static float k_minNumberOfYGridUnits = 5.0f;
|
||||
constexpr static float k_maxNumberOfYGridUnits = 13.0f;
|
||||
private:
|
||||
constexpr static float k_minNumberOfXGridUnits = 7.0f;
|
||||
constexpr static float k_minNumberOfYGridUnits = 5.0f;
|
||||
constexpr static float k_oneUnit = 1.0f;
|
||||
constexpr static float k_twoUnit = 2.0f;
|
||||
constexpr static float k_fiveUnit = 5.0f;
|
||||
|
||||
@@ -21,13 +21,14 @@ public:
|
||||
|
||||
void didBecomeFirstResponder() override;
|
||||
protected:
|
||||
SelectableTableView m_selectableTableView;
|
||||
private:
|
||||
static constexpr KDCoordinate k_cellHeight = 30;
|
||||
virtual bool cellAtLocationIsEditable(int columnIndex, int rowIndex) = 0;
|
||||
virtual void setDataAtLocation(float floatBody, int columnIndex, int rowIndex) = 0;
|
||||
virtual float dataAtLocation(int columnIndex, int rowIndex) = 0;
|
||||
virtual int numberOfElements() = 0;
|
||||
virtual int maxNumberOfElements() const = 0;
|
||||
SelectableTableView m_selectableTableView;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
constexpr static float k_numberOfCursorStepsInGradUnit = 5.0f;
|
||||
protected:
|
||||
constexpr static float k_cursorMarginFactorToBorder = 0.025f;
|
||||
bool panToMakePointVisible(float x, float y, float xMargin, float yMargin);
|
||||
// Window bounds of the data
|
||||
float m_xMin;
|
||||
float m_xMax;
|
||||
@@ -50,6 +49,8 @@ protected:
|
||||
bool m_yAuto;
|
||||
float m_xGridUnit;
|
||||
float m_yGridUnit;
|
||||
private:
|
||||
bool panToMakePointVisible(float x, float y, float xMargin, float yMargin);
|
||||
CurveViewCursor * m_cursor;
|
||||
InteractiveCurveViewRangeDelegate * m_delegate;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user