Mercurial > hg > svcore
comparison data/model/ModelDataTableModel.cpp @ 426:2386582f67cd
* build fix
author | Chris Cannam |
---|---|
date | Mon, 16 Jun 2008 07:55:35 +0000 |
parents | f5e8f12d2e58 |
children | 72ec275e458b |
comparison
equal
deleted
inserted
replaced
425:f5e8f12d2e58 | 426:2386582f67cd |
---|---|
149 m_sort.clear(); | 149 m_sort.clear(); |
150 emit layoutChanged(); | 150 emit layoutChanged(); |
151 } | 151 } |
152 | 152 |
153 int | 153 int |
154 ModelDataTableModel::getSorted(int row) | 154 ModelDataTableModel::getSorted(int row) const |
155 { | 155 { |
156 if (m_model->isColumnTimeValue(m_sortColumn)) { | 156 if (m_model->isColumnTimeValue(m_sortColumn)) { |
157 if (m_sortOrdering == Qt::AscendingOrder) { | 157 if (m_sortOrdering == Qt::AscendingOrder) { |
158 return row; | 158 return row; |
159 } else { | 159 } else { |
174 | 174 |
175 return result; | 175 return result; |
176 } | 176 } |
177 | 177 |
178 int | 178 int |
179 ModelDataTableModel::getUnsorted(int row) | 179 ModelDataTableModel::getUnsorted(int row) const |
180 { | 180 { |
181 if (m_model->isColumnTimeValue(m_sortColumn)) { | 181 if (m_model->isColumnTimeValue(m_sortColumn)) { |
182 if (m_sortOrdering == Qt::AscendingOrder) { | 182 if (m_sortOrdering == Qt::AscendingOrder) { |
183 return row; | 183 return row; |
184 } else { | 184 } else { |
201 | 201 |
202 return result; | 202 return result; |
203 } | 203 } |
204 | 204 |
205 void | 205 void |
206 ModelDataTableModel::resort() | 206 ModelDataTableModel::resort() const |
207 { | 207 { |
208 bool numeric = (m_model->getSortType(m_sortColumn) == | 208 bool numeric = (m_model->getSortType(m_sortColumn) == |
209 TabularModel::SortNumeric); | 209 TabularModel::SortNumeric); |
210 | 210 |
211 m_sort.clear(); | 211 m_sort.clear(); |
230 | 230 |
231 // and sort now maps from original row number to sorted row number | 231 // and sort now maps from original row number to sorted row number |
232 } | 232 } |
233 | 233 |
234 void | 234 void |
235 ModelDataTableModel::resortNumeric() | 235 ModelDataTableModel::resortNumeric() const |
236 { | 236 { |
237 typedef std::multimap<double, int> MapType; | 237 typedef std::multimap<double, int> MapType; |
238 | 238 |
239 MapType rowMap; | 239 MapType rowMap; |
240 int rows = m_model->getRowCount(); | 240 int rows = m_model->getRowCount(); |
250 | 250 |
251 // rsort now maps from sorted row number to original row number | 251 // rsort now maps from sorted row number to original row number |
252 } | 252 } |
253 | 253 |
254 void | 254 void |
255 ModelDataTableModel::resortAlphabetical() | 255 ModelDataTableModel::resortAlphabetical() const |
256 { | 256 { |
257 typedef std::multimap<QString, int> MapType; | 257 typedef std::multimap<QString, int> MapType; |
258 | 258 |
259 MapType rowMap; | 259 MapType rowMap; |
260 int rows = m_model->getRowCount(); | 260 int rows = m_model->getRowCount(); |