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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-03-07 13:31:47 -03:00 committed by Dirk Hohndel
parent 8f43ad8100
commit 00c97e710f
7 changed files with 1 additions and 326 deletions

View file

@ -6,7 +6,6 @@
#include <QTableView>
#include <QHeaderView>
#include "mainwindow.h"
#include "profilegraphics.h"
#include "../dive.h"
#include "../display.h"
#include "printdialog.h"

View file

@ -5,7 +5,6 @@
#include "divetextitem.h"
#include "profile.h"
#include "dive.h"
#include "profilegraphics.h"
#include "preferences.h"
#include "helpers.h"

View file

@ -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<QGraphicsItem *> 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) {

View file

@ -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();