[expression_editor/poincare] Move Up in an ExpressionLayout.

Change-Id: I75fd91233729afd4eb77d8e9d53c102a632643ea
This commit is contained in:
Léa Saviot
2017-12-15 18:10:14 +01:00
parent 96c2f9aeba
commit fc8cd6c06e
29 changed files with 372 additions and 5 deletions

View File

@@ -105,6 +105,14 @@ bool KDRect::contains(KDPoint p) const {
return (p.x() >= x() && p.x() <= right() && p.y() >= y() && p.y() <= bottom());
}
bool KDRect::isAbove(KDPoint p) const {
return (p.y() >= y());
}
bool KDRect::isUnder(KDPoint p) const {
return (p.y() <= bottom());
}
KDRect KDRect::translatedBy(KDPoint p) const {
return KDRect(x() + p.x(), y() + p.y(), width(), height());
}