Rename createDecostops to drawProfile

After all, that's what the function does.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-09-18 22:19:49 -05:00
parent 882b2c146b
commit 4141c68450
2 changed files with 11 additions and 11 deletions

View file

@ -164,7 +164,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
gasListView->hide(); gasListView->hide();
connect(gasListView, SIGNAL(activated(QModelIndex)), this, SLOT(selectGas(QModelIndex))); connect(gasListView, SIGNAL(activated(QModelIndex)), this, SLOT(selectGas(QModelIndex)));
connect(plannerModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(createDecoStops())); connect(plannerModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(drawProfile()));
connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)), connect(plannerModel, SIGNAL(rowsInserted(const QModelIndex&,int,int)),
this, SLOT(pointInserted(const QModelIndex&, int, int))); this, SLOT(pointInserted(const QModelIndex&, int, int)));
@ -185,7 +185,7 @@ void DivePlannerGraphics::pointInserted(const QModelIndex& parent, int start , i
connect(gasChooseBtn, SIGNAL(clicked()), this, SLOT(prepareSelectGas())); connect(gasChooseBtn, SIGNAL(clicked()), this, SLOT(prepareSelectGas()));
gases << gasChooseBtn; gases << gasChooseBtn;
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::keyDownAction() void DivePlannerGraphics::keyDownAction()
@ -219,7 +219,7 @@ void DivePlannerGraphics::keyUpAction()
plannerModel->editStop(row, dp); plannerModel->editStop(row, dp);
} }
} }
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::keyLeftAction() void DivePlannerGraphics::keyLeftAction()
@ -303,7 +303,7 @@ void DivePlannerGraphics::pointsRemoved(const QModelIndex& , int start, int end)
gases.pop_back(); gases.pop_back();
} }
scene()->clearSelection(); scene()->clearSelection();
createDecoStops(); drawProfile();
} }
bool intLessThan(int a, int b){ bool intLessThan(int a, int b){
@ -343,7 +343,7 @@ void DivePlannerGraphics::increaseDepth()
return; return;
depthLine->setMaximum( depthLine->maximum() + 10); depthLine->setMaximum( depthLine->maximum() + 10);
depthLine->updateTicks(); depthLine->updateTicks();
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::increaseTime() void DivePlannerGraphics::increaseTime()
@ -351,7 +351,7 @@ void DivePlannerGraphics::increaseTime()
minMinutes += 10; minMinutes += 10;
timeLine->setMaximum( minMinutes ); timeLine->setMaximum( minMinutes );
timeLine->updateTicks(); timeLine->updateTicks();
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::decreaseDepth() void DivePlannerGraphics::decreaseDepth()
@ -370,7 +370,7 @@ void DivePlannerGraphics::decreaseDepth()
} }
depthLine->setMaximum(depthLine->maximum() - 10); depthLine->setMaximum(depthLine->maximum() - 10);
depthLine->updateTicks(); depthLine->updateTicks();
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::decreaseTime() void DivePlannerGraphics::decreaseTime()
@ -385,7 +385,7 @@ void DivePlannerGraphics::decreaseTime()
minMinutes -= 10; minMinutes -= 10;
timeLine->setMaximum(timeLine->maximum() -10); timeLine->setMaximum(timeLine->maximum() -10);
timeLine->updateTicks(); timeLine->updateTicks();
createDecoStops(); drawProfile();
} }
void DivePlannerGraphics::mouseDoubleClickEvent(QMouseEvent* event) void DivePlannerGraphics::mouseDoubleClickEvent(QMouseEvent* event)
@ -415,7 +415,7 @@ void DivePlannerGraphics::selectGas(const QModelIndex& index)
gasListView->hide(); gasListView->hide();
} }
void DivePlannerGraphics::createDecoStops() void DivePlannerGraphics::drawProfile()
{ {
qDeleteAll(lines); qDeleteAll(lines);
lines.clear(); lines.clear();
@ -605,7 +605,7 @@ void DivePlannerGraphics::mouseReleaseEvent(QMouseEvent* event)
activeDraggedHandler->setBrush(QBrush(Qt::white)); activeDraggedHandler->setBrush(QBrush(Qt::white));
activeDraggedHandler->setPos(QPointF(xpos, ypos)); activeDraggedHandler->setPos(QPointF(xpos, ypos));
createDecoStops(); drawProfile();
activeDraggedHandler = 0; activeDraggedHandler = 0;
} }
} }

View file

@ -147,7 +147,7 @@ private slots:
void increaseDepth(); void increaseDepth();
void decreaseTime(); void decreaseTime();
void decreaseDepth();; void decreaseDepth();;
void createDecoStops(); void drawProfile();
void prepareSelectGas(); void prepareSelectGas();
void selectGas(const QModelIndex& index); void selectGas(const QModelIndex& index);
void pointInserted(const QModelIndex&, int start, int end); void pointInserted(const QModelIndex&, int start, int end);