QStringList DocumentEditor::bookmarkedLinesToStringList() { QStringList list; for (int i = 0; i < _bookmarks.size(); i++) { int id = _bookmarks.at(i); int xline = markerLine(id); list.append(QString::number(xline)); } return list; }
bool DocumentEditor::navigateBookmark(int id_) { int line = markerLine(id_); if (line < 0) return false; setCursorPosition(line, 0); ensureLineVisible(line); return true; }
void DocumentEditor::toggleBookmark(int margin_, int line_, Qt::KeyboardModifiers state_) { (void)margin_; (void)state_; if(markersAtLine(line_) & MARKER_BOOK_MASK) { for (int i = 0; i < _bookmarks.size(); i++) { int id = _bookmarks.at(i); int xline = markerLine(id); if (xline == line_) { markerDeleteHandle(id); _bookmarks.removeAt(i); i--; } } return; } int id = markerAdd(line_, MARKER_BOOK); _bookmarks.append(id); }
foreach(BufferId bufferId, dirtyMarkerLineBuffers) { msgId = markerLine(bufferId); if (msgId.isValid()) Core::setBufferMarkerLineMsg(userId, bufferId, msgId); }