summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveplotdatamodel.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 11:50:56 +0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-16 11:50:56 +0700
commita27f67c02612791fad73b4e0550d942dc3a5a339 (patch)
tree4417a2be34c8bcd7c03db23ba5f307ad463657a9 /qt-ui/profile/diveplotdatamodel.cpp
parent3387ccc6f676636fe3fb8b11c8c371f627d74551 (diff)
downloadsubsurface-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/diveplotdatamodel.cpp')
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index a5506139f..4ecf3ebb5 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -23,19 +23,19 @@ QVariant DivePlotDataModel::data(const QModelIndex& index, int role) const
return QVariant();
plot_data item = plotData[index.row()];
- if (role == Qt::DisplayRole){
- switch(index.column()){
- case DEPTH: return item.depth;
- case TIME: return item.sec;
- case PRESSURE: return item.pressure[0];
- case TEMPERATURE: return item.temperature;
- case COLOR: return item.velocity;
- case USERENTERED: return false;
+ if (role == Qt::DisplayRole) {
+ switch (index.column()) {
+ case DEPTH: return item.depth;
+ case TIME: return item.sec;
+ case PRESSURE: return item.pressure[0];
+ case TEMPERATURE: return item.temperature;
+ case COLOR: return item.velocity;
+ case USERENTERED: return false;
}
}
- if (role == Qt::BackgroundRole){
- switch(index.column()){
- case COLOR: return getColor((color_indice_t)(VELOCITY_COLORS_START_IDX + item.velocity));
+ if (role == Qt::BackgroundRole) {
+ switch (index.column()) {
+ case COLOR: return getColor((color_indice_t)(VELOCITY_COLORS_START_IDX + item.velocity));
}
}
return QVariant();
@@ -54,20 +54,20 @@ QVariant DivePlotDataModel::headerData(int section, Qt::Orientation orientation,
if (role != Qt::DisplayRole)
return QVariant();
- switch(section){
- case DEPTH: return tr("Depth");
- case TIME: return tr("Time");
- case PRESSURE: return tr("Pressure");
- case TEMPERATURE: return tr("Temperature");
- case COLOR: return tr("Color");
- case USERENTERED: return tr("User Entered");
+ switch (section) {
+ case DEPTH: return tr("Depth");
+ case TIME: return tr("Time");
+ case PRESSURE: return tr("Pressure");
+ case TEMPERATURE: return tr("Temperature");
+ case COLOR: return tr("Color");
+ case USERENTERED: return tr("User Entered");
}
return QVariant();
}
void DivePlotDataModel::clear()
{
- if(rowCount() != 0){
+ if (rowCount() != 0) {
beginRemoveRows(QModelIndex(), 0, rowCount() - 1);
endRemoveRows();
}