summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-23 21:29:14 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 07:31:27 -0700
commite6c294f718c37e24729132c586b73b1dc0047acf (patch)
tree19db427090d356045885b84adf2464013e57cfdd
parent963178d3d4513b9c3e9a67ae56ae7e9fa6248304 (diff)
downloadsubsurface-e6c294f718c37e24729132c586b73b1dc0047acf.tar.gz
Remove code already ported to the new profile.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/diveplanner.cpp31
-rw-r--r--qt-ui/diveplanner.h2
2 files changed, 0 insertions, 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<DiveHandler *>(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: