aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-09 07:27:46 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-09-09 07:27:46 -0300
commitb4a609f46fb2c66798d4d56f59ce44c26fc8f3f8 (patch)
treeb1dbf4a199b0463e31e327c58565cbed57f19311 /qt-ui/diveplanner.cpp
parent545c76992a6a9fb3de59c26e782b95d30d5cd513 (diff)
downloadsubsurface-b4a609f46fb2c66798d4d56f59ce44c26fc8f3f8.tar.gz
Signal that the model changed when editing plan specific information.
Signal that the model changed when editing plan specific information, when you changes the ATM pressure or any other information, the graphic of the plan will be generated again to mirror your actual dive. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 10ee31e5d..cd0eaceec 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -983,26 +983,31 @@ void DivePlannerPointsModel::createPlan()
void DivePlannerPointsModel::setBottomSac(int sac)
{
diveplan.bottomsac = sac;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
void DivePlannerPointsModel::setDecoSac(int sac)
{
diveplan.decosac = sac;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
void DivePlannerPointsModel::setGFHigh(short int gfhigh)
{
diveplan.gfhigh = gfhigh;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
void DivePlannerPointsModel::setGFLow(short int ghflow)
{
diveplan.gflow = ghflow;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
void DivePlannerPointsModel::setSurfacePressure(int pressure)
{
diveplan.surface_pressure = pressure;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
void DivePlannerPointsModel::setLastStop6m(bool value)
@@ -1012,6 +1017,7 @@ void DivePlannerPointsModel::setLastStop6m(bool value)
void DivePlannerPointsModel::setStartTime(const QTime& t)
{
diveplan.when = t.msec();
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
}
bool divePointsLessThan(const divedatapoint& p1, const divedatapoint& p2){