From e6c294f718c37e24729132c586b73b1dc0047acf Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 23 May 2014 21:29:14 -0300 Subject: Remove code already ported to the new profile. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 31 ------------------------------- qt-ui/diveplanner.h | 2 -- 2 files changed, 33 deletions(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 6ea88e1e3..2c0b429d0 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -480,37 +480,6 @@ void DivePlannerGraphics::mouseMoveEvent(QMouseEvent *event) #endif } -void DivePlannerGraphics::mousePressEvent(QMouseEvent *event) -{ - if (event->modifiers()) { - QGraphicsView::mousePressEvent(event); - return; - } - - QPointF mappedPos = mapToScene(event->pos()); - if (event->button() == Qt::LeftButton) { - Q_FOREACH (QGraphicsItem *item, scene()->items(mappedPos, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder, transform())) { - if (DiveHandler *h = qgraphicsitem_cast(item)) { - activeDraggedHandler = h; - activeDraggedHandler->setBrush(Qt::red); - originalHandlerPos = activeDraggedHandler->pos(); - } - } - } - QGraphicsView::mousePressEvent(event); -} - -void DivePlannerGraphics::mouseReleaseEvent(QMouseEvent *event) -{ - if (activeDraggedHandler) { - /* we already deal with all the positioning in the life update, - * so all we need to do here is change the color of the handler */ - activeDraggedHandler->setBrush(QBrush(Qt::white)); - activeDraggedHandler = 0; - drawProfile(); - } -} - DiveHandler::DiveHandler() : QGraphicsEllipseItem() { setRect(-5, -5, 10, 10); diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index a56d403fc..e6b534430 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -160,8 +160,6 @@ protected: virtual void showEvent(QShowEvent *event); virtual void resizeEvent(QResizeEvent *event); virtual void mouseMoveEvent(QMouseEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *event); qreal fromPercent(qreal percent, Qt::Orientation orientation); public slots: -- cgit v1.2.3-70-g09d2