MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / openNote

Method openNote

nixnote.cpp:1539–1559  ·  view source on GitHub ↗

Open a new note. If newWindow is true it is an external note request.

Source from the content-addressed store, hash-verified

1537//* note request.
1538//************************************************************
1539void NixNote::openNote(bool newWindow) {
1540 saveContents();
1541 FilterCriteria *criteria = global.filterCriteria[global.filterPosition];
1542 qint32 lid;
1543 if (criteria->isLidSet()) {
1544 lid = criteria->getLid();
1545 if (newWindow)
1546 tabWindow->openNote(lid, NTabWidget::NewTab);
1547 else
1548 tabWindow->openNote(lid, NTabWidget::CurrentTab);
1549 } else {
1550 tabWindow->openNote(-1, NTabWidget::CurrentTab);
1551 }
1552 rightArrowButton->setEnabled(false);
1553 leftArrowButton->setEnabled(false);
1554 if (global.filterPosition+1 < global.filterCriteria.size())
1555 rightArrowButton->setEnabled(true);
1556 if (global.filterPosition > 0)
1557 leftArrowButton->setEnabled(true);
1558 checkReadOnlyNotebook();
1559}
1560
1561
1562

Callers 3

openExternalNoteMethod · 0.45
newExternalNoteMethod · 0.45

Calls 3

isLidSetMethod · 0.80
setEnabledMethod · 0.80
getLidMethod · 0.45

Tested by

no test coverage detected