| 856 | } |
| 857 | |
| 858 | void |
| 859 | TreeCanvas::bookmarkNode(void) { |
| 860 | QMutexLocker locker(&mutex); |
| 861 | if (!currentNode->isBookmarked()) { |
| 862 | bool ok; |
| 863 | QString text = |
| 864 | QInputDialog::getText(this, "Add bookmark", "Name:", |
| 865 | QLineEdit::Normal,"",&ok); |
| 866 | if (ok) { |
| 867 | currentNode->setBookmarked(true); |
| 868 | bookmarks.append(currentNode); |
| 869 | if (text == "") |
| 870 | text = QString("Node ")+QString().setNum(bookmarks.size()); |
| 871 | emit addedBookmark(text); |
| 872 | } |
| 873 | } else { |
| 874 | currentNode->setBookmarked(false); |
| 875 | int idx = bookmarks.indexOf(currentNode); |
| 876 | bookmarks.remove(idx); |
| 877 | emit removedBookmark(idx); |
| 878 | } |
| 879 | currentNode->dirtyUp(*na); |
| 880 | update(); |
| 881 | } |
| 882 | |
| 883 | void |
| 884 | TreeCanvas::setPath(void) { |
nothing calls this directly
no test coverage detected