mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
The never ending, futile fight for whitespace consistency
I just need to write a tool that does this... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7757363953
commit
115e5e5fbc
16 changed files with 116 additions and 130 deletions
|
@ -57,10 +57,9 @@ QWidget* TankInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewI
|
|||
comboDelegate->setModel(model);
|
||||
int i;
|
||||
for (i = 0; i < model->rowCount(); i++) {
|
||||
if (model->data(model->index(i,0), Qt::DisplayRole).toString() == data){
|
||||
if (model->data(model->index(i,0), Qt::DisplayRole).toString() == data)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i != model->rowCount())
|
||||
comboDelegate->setCurrentIndex(i);
|
||||
return comboDelegate;
|
||||
|
|
|
@ -103,13 +103,10 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
|
|||
ret = QString("%1%").arg((cyl->gasmix.he.permille + 5) / 10);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (role == Qt::DecorationRole){
|
||||
if (index.column() == REMOVE){
|
||||
} else if (role == Qt::DecorationRole) {
|
||||
if (index.column() == REMOVE)
|
||||
ret = QIcon(":trash");
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -312,13 +309,10 @@ QVariant WeightModel::data(const QModelIndex& index, int role) const
|
|||
ret = get_weight_string(ws->weight, TRUE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
else if (role == Qt::DecorationRole){
|
||||
if (index.column() == REMOVE){
|
||||
} else if (role == Qt::DecorationRole) {
|
||||
if (index.column() == REMOVE)
|
||||
ret = QIcon(":trash");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -438,8 +438,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->pn2));
|
||||
}
|
||||
}
|
||||
|
@ -457,8 +456,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->pn2));
|
||||
}
|
||||
}
|
||||
|
@ -479,8 +477,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->phe));
|
||||
}
|
||||
}
|
||||
|
@ -498,8 +495,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->phe));
|
||||
}
|
||||
}
|
||||
|
@ -518,8 +514,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->po2));
|
||||
}
|
||||
}
|
||||
|
@ -535,8 +530,7 @@ void ProfileGraphicsView::plot_pp_gas_profile()
|
|||
item->setPen(QPen(c));
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(entry->sec, entry->po2));
|
||||
}
|
||||
}
|
||||
|
@ -1168,8 +1162,7 @@ void ProfileGraphicsView::plot_temperature_profile()
|
|||
item->setPen(pen);
|
||||
scene()->addItem(item);
|
||||
from = to;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
from = QPointF(SCALEGC(sec, mkelvin));
|
||||
}
|
||||
last = mkelvin;
|
||||
|
|
Loading…
Add table
Reference in a new issue