mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
8f43ad8100
commit
00c97e710f
7 changed files with 1 additions and 326 deletions
|
@ -6,7 +6,6 @@
|
|||
#include <QTableView>
|
||||
#include <QHeaderView>
|
||||
#include "mainwindow.h"
|
||||
#include "profilegraphics.h"
|
||||
#include "../dive.h"
|
||||
#include "../display.h"
|
||||
#include "printdialog.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "divetextitem.h"
|
||||
#include "profile.h"
|
||||
#include "dive.h"
|
||||
#include "profilegraphics.h"
|
||||
#include "preferences.h"
|
||||
#include "helpers.h"
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue