aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-07 21:28:59 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-08 07:22:30 -0800
commitcacf5b3b2479220f4aa56879928ffe23a4277a7f (patch)
tree4a190e2fabf71226102fa30fc7d5f2bc8d546905 /qt-ui
parentc05575e103c551ba8bc60ab2d86c9120bed67fbe (diff)
downloadsubsurface-cacf5b3b2479220f4aa56879928ffe23a4277a7f.tar.gz
Fix the rest of item visibilities and a few alignment fixes.
Every item is now back on the profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveeventitem.cpp1
-rw-r--r--qt-ui/profile/profilewidget2.cpp30
2 files changed, 19 insertions, 12 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp
index 7b748fedd..2250a7306 100644
--- a/qt-ui/profile/diveeventitem.cpp
+++ b/qt-ui/profile/diveeventitem.cpp
@@ -99,7 +99,6 @@ void DiveEventItem::setupToolTipString()
void DiveEventItem::eventVisibilityChanged(const QString& eventName, bool visible)
{
-
}
void DiveEventItem::recalculatePos()
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index d28f9358d..d64da9964 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -146,7 +146,7 @@ void ProfileWidget2::setupItemOnScene()
cartesianPlane->setBottomAxis(timeAxis);
cartesianPlane->setLeftAxis(profileYAxis);
- diveComputerText->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ diveComputerText->setAlignment(Qt::AlignRight | Qt::AlignTop);
diveComputerText->setBrush(getColor(TIME_TEXT));
setupItem(reportedCeiling, timeAxis, profileYAxis, dataModel, DivePlotDataModel::CEILING, DivePlotDataModel::TIME, 1);
@@ -490,15 +490,23 @@ void ProfileWidget2::setProfileState()
cartesianPlane->setVisible(true);
meanDepth->setVisible(true);
+
diveComputerText->setVisible(true);
- cartesianPlane->setHorizontalLine( timeAxis->line() );
- cartesianPlane->setVerticalLine( profileYAxis->line() );
-// diveCeiling->setVisible(true);
-// reportedCeiling->setVisible(true);
-// Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
-// tissue->setVisible(true);
-// }
-// Q_FOREACH(DiveEventItem *event, eventItems){
-// event->setVisible(true);
-// }
+ diveComputerText->setPos(itemPos.dcLabel.on);
+
+ cartesianPlane->setHorizontalLine( itemPos.time.expanded );
+ cartesianPlane->setVerticalLine( itemPos.depth.expanded );
+
+ diveCeiling->setVisible(s.value("calcceiling").toBool());
+ reportedCeiling->setVisible(s.value("dcceiling").toBool());
+
+ if(s.value("calcalltissues").toBool()){
+ Q_FOREACH(DiveCalculatedTissue *tissue, allTissues){
+ tissue->setVisible(true);
+ }
+ }
+ // Only set visible the ones that should be visible, but how?
+ Q_FOREACH(DiveEventItem *event, eventItems){
+ event->setVisible(true);
+ }
}