mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
3387ccc6f6
commit
a27f67c026
28 changed files with 387 additions and 323 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue