TODO implement editors in treeview
| 1305 | |
| 1306 | // TODO implement editors in treeview |
| 1307 | void LibraryWindow::showRenameCurrentList() |
| 1308 | { |
| 1309 | QModelIndexList selectedLists = listsView->selectionModel()->selectedIndexes(); |
| 1310 | if (!selectedLists.isEmpty()) { |
| 1311 | QModelIndex mi = listsModelProxy->mapToSource(selectedLists.at(0)); |
| 1312 | if (listsModel->isEditable(mi)) { |
| 1313 | bool ok; |
| 1314 | QString newListName = QInputDialog::getText(this, tr("Rename list name"), |
| 1315 | tr("List name:"), QLineEdit::Normal, |
| 1316 | listsModel->name(mi), &ok); |
| 1317 | |
| 1318 | if (ok) |
| 1319 | listsModel->rename(mi, newListName); |
| 1320 | } |
| 1321 | } |
| 1322 | } |
| 1323 | |
| 1324 | void LibraryWindow::addSelectedComicsToFavorites() |
| 1325 | { |
nothing calls this directly
no test coverage detected