diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-01-16 11:50:56 +0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-16 11:50:56 +0700 |
commit | a27f67c02612791fad73b4e0550d942dc3a5a339 (patch) | |
tree | 4417a2be34c8bcd7c03db23ba5f307ad463657a9 /qt-ui/profile/diveprofileitem.cpp | |
parent | 3387ccc6f676636fe3fb8b11c8c371f627d74551 (diff) | |
download | subsurface-a27f67c02612791fad73b4e0550d942dc3a5a339.tar.gz |
Whitespace and coding style updates
Another futile attempt to cleanup the code and make coding style and
whitespace consistent. I tried to add a file that describes the key points
of our coding style. I have no illusions that this will help the least
bit...
This commit should ONLY change whitespace
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index dbdddbb8b..94aaf4363 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -10,6 +10,7 @@ DiveProfileItem::DiveProfileItem(): QObject(), QGraphicsPolygonItem(), hAxis(NULL), hDataColumn(-1), dataModel(NULL), vAxis(NULL), vDataColumn(-1) { + } void DiveProfileItem::setHorizontalAxis(DiveCartesianAxis* horizontal) @@ -54,7 +55,7 @@ void DiveProfileItem::modelDataChanged() // is an array of QPointF's, so we basically get the point from the model, convert // to our coordinates, store. no painting is done here. QPolygonF poly; - for(int i = 0, modelDataCount = dataModel->rowCount(); i < modelDataCount; i++){ + for (int i = 0, modelDataCount = dataModel->rowCount(); i < modelDataCount; i++) { qreal horizontalValue = dataModel->index(i, hDataColumn).data().toReal(); qreal verticalValue = dataModel->index(i, vDataColumn).data().toReal(); QPointF point( hAxis->posAtValue(horizontalValue), vAxis->posAtValue(verticalValue)); @@ -70,7 +71,7 @@ void DiveProfileItem::modelDataChanged() setBrush(QBrush(pat)); } -void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget){ +void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(widget); // This paints the Polygon + Background. I'm setting the pen to QPen() so we don't get a black line here, @@ -84,7 +85,7 @@ void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* o pen.setCosmetic(true); pen.setWidth(2); // This paints the colors of the velocities. - for(int i = 1, count = dataModel->rowCount(); i < count; i++){ + for (int i = 1, count = dataModel->rowCount(); i < count; i++) { QModelIndex colorIndex = dataModel->index(i, DivePlotDataModel::COLOR); pen.setBrush(QBrush(colorIndex.data(Qt::BackgroundRole).value<QColor>())); painter->setPen(pen); |