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/divetextitem.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/divetextitem.cpp')
-rw-r--r-- | qt-ui/profile/divetextitem.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp index 10116e19f..582cc4070 100644 --- a/qt-ui/profile/divetextitem.cpp +++ b/qt-ui/profile/divetextitem.cpp @@ -9,7 +9,7 @@ #include <QPen> #include <QDebug> -DiveTextItem::DiveTextItem(QGraphicsItem* parent): QGraphicsItemGroup(parent), +DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent), internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter), textBackgroundItem(NULL), textItem(NULL), @@ -25,7 +25,7 @@ void DiveTextItem::setAlignment(int alignFlags) updateText(); } -void DiveTextItem::setBrush(const QBrush& b) +void DiveTextItem::setBrush(const QBrush &b) { brush = b; updateText(); @@ -36,13 +36,13 @@ void DiveTextItem::setScale(double newscale) scale = newscale; } -void DiveTextItem::setText(const QString& t) +void DiveTextItem::setText(const QString &t) { internalText = t; updateText(); } -const QString& DiveTextItem::text() +const QString &DiveTextItem::text() { return internalText; } @@ -54,7 +54,7 @@ void DiveTextItem::updateText() textItem = NULL; delete textBackgroundItem; textBackgroundItem = NULL; - if(internalText.isEmpty()){ + if (internalText.isEmpty()) { return; } @@ -75,14 +75,14 @@ void DiveTextItem::updateText() QRectF rect = fm.boundingRect(internalText); yPos = (internalAlignFlags & Qt::AlignTop) ? 0 : - (internalAlignFlags & Qt::AlignBottom) ? +rect.height() : - /*(internalAlignFlags & Qt::AlignVCenter ? */ +rect.height() / 4; + (internalAlignFlags & Qt::AlignBottom) ? +rect.height() : + /*(internalAlignFlags & Qt::AlignVCenter ? */ +rect.height() / 4; - xPos = (internalAlignFlags & Qt::AlignLeft ) ? -rect.width() : - (internalAlignFlags & Qt::AlignHCenter) ? -rect.width()/2 : - /* (internalAlignFlags & Qt::AlignRight) */ 0; + xPos = (internalAlignFlags & Qt::AlignLeft) ? -rect.width() : + (internalAlignFlags & Qt::AlignHCenter) ? -rect.width() / 2 : + /* (internalAlignFlags & Qt::AlignRight) */ 0; - textPath.addText( xPos, yPos, fnt, internalText); + textPath.addText(xPos, yPos, fnt, internalText); QPainterPathStroker stroker; stroker.setWidth(3); textBackgroundItem = new QGraphicsPathItem(stroker.createStroke(textPath), this); |