diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-27 20:09:57 -0800 |
commit | 76e6420f6b3503b76bd3eec00ab0e53d6ea17a20 (patch) | |
tree | 8b50298f41bd29d55bbd6f4301f36ad31dc0b008 /qt-ui/profile/diveeventitem.cpp | |
parent | 006265d7a088cff4fea665159dbb454956c2cd76 (diff) | |
download | subsurface-76e6420f6b3503b76bd3eec00ab0e53d6ea17a20.tar.gz |
Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveeventitem.cpp')
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index f3740ef08..40d9e7263 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -6,26 +6,29 @@ #include "dive.h" #include <QDebug> -DiveEventItem::DiveEventItem(QObject* parent): DivePixmapItem(parent), - vAxis(NULL), hAxis(NULL), dataModel(NULL), internalEvent(NULL) +DiveEventItem::DiveEventItem(QObject *parent) : DivePixmapItem(parent), + vAxis(NULL), + hAxis(NULL), + dataModel(NULL), + internalEvent(NULL) { setFlag(ItemIgnoresTransformations); } -void DiveEventItem::setHorizontalAxis(DiveCartesianAxis* axis) +void DiveEventItem::setHorizontalAxis(DiveCartesianAxis *axis) { hAxis = axis; recalculatePos(true); } -void DiveEventItem::setModel(DivePlotDataModel* model) +void DiveEventItem::setModel(DivePlotDataModel *model) { dataModel = model; recalculatePos(true); } -void DiveEventItem::setVerticalAxis(DiveCartesianAxis* axis) +void DiveEventItem::setVerticalAxis(DiveCartesianAxis *axis) { vAxis = axis; recalculatePos(true); @@ -37,7 +40,7 @@ struct event *DiveEventItem::getEvent() return internalEvent; } -void DiveEventItem::setEvent(struct event* ev) +void DiveEventItem::setEvent(struct event *ev) { if (!ev) return; @@ -49,7 +52,7 @@ void DiveEventItem::setEvent(struct event* ev) void DiveEventItem::setupPixmap() { -#define EVENT_PIXMAP( PIX ) QPixmap(QString(PIX)).scaled(20, 20, Qt::KeepAspectRatio, Qt::SmoothTransformation) +#define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(20, 20, Qt::KeepAspectRatio, Qt::SmoothTransformation) if (!internalEvent->name) { setPixmap(EVENT_PIXMAP(":warning")); } else if ((strcmp(internalEvent->name, "bookmark") == 0)) { @@ -84,7 +87,7 @@ void DiveEventItem::setupToolTipString() else name += QString(tr("EAN%1")).arg(o2); } else if (name == "SP change") { - name += QString(":%1").arg((double) value / 1000); + name += QString(":%1").arg((double)value / 1000); } else { name += QString(":%1").arg(value); } @@ -98,7 +101,7 @@ void DiveEventItem::setupToolTipString() setToolTip(name); } -void DiveEventItem::eventVisibilityChanged(const QString& eventName, bool visible) +void DiveEventItem::eventVisibilityChanged(const QString &eventName, bool visible) { } @@ -107,7 +110,7 @@ void DiveEventItem::recalculatePos(bool instant) if (!vAxis || !hAxis || !internalEvent || !dataModel) return; - QModelIndexList result = dataModel->match(dataModel->index(0,DivePlotDataModel::TIME), Qt::DisplayRole, internalEvent->time.seconds ); + QModelIndexList result = dataModel->match(dataModel->index(0, DivePlotDataModel::TIME), Qt::DisplayRole, internalEvent->time.seconds); if (result.isEmpty()) { Q_ASSERT("can't find a spot in the dataModel"); hide(); @@ -122,5 +125,5 @@ void DiveEventItem::recalculatePos(bool instant) if (!instant) Animations::moveTo(this, x, y, 500); else - setPos(x,y); + setPos(x, y); } |