Mercurial > hg > svcore
comparison data/model/SparseTimeValueModel.h @ 606:1415e35881f6
* Some (incomplete) Solaris build bobs
| author | Chris Cannam | 
|---|---|
| date | Thu, 10 Sep 2009 14:17:59 +0000 | 
| parents | e43368ec5ff0 | 
| children | e22b6e89a7f7 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 605:133418f4e74c | 606:1415e35881f6 | 
|---|---|
| 126 if (column < 2) { | 126 if (column < 2) { | 
| 127 return SparseValueModel<TimeValuePoint>::getData | 127 return SparseValueModel<TimeValuePoint>::getData | 
| 128 (row, column, role); | 128 (row, column, role); | 
| 129 } | 129 } | 
| 130 | 130 | 
| 131 PointListIterator i = getPointListIteratorForRow(row); | 131 PointListConstIterator i = getPointListIteratorForRow(row); | 
| 132 if (i == m_points.end()) return QVariant(); | 132 if (i == m_points.end()) return QVariant(); | 
| 133 | 133 | 
| 134 switch (column) { | 134 switch (column) { | 
| 135 case 2: | 135 case 2: | 
| 136 if (role == Qt::EditRole || role == SortRole) return i->value; | 136 if (role == Qt::EditRole || role == SortRole) return i->value; | 
| 146 return SparseValueModel<TimeValuePoint>::getSetDataCommand | 146 return SparseValueModel<TimeValuePoint>::getSetDataCommand | 
| 147 (row, column, value, role); | 147 (row, column, value, role); | 
| 148 } | 148 } | 
| 149 | 149 | 
| 150 if (role != Qt::EditRole) return false; | 150 if (role != Qt::EditRole) return false; | 
| 151 PointListIterator i = getPointListIteratorForRow(row); | 151 PointListConstIterator i = getPointListIteratorForRow(row); | 
| 152 if (i == m_points.end()) return false; | 152 if (i == m_points.end()) return false; | 
| 153 EditCommand *command = new EditCommand(this, tr("Edit Data")); | 153 EditCommand *command = new EditCommand(this, tr("Edit Data")); | 
| 154 | 154 | 
| 155 Point point(*i); | 155 Point point(*i); | 
| 156 command->deletePoint(point); | 156 command->deletePoint(point); | 
