summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-23 22:25:49 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 07:34:32 -0700
commit93f35971c634d6badea8df3124062a4ad7c919f0 (patch)
treef7925f217588688fb698420e759697cebb2535b2
parentf67693b2e0dc8dc8e89a44b2db17fc1f6bc64931 (diff)
downloadsubsurface-93f35971c634d6badea8df3124062a4ad7c919f0.tar.gz
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>
-rw-r--r--qt-ui/diveplanner.cpp80
-rw-r--r--qt-ui/diveplanner.h8
2 files changed, 0 insertions, 88 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index b594861ae..21fa08507 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -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);
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 524c95f55..e5bdcaa04 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -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);