diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-11 10:21:04 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-10-11 10:21:04 -0300 |
commit | 1b9a4f2bf8e9de9144133a435f3470fd77975945 (patch) | |
tree | 74aa1d0972296d3d7f7b327fbabd523d91cb8aeb /qt-ui/profilegraphics.cpp | |
parent | 9ed933d033889ac841c5f38afcdd40fa588a8cb9 (diff) | |
download | subsurface-1b9a4f2bf8e9de9144133a435f3470fd77975945.tar.gz |
Good deal of whitespace fixes and code cleanup.
I just went thru all of subsurface code removing
some whitespaces issues and trying to make the
code prettyer, I also removed a few QString issues.d
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 30adef132..45d2a077a 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -67,8 +67,6 @@ ProfileGraphicsView::ProfileGraphicsView(QWidget* parent) : QGraphicsView(parent setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff); - - } /* since we cannot use translate() directly on the scene we hack on @@ -286,7 +284,6 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw) /* Depth profile */ plot_depth_profile(); - plot_events(dc); if (rulerEnabled && !printMode) @@ -300,11 +297,8 @@ void ProfileGraphicsView::plot(struct dive *d, bool forceRedraw) /* Text on top of all graphs.. */ plot_temperature_text(); - plot_depth_text(); - plot_cylinder_pressure_text(); - plot_deco_text(); /* Put the dive computer name in the lower left corner */ @@ -649,7 +643,6 @@ void ProfileGraphicsView::plot_depth_sample(struct plot_data *entry,text_render_ plot_text(tro, QPointF(sec, entry->depth), QString("%1").arg(d, 0, 'f', 1)); } - void ProfileGraphicsView::plot_temperature_text() { int i; @@ -768,13 +761,11 @@ void ProfileGraphicsView::plot_cylinder_pressure(struct divecomputer *dc) scene()->addItem(item); } - from = QPointF(SCALEGC(entry->sec, mbar)); last_index = entry->cylinderindex; } } - /* set the color for the pressure plot according to temporary sac rate * as compared to avg_sac; the calculation simply maps the delta between * sac and avg_sac to indexes 0 .. (SAC_COLORS - 1) with everything @@ -926,7 +917,6 @@ void ProfileGraphicsView::remove_ruler() } } - void ProfileGraphicsView::plot_depth_profile() { int i, incr; @@ -1324,7 +1314,6 @@ void ToolTipItem::clear() void ToolTipItem::setRect(const QRectF& r) { - // qDeleteAll(childItems()); delete background; @@ -1355,7 +1344,6 @@ void ToolTipItem::setRect(const QRectF& r) updateTitlePosition(); } - void ToolTipItem::collapse() { QPropertyAnimation *animation = new QPropertyAnimation(this, "rect"); @@ -1370,10 +1358,8 @@ void ToolTipItem::collapse() void ToolTipItem::expand() { - - if (!title) { + if (!title) return; - } double width = 0, height = title->boundingRect().height() + SPACING; Q_FOREACH(ToolTip t, toolTips) { @@ -1418,7 +1404,6 @@ ToolTipItem::~ToolTipItem() clear(); } - void ToolTipItem::updateTitlePosition() { if (rectangle.width() < title->boundingRect().width() + SPACING*4) { @@ -1532,8 +1517,6 @@ EventItem::EventItem(QGraphicsItem* parent, bool grayscale): QGraphicsPolygonIte ball->setPen(QPen(getColor(ALERT_FG))); } - - RulerNodeItem::RulerNodeItem(QGraphicsItem *parent, graphics_context context) : QGraphicsEllipseItem(parent), gc(context), entry(NULL) , ruler(NULL) { setRect(QRect(QPoint(-8,8),QPoint(8,-8))); |