diff --git a/src/Core/RideCacheModel.cpp b/src/Core/RideCacheModel.cpp index b47b4664a..e286abfdc 100644 --- a/src/Core/RideCacheModel.cpp +++ b/src/Core/RideCacheModel.cpp @@ -76,7 +76,7 @@ RideCacheModel::data(const QModelIndex &index, int role) const case 2 : return item->dateTime; case 3 : return item->present; case 4 : return item->color.name(); - case 5 : return item->isRun; + case 5 : return item->planned; default: { @@ -196,7 +196,7 @@ RideCacheModel::configChanged(qint32) // 2 QDateTime dateTime; // 3 QString present; // 4 QColor color; - // 5 bool isRun; + // 5 bool planned; columns_ = 5 + factory->metricCount() + metadata.count(); headings_.clear(); @@ -209,7 +209,7 @@ RideCacheModel::configChanged(qint32) case 2 : headings_<< QString("ride_date"); break; case 3 : headings_<< QString("Data"); break; case 4 : headings_<< QString("color"); break; - case 5 : headings_<< QString("isRun"); break; + case 5 : headings_<< QString("planned"); break; default: { diff --git a/src/Gui/RideNavigator.cpp b/src/Gui/RideNavigator.cpp index 3ea3e827b..bcfe81243 100644 --- a/src/Gui/RideNavigator.cpp +++ b/src/Gui/RideNavigator.cpp @@ -1095,7 +1095,7 @@ void NavigatorCellDelegate::paint(QPainter *painter, const QStyleOptionViewItem bool hover = false; //disable this, its annoying option.state & QStyle::State_MouseOver; bool selected = option.state & QStyle::State_Selected; bool focus = option.state & QStyle::State_HasFocus; - //bool isRun = rideNavigator->tableView->model()->data(index, Qt::UserRole+2).toBool(); + bool planned = rideNavigator->tableView->model()->data(index, Qt::UserRole+2).toBool(); // format the cell depending upon what it is... QString columnName = rideNavigator->tableView->model()->headerData(index.column(), Qt::Horizontal).toString(); @@ -1158,11 +1158,11 @@ void NavigatorCellDelegate::paint(QPainter *painter, const QStyleOptionViewItem // basic background QBrush background = QBrush(GColor(CPLOTBACKGROUND)); - // runs are darker - //if (isRun) { - //background.setColor(background.color().darker(150)); - //userColor = userColor.darker(150); - //} + // planned activities are darker + if (planned) { + background.setColor(background.color().darker(150)); + userColor = userColor.darker(150); + } if (columnName != "*") { diff --git a/src/Gui/RideNavigatorProxy.h b/src/Gui/RideNavigatorProxy.h index 978894865..78fbab0de 100644 --- a/src/Gui/RideNavigatorProxy.h +++ b/src/Gui/RideNavigatorProxy.h @@ -68,7 +68,7 @@ private: int calendarText; int colorColumn; int fileIndex; - int isRunIndex; + int plannedIndex; int tempIndex; int dateColumn; @@ -110,15 +110,15 @@ public: calendarText = -1; colorColumn = -1; fileIndex = -1; - isRunIndex = -1; + plannedIndex = -1; tempIndex = -1; for(int i=0; icolumnCount(); i++) { if (model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString() == "average_temp") { tempIndex = i; } - if (model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString() == "isRun") { - isRunIndex = i; + if (model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString() == "planned") { + plannedIndex = i; } if (model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString() == "filename" || model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString() == tr("File")) { @@ -342,17 +342,17 @@ public: } else if (role == (Qt::UserRole+2)) { // isRUN ? - if (isRunIndex != -1 && proxyIndex.internalPointer()) { + if (plannedIndex != -1 && proxyIndex.internalPointer()) { - bool isRun = false; + bool planned = false; // hideous code, sorry int groupNo = ((QModelIndex*)proxyIndex.internalPointer())->row(); if (groupNo < 0 || groupNo >= groups.count() || proxyIndex.column() == 0) returning = false; - else isRun = sourceModel()->data(sourceModel()->index(groupToSourceRow.value(groups[groupNo])->at(proxyIndex.row()), isRunIndex)).toBool(); + else planned = sourceModel()->data(sourceModel()->index(groupToSourceRow.value(groups[groupNo])->at(proxyIndex.row()), plannedIndex)).toBool(); - returning = isRun; + returning = planned; } else { returning = false; }