aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Joakim Bygdell <j.bygdell@gmail.com>2017-02-04 10:46:02 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-02-05 11:59:47 -0800
commit11ccadbab5a8da5a43410b23ffb7b96f5c850051 (patch)
tree7285ffeba762b28f80858cb9246a453d877ee82b /profile-widget/profilewidget2.cpp
parent11dcae436eed5c684077b5a5e2b20d73fbebcca9 (diff)
downloadsubsurface-11ccadbab5a8da5a43410b23ffb7b96f5c850051.tar.gz
MOBILE: Reposition objects in the profile
Add the tankbar to the profile and change the relative positions of the depth and temperature curves to minimize overlap. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 38aa9d64f..df879fbb8 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -224,6 +224,7 @@ void ProfileWidget2::addItemsToScene()
diveComputerText->setData(SUBSURFACE_OBJ_DATA, SUBSURFACE_OBJ_DC_TEXT);
scene()->addItem(diveComputerText);
scene()->addItem(reportedCeiling);
+ scene()->addItem(tankItem);
#ifndef SUBSURFACE_MOBILE
scene()->addItem(toolTipItem);
scene()->addItem(diveCeiling);
@@ -241,7 +242,6 @@ void ProfileWidget2::addItemsToScene()
scene()->addItem(rulerItem);
scene()->addItem(rulerItem->sourceNode());
scene()->addItem(rulerItem->destNode());
- scene()->addItem(tankItem);
scene()->addItem(mouseFollowerHorizontal);
scene()->addItem(mouseFollowerVertical);
QPen pen(QColor(Qt::red).lighter());
@@ -420,12 +420,15 @@ void ProfileWidget2::setupItemSizes()
itemPos.depth.shrinked.setP2(QPointF(0, 55));
itemPos.depth.intermediate.setP1(QPointF(0, 0));
itemPos.depth.intermediate.setP2(QPointF(0, 65));
+#ifdef SUBSURFACE_MOBILE
+ itemPos.depth.expanded.setP2(QPointF(0, 65));
+#endif
// Time Axis Config
itemPos.time.pos.on.setX(3);
itemPos.time.pos.on.setY(95);
#ifdef SUBSURFACE_MOBILE
- itemPos.time.pos.on.setY(89);
+ itemPos.time.pos.on.setY(89.5);
#endif
itemPos.time.pos.off.setX(3);
itemPos.time.pos.off.setY(110);
@@ -461,9 +464,6 @@ void ProfileWidget2::setupItemSizes()
// Temperature axis config
itemPos.temperature.pos.on.setX(3);
itemPos.temperature.pos.on.setY(60);
-#ifdef SUBSURFACE_MOBILE
- itemPos.temperature.pos.on.setY(50);
-#endif
itemPos.temperatureAll.pos.on.setY(51);
itemPos.temperature.pos.off.setX(-10);
itemPos.temperature.pos.off.setY(40);
@@ -473,6 +473,14 @@ void ProfileWidget2::setupItemSizes()
itemPos.temperature.shrinked.setP2(QPointF(0, 12));
itemPos.temperature.intermediate.setP1(QPointF(0, 2));
itemPos.temperature.intermediate.setP2(QPointF(0, 12));
+#ifdef SUBSURFACE_MOBILE
+ itemPos.temperature.pos.on.setY(51);
+ itemPos.temperatureAll.pos.on.setY(47);
+ itemPos.temperature.expanded.setP1(QPointF(0, 20));
+ itemPos.temperature.expanded.setP2(QPointF(0, 33));
+ itemPos.temperature.intermediate.setP1(QPointF(0, 2));
+ itemPos.temperature.intermediate.setP2(QPointF(0, 12));
+#endif
// Heartbeat axis config
itemPos.heartBeat.pos.on.setX(3);
@@ -497,6 +505,9 @@ void ProfileWidget2::setupItemSizes()
itemPos.tankBar.on.setX(0);
itemPos.tankBar.on.setY(91.95);
+#ifdef SUBSURFACE_MOBILE
+ itemPos.tankBar.on.setY(86.4);
+#endif
}
void ProfileWidget2::setupItem(AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis,