aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);