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;
|
stats_t stats_interval;
|
||||||
};
|
};
|
||||||
|
|
||||||
YearStatisticsItem::YearStatisticsItem(stats_t interval)
|
YearStatisticsItem::YearStatisticsItem(stats_t interval) : stats_interval(interval)
|
||||||
: stats_interval(interval)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant YearStatisticsItem::data(int column, int role) const
|
QVariant YearStatisticsItem::data(int column, int role) const
|
||||||
{
|
{
|
||||||
const char *unit;
|
const char *unit;
|
||||||
|
double value;
|
||||||
QVariant ret;
|
QVariant ret;
|
||||||
|
|
||||||
if (role != Qt::DisplayRole){
|
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 AVG_SAC: ret = stats_interval.avg_sac.mliter; break;
|
||||||
case MIN_SAC: ret = stats_interval.min_sac.mliter; break;
|
case MIN_SAC: ret = stats_interval.min_sac.mliter; break;
|
||||||
case MAX_SAC: ret = stats_interval.max_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);
|
get_temp_units(stats_interval.min_temp, &unit);
|
||||||
if (stats_interval.combined_temp && stats_interval.combined_count) {
|
if (stats_interval.combined_temp && stats_interval.combined_count) {
|
||||||
ret = QString("%1 %2").arg(stats_interval.combined_temp / stats_interval.combined_count).arg(unit);
|
ret = QString("%1 %2").arg(stats_interval.combined_temp / stats_interval.combined_count).arg(unit);
|
||||||
}
|
}
|
||||||
}break;
|
break;
|
||||||
case MIN_TEMP:{
|
case MIN_TEMP:
|
||||||
double value = get_temp_units(stats_interval.min_temp, &unit);
|
value = get_temp_units(stats_interval.min_temp, &unit);
|
||||||
if (value > -100.0) {
|
if (value > -100.0) {
|
||||||
ret = QString("%1 %2").arg(value).arg(unit);
|
ret = QString("%1 %2").arg(value).arg(unit);
|
||||||
}
|
}
|
||||||
}break;
|
break;
|
||||||
case MAX_TEMP:{
|
case MAX_TEMP:
|
||||||
double value = get_temp_units(stats_interval.max_temp, &unit);
|
value = get_temp_units(stats_interval.max_temp, &unit);
|
||||||
if (value > -100.0) {
|
if (value > -100.0) {
|
||||||
ret = QString("%1 %2").arg(value).arg(unit);
|
ret = QString("%1 %2").arg(value).arg(unit);
|
||||||
}
|
}
|
||||||
}break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1354,9 +1354,8 @@ YearlyStatisticsModel::YearlyStatisticsModel(QObject* parent)
|
||||||
QVariant YearlyStatisticsModel::headerData(int section, Qt::Orientation orientation, int role) const
|
QVariant YearlyStatisticsModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
{
|
{
|
||||||
QVariant val;
|
QVariant val;
|
||||||
if (role == Qt::FontRole){
|
if (role == Qt::FontRole)
|
||||||
val = defaultModelFont();
|
val = defaultModelFont();
|
||||||
}
|
|
||||||
|
|
||||||
if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
|
if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
|
||||||
switch(section) {
|
switch(section) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue