##// END OF EJS Templates
Compile fix
Compile fix

File last commit:

r115:8cafc623ea10
r124:af6b508a43ab
Show More
plotdomain.cpp
45 lines | 807 B | text/x-c | CppLexer
Michal Klocek
Add zoom support...
r67 #include "plotdomain_p.h"
Michal Klocek
Refactor xyplotdata...
r25
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactor xyplotdata...
r25
Michal Klocek
Add zoom support...
r67 PlotDomain::PlotDomain():
Michal Klocek
Refactor xyplotdata...
r25 m_minX(0),
m_maxX(0),
m_minY(0),
m_maxY(0)
{
}
Michal Klocek
Add zoom support...
r67 PlotDomain::~PlotDomain()
Michal Klocek
Refactor xyplotdata...
r25 {
// TODO Auto-generated destructor stub
}
Michal Klocek
Add zoom support...
r67 qreal PlotDomain::spanX() const
Michal Klocek
Refactor xyplotdata...
r25 {
Q_ASSERT(m_maxX >= m_minX);
return m_maxX - m_minX;
}
Michal Klocek
Add zoom support...
r67 qreal PlotDomain::spanY() const
Michal Klocek
Refactor xyplotdata...
r25 {
Q_ASSERT(m_maxY >= m_minY);
return m_maxY - m_minY;
}
Michal Klocek
Adds layout support for charts....
r115 PlotDomain PlotDomain::subDomain(const QRectF& rect, qreal maxWidth,qreal maxHeight) const
Michal Klocek
Small refactor, adds subDomain to plotDomain
r76 {
PlotDomain domain;
qreal dx = spanX() / maxWidth;
qreal dy = spanY() / maxHeight;
domain.m_minX = m_minX + dx * rect.left();
domain.m_maxX = m_minX + dx * rect.right();
domain.m_minY = m_maxY - dy * rect.bottom();
domain.m_maxY = m_maxY - dy * rect.top();
return domain;
}
Tero Ahola
Renamed to QtCommercialChart
r30 QTCOMMERCIALCHART_END_NAMESPACE