Remove the depth / time increase and decrease functions.

The new profile code handles the resizing of the profile area in order to
accomodate the depth and time of the dive much more intuitively - the old
manual buttons to do so are no longer needed.

This also removes a few other unused methods.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-23 22:25:49 -03:00 committed by Dirk Hohndel
parent f67693b2e0
commit 93f35971c6
2 changed files with 0 additions and 88 deletions

View file

@ -122,10 +122,6 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget *parent) : QGraphicsView(parent
setRenderHint(QPainter::Antialiasing);
}
void DivePlannerGraphics::settingsChanged()
{
}
void DivePlannerGraphics::keyDownAction()
{
#if 0
@ -266,70 +262,6 @@ void DivePlannerGraphics::keyEscAction()
plannerModel->cancelPlan();
}
qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientation)
{
qreal total = orientation == Qt::Horizontal ? sceneRect().width() : sceneRect().height();
qreal result = (total * percent) / 100;
return result;
}
void DivePlannerGraphics::increaseDepth()
{
#if 0
if (depthLine->maximum() + M_OR_FT(10, 30) > MAX_DEPTH)
return;
minDepth += M_OR_FT(10, 30);
depthLine->setMaximum(minDepth);
depthLine->updateTicks();
drawProfile();
#endif
}
void DivePlannerGraphics::increaseTime()
{
#if 0
minMinutes += 10;
timeLine->setMaximum(minMinutes);
timeLine->updateTicks();
drawProfile();
#endif
}
void DivePlannerGraphics::decreaseDepth()
{
#if 0
if (depthLine->maximum() - M_OR_FT(10, 30) < MIN_DEPTH)
return;
Q_FOREACH (DiveHandler *d, handles) {
if (depthLine->valueAt(d->pos()) > depthLine->maximum() - M_OR_FT(10, 30)) {
QMessageBox::warning(MainWindow::instance(),
tr("Handler Position Error"),
tr("One or more of your stops will be lost with this operations, \n"
"Please, remove them first."));
return;
}
}
minDepth -= M_OR_FT(10, 30);
depthLine->setMaximum(minDepth);
depthLine->updateTicks();
drawProfile();
#endif
}
void DivePlannerGraphics::decreaseTime()
{
#if 0
if (timeLine->maximum() - 10 < TIME_INITIAL_MAX || timeLine->maximum() - 10 < dpMaxTime)
return;
minMinutes -= 10;
timeLine->setMaximum(timeLine->maximum() - 10);
timeLine->updateTicks();
drawProfile();
#endif
}
void DivePlannerPointsModel::createSimpleDive()
{
// plannerModel->addStop(0, 0, O2_IN_AIR, 0, 0);
@ -418,18 +350,6 @@ void DivePlannerGraphics::drawProfile()
plannerModel->deleteTemporaryPlan();
}
void DivePlannerGraphics::resizeEvent(QResizeEvent *event)
{
QGraphicsView::resizeEvent(event);
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
void DivePlannerGraphics::showEvent(QShowEvent *event)
{
QGraphicsView::showEvent(event);
fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
DiveHandler::DiveHandler() : QGraphicsEllipseItem()
{
setRect(-5, -5, 10, 10);

View file

@ -160,9 +160,6 @@ protected:
virtual void showEvent(QShowEvent *event);
virtual void resizeEvent(QResizeEvent *event);
qreal fromPercent(qreal percent, Qt::Orientation orientation);
public
slots:
void settingsChanged();
private
slots:
void keyEscAction();
@ -171,11 +168,6 @@ slots:
void keyDownAction();
void keyLeftAction();
void keyRightAction();
void increaseTime();
void increaseDepth();
void decreaseTime();
void decreaseDepth();
void drawProfile();
private:
void moveActiveHandler(const QPointF &MappedPos, const int pos);