25 const int HEADER_OFFSET = 1;
26 const int NUM_LEGEND_ROWS_UNSPANNED = 2;
34 if ((role == Qt::BackgroundRole) &&
35 !m_pointIdentifier.isEmpty () &&
36 (index.row () == m_rowToBeHighlighted)) {
39 return QVariant (QColor (230, 230, 230));
42 bool ambiguousSegment = ((role == Qt::BackgroundRole) &&
43 (m_ambiguousRows.contains (index.row () - HEADER_OFFSET)));
44 bool ambiguousFootnote = ((role == Qt::BackgroundRole) &&
45 (m_ambiguousRows.size () > 0) &&
46 (index.row () >= rowCount () - NUM_LEGEND_ROWS_UNSPANNED));
47 if (ambiguousSegment || ambiguousFootnote) {
50 return QVariant (QColor (255, 0, 0, 50));
54 return QStandardItemModel::data (index, role);
86 <<
" rows=" << rowCount()
87 <<
" cols=" << columnCount()
88 <<
" identifier=" << pointIdentifier.toLatin1().data();
90 m_pointIdentifier = pointIdentifier;
93 if (!m_pointIdentifier.isEmpty ()) {
96 m_rowToBeHighlighted = rowToBeHighlighted();
97 rowTransitioned = m_rowToBeHighlighted;
102 rowTransitioned = m_rowToBeHighlighted;
107 QModelIndex indexTopLeft = createIndex (rowTransitioned, 0);
108 QModelIndex indexBottomRight = createIndex (rowTransitioned, columnCount() - 1);
111 roles << Qt::BackgroundRole;
113 emit dataChanged (indexTopLeft,