Mercurial > hg > svcore
comparison data/model/SparseOneDimensionalModel.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 |
---|---|
136 if (column < 2) { | 136 if (column < 2) { |
137 return SparseModel<OneDimensionalPoint>::getData | 137 return SparseModel<OneDimensionalPoint>::getData |
138 (row, column, role); | 138 (row, column, role); |
139 } | 139 } |
140 | 140 |
141 PointListIterator i = getPointListIteratorForRow(row); | 141 PointListConstIterator i = getPointListIteratorForRow(row); |
142 if (i == m_points.end()) return QVariant(); | 142 if (i == m_points.end()) return QVariant(); |
143 | 143 |
144 switch (column) { | 144 switch (column) { |
145 case 2: return i->label; | 145 case 2: return i->label; |
146 default: return QVariant(); | 146 default: return QVariant(); |
153 return SparseModel<OneDimensionalPoint>::getSetDataCommand | 153 return SparseModel<OneDimensionalPoint>::getSetDataCommand |
154 (row, column, value, role); | 154 (row, column, value, role); |
155 } | 155 } |
156 | 156 |
157 if (role != Qt::EditRole) return false; | 157 if (role != Qt::EditRole) return false; |
158 PointListIterator i = getPointListIteratorForRow(row); | 158 PointListConstIterator i = getPointListIteratorForRow(row); |
159 if (i == m_points.end()) return false; | 159 if (i == m_points.end()) return false; |
160 EditCommand *command = new EditCommand(this, tr("Edit Data")); | 160 EditCommand *command = new EditCommand(this, tr("Edit Data")); |
161 | 161 |
162 Point point(*i); | 162 Point point(*i); |
163 command->deletePoint(point); | 163 command->deletePoint(point); |