forked from organicmaps/organicmaps-tmp
Show segment status near segment id. It shows status code for now.
This commit is contained in:
parent
2a908ef855
commit
688f086b2e
1 changed files with 4 additions and 1 deletions
|
@ -212,7 +212,7 @@ int TrafficMode::rowCount(const QModelIndex & parent) const
|
|||
return static_cast<int>(m_segments.size());
|
||||
}
|
||||
|
||||
int TrafficMode::columnCount(const QModelIndex & parent) const { return 1; }
|
||||
int TrafficMode::columnCount(const QModelIndex & parent) const { return 2; }
|
||||
|
||||
QVariant TrafficMode::data(const QModelIndex & index, int role) const
|
||||
{
|
||||
|
@ -228,6 +228,9 @@ QVariant TrafficMode::data(const QModelIndex & index, int role) const
|
|||
if (index.column() == 0)
|
||||
return m_segments[index.row()].GetPartnerSegmentId();
|
||||
|
||||
if (index.column() == 1)
|
||||
return static_cast<int>(m_segments[index.row()].GetStatus());
|
||||
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue