From 00c97e710f0090b3a2a8d5fe5b92e5ac0207a4b9 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 7 Mar 2014 13:31:47 -0300 Subject: Remove a Lot of Dead Code. This is just removal of dead code from the old profile, probably there's still a bit more to remove, but this is a very good cleanup already. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 1 - qt-ui/profile/divetooltipitem.cpp | 17 ----------------- qt-ui/profile/divetooltipitem.h | 1 - 3 files changed, 19 deletions(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 77db58eca..454fab0c9 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -5,7 +5,6 @@ #include "divetextitem.h" #include "profile.h" #include "dive.h" -#include "profilegraphics.h" #include "preferences.h" #include "helpers.h" diff --git a/qt-ui/profile/divetooltipitem.cpp b/qt-ui/profile/divetooltipitem.cpp index 0442f0793..c11266a5a 100644 --- a/qt-ui/profile/divetooltipitem.cpp +++ b/qt-ui/profile/divetooltipitem.cpp @@ -37,23 +37,6 @@ void ToolTipItem::addToolTip(const QString &toolTip, const QIcon &icon) expand(); } -void ToolTipItem::refresh(struct graphics_context *gc, QPointF pos) -{ - clear(); - int time = (pos.x() * gc->maxtime) / gc->maxx; - struct membuffer mb = { 0 }; - - get_plot_details(gc, time, &mb); - addToolTip(QString::fromUtf8(mb.buffer, mb.len)); - free_buffer(&mb); - - QList items = scene()->items(pos, Qt::IntersectsItemShape, Qt::DescendingOrder, transform()); - Q_FOREACH(QGraphicsItem * item, items) { - if (!item->toolTip().isEmpty()) - addToolTip(item->toolTip()); - } -} - void ToolTipItem::clear() { Q_FOREACH(ToolTip t, toolTips) { diff --git a/qt-ui/profile/divetooltipitem.h b/qt-ui/profile/divetooltipitem.h index 566b21770..1f84d0664 100644 --- a/qt-ui/profile/divetooltipitem.h +++ b/qt-ui/profile/divetooltipitem.h @@ -41,7 +41,6 @@ public: void expand(); void clear(); void addToolTip(const QString &toolTip, const QIcon &icon = QIcon()); - void refresh(struct graphics_context *gc, QPointF pos); void refresh(const QPointF &pos); bool isExpanded() const; void persistPos(); -- cgit v1.2.3-70-g09d2