MCPcopy Create free account
hub / github.com/YACReader/yacreader / showRenameCurrentList

Method showRenameCurrentList

YACReaderLibrary/library_window.cpp:1307–1322  ·  view source on GitHub ↗

TODO implement editors in treeview

Source from the content-addressed store, hash-verified

1305
1306// TODO implement editors in treeview
1307void 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
1324void LibraryWindow::addSelectedComicsToFavorites()
1325{

Callers

nothing calls this directly

Calls 6

selectedIndexesMethod · 0.80
isEmptyMethod · 0.80
isEditableMethod · 0.80
selectionModelMethod · 0.45
nameMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected