| 176 | } |
| 177 | |
| 178 | QVector<QStringList> ROOTOptionsWidget::columns() const { |
| 179 | QVector<QStringList> cols; |
| 180 | |
| 181 | // ui.twColumns->selectedItems() returns the items in the order of selection. |
| 182 | // Iterate through the tree to retain the displayed order. |
| 183 | for (int t = 0; t < ui.twColumns->topLevelItemCount(); ++t) { |
| 184 | auto titem = ui.twColumns->topLevelItem(t); |
| 185 | if (titem->isSelected()) |
| 186 | cols << titem->data(0, Qt::UserRole).toStringList(); |
| 187 | for (int c = 0; c < titem->childCount(); ++c) { |
| 188 | auto citem = titem->child(c); |
| 189 | if (citem->isSelected()) |
| 190 | cols << citem->data(0, Qt::UserRole).toStringList(); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | return cols; |
| 195 | } |
| 196 | |
| 197 | void ROOTOptionsWidget::setNRows(int nrows) { |
| 198 | // try to retain the range settings: |
no test coverage detected