[apps] Improvements of MVC structure regarding curve views and ranges

Change-Id: Iec8031dbf349c34c18694dffabd02ef9c88ebf2d
This commit is contained in:
Émilie Feral
2017-01-17 17:42:30 +01:00
parent 72de9990e9
commit c3008ca360
42 changed files with 343 additions and 302 deletions

View File

@@ -8,22 +8,25 @@ BoxRange::BoxRange(Store * store) :
}
float BoxRange::xMin() {
return m_store->minValue();
float min = m_store->minValue();
float max = m_store->maxValue();
max = min >= max ? min + 1 : max;
return min - k_displayLeftMarginRatio*(max-min);
}
float BoxRange::xMax() {
if (m_store->minValue() >= m_store->maxValue()) {
return m_store->minValue() + 1.0f;
}
return m_store->maxValue();
float min = m_store->minValue();
float max = m_store->maxValue();
max = min >= max ? min + 1 : max;
return max + k_displayRightMarginRatio*(max - min);
}
float BoxRange::yMin() {
return 0.0f;
return -k_displayBottomMarginRatio;
}
float BoxRange::yMax() {
return 1.0f;
return 1.0f+k_displayTopMarginRatio;
}
float BoxRange::xGridUnit() {