mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Reduce the bleeding in my eyes
This is all just coding style and white space cleanup. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f780a56847
commit
dda28c76aa
1 changed files with 54 additions and 55 deletions
|
@ -1296,14 +1296,14 @@ private:
|
|||
stats_t stats_interval;
|
||||
};
|
||||
|
||||
YearStatisticsItem::YearStatisticsItem(stats_t interval)
|
||||
: stats_interval(interval)
|
||||
YearStatisticsItem::YearStatisticsItem(stats_t interval) : stats_interval(interval)
|
||||
{
|
||||
}
|
||||
|
||||
QVariant YearStatisticsItem::data(int column, int role) const
|
||||
{
|
||||
const char *unit;
|
||||
double value;
|
||||
QVariant ret;
|
||||
|
||||
if (role != Qt::DisplayRole){
|
||||
|
@ -1323,24 +1323,24 @@ QVariant YearStatisticsItem::data(int column, int role) const
|
|||
case AVG_SAC: ret = stats_interval.avg_sac.mliter; break;
|
||||
case MIN_SAC: ret = stats_interval.min_sac.mliter; break;
|
||||
case MAX_SAC: ret = stats_interval.max_sac.mliter; break;
|
||||
case AVG_TEMP:{
|
||||
case AVG_TEMP:
|
||||
get_temp_units(stats_interval.min_temp, &unit);
|
||||
if (stats_interval.combined_temp && stats_interval.combined_count) {
|
||||
ret = QString("%1 %2").arg(stats_interval.combined_temp / stats_interval.combined_count).arg(unit);
|
||||
}
|
||||
}break;
|
||||
case MIN_TEMP:{
|
||||
double value = get_temp_units(stats_interval.min_temp, &unit);
|
||||
break;
|
||||
case MIN_TEMP:
|
||||
value = get_temp_units(stats_interval.min_temp, &unit);
|
||||
if (value > -100.0) {
|
||||
ret = QString("%1 %2").arg(value).arg(unit);
|
||||
}
|
||||
}break;
|
||||
case MAX_TEMP:{
|
||||
double value = get_temp_units(stats_interval.max_temp, &unit);
|
||||
break;
|
||||
case MAX_TEMP:
|
||||
value = get_temp_units(stats_interval.max_temp, &unit);
|
||||
if (value > -100.0) {
|
||||
ret = QString("%1 %2").arg(value).arg(unit);
|
||||
}
|
||||
}break;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1354,9 +1354,8 @@ YearlyStatisticsModel::YearlyStatisticsModel(QObject* parent)
|
|||
QVariant YearlyStatisticsModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
QVariant val;
|
||||
if (role == Qt::FontRole){
|
||||
if (role == Qt::FontRole)
|
||||
val = defaultModelFont();
|
||||
}
|
||||
|
||||
if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
|
||||
switch(section) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue